summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov <akurtako@redhat.com>2012-10-08 22:28:22 +0300
committerAlexander Kurtakov <akurtako@redhat.com>2012-10-08 22:29:41 +0300
commit9500727710c9626dc536a0475cdc8a8842b13b33 (patch)
tree982c756b42976a081a3ff63eaf1f05bbe57e2fbe
parent2a6e0c9b702b0b502452265cc844e28c66b4245c (diff)
downloadeclipse.platform.swt-9500727710c9626dc536a0475cdc8a8842b13b33.tar.gz
eclipse.platform.swt-9500727710c9626dc536a0475cdc8a8842b13b33.tar.xz
eclipse.platform.swt-9500727710c9626dc536a0475cdc8a8842b13b33.zip
Use gtk_selection_data_get* functions instead of GtkSelectionData struct
Fix for bug 391370. Struct members should not be accessed directly and using the members will allow to remove the memmove/sizeof bindings for GtkSelectionData which fail to compile on GTK 3.x. New implementation is used for GTK 2.14+ when the functions were introduced.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java63
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java29
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java33
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c100
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java65
9 files changed, 282 insertions, 35 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java
index 7b3f563481..0cf7d4f230 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java
@@ -313,13 +313,20 @@ public Object getContents(Transfer transfer, int clipboards) {
}
}
if (selection_data == 0) return null;
- GtkSelectionData gtkSelectionData = new GtkSelectionData();
- OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
TransferData tdata = new TransferData();
- tdata.type = gtkSelectionData.type;
- tdata.pValue = gtkSelectionData.data;
- tdata.length = gtkSelectionData.length;
- tdata.format = gtkSelectionData.format;
+ if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+ tdata.type = OS.gtk_selection_data_get_data_type(selection_data);
+ tdata.pValue = OS.gtk_selection_data_get_data(selection_data);
+ tdata.length = OS.gtk_selection_data_get_length(selection_data);
+ tdata.format = OS.gtk_selection_data_get_format(selection_data);
+ } else {
+ GtkSelectionData gtkSelectionData = new GtkSelectionData();
+ OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+ tdata.type = gtkSelectionData.type;
+ tdata.pValue = gtkSelectionData.data;
+ tdata.length = gtkSelectionData.length;
+ tdata.format = gtkSelectionData.format;
+ }
Object result = transfer.nativeToJava(tdata);
OS.gtk_selection_data_free(selection_data);
return result;
@@ -602,11 +609,23 @@ private int[] getAvailablePrimaryTypes() {
OS.gdk_threads_leave();
if (selection_data != 0) {
try {
- GtkSelectionData gtkSelectionData = new GtkSelectionData();
- OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
- if (gtkSelectionData.length != 0) {
- types = new int[gtkSelectionData.length * 8 / gtkSelectionData.format];
- OS.memmove(types, gtkSelectionData.data, gtkSelectionData.length);
+ int length;
+ int format;
+ long /*int*/ data;
+ if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+ length = OS.gtk_selection_data_get_length(selection_data);
+ format = OS.gtk_selection_data_get_format(selection_data);
+ data = OS.gtk_selection_data_get_data(selection_data);
+ } else {
+ GtkSelectionData gtkSelectionData = new GtkSelectionData();
+ OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+ length = gtkSelectionData.length;
+ format = gtkSelectionData.format;
+ data = gtkSelectionData.data;
+ }
+ if (length != 0) {
+ types = new int[length * 8 / format];
+ OS.memmove(types, data, length);
}
} finally {
OS.gtk_selection_data_free(selection_data);
@@ -626,11 +645,23 @@ private int[] getAvailableClipboardTypes () {
OS.gdk_threads_leave();
if (selection_data != 0) {
try {
- GtkSelectionData gtkSelectionData = new GtkSelectionData();
- OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
- if (gtkSelectionData.length != 0) {
- types = new int[gtkSelectionData.length * 8 / gtkSelectionData.format];
- OS.memmove(types, gtkSelectionData.data, gtkSelectionData.length);
+ int length;
+ int format;
+ long /*int*/ data;
+ if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+ length = OS.gtk_selection_data_get_length(selection_data);
+ format = OS.gtk_selection_data_get_format(selection_data);
+ data = OS.gtk_selection_data_get_data(selection_data);
+ } else {
+ GtkSelectionData gtkSelectionData = new GtkSelectionData();
+ OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+ length = gtkSelectionData.length;
+ format = gtkSelectionData.format;
+ data = gtkSelectionData.data;
+ }
+ if (length != 0) {
+ types = new int[length * 8 / format];
+ OS.memmove(types, data, length);
}
} finally {
OS.gtk_selection_data_free(selection_data);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
index b68c23e1a5..df50ad6b72 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
@@ -121,10 +121,16 @@ void dispose () {
*/
long /*int*/ getFunc(long /*int*/ clipboard, long /*int*/ selection_data, long /*int*/ info, long /*int*/ user_data_or_owner){
if (selection_data == 0) return 0;
- GtkSelectionData selectionData = new GtkSelectionData();
- OS.memmove(selectionData, selection_data, GtkSelectionData.sizeof);
+ long /*int*/ target;
+ if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+ target = OS.gtk_selection_data_get_target(selection_data);
+ } else {
+ GtkSelectionData selectionData = new GtkSelectionData();
+ OS.memmove(selectionData, selection_data, GtkSelectionData.sizeof);
+ target = selectionData.target;
+ }
TransferData tdata = new TransferData();
- tdata.type = selectionData.target;
+ tdata.type = target;
Transfer[] types = (clipboard == Clipboard.GTKCLIPBOARD) ? clipboardDataTypes : primaryClipboardDataTypes;
int index = -1;
for (int i = 0; i < types.length; i++) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
index d6cf0b6a9d..3e2a3b7c68 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
@@ -352,15 +352,30 @@ void dragEnd(long /*int*/ widget, long /*int*/ context){
void dragGetData(long /*int*/ widget, long /*int*/ context, long /*int*/ selection_data, int info, int time){
if (selection_data == 0) return;
- GtkSelectionData gtkSelectionData = new GtkSelectionData();
- OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
- if (gtkSelectionData.target == 0) return;
+ int length;
+ int format;
+ long /*int*/ data;
+ long /*int*/ target;
+ if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+ length = OS.gtk_selection_data_get_length(selection_data);
+ format = OS.gtk_selection_data_get_format(selection_data);
+ data = OS.gtk_selection_data_get_data(selection_data);
+ target = OS.gtk_selection_data_get_target(selection_data);
+ } else {
+ GtkSelectionData gtkSelectionData = new GtkSelectionData();
+ OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+ length = gtkSelectionData.length;
+ format = gtkSelectionData.format;
+ data = gtkSelectionData.data;
+ target = gtkSelectionData.target;
+ }
+ if (target == 0) return;
TransferData transferData = new TransferData();
- transferData.type = gtkSelectionData.target;
- transferData.pValue = gtkSelectionData.data;
- transferData.length = gtkSelectionData.length;
- transferData.format = gtkSelectionData.format;
+ transferData.type = target;
+ transferData.pValue = data;
+ transferData.length = length;
+ transferData.format = format;
DNDEvent event = new DNDEvent();
event.widget = this;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
index b837c7f34d..cc8a14e7ac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
@@ -332,9 +332,9 @@ protected void checkSubclass () {
}
}
-void drag_data_received ( long /*int*/ widget, long /*int*/ context, int x, int y, long /*int*/ data, int info, int time){
+void drag_data_received ( long /*int*/ widget, long /*int*/ context, int x, int y, long /*int*/ selection_data, int info, int time){
DNDEvent event = new DNDEvent();
- if (data == 0 || !setEventData(context, x, y, time, event)) {
+ if (selection_data == 0 || !setEventData(context, x, y, time, event)) {
keyOperation = -1;
return;
}
@@ -345,13 +345,28 @@ void drag_data_received ( long /*int*/ widget, long /*int*/ context, int x, int
// Get data in a Java format
Object object = null;
TransferData transferData = new TransferData();
- GtkSelectionData selectionData = new GtkSelectionData();
- OS.memmove(selectionData, data, GtkSelectionData.sizeof);
- if (selectionData.data != 0) {
- transferData.type = selectionData.type;
- transferData.length = selectionData.length;
- transferData.pValue = selectionData.data;
- transferData.format = selectionData.format;
+ int length;
+ int format;
+ long /*int*/ data;
+ long /*int*/ type;
+ if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+ length = OS.gtk_selection_data_get_length(selection_data);
+ format = OS.gtk_selection_data_get_format(selection_data);
+ data = OS.gtk_selection_data_get_data(selection_data);
+ type = OS.gtk_selection_data_get_data_type(selection_data);
+ } else {
+ GtkSelectionData gtkSelectionData = new GtkSelectionData();
+ OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+ length = gtkSelectionData.length;
+ format = gtkSelectionData.format;
+ data = gtkSelectionData.data;
+ type = gtkSelectionData.type;
+ }
+ if (data != 0) {
+ transferData.type = type;
+ transferData.length = length;
+ transferData.pValue = data;
+ transferData.format = format;
for (int i = 0; i < transferAgents.length; i++) {
Transfer transfer = transferAgents[i];
if (transfer != null && transfer.isSupportedType(transferData)) {
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 c8f8cfadcd..e024baa68a 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
@@ -13225,6 +13225,106 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1selection_1data_1free)
}
#endif
+#ifndef NO__1gtk_1selection_1data_1get_1data
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1data)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1data_FUNC);
+/*
+ rc = (jintLong)gtk_selection_data_get_data((GtkSelectionData *)arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_selection_data_get_data)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1data_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1selection_1data_1get_1data_1type
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1data_1type)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1data_1type_FUNC);
+/*
+ rc = (jintLong)gtk_selection_data_get_data_type((GtkSelectionData *)arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_selection_data_get_data_type)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1data_1type_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1selection_1data_1get_1format
+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1format)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1format_FUNC);
+/*
+ rc = (jint)gtk_selection_data_get_format((GtkSelectionData *)arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_selection_data_get_format)
+ if (fp) {
+ rc = (jint)((jint (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1format_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1selection_1data_1get_1length
+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1length)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1length_FUNC);
+/*
+ rc = (jint)gtk_selection_data_get_length((GtkSelectionData *)arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_selection_data_get_length)
+ if (fp) {
+ rc = (jint)((jint (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1length_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1selection_1data_1get_1target
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1target)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1target_FUNC);
+/*
+ rc = (jintLong)gtk_selection_data_get_target((GtkSelectionData *)arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_selection_data_get_target)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1target_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1gtk_1selection_1data_1set
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1selection_1data_1set)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jint arg4)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
index b30532cb8b..2ddaaa9dc1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
@@ -221,6 +221,11 @@
#define gtk_style_context_set_state_LIB LIB_GTK
#define gtk_hscale_new_LIB LIB_GTK
#define gtk_vscale_new_LIB LIB_GTK
+#define gtk_selection_data_get_data_LIB LIB_GTK
+#define gtk_selection_data_get_data_type_LIB LIB_GTK
+#define gtk_selection_data_get_format_LIB LIB_GTK
+#define gtk_selection_data_get_length_LIB LIB_GTK
+#define gtk_selection_data_get_target_LIB LIB_GTK
#define gtk_status_icon_get_geometry_LIB LIB_GTK
#define gtk_status_icon_get_visible_LIB LIB_GTK
#define gtk_status_icon_new_LIB LIB_GTK
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 ab94e5b0e7..ffdf7bc6b3 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
@@ -976,6 +976,11 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1scrolled_1window_1set_1policy",
"_1gtk_1scrolled_1window_1set_1shadow_1type",
"_1gtk_1selection_1data_1free",
+ "_1gtk_1selection_1data_1get_1data",
+ "_1gtk_1selection_1data_1get_1data_1type",
+ "_1gtk_1selection_1data_1get_1format",
+ "_1gtk_1selection_1data_1get_1length",
+ "_1gtk_1selection_1data_1get_1target",
"_1gtk_1selection_1data_1set",
"_1gtk_1separator_1menu_1item_1new",
"_1gtk_1separator_1new",
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 b6a58dfadd..1074782028 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
@@ -986,6 +986,11 @@ typedef enum {
_1gtk_1scrolled_1window_1set_1policy_FUNC,
_1gtk_1scrolled_1window_1set_1shadow_1type_FUNC,
_1gtk_1selection_1data_1free_FUNC,
+ _1gtk_1selection_1data_1get_1data_FUNC,
+ _1gtk_1selection_1data_1get_1data_1type_FUNC,
+ _1gtk_1selection_1data_1get_1format_FUNC,
+ _1gtk_1selection_1data_1get_1length_FUNC,
+ _1gtk_1selection_1data_1get_1target_FUNC,
_1gtk_1selection_1data_1set_FUNC,
_1gtk_1separator_1menu_1item_1new_FUNC,
_1gtk_1separator_1new_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 04a5369320..f372dd1b73 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
@@ -9848,6 +9848,71 @@ public static final void gtk_selection_data_free(long /*int*/ selection_data) {
lock.unlock();
}
}
+/**
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *)
+ */
+public static final native long /*int*/ _gtk_selection_data_get_data(long /*int*/ selection_data);
+public static final long /*int*/ gtk_selection_data_get_data(long /*int*/ selection_data) {
+ lock.lock();
+ try {
+ return _gtk_selection_data_get_data(selection_data);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *)
+ */
+public static final native int _gtk_selection_data_get_format(long /*int*/ selection_data);
+public static final int gtk_selection_data_get_format(long /*int*/ selection_data) {
+ lock.lock();
+ try {
+ return _gtk_selection_data_get_format(selection_data);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *)
+ */
+public static final native int _gtk_selection_data_get_length(long /*int*/ selection_data);
+public static final int gtk_selection_data_get_length(long /*int*/ selection_data) {
+ lock.lock();
+ try {
+ return _gtk_selection_data_get_length(selection_data);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *)
+ */
+public static final native long /*int*/ _gtk_selection_data_get_target(long /*int*/ selection_data);
+public static final long /*int*/ gtk_selection_data_get_target(long /*int*/ selection_data) {
+ lock.lock();
+ try {
+ return _gtk_selection_data_get_target(selection_data);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *)
+ */
+public static final native long /*int*/ _gtk_selection_data_get_data_type(long /*int*/ selection_data);
+public static final long /*int*/ gtk_selection_data_get_data_type(long /*int*/ selection_data) {
+ lock.lock();
+ try {
+ return _gtk_selection_data_get_data_type(selection_data);
+ } finally {
+ lock.unlock();
+ }
+}
/**
* @param selection_data cast=(GtkSelectionData *)
* @param type cast=(GdkAtom)