From 4e95e9822f38553154d401b66a8ec9a218291978 Mon Sep 17 00:00:00 2001 From: Arun Thondapu Date: Fri, 28 Sep 2012 18:01:01 +0530 Subject: Bug 388528 add GdkDevice* cast for gdk_device_get_associated_device() --- .../gtk/org/eclipse/swt/dnd/DragSource.java | 2 +- bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | 4 ++-- .../Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) 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 e403b01948..d6cf0b6a9d 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 @@ -319,7 +319,7 @@ void dragEnd(long /*int*/ widget, long /*int*/ context){ long /*int*/ display = OS.gdk_window_get_display(OS.gtk_widget_get_window(widget)); long /*int*/ device_manager = OS.gdk_display_get_device_manager(display); long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer(device_manager); - long /*int*/ keyboard = OS.gdk_device_get_associated_device (pointer); + long /*int*/ keyboard = OS.gdk_device_get_associated_device(pointer); OS.gdk_device_ungrab(pointer, OS.GDK_CURRENT_TIME); OS.gdk_device_ungrab(keyboard, OS.GDK_CURRENT_TIME); } else { 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 dde2e9be8d..06b011ad96 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 @@ -4883,12 +4883,12 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1device_1get_1associated_1device) jintLong rc = 0; OS_NATIVE_ENTER(env, that, _1gdk_1device_1get_1associated_1device_FUNC); /* - rc = (jintLong)gdk_device_get_associated_device(arg0); + rc = (jintLong)gdk_device_get_associated_device((GdkDevice *)arg0); */ { OS_LOAD_FUNCTION(fp, gdk_device_get_associated_device) if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDevice *))fp)((GdkDevice *)arg0); } } OS_NATIVE_EXIT(env, that, _1gdk_1device_1get_1associated_1device_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 dd6ca13ddd..39db03127f 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 @@ -4703,7 +4703,10 @@ public static final void gdk_device_ungrab(long /*int*/ device, int time_) { lock.unlock(); } } -/** @method flags=dynamic */ +/** + * @method flags=dynamic + * @param device cast=(GdkDevice *) + */ public static final native long /*int*/ _gdk_device_get_associated_device(long /*int*/ device); public static final long /*int*/ gdk_device_get_associated_device(long /*int*/ device) { lock.lock(); -- cgit