diff options
| author | Alexander Kurtakov | 2012-03-14 16:17:41 +0000 |
|---|---|---|
| committer | Silenio Quarti | 2012-03-19 14:45:40 +0000 |
| commit | 7bf3c47e0c6cc9b2515e6ca8617a79747d350372 (patch) | |
| tree | 59f273f64519ea35944a410459b0a00196307c49 | |
| parent | a7ac410c9ca698732ac05897befec1115af3cd76 (diff) | |
| download | eclipse.platform.swt-7bf3c47e0c6cc9b2515e6ca8617a79747d350372.tar.gz eclipse.platform.swt-7bf3c47e0c6cc9b2515e6ca8617a79747d350372.tar.xz eclipse.platform.swt-7bf3c47e0c6cc9b2515e6ca8617a79747d350372.zip | |
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.
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 e154c4df7b..64c9675cd0 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 b6e51825f2..c3707a67c7 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 d38b74a4d5..4b92827688 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) |
