diff options
author | Eric Williams | 2018-11-12 21:24:53 +0000 |
---|---|---|
committer | Eric Williams | 2018-11-13 19:52:16 +0000 |
commit | 5d66216af7bfd9af3f6e7086f5719b772f623b0c (patch) | |
tree | be34a6d88c456bd8726d275da00d99a813f1fe99 | |
parent | 9f9824044a4a853020c6186a2c02ef0245e1564d (diff) | |
download | eclipse.platform.swt-5d66216af7bfd9af3f6e7086f5719b772f623b0c.tar.gz eclipse.platform.swt-5d66216af7bfd9af3f6e7086f5719b772f623b0c.tar.xz eclipse.platform.swt-5d66216af7bfd9af3f6e7086f5719b772f623b0c.zip |
Bug 540801: [GTK4] Build SWT on GTK4
Handle GDK functions that have been removed on GTK4.
Change-Id: I92ae7d6e1949337f3f0952c1b8a5914ac9fab92b
Signed-off-by: Eric Williams <ericwill@redhat.com>
5 files changed, 505 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 1d4fbfedca..4fad2d06a4 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 @@ -396,18 +396,56 @@ JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1for_1display) } #endif -#ifndef NO__1gdk_1cursor_1new_1from_1name -JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1name) - (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) +#if (!defined(NO__1gdk_1cursor_1new_1from_1name__I_3B) && !defined(JNI64)) || (!defined(NO__1gdk_1cursor_1new_1from_1name__J_3B) && defined(JNI64)) +#ifndef JNI64 +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1name__I_3B)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) +#else +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1name__J_3B)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) +#endif { jbyte *lparg1=NULL; jintLong rc = 0; - GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1name_FUNC); +#ifndef JNI64 + GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1name__I_3B_FUNC); +#else + GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1name__J_3B_FUNC); +#endif if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; rc = (jintLong)gdk_cursor_new_from_name((GdkDisplay *)arg0, (const gchar *)lparg1); fail: if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); - GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1name_FUNC); +#ifndef JNI64 + GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1name__I_3B_FUNC); +#else + GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1name__J_3B_FUNC); +#endif + return rc; +} +#endif + +#if (!defined(NO__1gdk_1cursor_1new_1from_1name___3BI) && !defined(JNI64)) || (!defined(NO__1gdk_1cursor_1new_1from_1name___3BJ) && defined(JNI64)) +#ifndef JNI64 +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1name___3BI)(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1) +#else +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1name___3BJ)(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1) +#endif +{ + jbyte *lparg0=NULL; + jintLong rc = 0; +#ifndef JNI64 + GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1name___3BI_FUNC); +#else + GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1name___3BJ_FUNC); +#endif + if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; + rc = (jintLong)gdk_cursor_new_from_name((const gchar *)lparg0, (GdkCursor *)arg1); +fail: + if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); +#ifndef JNI64 + GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1name___3BI_FUNC); +#else + GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1name___3BJ_FUNC); +#endif return rc; } #endif @@ -456,6 +494,25 @@ JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1device_1get_1seat) } #endif +#ifndef NO__1gdk_1device_1get_1surface_1at_1position +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1device_1get_1surface_1at_1position) + (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) +{ + jint *lparg1=NULL; + jint *lparg2=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1get_1surface_1at_1position_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; + rc = (jintLong)gdk_device_get_surface_at_position((GdkDevice *)arg0, (gint *)lparg1, (gint *)lparg2); +fail: + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1get_1surface_1at_1position_FUNC); + return rc; +} +#endif + #ifndef NO__1gdk_1device_1get_1window_1at_1position JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1device_1get_1window_1at_1position) (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) @@ -533,13 +590,45 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1ungrab) } #endif -#ifndef NO__1gdk_1device_1warp -JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1warp) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) +#if (!defined(NO__1gdk_1device_1warp__III) && !defined(JNI64)) || (!defined(NO__1gdk_1device_1warp__JII) && defined(JNI64)) +#ifndef JNI64 +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1warp__III)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) +#else +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1warp__JII)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) +#endif { - GDK_NATIVE_ENTER(env, that, _1gdk_1device_1warp_FUNC); +#ifndef JNI64 + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1warp__III_FUNC); +#else + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1warp__JII_FUNC); +#endif + gdk_device_warp((GdkDevice *)arg0, (gint)arg1, (gint)arg2); +#ifndef JNI64 + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1warp__III_FUNC); +#else + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1warp__JII_FUNC); +#endif +} +#endif + +#if (!defined(NO__1gdk_1device_1warp__IIII) && !defined(JNI64)) || (!defined(NO__1gdk_1device_1warp__JJII) && defined(JNI64)) +#ifndef JNI64 +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1warp__IIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) +#else +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1warp__JJII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) +#endif +{ +#ifndef JNI64 + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1warp__IIII_FUNC); +#else + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1warp__JJII_FUNC); +#endif gdk_device_warp((GdkDevice *)arg0, (GdkScreen *)arg1, (gint)arg2, (gint)arg3); - GDK_NATIVE_EXIT(env, that, _1gdk_1device_1warp_FUNC); +#ifndef JNI64 + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1warp__IIII_FUNC); +#else + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1warp__JJII_FUNC); +#endif } #endif @@ -1802,6 +1891,38 @@ fail: } #endif +#ifndef NO__1gdk_1surface_1create_1similar_1surface +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1surface_1create_1similar_1surface) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1create_1similar_1surface_FUNC); + rc = (jintLong)gdk_surface_create_similar_surface((GdkSurface *)arg0, (cairo_content_t)arg1, arg2, arg3); + GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1create_1similar_1surface_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1surface_1destroy +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1destroy) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1destroy_FUNC); + gdk_surface_destroy((GdkSurface *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1destroy_FUNC); +} +#endif + +#ifndef NO__1gdk_1surface_1focus +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1surface_1focus) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1surface_1focus_FUNC); + gdk_surface_focus((GdkSurface *)arg0, arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1surface_1focus_FUNC); +} +#endif + #ifndef NO__1gdk_1test_1simulate_1button JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1test_1simulate_1button) (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h index 6404d87fef..d207c21ec7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h @@ -164,10 +164,63 @@ // Structs which do not exist on GTK4 #define NO_GtkTargetEntry +#define NO_GdkEventWindowState +#define NO_GdkWindowAttr +#define NO_GdkEvent +#define NO_GdkEventAny +#define NO_GdkEventButton +#define NO_GdkEventCrossing +#define NO_GdkEventExpose +#define NO_GdkEventFocus +#define NO_GdkEventKey +#define NO_GdkEventMotion +#define NO_GdkEventScroll // Memmoves for those structs which were removed in GTK4 #define NO_memmove__ILorg_eclipse_swt_internal_gtk_GtkTargetEntry_2I #define NO_memmove__JLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2J +#define NO_memmove__LLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2II +#define NO_memmove__LLorg_eclipse_swt_internal_gtk_GtkTargetEntry_2JJ +#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEvent_2I +#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEvent_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEvent_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEvent_2JJ +#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEventAny_2I +#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEventAny_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventAny_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventAny_2JJ +#define NO_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventButton_2I +#define NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkEventButton_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2JJ +#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEventCrossing_2I +#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEventCrossing_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2JJ +#define NO_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventExpose_2I +#define NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkEventExpose_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventExpose_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventExpose_2JJ +#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEventFocus_2I +#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEventFocus_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2JJ +#define NO_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventKey_2I +#define NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkEventKey_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2JJ +#define NO_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventMotion_2I +#define NO_memmove__JLorg_eclipse_swt_internal_gtk_GdkEventMotion_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ +#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEventScroll_2I +#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEventScroll_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventScroll_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventScroll_2JJ +#define NO_memmove__Iorg_eclipse_swt_internal_gtk_GdkEventWindowState_2I +#define NO_memmove__Jorg_eclipse_swt_internal_gtk_GdkEventWindowState_2J +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2II +#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2JJ // No GtkClipboard on GTK4 #define NO__1gtk_1clipboard_1clear @@ -190,9 +243,23 @@ #define NO__1gtk_1target_1list_1new #define NO__1gtk_1target_1list_1unref -// No GdkScreen on GTK4 +// No GdkScreen on GTK4, including parameter casts #define NO__1gtk_1widget_1get_1screen #define NO__1gtk_1style_1context_1add_1provider_1for_1screen +#define NO__1gdk_1device_1warp__IIII +#define NO__1gdk_1device_1warp__JJII +#define NO__1gdk_1screen_1get_1default +#define NO__1gdk_1screen_1get_1monitor_1at_1point +#define NO__1gdk_1screen_1get_1monitor_1at_1window +#define NO__1gdk_1screen_1get_1monitor_1geometry +#define NO__1gdk_1screen_1get_1monitor_1scale_1factor +#define NO__1gdk_1screen_1get_1monitor_1workarea +#define NO__1gdk_1screen_1get_1n_1monitors +#define NO__1gdk_1screen_1get_1primary_1monitor +#define NO__1gdk_1screen_1get_1resolution +#define NO__1gdk_1screen_1get_1system_1visual +#define NO__1gdk_1screen_1get_1window_1stack +#define NO__1gdk_1screen_1is_1composited // Miscellaneous functions removed from GTK4 #define NO__1gtk_1button_1set_1image @@ -200,6 +267,19 @@ #define NO__1gtk_1toggle_1button_1set_1inconsistent #define NO__1gtk_1toggle_1button_1set_1mode #define NO__1gtk_1toolbar_1set_1icon_1size +#define NO__1gdk_1flush +#define NO__1gdk_1keymap_1get_1for_1display +#define NO__1gdk_1pango_1context_1get +#define NO__1gdk_1set_1program_1class +#define NO__1gdk_1test_1simulate_1button +#define NO__1gdk_1test_1simulate_1key +#define NO__1gdk_1atom_1intern +#define NO__1gdk_1atom_1name +#define NO__1gdk_1cairo_1create +#define NO_gdk_1threads_1leave +#define NO__1gdk_1selection_1owner_1set +#define NO__1gdk_1selection_1owner_1get +#define NO__1gdk_1visual_1get_1depth // Some drawing functions have been removed on GTK4 #define NO__1gtk_1widget_1draw @@ -236,11 +316,64 @@ #define NO__1gtk_1widget_1set_1allocation #define NO__1gtk_1window_1set_1geometry_1hints -// No GdkWindow on GTK4 +// No GdkWindow on GTK4, this includes parameter casting #define NO__1gtk_1widget_1set_1has_1window #define NO__1gtk_1widget_1get_1has_1window #define NO__1gtk_1im_1context_1set_1client_1window #define NO__1gtk_1widget_1set_1parent_1window +#define NO__1gdk_1cairo_1set_1source_1window +#define NO__1gdk_1device_1grab +#define NO__1gdk_1display_1get_1monitor_1at_1window +#define NO__1gdk_1get_1default_1root_1window +#define NO__1gdk_1property_1get +#define NO__1gdk_1window_1add_1filter +#define NO__1gdk_1window_1begin_1draw_1frame +#define NO__1gdk_1window_1create_1similar_1surface +#define NO__1gdk_1window_1destroy +#define NO__1gdk_1window_1end_1draw_1frame +#define NO__1gdk_1window_1focus +#define NO__1gdk_1window_1get_1children +#define NO__1gdk_1window_1get_1device_1position +#define NO__1gdk_1window_1get_1display +#define NO__1gdk_1window_1set_1events +#define NO__1gdk_1window_1get_1events +#define NO__1gdk_1window_1get_1frame_1extents +#define NO__1gdk_1window_1get_1height +#define NO__1gdk_1window_1get_1width +#define NO__1gdk_1window_1get_1origin +#define NO__1gdk_1window_1get_1parent +#define NO__1gdk_1window_1get_1position +#define NO__1gdk_1window_1get_1root_1origin +#define NO__1gdk_1window_1get_1state +#define NO__1gdk_1window_1get_1user_1data +#define NO__1gdk_1window_1get_1visible_1region +#define NO__1gdk_1window_1show +#define NO__1gdk_1window_1hide +#define NO__1gdk_1window_1invalidate_1rect +#define NO__1gdk_1window_1invalidate_1region +#define NO__1gdk_1window_1is_1visible +#define NO__1gdk_1window_1raise +#define NO__1gdk_1window_1lower +#define NO__1gdk_1window_1move +#define NO__1gdk_1window_1move_1resize +#define NO__1gdk_1window_1new +#define NO__1gdk_1window_1process_1updates +#define NO__1gdk_1window_1resize +#define NO__1gdk_1window_1restack +#define NO__1gdk_1window_1set_1cursor +#define NO__1gdk_1window_1set_1decorations +#define NO__1gdk_1window_1set_1events +#define NO__1gdk_1window_1set_1functions +#define NO__1gdk_1window_1set_1override_1redirect +#define NO__1gdk_1window_1set_1user_1data +#define NO__1gdk_1window_1shape_1combine_1region +#define NO__1gdk_1window_1show_1unraised +#define NO__1gdk_1device_1get_1window_1at_1position + +// GdkDragContext removals +#define NO__1gdk_1drag_1context_1get_1dest_1window +#define NO__1gdk_1drag_1context_1list_1targets +#define NO__1gdk_1drag_1status // Some widgets have removed access to their GdkWindows in GTK4 #define NO__1gtk_1text_1view_1get_1window @@ -250,6 +383,19 @@ #define NO__1gtk_1event_1box_1new #define NO__1gtk_1widget_1add_1events #define NO__1gtk_1widget_1get_1events +#define NO__1gdk_1event_1free +#define NO__1gdk_1event_1get +#define NO__1gdk_1event_1peek +#define NO__1gdk_1event_1put +#define NO_GDK_1EVENT_1TYPE +#define NO_GDK_1EVENT_1WINDOW + +// GdkCursor removals +#define NO__1gdk_1cursor_1new_1for_1display +#define NO__1gdk_1cursor_1new_1from_1pixbuf +#define NO__1gdk_1display_1supports_1cursor_1color +#define NO__1gdk_1cursor_1new_1from_1name__I_3B +#define NO__1gdk_1cursor_1new_1from_1name__J_3B #else @@ -267,6 +413,17 @@ #define NO__1gtk_1widget_1set_1has_1surface #define NO__1gtk_1widget_1get_1has_1surface #define NO__1gtk_1widget_1set_1parent_1surface +#define NO__1gdk_1surface_1create_1similar_1surface +#define NO__1gdk_1surface_1destroy +#define NO__1gdk_1surface_1focus +#define NO__1gdk_1device_1get_1surface_1at_1position + +// Miscellaneous functions not present on GTK3 +#define NO__1gdk_1device_1warp__III +#define NO__1gdk_1device_1warp__JII +#define NO__1gdk_1cursor_1new_1from_1name___3BI +#define NO__1gdk_1cursor_1new_1from_1name___3BJ + #endif #include "os_custom.h" 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 7476eb450c..d99f20f821 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 @@ -52,15 +52,34 @@ char * GDK_nativeFunctionNames[] = { "_1gdk_1cairo_1set_1source_1rgba", "_1gdk_1cairo_1set_1source_1window", "_1gdk_1cursor_1new_1for_1display", - "_1gdk_1cursor_1new_1from_1name", +#ifndef JNI64 + "_1gdk_1cursor_1new_1from_1name__I_3B", +#else + "_1gdk_1cursor_1new_1from_1name__J_3B", +#endif +#ifndef JNI64 + "_1gdk_1cursor_1new_1from_1name___3BI", +#else + "_1gdk_1cursor_1new_1from_1name___3BJ", +#endif "_1gdk_1cursor_1new_1from_1pixbuf", "_1gdk_1device_1get_1associated_1device", "_1gdk_1device_1get_1seat", + "_1gdk_1device_1get_1surface_1at_1position", "_1gdk_1device_1get_1window_1at_1position", "_1gdk_1device_1grab", "_1gdk_1device_1manager_1get_1client_1pointer", "_1gdk_1device_1ungrab", - "_1gdk_1device_1warp", +#ifndef JNI64 + "_1gdk_1device_1warp__III", +#else + "_1gdk_1device_1warp__JII", +#endif +#ifndef JNI64 + "_1gdk_1device_1warp__IIII", +#else + "_1gdk_1device_1warp__JJII", +#endif "_1gdk_1display_1beep", "_1gdk_1display_1get_1default", "_1gdk_1display_1get_1default_1group", @@ -142,6 +161,9 @@ char * GDK_nativeFunctionNames[] = { "_1gdk_1selection_1owner_1get", "_1gdk_1selection_1owner_1set", "_1gdk_1set_1program_1class", + "_1gdk_1surface_1create_1similar_1surface", + "_1gdk_1surface_1destroy", + "_1gdk_1surface_1focus", "_1gdk_1test_1simulate_1button", "_1gdk_1test_1simulate_1key", "_1gdk_1text_1property_1to_1utf8_1list_1for_1display", 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 70e255b2d0..903397cc8b 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 @@ -62,15 +62,34 @@ typedef enum { _1gdk_1cairo_1set_1source_1rgba_FUNC, _1gdk_1cairo_1set_1source_1window_FUNC, _1gdk_1cursor_1new_1for_1display_FUNC, - _1gdk_1cursor_1new_1from_1name_FUNC, +#ifndef JNI64 + _1gdk_1cursor_1new_1from_1name__I_3B_FUNC, +#else + _1gdk_1cursor_1new_1from_1name__J_3B_FUNC, +#endif +#ifndef JNI64 + _1gdk_1cursor_1new_1from_1name___3BI_FUNC, +#else + _1gdk_1cursor_1new_1from_1name___3BJ_FUNC, +#endif _1gdk_1cursor_1new_1from_1pixbuf_FUNC, _1gdk_1device_1get_1associated_1device_FUNC, _1gdk_1device_1get_1seat_FUNC, + _1gdk_1device_1get_1surface_1at_1position_FUNC, _1gdk_1device_1get_1window_1at_1position_FUNC, _1gdk_1device_1grab_FUNC, _1gdk_1device_1manager_1get_1client_1pointer_FUNC, _1gdk_1device_1ungrab_FUNC, - _1gdk_1device_1warp_FUNC, +#ifndef JNI64 + _1gdk_1device_1warp__III_FUNC, +#else + _1gdk_1device_1warp__JII_FUNC, +#endif +#ifndef JNI64 + _1gdk_1device_1warp__IIII_FUNC, +#else + _1gdk_1device_1warp__JJII_FUNC, +#endif _1gdk_1display_1beep_FUNC, _1gdk_1display_1get_1default_FUNC, _1gdk_1display_1get_1default_1group_FUNC, @@ -152,6 +171,9 @@ typedef enum { _1gdk_1selection_1owner_1get_FUNC, _1gdk_1selection_1owner_1set_FUNC, _1gdk_1set_1program_1class_FUNC, + _1gdk_1surface_1create_1similar_1surface_FUNC, + _1gdk_1surface_1destroy_FUNC, + _1gdk_1surface_1focus_FUNC, _1gdk_1test_1simulate_1button_FUNC, _1gdk_1test_1simulate_1key_FUNC, _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java index 7416136d04..da1e07b054 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java @@ -388,6 +388,7 @@ public class GDK extends OS { * @param data cast=(gpointer) */ public static final native void _gdk_window_add_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_add_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data) { lock.lock(); try { @@ -402,6 +403,7 @@ public class GDK extends OS { * @method flags=dynamic */ public static final native long /*int*/ _gdk_window_begin_draw_frame(long /*int*/ window, long /*int*/ region); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_window_begin_draw_frame(long /*int*/ window, long /*int*/ region) { lock.lock(); try { @@ -416,6 +418,7 @@ public class GDK extends OS { * @method flags=dynamic */ public static final native long /*int*/ _gdk_window_end_draw_frame(long /*int*/ window, long /*int*/ context); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_window_end_draw_frame(long /*int*/ window, long /*int*/ context) { lock.lock(); try { @@ -426,6 +429,7 @@ public class GDK extends OS { } /** @param atom_name cast=(const gchar *),flags=no_out critical */ public static final native long /*int*/ _gdk_atom_intern(byte[] atom_name, boolean only_if_exists); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_atom_intern(byte[] atom_name, boolean only_if_exists) { lock.lock(); try { @@ -436,6 +440,7 @@ public class GDK extends OS { } /** @param atom cast=(GdkAtom) */ public static final native long /*int*/ _gdk_atom_name(long /*int*/ atom); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_atom_name(long /*int*/ atom) { lock.lock(); try { @@ -457,10 +462,11 @@ public class GDK extends OS { } } /** - * @param window cast=(GdkWindow *) * @method flags=dynamic + * @param window cast=(GdkWindow *) */ public static final native long /*int*/ _gdk_cairo_create(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */ public static final long /*int*/ gdk_cairo_create(long /*int*/ window) { lock.lock(); try { @@ -512,6 +518,7 @@ public class GDK extends OS { * @param window cast=(GdkWindow *) */ public static final native int _gdk_window_get_state(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final int gdk_window_get_state(long /*int*/ window) { lock.lock(); try { @@ -524,6 +531,7 @@ public class GDK extends OS { * @param window cast=(GdkWindow *) */ public static final native int _gdk_window_get_width(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final int gdk_window_get_width(long /*int*/ window) { lock.lock(); try { @@ -536,6 +544,7 @@ public class GDK extends OS { * @param window cast=(GdkWindow *) */ public static final native long /*int*/ _gdk_window_get_visible_region(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_window_get_visible_region(long /*int*/ window) { lock.lock(); try { @@ -548,6 +557,7 @@ public class GDK extends OS { * @param window cast=(GdkWindow *) */ public static final native int _gdk_window_get_height(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final int gdk_window_get_height(long /*int*/ window) { lock.lock(); try { @@ -579,6 +589,7 @@ public class GDK extends OS { * @param y cast=(gdouble) */ public static final native void _gdk_cairo_set_source_window(long /*int*/ cairo, long /*int*/ window, int x, int y); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_cairo_set_source_window(long /*int*/ cairo, long /*int*/ window, int x, int y) { lock.lock(); try { @@ -592,6 +603,7 @@ public class GDK extends OS { * @param cursor_type cast=(GdkCursorType) */ public static final native long /*int*/ _gdk_cursor_new_for_display(long /*int*/ display, long /*int*/ cursor_type); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_cursor_new_for_display(long /*int*/ display, long /*int*/ cursor_type) { lock.lock(); try { @@ -600,10 +612,12 @@ public class GDK extends OS { lock.unlock(); } } - /** @param display cast=(GdkDisplay *) - * @param cursor_name cast=(const gchar *) + /** + * @param display cast=(GdkDisplay *) + * @param cursor_name cast=(const gchar *) */ public static final native long /*int*/ _gdk_cursor_new_from_name(long /*int*/ display, byte[] cursor_name); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_cursor_new_from_name(long /*int*/ display, byte[] cursor_name) { lock.lock(); try { @@ -613,12 +627,27 @@ public class GDK extends OS { } } /** + * @param cursor_name cast=(const gchar *) + * @param fallback cast=(GdkCursor *) + */ + public static final native long /*int*/ _gdk_cursor_new_from_name(byte[] cursor_name, long /*int*/ fallback); + /** [GTK4 only, if-def'd in os.h] */ + public static final long /*int*/ gdk_cursor_new_from_name(byte[] cursor_name, long /*int*/ fallback) { + lock.lock(); + try { + return _gdk_cursor_new_from_name(cursor_name, fallback); + } finally { + lock.unlock(); + } + } + /** * @param display cast=(GdkDisplay *) * @param pixbuf cast=(GdkPixbuf *) * @param x cast=(gint) * @param y cast=(gint) */ public static final native long /*int*/ _gdk_cursor_new_from_pixbuf(long /*int*/ display, long /*int*/ pixbuf, int x, int y); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_cursor_new_from_pixbuf(long /*int*/ display, long /*int*/ pixbuf, int x, int y) { lock.lock(); try { @@ -634,6 +663,7 @@ public class GDK extends OS { * @param y cast=(gint) */ public static final native void _gdk_device_warp(long /*int*/ device, long /*int*/ screen, int x, int y); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_device_warp(long /*int*/ device, long /*int*/ screen, int x, int y) { lock.lock(); try { @@ -642,6 +672,21 @@ public class GDK extends OS { lock.unlock(); } } + /** + * @param device cast=(GdkDevice *) + * @param x cast=(gint) + * @param y cast=(gint) + */ + public static final native void _gdk_device_warp(long /*int*/ device, int x, int y); + /** [GTK4 only, if-def'd in os.h] */ + public static final void gdk_device_warp(long /*int*/ device, int x, int y) { + lock.lock(); + try { + _gdk_device_warp(device, x, y); + } finally { + lock.unlock(); + } + } public static final native long /*int*/ _gdk_display_get_default(); public static final long /*int*/ gdk_display_get_default() { lock.lock(); @@ -679,6 +724,7 @@ public class GDK extends OS { * @param window cast=(GdkWindow *) */ public static final native long /*int*/ _gdk_window_get_display(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_window_get_display(long /*int*/ window) { lock.lock(); try { @@ -716,6 +762,7 @@ public class GDK extends OS { * @param win_y cast=(gint *) */ public static final native long /*int*/ _gdk_device_get_window_at_position(long /*int*/ device, int[] win_x, int[] win_y); + /** [GTK3 only] */ public static final long /*int*/ gdk_device_get_window_at_position(long /*int*/ device, int[] win_x, int[] win_y) { lock.lock(); try { @@ -725,9 +772,25 @@ public class GDK extends OS { } } /** + * @param device cast=(GdkDevice *) + * @param win_x cast=(gint *) + * @param win_y cast=(gint *) + */ + public static final native long /*int*/ _gdk_device_get_surface_at_position(long /*int*/ device, int[] win_x, int[] win_y); + /** [GTK4 only] */ + public static final long /*int*/ gdk_device_get_surface_at_position(long /*int*/ device, int[] win_x, int[] win_y) { + lock.lock(); + try { + return _gdk_device_get_window_at_position(device, win_x, win_y); + } finally { + lock.unlock(); + } + } + /** * @param display cast=(GdkDisplay *) */ public static final native boolean _gdk_display_supports_cursor_color(long /*int*/ display); + /** [GTK3 only, if-def'd in os.h] */ public static final boolean gdk_display_supports_cursor_color(long /*int*/ display) { lock.lock(); try { @@ -752,6 +815,7 @@ public class GDK extends OS { * @param context cast=(GdkDragContext *) */ public static final native long /*int*/ _gdk_drag_context_get_dest_window(long /*int*/ context); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_drag_context_get_dest_window(long /*int*/ context) { lock.lock(); try { @@ -776,6 +840,7 @@ public class GDK extends OS { * @param context cast=(GdkDragContext *) */ public static final native long /*int*/ _gdk_drag_context_list_targets(long /*int*/ context); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_drag_context_list_targets(long /*int*/ context) { lock.lock(); try { @@ -790,6 +855,7 @@ public class GDK extends OS { * @param time cast=(guint32) */ public static final native void _gdk_drag_status(long /*int*/ context, int action, int time); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_drag_status(long /*int*/ context, int action, int time) { lock.lock(); try { @@ -823,6 +889,7 @@ public class GDK extends OS { } /** @param event cast=(GdkEvent *) */ public static final native void _gdk_event_free(long /*int*/ event); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_event_free(long /*int*/ event) { lock.lock(); try { @@ -832,6 +899,7 @@ public class GDK extends OS { } } public static final native long /*int*/ _gdk_event_get(); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_event_get() { lock.lock(); try { @@ -941,6 +1009,7 @@ public class GDK extends OS { } } public static final native long /*int*/ _gdk_event_peek(); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_event_peek() { lock.lock(); try { @@ -951,6 +1020,7 @@ public class GDK extends OS { } /** @param event cast=(GdkEvent *) */ public static final native void _gdk_event_put(long /*int*/ event); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_event_put(long /*int*/ event) { lock.lock(); try { @@ -984,6 +1054,7 @@ public class GDK extends OS { } } public static final native void _gdk_flush(); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_flush() { lock.lock(); try { @@ -993,6 +1064,7 @@ public class GDK extends OS { } } public static final native long /*int*/ _gdk_get_default_root_window(); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_get_default_root_window() { lock.lock(); try { @@ -1005,6 +1077,7 @@ public class GDK extends OS { * @param display cast=(GdkDisplay *) */ public static final native long /*int*/ _gdk_keymap_get_for_display(long /*int*/ display); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_keymap_get_for_display(long /*int*/ display) { lock.lock(); try { @@ -1047,6 +1120,7 @@ public class GDK extends OS { } } public static final native long /*int*/ _gdk_pango_context_get(); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_pango_context_get() { lock.lock(); try { @@ -1245,7 +1319,7 @@ public class GDK extends OS { * @param time_ cast=(guint32) */ public static final native int _gdk_device_grab(long /*int*/ device, long /*int*/ window, int grab_ownership, boolean owner_events, int event_mask, long /*int*/ cursor, int time_); - /** [GTK3; 3.20 deprecated] */ + /** [GTK3 only, if-def'd in os.h; 3.20 deprecated, replaced] */ public static final int gdk_device_grab(long /*int*/ device, long /*int*/ window, int grab_ownership, boolean owner_events, int event_mask, long /*int*/ cursor, int time_) { lock.lock(); try { @@ -1304,6 +1378,7 @@ public class GDK extends OS { * @param data cast=(guchar **) */ public static final native boolean _gdk_property_get(long /*int*/ window, long /*int*/ property, long /*int*/ type, long /*int*/ offset, long /*int*/ length, int pdelete, long /*int*/[] actual_property_type, int[] actual_format, int[] actual_length, long /*int*/[] data); + /** [GTK3 only, if-def'd in os.h] */ public static final boolean gdk_property_get(long /*int*/ window, long /*int*/ property, long /*int*/ type, long /*int*/ offset, long /*int*/ length, int pdelete, long /*int*/[] actual_property_type, int[] actual_format, int[] actual_length, long /*int*/[] data) { lock.lock(); try { @@ -1374,6 +1449,7 @@ public class GDK extends OS { } } public static final native long /*int*/ _gdk_screen_get_default(); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_screen_get_default() { lock.lock(); try { @@ -1384,6 +1460,7 @@ public class GDK extends OS { } /** @param screen cast=(GdkScreen *) */ public static final native long /*int*/ _gdk_screen_get_window_stack(long /*int*/ screen); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_screen_get_window_stack(long /*int*/ screen) { lock.lock(); try { @@ -1396,6 +1473,7 @@ public class GDK extends OS { * @param screen cast=(GdkScreen *) */ public static final native double _gdk_screen_get_resolution(long /*int*/ screen); + /** [GTK3 only, if-def'd in os.h] */ public static final double gdk_screen_get_resolution(long /*int*/ screen) { lock.lock(); try { @@ -1410,6 +1488,7 @@ public class GDK extends OS { * @param monitor_num cast=(gint) */ public static final native int _gdk_screen_get_monitor_scale_factor(long /*int*/ screen, int monitor_num); + /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */ public static final int gdk_screen_get_monitor_scale_factor(long /*int*/ screen, int monitor_num) { lock.lock(); try { @@ -1437,6 +1516,7 @@ public class GDK extends OS { * @param y cast=(gint) */ public static final native int _gdk_screen_get_monitor_at_point (long /*int*/ screen, int x, int y); + /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */ public static final int gdk_screen_get_monitor_at_point (long /*int*/ screen, int x, int y) { lock.lock(); try { @@ -1451,6 +1531,7 @@ public class GDK extends OS { * @param window cast=(GdkWindow *) */ public static final native int _gdk_screen_get_monitor_at_window(long /*int*/ screen, long /*int*/ window); + /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */ public static final int gdk_screen_get_monitor_at_window(long /*int*/ screen, long /*int*/ window) { lock.lock(); try { @@ -1489,6 +1570,7 @@ public class GDK extends OS { * @param window cast=(GdkWindow *) */ public static final native long /*int*/ _gdk_display_get_monitor_at_window(long /*int*/ display, long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_display_get_monitor_at_window(long /*int*/ display, long /*int*/ window) { lock.lock(); try { @@ -1539,6 +1621,7 @@ public class GDK extends OS { * @param dest flags=no_in */ public static final native void _gdk_screen_get_monitor_geometry (long /*int*/ screen, int monitor_num, GdkRectangle dest); + /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */ public static final void gdk_screen_get_monitor_geometry (long /*int*/ screen, int monitor_num, GdkRectangle dest) { lock.lock(); try { @@ -1579,6 +1662,7 @@ public class GDK extends OS { * @param dest flags=no_in */ public static final native void _gdk_screen_get_monitor_workarea (long /*int*/ screen, int monitor_num, GdkRectangle dest); + /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */ public static final void gdk_screen_get_monitor_workarea (long /*int*/ screen, int monitor_num, GdkRectangle dest) { lock.lock(); try { @@ -1592,6 +1676,7 @@ public class GDK extends OS { * @param screen cast=(GdkScreen *) */ public static final native int _gdk_screen_get_n_monitors(long /*int*/ screen); + /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */ public static final int gdk_screen_get_n_monitors(long /*int*/ screen) { lock.lock(); try { @@ -1605,6 +1690,7 @@ public class GDK extends OS { * @param screen cast=(GdkScreen *) */ public static final native int _gdk_screen_get_primary_monitor(long /*int*/ screen); + /** [GTK3 only, if-def'd in os.h; 3.22 deprecated, replaced] */ public static final int gdk_screen_get_primary_monitor(long /*int*/ screen) { lock.lock(); try { @@ -1617,6 +1703,7 @@ public class GDK extends OS { * @param screen cast=(GdkScreen *) */ public static final native long /*int*/ _gdk_screen_get_system_visual(long /*int*/ screen); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_screen_get_system_visual(long /*int*/ screen) { lock.lock(); try { @@ -1641,6 +1728,7 @@ public class GDK extends OS { * @param screen cast=(GdkScreen *) */ public static final native boolean _gdk_screen_is_composited(long /*int*/ screen); + /** [GTK3 only, if-def'd in os.h] */ public static final boolean gdk_screen_is_composited(long /*int*/ screen) { lock.lock(); try { @@ -1699,6 +1787,7 @@ public class GDK extends OS { } /** @param program_class cast=(const char *) */ public static final native void _gdk_set_program_class(byte[] program_class); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_set_program_class(byte[] program_class) { lock.lock(); try { @@ -1709,6 +1798,7 @@ public class GDK extends OS { } /** @param atom cast=(GdkAtom) */ public static final native void _gdk_selection_owner_get(long /*int*/ atom); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_selection_owner_get(long /*int*/ atom) { lock.lock(); try { @@ -1724,6 +1814,7 @@ public class GDK extends OS { * @param send_event cast=(gboolean) */ public static final native void _gdk_selection_owner_set(long /*int*/ owner, long /*int*/ atom, int time, boolean send_event); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_selection_owner_set(long /*int*/ owner, long /*int*/ atom, int time, boolean send_event) { lock.lock(); try { @@ -1785,6 +1876,7 @@ public class GDK extends OS { * @param key_pressrelease cast=(GdkEventType) */ public static final native boolean _gdk_test_simulate_key(long /*int*/ window, int x, int y, int keyval, int modifiers, int key_pressrelease); + /** [GTK3 only, if-def'd in os.h] */ public static final boolean gdk_test_simulate_key(long /*int*/ window, int x, int y, int keyval, int modifiers, int key_pressrelease) { lock.lock(); try { @@ -1822,6 +1914,7 @@ public class GDK extends OS { * @param visual cast=(GdkVisual *) */ public static final native int _gdk_visual_get_depth(long /*int*/ visual); + /** [GTK3 only, if-def'd in os.h] */ public static final int gdk_visual_get_depth(long /*int*/ visual) { lock.lock(); try { @@ -1835,6 +1928,7 @@ public class GDK extends OS { * @param content cast=(cairo_content_t) */ public static final native long /*int*/ _gdk_window_create_similar_surface(long /*int*/ window, int content, int width, int height); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_window_create_similar_surface(long /*int*/ window, int content, int width, int height) { lock.lock(); try { @@ -1843,8 +1937,23 @@ public class GDK extends OS { lock.unlock(); } } + /** + * @param window cast=(GdkSurface *) + * @param content cast=(cairo_content_t) + */ + public static final native long /*int*/ _gdk_surface_create_similar_surface(long /*int*/ window, int content, int width, int height); + /** [GTK4 only, if-def'd in os.h] */ + public static final long /*int*/ gdk_surface_create_similar_surface(long /*int*/ window, int content, int width, int height) { + lock.lock(); + try { + return _gdk_window_create_similar_surface(window, content, width, height); + } finally { + lock.unlock(); + } + } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_destroy(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_destroy(long /*int*/ window) { lock.lock(); try { @@ -1853,8 +1962,20 @@ public class GDK extends OS { lock.unlock(); } } + /** @param window cast=(GdkSurface *) */ + public static final native void _gdk_surface_destroy(long /*int*/ window); + /** [GTK4 only, if-def'd in os.h] */ + public static final void gdk_surface_destroy(long /*int*/ window) { + lock.lock(); + try { + _gdk_window_destroy(window); + } finally { + lock.unlock(); + } + } /** @param window cast=(GdkWindow *) */ public static final native long /*int*/ _gdk_window_get_children(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_window_get_children(long /*int*/ window) { lock.lock(); try { @@ -1865,6 +1986,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native int _gdk_window_get_events(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final int gdk_window_get_events(long /*int*/ window) { lock.lock(); try { @@ -1875,6 +1997,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_focus(long /*int*/ window, int timestamp); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_focus(long /*int*/ window, int timestamp) { lock.lock(); try { @@ -1883,11 +2006,23 @@ public class GDK extends OS { lock.unlock(); } } + /** @param surface cast=(GdkSurface *) */ + public static final native void _gdk_surface_focus(long /*int*/ surface, int timestamp); + /** [GTK4 only, if-def'd in os.h] */ + public static final void gdk_surface_focus(long /*int*/ surface, int timestamp) { + lock.lock(); + try { + _gdk_window_focus(surface, timestamp); + } finally { + lock.unlock(); + } + } /** * @param window cast=(GdkWindow *) * @param rect cast=(GdkRectangle *),flags=no_in */ public static final native void _gdk_window_get_frame_extents(long /*int*/ window, GdkRectangle rect); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_get_frame_extents(long /*int*/ window, GdkRectangle rect) { lock.lock(); try { @@ -1902,6 +2037,7 @@ public class GDK extends OS { * @param y cast=(gint *) */ public static final native int _gdk_window_get_origin(long /*int*/ window, int[] x, int[] y); + /** [GTK3 only, if-def'd in os.h] */ public static final int gdk_window_get_origin(long /*int*/ window, int[] x, int[] y) { lock.lock(); try { @@ -1918,6 +2054,7 @@ public class GDK extends OS { * @param mask cast=(GdkModifierType *) */ public static final native long /*int*/ _gdk_window_get_device_position(long /*int*/ window, long /*int*/ device, int[] x, int[] y, int[] mask); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_window_get_device_position(long /*int*/ window, long /*int*/ device, int[] x, int[] y, int[] mask) { lock.lock(); try { @@ -1928,6 +2065,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native long /*int*/ _gdk_window_get_parent(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_window_get_parent(long /*int*/ window) { lock.lock(); try { @@ -1942,6 +2080,7 @@ public class GDK extends OS { * @param y cast=(gint *) */ public static final native void _gdk_window_get_position(long /*int*/ window, int[] x, int[] y); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_get_position(long /*int*/ window, int[] x, int[] y) { lock.lock(); try { @@ -1956,6 +2095,7 @@ public class GDK extends OS { * @param y cast=(gint *) */ public static final native void _gdk_window_get_root_origin(long /*int*/ window, int[] x, int[] y); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_get_root_origin(long /*int*/ window, int[] x, int[] y) { lock.lock(); try { @@ -1969,6 +2109,7 @@ public class GDK extends OS { * @param data cast=(gpointer *) */ public static final native void _gdk_window_get_user_data(long /*int*/ window, long /*int*/[] data); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_get_user_data(long /*int*/ window, long /*int*/[] data) { lock.lock(); try { @@ -1979,6 +2120,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_hide(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_hide(long /*int*/ window) { lock.lock(); try { @@ -1993,6 +2135,7 @@ public class GDK extends OS { * @param invalidate_children cast=(gboolean) */ public static final native void _gdk_window_invalidate_rect(long /*int*/ window, GdkRectangle rectangle, boolean invalidate_children); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_invalidate_rect(long /*int*/ window, GdkRectangle rectangle, boolean invalidate_children) { lock.lock(); try { @@ -2007,6 +2150,7 @@ public class GDK extends OS { * @param invalidate_children cast=(gboolean) */ public static final native void _gdk_window_invalidate_region(long /*int*/ window, long /*int*/ region, boolean invalidate_children); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_invalidate_region(long /*int*/ window, long /*int*/ region, boolean invalidate_children) { lock.lock(); try { @@ -2017,6 +2161,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native boolean _gdk_window_is_visible(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final boolean gdk_window_is_visible(long /*int*/ window) { lock.lock(); try { @@ -2027,6 +2172,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_move(long /*int*/ window, int x, int y); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_move(long /*int*/ window, int x, int y) { lock.lock(); try { @@ -2037,6 +2183,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_move_resize(long /*int*/ window, int x, int y, int width, int height); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_move_resize(long /*int*/ window, int x, int y, int width, int height) { lock.lock(); try { @@ -2050,6 +2197,7 @@ public class GDK extends OS { * @param attributes flags=no_out */ public static final native long /*int*/ _gdk_window_new(long /*int*/ parent, GdkWindowAttr attributes, int attributes_mask); + /** [GTK3 only, if-def'd in os.h] */ public static final long /*int*/ gdk_window_new(long /*int*/ parent, GdkWindowAttr attributes, int attributes_mask) { lock.lock(); try { @@ -2060,6 +2208,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_lower(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_lower(long /*int*/ window) { lock.lock(); try { @@ -2072,6 +2221,7 @@ public class GDK extends OS { * @method flags=dynamic */ public static final native void _gdk_window_process_all_updates(); + /** [GTK3 only; 3.16 deprecated, replaced] */ public static final void gdk_window_process_all_updates() { lock.lock(); try { @@ -2086,6 +2236,7 @@ public class GDK extends OS { * @param update_children cast=(gboolean) */ public static final native void _gdk_window_process_updates(long /*int*/ window, boolean update_children); + /** [GTK3 only, if-def'd in os.h; 3.16 deprecated, replaced] */ public static final void gdk_window_process_updates(long /*int*/ window, boolean update_children) { lock.lock(); try { @@ -2096,6 +2247,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_raise(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_raise(long /*int*/ window) { lock.lock(); try { @@ -2106,6 +2258,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_resize(long /*int*/ window, int width, int height); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_resize(long /*int*/ window, int width, int height) { lock.lock(); try { @@ -2120,6 +2273,7 @@ public class GDK extends OS { * @param above cast=(gboolean) */ public static final native void _gdk_window_restack(long /*int*/ window, long /*int*/ sibling, boolean above); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_restack(long /*int*/ window, long /*int*/ sibling, boolean above) { lock.lock(); try { @@ -2144,6 +2298,7 @@ public class GDK extends OS { * @param cursor cast=(GdkCursor *) */ public static final native void _gdk_window_set_cursor(long /*int*/ window, long /*int*/ cursor); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_set_cursor(long /*int*/ window, long /*int*/ cursor) { lock.lock(); try { @@ -2157,6 +2312,7 @@ public class GDK extends OS { * @param decorations cast=(GdkWMDecoration) */ public static final native void _gdk_window_set_decorations(long /*int*/ window, int decorations); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_set_decorations(long /*int*/ window, int decorations) { lock.lock(); try { @@ -2170,6 +2326,7 @@ public class GDK extends OS { * @param functions cast=(GdkWMFunction) */ public static final native void _gdk_window_set_functions(long /*int*/ window, int functions); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_set_functions(long /*int*/ window, int functions) { lock.lock(); try { @@ -2180,6 +2337,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_set_events(long /*int*/ window, int event_mask); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_set_events(long /*int*/ window, int event_mask) { lock.lock(); try { @@ -2193,6 +2351,7 @@ public class GDK extends OS { * @param override_redirect cast=(gboolean) */ public static final native void _gdk_window_set_override_redirect(long /*int*/ window, boolean override_redirect); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_set_override_redirect(long /*int*/ window, boolean override_redirect) { lock.lock(); try { @@ -2206,6 +2365,7 @@ public class GDK extends OS { * @param user_data cast=(gpointer) */ public static final native void _gdk_window_set_user_data(long /*int*/ window, long /*int*/ user_data); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_set_user_data(long /*int*/ window, long /*int*/ user_data) { lock.lock(); try { @@ -2221,6 +2381,7 @@ public class GDK extends OS { * @param offset_y cast=(gint) */ public static final native void _gdk_window_shape_combine_region (long /*int*/ window, long /*int*/ shape_region, int offset_x, int offset_y); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_shape_combine_region (long /*int*/ window, long /*int*/ shape_region, int offset_x, int offset_y) { lock.lock(); try { @@ -2231,6 +2392,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_show(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_show(long /*int*/ window) { lock.lock(); try { @@ -2241,6 +2403,7 @@ public class GDK extends OS { } /** @param window cast=(GdkWindow *) */ public static final native void _gdk_window_show_unraised(long /*int*/ window); + /** [GTK3 only, if-def'd in os.h] */ public static final void gdk_window_show_unraised(long /*int*/ window) { lock.lock(); try { |