aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-03-14 05:18:17 (EDT)
committerSilenio Quarti2012-03-19 10:31:39 (EDT)
commit04c22da729e18d1ddf8c71f457fb67dda8450de7 (patch)
tree3658acd82c3675efda3003781b1a6fd1087a90d1
parent28c088e52ae46fc9da6497a12e25dc62b56ffa40 (diff)
downloadeclipse.platform.swt-04c22da729e18d1ddf8c71f457fb67dda8450de7.zip
eclipse.platform.swt-04c22da729e18d1ddf8c71f457fb67dda8450de7.tar.gz
eclipse.platform.swt-04c22da729e18d1ddf8c71f457fb67dda8450de7.tar.bz2
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.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java2
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 99eaebf..dad1ee4 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 3abe853..539e395 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 c79a697..5100389 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 5306e6e..32677c1 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 96dfe32..8c4dae4 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 f6cd115..693b041 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 c6a1119..e581774 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 51315b5..87b57f3 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 9997b89..a97bc30 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);
}
/**