diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-06-12 10:48:11 -0400 |
---|---|---|
committer | Anatoly Spektor <aspektor@redhat.com> | 2012-06-12 10:48:11 -0400 |
commit | e6f210db9479fac0832924f369f2028136d7b0f8 (patch) | |
tree | 969578c2c5438e27f5a15f580ede16aeda62cf3a | |
parent | 6f7e9db4a5109de2cb967f8161a35ca18fee8f28 (diff) | |
download | eclipse.platform.swt-e6f210db9479fac0832924f369f2028136d7b0f8.tar.gz eclipse.platform.swt-e6f210db9479fac0832924f369f2028136d7b0f8.tar.xz eclipse.platform.swt-e6f210db9479fac0832924f369f2028136d7b0f8.zip |
Make gdk_draw_polygon function dynamic
3 files changed, 11 insertions, 20 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 1c8c5a54fb..2b662470a4 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 @@ -5414,24 +5414,18 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1polygon) { jint *lparg3=NULL; OS_NATIVE_ENTER(env, that, _1gdk_1draw_1polygon_FUNC); -#ifdef JNI_VERSION_1_2 - if (IS_JNI_1_2) { - if (arg3) if ((lparg3 = (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) == NULL) goto fail; - } else -#endif + if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; +/* + gdk_draw_polygon(arg0, arg1, arg2, lparg3, arg4); +*/ { - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; + OS_LOAD_FUNCTION(fp, gdk_draw_polygon) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint *, jint))fp)(arg0, arg1, arg2, lparg3, arg4); + } } - gdk_draw_polygon((GdkDrawable *)arg0, (GdkGC *)arg1, (gint)arg2, (GdkPoint *)lparg3, (gint)arg4); fail: -#ifdef JNI_VERSION_1_2 - if (IS_JNI_1_2) { - if (arg3 && lparg3) (*env)->ReleasePrimitiveArrayCritical(env, arg3, lparg3, JNI_ABORT); - } else -#endif - { - if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, JNI_ABORT); - } + if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); OS_NATIVE_EXIT(env, that, _1gdk_1draw_1polygon_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 2e537a9f6c..167ff0c545 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 @@ -154,6 +154,7 @@ #define gdk_draw_lines_LIB LIB_GDK #define gdk_draw_pixbuf_LIB LIB_GDK #define gdk_draw_point_LIB LIB_GDK +#define gdk_draw_polygon_LIB LIB_GDK #define gdk_gc_set_background_LIB LIB_GDK #define gdk_gc_set_clip_mask_LIB LIB_GDK #define gdk_gc_set_clip_origin_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 8827bda6b3..1aac3a0480 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 @@ -4031,11 +4031,7 @@ public static final void gdk_draw_point(int /*long*/ drawable, int /*long*/ gc, } } /** - * @param drawable cast=(GdkDrawable *) - * @param gc cast=(GdkGC *) - * @param filled cast=(gint) - * @param points cast=(GdkPoint *),flags=no_out critical - * @param npoints cast=(gint) + * @method flags=dynamic */ public static final native void _gdk_draw_polygon(int /*long*/ drawable, int /*long*/ gc, int filled, int[] points, int npoints); public static final void gdk_draw_polygon(int /*long*/ drawable, int /*long*/ gc, int filled, int[] points, int npoints) { |