summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-03-14 12:17:41 (EDT)
committer Silenio Quarti2012-03-19 10:45:40 (EDT)
commit7bf3c47e0c6cc9b2515e6ca8617a79747d350372 (patch)
tree59f273f64519ea35944a410459b0a00196307c49
parenta7ac410c9ca698732ac05897befec1115af3cd76 (diff)
downloadeclipse.platform.swt-7bf3c47e0c6cc9b2515e6ca8617a79747d350372.zip
eclipse.platform.swt-7bf3c47e0c6cc9b2515e6ca8617a79747d350372.tar.gz
eclipse.platform.swt-7bf3c47e0c6cc9b2515e6ca8617a79747d350372.tar.bz2
Make gdk_draw_line dynamic.
Used in two places and both have a cairo path returning prior to the function invocation. The function gdk_draw_line is removed in GDK 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 e154c4d..64c9675 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
@@ -5297,7 +5297,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1line)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
{
OS_NATIVE_ENTER(env, that, _1gdk_1draw_1line_FUNC);
- gdk_draw_line((GdkDrawable *)arg0, (GdkGC *)arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5);
+/*
+ gdk_draw_line(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_draw_line)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong, jintLong, gint, gint, gint, gint))fp)(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gdk_1draw_1line_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 b6e5182..c3707a6 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
@@ -148,6 +148,7 @@
#define gdk_display_get_default_LIB LIB_GDK
#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_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 d38b74a..4b92827 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
@@ -3947,8 +3947,7 @@ public static final void gdk_draw_layout_with_colors(int /*long*/ drawable, int
}
}
/**
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
+ * @method flags=dynamic
* @param x1 cast=(gint)
* @param y1 cast=(gint)
* @param x2 cast=(gint)