summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa
diff options
context:
space:
mode:
authorSilenio Quarti <Silenio_Quarti@ca.ibm.com>2011-09-07 14:18:44 -0400
committerSilenio Quarti <Silenio_Quarti@ca.ibm.com>2011-09-07 14:18:44 -0400
commit4222a621d2928b548c2e30cc0978e442beedb1d5 (patch)
treea1c67627e9c0255f6985e358bfb9c500f3a837c8 /bundles/org.eclipse.swt/Eclipse SWT PI/cocoa
parent4f704108b0528d9c77c54499cc20715a8573c665 (diff)
downloadeclipse.platform.swt-4222a621d2928b548c2e30cc0978e442beedb1d5.tar.gz
eclipse.platform.swt-4222a621d2928b548c2e30cc0978e442beedb1d5.tar.xz
eclipse.platform.swt-4222a621d2928b548c2e30cc0978e442beedb1d5.zip
Bug 343331 - [Mac] GLCanvas draws on top of fast views
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c27
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java5
6 files changed, 56 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
index c9489cb283..7b91d4e421 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
@@ -8756,6 +8756,33 @@ fail:
}
#endif
+#if (!defined(NO_objc_1msgSend__II_3II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3II) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jint arg3)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJ_3II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jint arg3)
+#endif
+{
+ jint *lparg2=NULL;
+ jintLong rc = 0;
+#ifndef JNI64
+ OS_NATIVE_ENTER(env, that, objc_1msgSend__II_3II_FUNC);
+#else
+ OS_NATIVE_ENTER(env, that, objc_1msgSend__JJ_3II_FUNC);
+#endif
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jintLong)((jintLong (*)(jintLong, jintLong, jint *, jint))objc_msgSend)(arg0, arg1, lparg2, arg3);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+#ifndef JNI64
+ OS_NATIVE_EXIT(env, that, objc_1msgSend__II_3II_FUNC);
+#else
+ OS_NATIVE_EXIT(env, that, objc_1msgSend__JJ_3II_FUNC);
+#endif
+ return rc;
+}
+#endif
+
#if (!defined(NO_objc_1msgSend__II_3III) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3JII) && defined(JNI64))
#ifndef JNI64
JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3III)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2, jint arg3, jint arg4)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
index 49ce35e8d6..95d94153c2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
@@ -14,8 +14,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 629;
-int OS_nativeFunctionCallCount[629];
+int OS_nativeFunctionCount = 630;
+int OS_nativeFunctionCallCount[630];
char * OS_nativeFunctionNames[] = {
"ATSFontActivateFromFileReference",
"AcquireRootMenu",
@@ -940,6 +940,11 @@ char * OS_nativeFunctionNames[] = {
"objc_1msgSend__JJ_3J",
#endif
#ifndef JNI64
+ "objc_1msgSend__II_3II",
+#else
+ "objc_1msgSend__JJ_3II",
+#endif
+#ifndef JNI64
"objc_1msgSend__II_3III",
#else
"objc_1msgSend__JJ_3JII",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
index 1f4d61bedc..4a3efdb762 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
@@ -948,6 +948,11 @@ typedef enum {
objc_1msgSend__JJ_3J_FUNC,
#endif
#ifndef JNI64
+ objc_1msgSend__II_3II_FUNC,
+#else
+ objc_1msgSend__JJ_3II_FUNC,
+#endif
+#ifndef JNI64
objc_1msgSend__II_3III_FUNC,
#else
objc_1msgSend__JJ_3JII_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
index 8c1c2bd8a5..265e3e613f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
@@ -2119,6 +2119,11 @@
<method selector="makeCurrentContext" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method selector="setValues:forParameter:" swt_gen="true">
+ <arg swt_gen="true" swt_java_type="int[]"></arg>
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="setView:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -4800,6 +4805,8 @@
<enum name="NSNormalWindowLevel" swt_gen="true"></enum>
<enum name="NSOffState" swt_gen="true"></enum>
<enum name="NSOnState" swt_gen="true"></enum>
+ <enum name="NSOpenGLCPSurfaceOrder" swt_gen="true"></enum>
+ <enum name="NSOpenGLCPSwapInterval" swt_gen="true"></enum>
<enum name="NSOpenGLPFAAccumSize" swt_gen="true"></enum>
<enum name="NSOpenGLPFAAlphaSize" swt_gen="true"></enum>
<enum name="NSOpenGLPFAColorSize" swt_gen="true"></enum>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java
index fd688df582..d03cb56fa2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOpenGLContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -50,6 +50,10 @@ public void makeCurrentContext() {
OS.objc_msgSend(this.id, OS.sel_makeCurrentContext);
}
+public void setValues(int[] vals, int param) {
+ OS.objc_msgSend(this.id, OS.sel_setValues_forParameter_, vals, param);
+}
+
public void setView(NSView view) {
OS.objc_msgSend(this.id, OS.sel_setView_, view != null ? view.id : 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index 0ba6ac949b..29f1098290 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -1987,6 +1987,7 @@ public static final int /*long*/ sel_setUsesThreadedAnimation_ = sel_registerNam
public static final int /*long*/ sel_setValue_forHTTPHeaderField_ = sel_registerName("setValue:forHTTPHeaderField:");
public static final int /*long*/ sel_setValue_forKey_ = sel_registerName("setValue:forKey:");
public static final int /*long*/ sel_setValueWraps_ = sel_registerName("setValueWraps:");
+public static final int /*long*/ sel_setValues_forParameter_ = sel_registerName("setValues:forParameter:");
public static final int /*long*/ sel_setVerticalScroller_ = sel_registerName("setVerticalScroller:");
public static final int /*long*/ sel_setView_ = sel_registerName("setView:");
public static final int /*long*/ sel_setVisible_ = sel_registerName("setVisible:");
@@ -2332,6 +2333,8 @@ public static final int NSNonactivatingPanelMask = 128;
public static final int NSNormalWindowLevel = 0;
public static final int NSOffState = 0;
public static final int NSOnState = 1;
+public static final int NSOpenGLCPSurfaceOrder = 235;
+public static final int NSOpenGLCPSwapInterval = 222;
public static final int NSOpenGLPFAAccumSize = 14;
public static final int NSOpenGLPFAAlphaSize = 11;
public static final int NSOpenGLPFAColorSize = 8;
@@ -4047,6 +4050,8 @@ public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long
/** @method flags=cast */
public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int[] /*long[]*/ arg0, int arg1, int arg2);
/** @method flags=cast */
+public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int[] arg0, int arg1);
+/** @method flags=cast */
public static final native int objc_msgSend(int id, int sel, float arg0);
/** @method flags=cast */
public static final native long objc_msgSend(long id, long sel, int arg0);