summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-03-14 12:19:34 (EDT)
committer Silenio Quarti2012-03-19 10:48:42 (EDT)
commit48c7c4392f1d1c2e9577034b5dec5fa811028571 (patch)
tree2e3151eef2de53338c93a5c19bf7a3134b940d60
parent7bf3c47e0c6cc9b2515e6ca8617a79747d350372 (diff)
downloadeclipse.platform.swt-48c7c4392f1d1c2e9577034b5dec5fa811028571.zip
eclipse.platform.swt-48c7c4392f1d1c2e9577034b5dec5fa811028571.tar.gz
eclipse.platform.swt-48c7c4392f1d1c2e9577034b5dec5fa811028571.tar.bz2
Make gdk_draw_lines dynamic.
Single usage and already covered by cairo path. The function is removed in GTK 3.
-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.java3
3 files changed, 11 insertions, 3 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 64c9675..5eea83a 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
@@ -5324,7 +5324,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1lines)
{
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
}
- gdk_draw_lines((GdkDrawable *)arg0, (GdkGC *)arg1, (GdkPoint *)lparg2, (gint)arg3);
+/*
+ gdk_draw_lines(arg0, arg1, (GdkPoint *)lparg2, (gint)arg3);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_draw_lines)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jintLong, GdkPoint *, gint))fp)(arg0, arg1, (GdkPoint *)lparg2, (gint)arg3);
+ }
+ }
fail:
#ifdef JNI_VERSION_1_2
if (IS_JNI_1_2) {
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 c3707a6..c386904 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
@@ -149,6 +149,7 @@
#define gdk_display_supports_cursor_color_LIB LIB_GDK
#define gdk_draw_arc_LIB LIB_GDK
#define gdk_draw_line_LIB LIB_GDK
+#define gdk_draw_lines_LIB LIB_GDK
#define gdk_draw_pixbuf_LIB LIB_GDK
#define gdk_draw_point_LIB LIB_GDK
#define gdk_pixbuf_save_to_bufferv_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 4b92827..907478b 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
@@ -3963,8 +3963,7 @@ public static final void gdk_draw_line(int /*long*/ drawable, int /*long*/ gc, i
}
}
/**
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
+ * @method flags=dynamic
* @param points cast=(GdkPoint *),flags=no_out critical
* @param npoints cast=(gint)
*/