From 4aa744e8898dfdeafa32c91aa90156619bea3bea 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 8551e00df7..6610d5fef0 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 @@ -5310,7 +5310,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 83a0bb93cc..6c36da0615 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,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 51f7edd486..3c787d8e1a 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 @@ -3944,11 +3944,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