From e7d01beb79c3a072f69f3d2c45e7b1578ac95d5d Mon Sep 17 00:00:00 2001 From: Anatoly Spektor Date: Fri, 28 Sep 2012 15:31:19 -0400 Subject: Make gdk_gc_set_stipple dynamic As Sash widget that only used gdk_gc_set_stipple is using Cairo instead of GDK, this function is not used in newer GTK and can be made dynamic. --- bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | 10 +++++++++- bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h | 1 + .../Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java | 5 +---- 3 files changed, 11 insertions(+), 5 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 06b011ad96..711216e7f7 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 @@ -5692,7 +5692,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1stipple) (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) { OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1stipple_FUNC); - gdk_gc_set_stipple((GdkGC *)arg0, (GdkPixmap *)arg1); +/* + gdk_gc_set_stipple(arg0, arg1); +*/ + { + OS_LOAD_FUNCTION(fp, gdk_gc_set_stipple) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); + } + } OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1stipple_FUNC); } #endif 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 8944f3f2a5..02377cef21 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 @@ -184,6 +184,7 @@ #define gdk_draw_image_LIB LIB_GDK #define gdk_drawable_get_size_LIB LIB_GDK #define gdk_gc_set_background_LIB LIB_GDK +#define gdk_gc_set_stipple_LIB LIB_GDK #define gdk_gc_set_clip_mask_LIB LIB_GDK #define gdk_gc_set_clip_origin_LIB LIB_GDK #define gdk_gc_set_dashes_LIB LIB_GDK 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 39db03127f..91c1865255 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 @@ -4259,10 +4259,7 @@ public static final void gdk_gc_set_line_attributes(long /*int*/ gc, int line_wi lock.unlock(); } } -/** - * @param gc cast=(GdkGC *) - * @param stipple cast=(GdkPixmap *) - */ +/** @method flags=dynamic */ public static final native void _gdk_gc_set_stipple(long /*int*/ gc, long /*int*/ stipple); public static final void gdk_gc_set_stipple(long /*int*/ gc, long /*int*/ stipple) { lock.lock(); -- cgit