summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-02-29 15:26:02 (EST)
committer Silenio Quarti2012-03-05 17:38:39 (EST)
commit8f38c5bb4038a6567d71192eef13ddcca0d9acec (patch)
tree8e8e02daac3a2689f43403c215674612b6cc5411
parent716f2741149429ab03db74a38566b08f01a32112 (diff)
downloadeclipse.platform.swt-8f38c5bb4038a6567d71192eef13ddcca0d9acec.zip
eclipse.platform.swt-8f38c5bb4038a6567d71192eef13ddcca0d9acec.tar.gz
eclipse.platform.swt-8f38c5bb4038a6567d71192eef13ddcca0d9acec.tar.bz2
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.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c18
-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.java7
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 63ce761..87f1c96 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 23bedb8..d74153f 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 d116736..e8b8307 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 203d33b..cbe5eae 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 8beef85..e6c52f5 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();
}