aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatoly Spektor2012-09-28 15:31:19 (EDT)
committerArun Thondapu2012-10-01 09:06:23 (EDT)
commite7d01beb79c3a072f69f3d2c45e7b1578ac95d5d (patch)
tree34e78460aafe1785ee4fd192d73e7a34e2ef89cc
parent4e3e25272ea59b959e379683a113f2c5ee8c3b43 (diff)
downloadeclipse.platform.swt-e7d01beb79c3a072f69f3d2c45e7b1578ac95d5d.zip
eclipse.platform.swt-e7d01beb79c3a072f69f3d2c45e7b1578ac95d5d.tar.gz
eclipse.platform.swt-e7d01beb79c3a072f69f3d2c45e7b1578ac95d5d.tar.bz2
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.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java5
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 06b011a..711216e 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 8944f3f..02377ce 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 39db031..91c1865 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();