diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI')
4 files changed, 130 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 1c8c5a54fb..e8faaef706 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 @@ -6360,6 +6360,47 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixmap_1foreign_1new) } #endif +#ifndef NO__1gdk_1pixmap_1get_1size +JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixmap_1get_1size) + (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) +{ + jint *lparg1=NULL; + jint *lparg2=NULL; + OS_NATIVE_ENTER(env, that, _1gdk_1pixmap_1get_1size_FUNC); +#ifdef JNI_VERSION_1_2 + if (IS_JNI_1_2) { + if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail; + } else +#endif + { + if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; + } +/* + gdk_pixmap_get_size((GdkPixmap *)arg0, (gint *)lparg1, (gint *)lparg2); +*/ + { + OS_LOAD_FUNCTION(fp, gdk_pixmap_get_size) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkPixmap *, gint *, gint *))fp)((GdkPixmap *)arg0, (gint *)lparg1, (gint *)lparg2); + } + } +fail: +#ifdef JNI_VERSION_1_2 + if (IS_JNI_1_2) { + if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, 0); + } else +#endif + { + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); + } + OS_NATIVE_EXIT(env, that, _1gdk_1pixmap_1get_1size_FUNC); +} +#endif + #ifndef NO__1gdk_1pixmap_1new JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixmap_1new) (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3) @@ -7013,6 +7054,26 @@ fail: } #endif +#ifndef NO__1gdk_1window_1get_1height +JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1height) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1height_FUNC); +/* + rc = (jintLong)gdk_window_get_height((GdkWindow *)arg0); +*/ + { + OS_LOAD_FUNCTION(fp, gdk_window_get_height) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); + } + } + OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1height_FUNC); + return rc; +} +#endif + #ifndef NO__1gdk_1window_1get_1internal_1paint_1info JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1get_1internal_1paint_1info) (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintArray arg2, jintArray arg3) @@ -7117,6 +7178,26 @@ fail: } #endif +#ifndef NO__1gdk_1window_1get_1width +JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1width) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1width_FUNC); +/* + rc = (jintLong)gdk_window_get_width((GdkWindow *)arg0); +*/ + { + OS_LOAD_FUNCTION(fp, gdk_window_get_width) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); + } + } + OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1width_FUNC); + return rc; +} +#endif + #ifndef NO__1gdk_1window_1hide JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1hide) (JNIEnv *env, jclass that, jintLong arg0) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c index f444a423e7..fea4b3f131 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c @@ -18,8 +18,8 @@ #ifdef NATIVE_STATS -int OS_nativeFunctionCount = 1402; -int OS_nativeFunctionCallCount[1402]; +int OS_nativeFunctionCount = 1405; +int OS_nativeFunctionCallCount[1405]; char * OS_nativeFunctionNames[] = { #ifndef JNI64 "Call__IIII", @@ -519,6 +519,7 @@ char * OS_nativeFunctionNames[] = { "_1gdk_1pixbuf_1scale", "_1gdk_1pixbuf_1scale_1simple", "_1gdk_1pixmap_1foreign_1new", + "_1gdk_1pixmap_1get_1size", "_1gdk_1pixmap_1new", "_1gdk_1pointer_1grab", "_1gdk_1pointer_1is_1grabbed", @@ -565,12 +566,14 @@ char * OS_nativeFunctionNames[] = { "_1gdk_1window_1get_1children", "_1gdk_1window_1get_1events", "_1gdk_1window_1get_1frame_1extents", + "_1gdk_1window_1get_1height", "_1gdk_1window_1get_1internal_1paint_1info", "_1gdk_1window_1get_1origin", "_1gdk_1window_1get_1parent", "_1gdk_1window_1get_1pointer", "_1gdk_1window_1get_1position", "_1gdk_1window_1get_1user_1data", + "_1gdk_1window_1get_1width", "_1gdk_1window_1hide", "_1gdk_1window_1invalidate_1rect", "_1gdk_1window_1invalidate_1region", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h index f7321e2d6a..4729e23eef 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h @@ -527,6 +527,7 @@ typedef enum { _1gdk_1pixbuf_1scale_FUNC, _1gdk_1pixbuf_1scale_1simple_FUNC, _1gdk_1pixmap_1foreign_1new_FUNC, + _1gdk_1pixmap_1get_1size_FUNC, _1gdk_1pixmap_1new_FUNC, _1gdk_1pointer_1grab_FUNC, _1gdk_1pointer_1is_1grabbed_FUNC, @@ -573,12 +574,14 @@ typedef enum { _1gdk_1window_1get_1children_FUNC, _1gdk_1window_1get_1events_FUNC, _1gdk_1window_1get_1frame_1extents_FUNC, + _1gdk_1window_1get_1height_FUNC, _1gdk_1window_1get_1internal_1paint_1info_FUNC, _1gdk_1window_1get_1origin_FUNC, _1gdk_1window_1get_1parent_FUNC, _1gdk_1window_1get_1pointer_FUNC, _1gdk_1window_1get_1position_FUNC, _1gdk_1window_1get_1user_1data_FUNC, + _1gdk_1window_1get_1width_FUNC, _1gdk_1window_1hide_FUNC, _1gdk_1window_1invalidate_1rect_FUNC, _1gdk_1window_1invalidate_1region_FUNC, 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..34d0342e8d 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 @@ -3695,6 +3695,32 @@ public static final void gdk_cairo_set_source_color(int /*long*/ cairo, GdkColor lock.unlock(); } } +/** + * @param window cast=(GdkWindow *) + * @method flags=dynamic + */ +public static final native int /*long*/ _gdk_window_get_width(int /*long*/ window); +public static final int /*long*/ gdk_window_get_width(int /*long*/ window) { + lock.lock(); + try { + return _gdk_window_get_width(window); + } finally { + lock.unlock(); + } +} +/** + * @param window cast=(GdkWindow *) + * @method flags=dynamic + */ +public static final native int /*long*/ _gdk_window_get_height(int /*long*/ window); +public static final int /*long*/ gdk_window_get_height(int /*long*/ window) { + lock.lock(); + try { + return _gdk_window_get_height(window); + } finally { + lock.unlock(); + } +} /** * @method flags=dynamic * @param window cast=(GdkWindow *) @@ -4074,7 +4100,21 @@ public static final int gdk_drawable_get_depth(int /*long*/ drawable) { lock.unlock(); } } - +/** + * @param pixmap cast=(GdkPixmap *) + * @param width cast=(gint *),flags=no_in critical + * @param height cast=(gint *),flags=no_in critical + * @method flags=dynamic + */ +public static final native void _gdk_pixmap_get_size(int /*long*/ pixmap, int[] width, int[] height); +public static final void gdk_pixmap_get_size(int /*long*/ pixmap, int[] width, int[] height) { + lock.lock(); + try { + _gdk_pixmap_get_size (pixmap,width,height); + } finally { + lock.unlock(); + } +} /** * @param drawable cast=(GdkDrawable *) * @param x cast=(gint) |