diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2012-02-29 22:26:02 +0200 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-03-05 17:38:39 -0500 |
commit | 8f38c5bb4038a6567d71192eef13ddcca0d9acec (patch) | |
tree | 8e8e02daac3a2689f43403c215674612b6cc5411 /bundles | |
parent | 716f2741149429ab03db74a38566b08f01a32112 (diff) | |
download | eclipse.platform.swt-8f38c5bb4038a6567d71192eef13ddcca0d9acec.tar.gz eclipse.platform.swt-8f38c5bb4038a6567d71192eef13ddcca0d9acec.tar.xz eclipse.platform.swt-8f38c5bb4038a6567d71192eef13ddcca0d9acec.zip |
Use gdk_text_property_to_utf8_list + _for_display.
Usage of gdk_text_property_to_utf8_list is deprecated and removed in
gtk3 but gdk_text_property_to_utf8_list_for_display is still here
for usage.
Diffstat (limited to 'bundles')
5 files changed, 16 insertions, 15 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java index 63ce761cb3..87f1c96375 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java @@ -117,7 +117,7 @@ public void javaToNative (Object object, TransferData transferData) { public Object nativeToJava(TransferData transferData){ if (!isSupportedType(transferData) || transferData.pValue == 0) return null; int /*long*/[] list = new int /*long*/[1]; - int count = OS.gdk_text_property_to_utf8_list(transferData.type, transferData.format, transferData.pValue, transferData.length, list); + int count = OS.gdk_text_property_to_utf8_list_for_display(OS.gdk_display_get_default(), transferData.type, transferData.format, transferData.pValue, transferData.length, list); if (count == 0) return null; int /*long*/[] ptr = new int /*long*/[1]; OS.memmove(ptr, list[0], OS.PTR_SIZEOF); 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 23bedb8329..d74153f857 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 @@ -6671,18 +6671,18 @@ fail: } #endif -#ifndef NO__1gdk_1text_1property_1to_1utf8_1list -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1text_1property_1to_1utf8_1list) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jint arg3, jintLongArray arg4) +#ifndef NO__1gdk_1text_1property_1to_1utf8_1list_1for_1display +JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1text_1property_1to_1utf8_1list_1for_1display) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jint arg4, jintLongArray arg5) { - jintLong *lparg4=NULL; + jintLong *lparg5=NULL; jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1text_1property_1to_1utf8_1list_FUNC); - if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail; - rc = (jint)gdk_text_property_to_utf8_list((GdkAtom)arg0, arg1, (guchar *)arg2, arg3, (gchar ***)lparg4); + OS_NATIVE_ENTER(env, that, _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC); + if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail; + rc = (jint)gdk_text_property_to_utf8_list_for_display((GdkDisplay *)arg0, (GdkAtom)arg1, arg2, (guchar *)arg3, arg4, (gchar ***)lparg5); fail: - if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1text_1property_1to_1utf8_1list_FUNC); + if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0); + OS_NATIVE_EXIT(env, that, _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC); return rc; } #endif 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 d116736b85..e8b8307784 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 @@ -548,7 +548,7 @@ char * OS_nativeFunctionNames[] = { "_1gdk_1screen_1width", "_1gdk_1screen_1width_1mm", "_1gdk_1set_1program_1class", - "_1gdk_1text_1property_1to_1utf8_1list", + "_1gdk_1text_1property_1to_1utf8_1list_1for_1display", "_1gdk_1unicode_1to_1keyval", "_1gdk_1utf8_1to_1compound_1text", "_1gdk_1utf8_1to_1string_1target", 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 203d33bf10..cbe5eae5de 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 @@ -556,7 +556,7 @@ typedef enum { _1gdk_1screen_1width_FUNC, _1gdk_1screen_1width_1mm_FUNC, _1gdk_1set_1program_1class_FUNC, - _1gdk_1text_1property_1to_1utf8_1list_FUNC, + _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC, _1gdk_1unicode_1to_1keyval_FUNC, _1gdk_1utf8_1to_1compound_1text_FUNC, _1gdk_1utf8_1to_1string_1target_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 8beef85d32..e6c52f5135 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 @@ -5198,15 +5198,16 @@ public static final int /*long*/ gdk_utf8_to_string_target(byte[] str) { } } /** + * @param display cast=(GdkDisplay *) * @param encoding cast=(GdkAtom) * @param text cast=(guchar *) * @param list cast=(gchar ***) */ -public static final native int _gdk_text_property_to_utf8_list (int /*long*/ encoding, int format, int /*long*/ text, int length, int /*long*/[] list); -public static final int gdk_text_property_to_utf8_list (int /*long*/ encoding, int format, int /*long*/ text, int length, int /*long*/[] list) { +public static final native int _gdk_text_property_to_utf8_list_for_display (int /*long*/ display, int /*long*/ encoding, int format, int /*long*/ text, int length, int /*long*/[] list); +public static final int gdk_text_property_to_utf8_list_for_display (int /*long*/ display, int /*long*/ encoding, int format, int /*long*/ text, int length, int /*long*/[] list) { lock.lock(); try { - return _gdk_text_property_to_utf8_list(encoding, format, text, length, list); + return _gdk_text_property_to_utf8_list_for_display(display, encoding, format, text, length, list); } finally { lock.unlock(); } |