summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2008-08-26 19:46:54 +0000
committerGrant Gayed <ggayed>2008-08-26 19:46:54 +0000
commit5a9d0980e4c56f49cd3e1d33e0b56e04218b6d4f (patch)
tree2a0967ff79c94e617ee56d495e33b42469a7773a
parent89031c932d2932e3704c8a78a3bf5194682f987f (diff)
downloadeclipse.platform.swt-5a9d0980e4c56f49cd3e1d33e0b56e04218b6d4f.tar.gz
eclipse.platform.swt-5a9d0980e4c56f49cd3e1d33e0b56e04218b6d4f.tar.xz
eclipse.platform.swt-5a9d0980e4c56f49cd3e1d33e0b56e04218b6d4f.zip
241671
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java2
7 files changed, 23 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties
index 44aafd39e8..877c00c2b6 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties
@@ -1501,6 +1501,8 @@ OS_CGContextTranslateCTM_0=cast=(CGContextRef)
OS_CGContextTranslateCTM_1=cast=(float)
OS_CGContextTranslateCTM_2=cast=(float)
+OS_CGCursorIsVisible=
+
OS_CGDataProviderCreateWithData=
OS_CGDataProviderCreateWithData_0=cast=(void *)
OS_CGDataProviderCreateWithData_1=cast=(const void *)
@@ -1530,7 +1532,7 @@ OS_CGDisplayBytesPerRow=
OS_CGDisplayBytesPerRow_0=cast=(CGDirectDisplayID)
OS_CGDisplayHideCursor=
-OS_CGDisplayHideCursor_0=
+OS_CGDisplayHideCursor_0=cast=CGDirectDisplayID
OS_CGDisplayPixelsHigh=
OS_CGDisplayPixelsHigh_0=cast=(CGDirectDisplayID)
@@ -1539,7 +1541,7 @@ OS_CGDisplayPixelsWide=
OS_CGDisplayPixelsWide_0=cast=(CGDirectDisplayID)
OS_CGDisplayShowCursor=
-OS_CGDisplayShowCursor_0=
+OS_CGDisplayShowCursor_0=cast=CGDirectDisplayID
OS_CGFontCreateWithPlatformFont=
OS_CGFontCreateWithPlatformFont_0=
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c
index 2ee7906b2a..f541e8ff9e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c
@@ -2519,6 +2519,18 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextTranslateCTM)
}
#endif
+#ifndef NO_CGCursorIsVisible
+JNIEXPORT jboolean JNICALL OS_NATIVE(CGCursorIsVisible)
+ (JNIEnv *env, jclass that)
+{
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, CGCursorIsVisible_FUNC);
+ rc = (jboolean)CGCursorIsVisible();
+ OS_NATIVE_EXIT(env, that, CGCursorIsVisible_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_CGDataProviderCreateWithData
JNIEXPORT jint JNICALL OS_NATIVE(CGDataProviderCreateWithData)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c
index 7ad75cc234..99ad07f7a4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c
@@ -14,8 +14,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 973;
-int OS_nativeFunctionCallCount[973];
+int OS_nativeFunctionCount = 974;
+int OS_nativeFunctionCallCount[974];
char * OS_nativeFunctionNames[] = {
"AECoerceDesc",
"AECountItems",
@@ -207,6 +207,7 @@ char * OS_nativeFunctionNames[] = {
"CGContextStrokeRect",
"CGContextSynchronize",
"CGContextTranslateCTM",
+ "CGCursorIsVisible",
"CGDataProviderCreateWithData",
"CGDataProviderCreateWithURL",
"CGDataProviderRelease",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h
index ae5fa85d81..a2184192dc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h
@@ -215,6 +215,7 @@ typedef enum {
CGContextStrokeRect_FUNC,
CGContextSynchronize_FUNC,
CGContextTranslateCTM_FUNC,
+ CGCursorIsVisible_FUNC,
CGDataProviderCreateWithData_FUNC,
CGDataProviderCreateWithURL_FUNC,
CGDataProviderRelease_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java
index 0718f1d29a..77e5faf9fd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java
@@ -1228,6 +1228,7 @@ public static final native void CGContextShowTextAtPoint (int ctx, float x, floa
public static final native void CGContextSetTextMatrix (int ctx, float[] transform);
public static final native void CGContextStrokePath (int ctx);
public static final native void CGContextSynchronize (int ctx);
+public static final native boolean CGCursorIsVisible ();
public static final native int CGFunctionCreate (int info, int domainDimension, float[] domain, int rangeDimension, float[] range, CGFunctionCallbacks callbacks);
public static final native void CGFunctionRelease (int function);
public static final native int CGDataProviderCreateWithData (int info, int data, int size, int releaseData);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java
index 720a51d2cc..3f19be54de 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java
@@ -232,7 +232,7 @@ int kEventTextInputUnicodeForKeyEvent (int nextHandler, int theEvent, int userDa
int result = super.kEventTextInputUnicodeForKeyEvent(nextHandler, theEvent, userData);
if (result != OS.noErr) {
if (caret != null) {
- OS.CGDisplayHideCursor (OS.CGMainDisplayID ());
+ if (OS.CGCursorIsVisible ()) OS.CGDisplayHideCursor (OS.CGMainDisplayID ());
}
}
return result;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
index 60f7763112..0bff4f0b20 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
@@ -2876,7 +2876,7 @@ int mouseProc (int nextHandler, int theEvent, int userData) {
case OS.kEventMouseDragged:
case OS.kEventMouseMoved:
mouseMoved = true;
- OS.CGDisplayShowCursor (OS.CGMainDisplayID ());
+ if (!OS.CGCursorIsVisible ()) OS.CGDisplayShowCursor (OS.CGMainDisplayID ());
}
int sizeof = org.eclipse.swt.internal.carbon.Point.sizeof;
org.eclipse.swt.internal.carbon.Point where = new org.eclipse.swt.internal.carbon.Point ();