From 727d7292a75a4a9f962a43e106df349fd017a4be Mon Sep 17 00:00:00 2001 From: Anatoly Spektor Date: Tue, 12 Jun 2012 12:26:50 -0400 Subject: Make gdk_draw_layout function dynamic --- bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | 10 +++++++++- bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h | 1 + .../Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java | 6 +----- 3 files changed, 11 insertions(+), 6 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 2da49ebd57..001998670a 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 @@ -5298,7 +5298,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1layout) (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4) { OS_NATIVE_ENTER(env, that, _1gdk_1draw_1layout_FUNC); - gdk_draw_layout((GdkDrawable *)arg0, (GdkGC *)arg1, (gint)arg2, (gint)arg3, (PangoLayout *)arg4); +/* + gdk_draw_layout(arg0, arg1, arg2, arg3, arg4); +*/ + { + OS_LOAD_FUNCTION(fp, gdk_draw_layout) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint, jintLong))fp)(arg0, arg1, arg2, arg3, arg4); + } + } OS_NATIVE_EXIT(env, that, _1gdk_1draw_1layout_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 7ed96d5775..a728489197 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_get_default_LIB LIB_GDK #define gdk_display_supports_cursor_color_LIB LIB_GDK #define gdk_draw_arc_LIB LIB_GDK +#define gdk_draw_layout_LIB LIB_GDK #define gdk_draw_layout_with_colors_LIB LIB_GDK #define gdk_draw_line_LIB LIB_GDK #define gdk_draw_lines_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 8ccd8777a0..c380dae81e 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 @@ -3930,11 +3930,7 @@ public static final void gdk_draw_image(int /*long*/ drawable, int /*long*/ gc, } } /** - * @param drawable cast=(GdkDrawable *) - * @param gc cast=(GdkGC *) - * @param x cast=(gint) - * @param y cast=(gint) - * @param layout cast=(PangoLayout *) + @method flags=dynamic */ public static final native void _gdk_draw_layout(int /*long*/ drawable, int /*long*/ gc, int x, int y, int /*long*/ layout); public static final void gdk_draw_layout(int /*long*/ drawable, int /*long*/ gc, int x, int y, int /*long*/ layout) { -- cgit