summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-03-15 17:36:32 (EDT)
committer Silenio Quarti2012-03-19 10:54:53 (EDT)
commit5463a09fc7ab4757e5eccc292bd859a628b9e962 (patch)
tree94e7b319ea40812d83093271c27ab972cf45a22f
parenta63e7844f1d8f849fe877d2101e33aaad4c582e8 (diff)
downloadeclipse.platform.swt-5463a09fc7ab4757e5eccc292bd859a628b9e962.zip
eclipse.platform.swt-5463a09fc7ab4757e5eccc292bd859a628b9e962.tar.gz
eclipse.platform.swt-5463a09fc7ab4757e5eccc292bd859a628b9e962.tar.bz2
Make gdk_gc_set_clip_origin and gdk_gc_set_clip_mask dynamic.
There is single usage of these in GC drawImageMask method which is used only in non-Cairo paths.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java5
3 files changed, 22 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 71a6505..09a4f6c 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
@@ -5729,7 +5729,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1clip_1mask)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
{
OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1clip_1mask_FUNC);
- gdk_gc_set_clip_mask((GdkGC *)arg0, (GdkBitmap *)arg1);
+/*
+ gdk_gc_set_clip_mask(arg0, arg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_gc_set_clip_mask)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1clip_1mask_FUNC);
}
#endif
@@ -5739,7 +5747,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1clip_1origin)
(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
{
OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1clip_1origin_FUNC);
- gdk_gc_set_clip_origin((GdkGC *)arg0, (gint)arg1, (gint)arg2);
+/*
+ gdk_gc_set_clip_origin(arg0, (gint)arg1, (gint)arg2);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_gc_set_clip_origin)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, gint, gint))fp)(arg0, (gint)arg1, (gint)arg2);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1clip_1origin_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 b5ffd5e..4dfd9a1 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
@@ -153,6 +153,8 @@
#define gdk_draw_lines_LIB LIB_GDK
#define gdk_draw_pixbuf_LIB LIB_GDK
#define gdk_draw_point_LIB LIB_GDK
+#define gdk_gc_set_clip_mask_LIB LIB_GDK
+#define gdk_gc_set_clip_origin_LIB LIB_GDK
#define gdk_pixbuf_save_to_bufferv_LIB LIB_GDK
#define gdk_screen_get_default_LIB LIB_GDK
#define gdk_screen_get_monitor_at_point_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 cfc1faf..f8c7df7 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
@@ -4292,8 +4292,7 @@ public static final void gdk_gc_set_background(int /*long*/ gc, GdkColor color)
}
}
/**
- * @param gc cast=(GdkGC *)
- * @param mask cast=(GdkBitmap *)
+ * @method flags=dynamic
*/
public static final native void _gdk_gc_set_clip_mask(int /*long*/ gc, int /*long*/ mask);
public static final void gdk_gc_set_clip_mask(int /*long*/ gc, int /*long*/ mask) {
@@ -4305,7 +4304,7 @@ public static final void gdk_gc_set_clip_mask(int /*long*/ gc, int /*long*/ mask
}
}
/**
- * @param gc cast=(GdkGC *)
+ * @method flags=dynamic
* @param x cast=(gint)
* @param y cast=(gint)
*/