diff options
| author | Alexander Kurtakov | 2012-03-14 09:18:17 +0000 |
|---|---|---|
| committer | Silenio Quarti | 2012-03-19 14:31:39 +0000 |
| commit | 04c22da729e18d1ddf8c71f457fb67dda8450de7 (patch) | |
| tree | 3658acd82c3675efda3003781b1a6fd1087a90d1 | |
| parent | 28c088e52ae46fc9da6497a12e25dc62b56ffa40 (diff) | |
| download | eclipse.platform.ui-04c22da729e18d1ddf8c71f457fb67dda8450de7.tar.gz eclipse.platform.ui-04c22da729e18d1ddf8c71f457fb67dda8450de7.tar.xz eclipse.platform.ui-04c22da729e18d1ddf8c71f457fb67dda8450de7.zip | |
Replace gdk_cursor_destroy with gdk_cursor_unref.
The function removed (gdk_cursor_destroy) has been an alias for
gdk_cursor_unref from pre-2.4 gtk times and the define is removed in GTK
3.
9 files changed, 20 insertions, 20 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c index 99eaebfc39c..dad1ee406a8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c @@ -5120,16 +5120,6 @@ fail: } #endif -#ifndef NO__1gdk_1cursor_1destroy -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cursor_1destroy) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1cursor_1destroy_FUNC); - gdk_cursor_destroy((GdkCursor *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1cursor_1destroy_FUNC); -} -#endif - #ifndef NO__1gdk_1cursor_1new JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cursor_1new) (JNIEnv *env, jclass that, jintLong arg0) @@ -5179,6 +5169,16 @@ fail: } #endif +#ifndef NO__1gdk_1cursor_1unref +JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cursor_1unref) + (JNIEnv *env, jclass that, jintLong arg0) +{ + OS_NATIVE_ENTER(env, that, _1gdk_1cursor_1unref_FUNC); + gdk_cursor_unref((GdkCursor *)arg0); + OS_NATIVE_EXIT(env, that, _1gdk_1cursor_1unref_FUNC); +} +#endif + #ifndef NO__1gdk_1display_1get_1default JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1default) (JNIEnv *env, jclass that) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c index 3abe853e5d5..539e3952009 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c @@ -436,10 +436,10 @@ char * OS_nativeFunctionNames[] = { "_1gdk_1colormap_1free_1colors", "_1gdk_1colormap_1get_1system", "_1gdk_1colormap_1query_1color", - "_1gdk_1cursor_1destroy", "_1gdk_1cursor_1new", "_1gdk_1cursor_1new_1from_1pixbuf", "_1gdk_1cursor_1new_1from_1pixmap", + "_1gdk_1cursor_1unref", "_1gdk_1display_1get_1default", "_1gdk_1display_1supports_1cursor_1color", "_1gdk_1drag_1status", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h index c79a697f624..51003895a98 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h @@ -444,10 +444,10 @@ typedef enum { _1gdk_1colormap_1free_1colors_FUNC, _1gdk_1colormap_1get_1system_FUNC, _1gdk_1colormap_1query_1color_FUNC, - _1gdk_1cursor_1destroy_FUNC, _1gdk_1cursor_1new_FUNC, _1gdk_1cursor_1new_1from_1pixbuf_FUNC, _1gdk_1cursor_1new_1from_1pixmap_FUNC, + _1gdk_1cursor_1unref_FUNC, _1gdk_1display_1get_1default_FUNC, _1gdk_1display_1supports_1cursor_1color_FUNC, _1gdk_1drag_1status_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java index 5306e6eaa1d..32677c1b487 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java @@ -3779,11 +3779,11 @@ public static final void gdk_colormap_query_color(int /*long*/ colormap, int /*l } } /** @param cursor cast=(GdkCursor *) */ -public static final native void _gdk_cursor_destroy(int /*long*/ cursor); -public static final void gdk_cursor_destroy(int /*long*/ cursor) { +public static final native void _gdk_cursor_unref(int /*long*/ cursor); +public static final void gdk_cursor_unref(int /*long*/ cursor) { lock.lock(); try { - _gdk_cursor_destroy(cursor); + _gdk_cursor_unref(cursor); } finally { lock.unlock(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java index 96dfe32955d..8c4dae4e731 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java @@ -449,7 +449,7 @@ int /*long*/ createCursor(byte[] sourceData, byte[] maskData, int width, int hei } void destroy() { - OS.gdk_cursor_destroy(handle); + OS.gdk_cursor_unref(handle); handle = 0; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java index f6cd1151fc6..693b0412c52 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java @@ -401,7 +401,7 @@ void hookEvents () { void releaseWidget () { super.releaseWidget (); - if (defaultCursor != 0) OS.gdk_cursor_destroy (defaultCursor); + if (defaultCursor != 0) OS.gdk_cursor_unref (defaultCursor); defaultCursor = 0; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java index c6a1119c2bc..e58177427f7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java @@ -1334,7 +1334,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) { int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle); int /*long*/ cursor = OS.gdk_cursor_new (mode); OS.gdk_window_set_cursor (window, cursor); - OS.gdk_cursor_destroy (cursor); + OS.gdk_cursor_unref (cursor); display.resizeMode = mode; } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java index 51315b5fe0d..87b57f3bd2b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java @@ -880,7 +880,7 @@ void setCursor (int /*long*/ cursor) { int /*long*/ defaultCursor = 0; if (cursor == 0) defaultCursor = OS.gdk_cursor_new (OS.GDK_XTERM); super.setCursor (cursor != 0 ? cursor : defaultCursor); - if (cursor == 0) OS.gdk_cursor_destroy (defaultCursor); + if (cursor == 0) OS.gdk_cursor_unref (defaultCursor); } void setFontDescription (int /*long*/ font) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java index 9997b89bac2..a97bc302f2e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java @@ -1995,7 +1995,7 @@ void setCursor (int /*long*/ cursor) { int /*long*/ defaultCursor = 0; if (cursor == 0) defaultCursor = OS.gdk_cursor_new (OS.GDK_XTERM); super.setCursor (cursor != 0 ? cursor : defaultCursor); - if (cursor == 0) OS.gdk_cursor_destroy (defaultCursor); + if (cursor == 0) OS.gdk_cursor_unref (defaultCursor); } /** |
