diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-09-28 15:31:19 -0400 |
---|---|---|
committer | Anatoly Spektor <aspektor@redhat.com> | 2012-09-28 15:31:19 -0400 |
commit | 3388c77d9d0ff6934b7578d1a4950b7e8b37b3c3 (patch) | |
tree | 4a27d7ec2985d7747d06651081112604266e83ed | |
parent | 5506cab4b428c80e29a6e4456dfb962867ed7143 (diff) | |
download | eclipse.platform.swt-gdk_gc_set_stipple.tar.gz eclipse.platform.swt-gdk_gc_set_stipple.tar.xz eclipse.platform.swt-gdk_gc_set_stipple.zip |
Make gdk_gc_set_stipple dynamicgdk_gc_set_stipple
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.
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 4e3b0f2d57..06bde072b4 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 @@ -5654,7 +5654,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 c1d1a65035..c66ee46706 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 @@ -181,6 +181,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 1baf52b0ca..82dfa67363 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(); |