Bug 570533 - [GTK4] Make separate GTK3.java and GTK4.java native
wrappers
- Grouped up general GTK functions
- Added comment headers for function groups for GtkFileFilter,
GtkFontChooserDialog, GtkFontChooser Interface, GtkSearchEntry,
GtkSeparator, GtkIMContext, GtkIMMulticontext, GtkListStore,
GtkCssProvider
- Move gtk_style_context_add_provider_for_screen,
gtk_style_context_add_provider_for_display to their respective files
- Move GtkMenu, GtkMenuButton, GtkLabel functions
Change-Id: Iacc1c54b1c375c7ec9d05f4ab0ece3241e78ec6b
Signed-off-by: Paul D'Pong <sdamrong@redhat.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/181017
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c
index f8c621e..eb5fc32 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c
@@ -1006,6 +1006,26 @@
}
#endif
+#ifndef NO_gtk_1label_1set_1line_1wrap
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1label_1set_1line_1wrap)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1label_1set_1line_1wrap_FUNC);
+ gtk_label_set_line_wrap((GtkLabel *)arg0, (gboolean)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1label_1set_1line_1wrap_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1label_1set_1line_1wrap_1mode
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1label_1set_1line_1wrap_1mode)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1label_1set_1line_1wrap_1mode_FUNC);
+ gtk_label_set_line_wrap_mode((GtkLabel *)arg0, (PangoWrapMode)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1label_1set_1line_1wrap_1mode_FUNC);
+}
+#endif
+
#ifndef NO_gtk_1main_1do_1event
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1main_1do_1event)
(JNIEnv *env, jclass that, jlong arg0)
@@ -1096,6 +1116,28 @@
}
#endif
+#ifndef NO_gtk_1menu_1popup
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1popup)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jint arg5, jint arg6)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1popup_FUNC);
+ gtk_menu_popup((GtkMenu *)arg0, (GtkWidget *)arg1, (GtkWidget *)arg2, (GtkMenuPositionFunc)arg3, (gpointer)arg4, (guint)arg5, (guint32)arg6);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1popup_FUNC);
+}
+G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
+
+#ifndef NO_gtk_1menu_1popup_1at_1pointer
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1popup_1at_1pointer)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1menu_1popup_1at_1pointer_FUNC);
+ gtk_menu_popup_at_pointer((GtkMenu *)arg0, (const GdkEvent*)arg1);
+ GTK3_NATIVE_EXIT(env, that, gtk_1menu_1popup_1at_1pointer_FUNC);
+}
+#endif
+
#ifndef NO_gtk_1menu_1shell_1deactivate
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1menu_1shell_1deactivate)
(JNIEnv *env, jclass that, jlong arg0)
@@ -1438,6 +1480,16 @@
G_GNUC_END_IGNORE_DEPRECATIONS
#endif
+#ifndef NO_gtk_1style_1context_1add_1provider_1for_1screen
+JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1style_1context_1add_1provider_1for_1screen)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
+{
+ GTK3_NATIVE_ENTER(env, that, gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
+ gtk_style_context_add_provider_for_screen((GdkScreen *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
+ GTK3_NATIVE_EXIT(env, that, gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
+}
+#endif
+
#ifndef NO_gtk_1style_1context_1invalidate
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1style_1context_1invalidate)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.c
index 6a0227c..1903f3f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.c
@@ -104,6 +104,8 @@
"gtk_1image_1set_1from_1icon_1name",
"gtk_1image_1set_1from_1surface",
"gtk_1init_1check",
+ "gtk_1label_1set_1line_1wrap",
+ "gtk_1label_1set_1line_1wrap_1mode",
"gtk_1main_1do_1event",
"gtk_1main_1iteration_1do",
"gtk_1menu_1bar_1new",
@@ -112,6 +114,8 @@
"gtk_1menu_1item_1set_1submenu",
"gtk_1menu_1new",
"gtk_1menu_1popdown",
+ "gtk_1menu_1popup",
+ "gtk_1menu_1popup_1at_1pointer",
"gtk_1menu_1shell_1deactivate",
"gtk_1menu_1shell_1insert",
"gtk_1menu_1shell_1set_1take_1focus",
@@ -140,6 +144,7 @@
"gtk_1status_1icon_1set_1from_1pixbuf",
"gtk_1status_1icon_1set_1tooltip_1text",
"gtk_1status_1icon_1set_1visible",
+ "gtk_1style_1context_1add_1provider_1for_1screen",
"gtk_1style_1context_1invalidate",
"gtk_1target_1list_1new",
"gtk_1target_1list_1unref",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.h
index 7cc5e94..1583638 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3_stats.h
@@ -114,6 +114,8 @@
gtk_1image_1set_1from_1icon_1name_FUNC,
gtk_1image_1set_1from_1surface_FUNC,
gtk_1init_1check_FUNC,
+ gtk_1label_1set_1line_1wrap_FUNC,
+ gtk_1label_1set_1line_1wrap_1mode_FUNC,
gtk_1main_1do_1event_FUNC,
gtk_1main_1iteration_1do_FUNC,
gtk_1menu_1bar_1new_FUNC,
@@ -122,6 +124,8 @@
gtk_1menu_1item_1set_1submenu_FUNC,
gtk_1menu_1new_FUNC,
gtk_1menu_1popdown_FUNC,
+ gtk_1menu_1popup_FUNC,
+ gtk_1menu_1popup_1at_1pointer_FUNC,
gtk_1menu_1shell_1deactivate_FUNC,
gtk_1menu_1shell_1insert_FUNC,
gtk_1menu_1shell_1set_1take_1focus_FUNC,
@@ -150,6 +154,7 @@
gtk_1status_1icon_1set_1from_1pixbuf_FUNC,
gtk_1status_1icon_1set_1tooltip_1text_FUNC,
gtk_1status_1icon_1set_1visible_FUNC,
+ gtk_1style_1context_1add_1provider_1for_1screen_FUNC,
gtk_1style_1context_1invalidate_FUNC,
gtk_1target_1list_1new_FUNC,
gtk_1target_1list_1unref_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c
index a4683ae..bd930fa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c
@@ -639,6 +639,36 @@
}
#endif
+#ifndef NO_gtk_1label_1set_1wrap
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1label_1set_1wrap)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1label_1set_1wrap_FUNC);
+ gtk_label_set_wrap((GtkLabel *)arg0, (gboolean)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1label_1set_1wrap_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1label_1set_1wrap_1mode
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1label_1set_1wrap_1mode)
+ (JNIEnv *env, jclass that, jlong arg0, jint arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1label_1set_1wrap_1mode_FUNC);
+ gtk_label_set_wrap_mode((GtkLabel *)arg0, (PangoWrapMode)arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1label_1set_1wrap_1mode_FUNC);
+}
+#endif
+
+#ifndef NO_gtk_1menu_1button_1set_1use_1underline
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1menu_1button_1set_1use_1underline)
+ (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1menu_1button_1set_1use_1underline_FUNC);
+ gtk_menu_button_set_use_underline((GtkMenuButton *)arg0, arg1);
+ GTK4_NATIVE_EXIT(env, that, gtk_1menu_1button_1set_1use_1underline_FUNC);
+}
+#endif
+
#ifndef NO_gtk_1named_1action_1new
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1named_1action_1new)
(JNIEnv *env, jclass that, jbyteArray arg0)
@@ -885,6 +915,16 @@
}
#endif
+#ifndef NO_gtk_1style_1context_1add_1provider_1for_1display
+JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1style_1context_1add_1provider_1for_1display)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
+{
+ GTK4_NATIVE_ENTER(env, that, gtk_1style_1context_1add_1provider_1for_1display_FUNC);
+ gtk_style_context_add_provider_for_display((GdkDisplay *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
+ GTK4_NATIVE_EXIT(env, that, gtk_1style_1context_1add_1provider_1for_1display_FUNC);
+}
+#endif
+
#ifndef NO_gtk_1text_1get_1buffer
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1text_1get_1buffer)
(JNIEnv *env, jclass that, jlong arg0)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c
index acaf6b6..207330b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c
@@ -74,6 +74,9 @@
"gtk_1image_1set_1from_1paintable",
"gtk_1init_1check",
"gtk_1keyval_1trigger_1new",
+ "gtk_1label_1set_1wrap",
+ "gtk_1label_1set_1wrap_1mode",
+ "gtk_1menu_1button_1set_1use_1underline",
"gtk_1named_1action_1new",
"gtk_1native_1get_1surface",
"gtk_1picture_1new",
@@ -95,6 +98,7 @@
"gtk_1shortcut_1controller_1set_1scope",
"gtk_1shortcut_1new",
"gtk_1snapshot_1append_1cairo",
+ "gtk_1style_1context_1add_1provider_1for_1display",
"gtk_1text_1get_1buffer",
"gtk_1widget_1action_1set_1enabled",
"gtk_1widget_1activate_1action",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h
index a137e2e..0e28978 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h
@@ -84,6 +84,9 @@
gtk_1image_1set_1from_1paintable_FUNC,
gtk_1init_1check_FUNC,
gtk_1keyval_1trigger_1new_FUNC,
+ gtk_1label_1set_1wrap_FUNC,
+ gtk_1label_1set_1wrap_1mode_FUNC,
+ gtk_1menu_1button_1set_1use_1underline_FUNC,
gtk_1named_1action_1new_FUNC,
gtk_1native_1get_1surface_FUNC,
gtk_1picture_1new_FUNC,
@@ -105,6 +108,7 @@
gtk_1shortcut_1controller_1set_1scope_FUNC,
gtk_1shortcut_1new_FUNC,
gtk_1snapshot_1append_1cairo_FUNC,
+ gtk_1style_1context_1add_1provider_1for_1display_FUNC,
gtk_1text_1get_1buffer_FUNC,
gtk_1widget_1action_1set_1enabled_FUNC,
gtk_1widget_1activate_1action_FUNC,
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 8851b4f..79e40aa 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
@@ -5747,42 +5747,6 @@
}
#endif
-#ifndef NO_gtk_1label_1set_1line_1wrap
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1line_1wrap)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1line_1wrap_FUNC);
-/*
- gtk_label_set_line_wrap((GtkLabel *)arg0, (gboolean)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_label_set_line_wrap)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkLabel *, gboolean))fp)((GtkLabel *)arg0, (gboolean)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1line_1wrap_FUNC);
-}
-#endif
-
-#ifndef NO_gtk_1label_1set_1line_1wrap_1mode
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1line_1wrap_1mode)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1line_1wrap_1mode_FUNC);
-/*
- gtk_label_set_line_wrap_mode((GtkLabel *)arg0, (PangoWrapMode)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_label_set_line_wrap_mode)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkLabel *, PangoWrapMode))fp)((GtkLabel *)arg0, (PangoWrapMode)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1line_1wrap_1mode_FUNC);
-}
-#endif
-
#ifndef NO_gtk_1label_1set_1text__JJ
JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1text__JJ)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
@@ -5821,42 +5785,6 @@
}
#endif
-#ifndef NO_gtk_1label_1set_1wrap
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1wrap)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1wrap_FUNC);
-/*
- gtk_label_set_wrap((GtkLabel *)arg0, (gboolean)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_label_set_wrap)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkLabel *, gboolean))fp)((GtkLabel *)arg0, (gboolean)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1wrap_FUNC);
-}
-#endif
-
-#ifndef NO_gtk_1label_1set_1wrap_1mode
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1wrap_1mode)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1label_1set_1wrap_1mode_FUNC);
-/*
- gtk_label_set_wrap_mode((GtkLabel *)arg0, (PangoWrapMode)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_label_set_wrap_mode)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkLabel *, PangoWrapMode))fp)((GtkLabel *)arg0, (PangoWrapMode)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, gtk_1label_1set_1wrap_1mode_FUNC);
-}
-#endif
-
#ifndef NO_gtk_1label_1set_1xalign
JNIEXPORT void JNICALL GTK_NATIVE(gtk_1label_1set_1xalign)
(JNIEnv *env, jclass that, jlong arg0, jfloat arg1)
@@ -6002,60 +5930,6 @@
}
#endif
-#ifndef NO_gtk_1menu_1button_1set_1use_1underline
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1menu_1button_1set_1use_1underline)
- (JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1menu_1button_1set_1use_1underline_FUNC);
-/*
- gtk_menu_button_set_use_underline((GtkMenuButton *)arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_menu_button_set_use_underline)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkMenuButton *, jboolean))fp)((GtkMenuButton *)arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, gtk_1menu_1button_1set_1use_1underline_FUNC);
-}
-#endif
-
-#ifndef NO_gtk_1menu_1popup
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1menu_1popup)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4, jint arg5, jint arg6)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1menu_1popup_FUNC);
-/*
- gtk_menu_popup(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_menu_popup)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong, jlong, jlong, jlong, jint, jint))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
- }
- }
- GTK_NATIVE_EXIT(env, that, gtk_1menu_1popup_FUNC);
-}
-#endif
-
-#ifndef NO_gtk_1menu_1popup_1at_1pointer
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1menu_1popup_1at_1pointer)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1menu_1popup_1at_1pointer_FUNC);
-/*
- gtk_menu_popup_at_pointer(arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_menu_popup_at_pointer)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jlong, jlong))fp)(arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, gtk_1menu_1popup_1at_1pointer_FUNC);
-}
-#endif
-
#ifndef NO_gtk_1menu_1popup_1at_1rect
JNIEXPORT void JNICALL GTK_NATIVE(gtk_1menu_1popup_1at_1rect)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jobject arg2, jint arg3, jint arg4, jlong arg5)
@@ -7641,34 +7515,6 @@
}
#endif
-#ifndef NO_gtk_1style_1context_1add_1provider_1for_1display
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1style_1context_1add_1provider_1for_1display)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1style_1context_1add_1provider_1for_1display_FUNC);
-/*
- gtk_style_context_add_provider_for_display((GdkDisplay *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_style_context_add_provider_for_display)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GdkDisplay *, GtkStyleProvider *, guint))fp)((GdkDisplay *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
- }
- }
- GTK_NATIVE_EXIT(env, that, gtk_1style_1context_1add_1provider_1for_1display_FUNC);
-}
-#endif
-
-#ifndef NO_gtk_1style_1context_1add_1provider_1for_1screen
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1style_1context_1add_1provider_1for_1screen)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jint arg2)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
- gtk_style_context_add_provider_for_screen((GdkScreen *)arg0, (GtkStyleProvider *)arg1, (guint)arg2);
- GTK_NATIVE_EXIT(env, that, gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
-}
-#endif
-
#ifndef NO_gtk_1style_1context_1get__JI_3B_3JJ
JNIEXPORT void JNICALL GTK_NATIVE(gtk_1style_1context_1get__JI_3B_3JJ)
(JNIEnv *env, jclass that, jlong arg0, jint arg1, jbyteArray arg2, jlongArray arg3, jlong arg4)
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 270eb0a..9ff466d5 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
@@ -219,7 +219,6 @@
#define NO_gtk_1status_1icon_1position_1menu_1func
// No GdkScreen on GTK4, including parameter casts
-#define NO_gtk_1style_1context_1add_1provider_1for_1screen
#define NO_gdk_1screen_1get_1default
#define NO_gdk_1screen_1get_1monitor_1at_1point
#define NO_gdk_1screen_1get_1monitor_1at_1window
@@ -393,7 +392,6 @@
#define NO_graphene_1rect_1init
// Miscellaneous functions not present on GTK3
-#define NO_gtk_1style_1context_1add_1provider_1for_1display
#define NO_gtk_1style_1context_1get_1margin
// GdkCursor API changes from GTK3 -> GTK4
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 23de79f..cc4f71f 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
@@ -462,13 +462,9 @@
"gtk_1label_1new_1with_1mnemonic",
"gtk_1label_1set_1attributes",
"gtk_1label_1set_1justify",
- "gtk_1label_1set_1line_1wrap",
- "gtk_1label_1set_1line_1wrap_1mode",
"gtk_1label_1set_1text__JJ",
"gtk_1label_1set_1text__J_3B",
"gtk_1label_1set_1text_1with_1mnemonic",
- "gtk_1label_1set_1wrap",
- "gtk_1label_1set_1wrap_1mode",
"gtk_1label_1set_1xalign",
"gtk_1label_1set_1yalign",
"gtk_1list_1store_1append",
@@ -482,9 +478,6 @@
"gtk_1list_1store_1set__JJIZI",
"gtk_1list_1store_1set__JJI_3BI",
"gtk_1menu_1button_1new",
- "gtk_1menu_1button_1set_1use_1underline",
- "gtk_1menu_1popup",
- "gtk_1menu_1popup_1at_1pointer",
"gtk_1menu_1popup_1at_1rect",
"gtk_1message_1dialog_1format_1secondary_1text",
"gtk_1message_1dialog_1new",
@@ -618,8 +611,6 @@
"gtk_1status_1icon_1position_1menu_1func",
"gtk_1style_1context_1add_1class",
"gtk_1style_1context_1add_1provider",
- "gtk_1style_1context_1add_1provider_1for_1display",
- "gtk_1style_1context_1add_1provider_1for_1screen",
"gtk_1style_1context_1get__JI_3B_3JJ",
"gtk_1style_1context_1get__J_3B_3JJ",
"gtk_1style_1context_1get_1border__JILorg_eclipse_swt_internal_gtk_GtkBorder_2",
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 ac06375..cb5ac1c 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
@@ -460,13 +460,9 @@
gtk_1label_1new_1with_1mnemonic_FUNC,
gtk_1label_1set_1attributes_FUNC,
gtk_1label_1set_1justify_FUNC,
- gtk_1label_1set_1line_1wrap_FUNC,
- gtk_1label_1set_1line_1wrap_1mode_FUNC,
gtk_1label_1set_1text__JJ_FUNC,
gtk_1label_1set_1text__J_3B_FUNC,
gtk_1label_1set_1text_1with_1mnemonic_FUNC,
- gtk_1label_1set_1wrap_FUNC,
- gtk_1label_1set_1wrap_1mode_FUNC,
gtk_1label_1set_1xalign_FUNC,
gtk_1label_1set_1yalign_FUNC,
gtk_1list_1store_1append_FUNC,
@@ -480,9 +476,6 @@
gtk_1list_1store_1set__JJIZI_FUNC,
gtk_1list_1store_1set__JJI_3BI_FUNC,
gtk_1menu_1button_1new_FUNC,
- gtk_1menu_1button_1set_1use_1underline_FUNC,
- gtk_1menu_1popup_FUNC,
- gtk_1menu_1popup_1at_1pointer_FUNC,
gtk_1menu_1popup_1at_1rect_FUNC,
gtk_1message_1dialog_1format_1secondary_1text_FUNC,
gtk_1message_1dialog_1new_FUNC,
@@ -616,8 +609,6 @@
gtk_1status_1icon_1position_1menu_1func_FUNC,
gtk_1style_1context_1add_1class_FUNC,
gtk_1style_1context_1add_1provider_FUNC,
- gtk_1style_1context_1add_1provider_1for_1display_FUNC,
- gtk_1style_1context_1add_1provider_1for_1screen_FUNC,
gtk_1style_1context_1get__JI_3B_3JJ_FUNC,
gtk_1style_1context_1get__J_3B_3JJ_FUNC,
gtk_1style_1context_1get_1border__JILorg_eclipse_swt_internal_gtk_GtkBorder_2_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
index a5f4879..121e55e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
@@ -421,8 +421,13 @@
/* GtkCheckButton */
public static final native long gtk_check_button_new();
-
+ /* General Gtk Functions */
public static final native long gtk_check_version(int required_major, int required_minor, int required_micro);
+ public static final native long gtk_get_default_language();
+ public static final native int gtk_get_major_version();
+ public static final native int gtk_get_minor_version();
+ public static final native int gtk_get_micro_version();
+
/* GtkColorChooser Interface */
/**
* @param chooser cast=(GtkColorChooser *)
@@ -701,12 +706,13 @@
*/
public static final native long gtk_file_chooser_native_new(byte[] title, long parent, int action, byte[] accept_label, byte[] cancel_label);
+ /* GtkFileFilter */
+ public static final native long gtk_file_filter_new();
/**
* @param filter cast=(GtkFileFilter *)
* @param pattern cast=(const gchar *)
*/
public static final native void gtk_file_filter_add_pattern(long filter, byte[] pattern);
- public static final native long gtk_file_filter_new();
/** @param filter cast=(GtkFileFilter *) */
public static final native long gtk_file_filter_get_name(long filter);
/**
@@ -714,6 +720,7 @@
* @param name cast=(const gchar *)
*/
public static final native void gtk_file_filter_set_name(long filter, byte[] name);
+
/**
* @method flags=dynamic
*/
@@ -762,15 +769,15 @@
*/
public static final native double gtk_gesture_zoom_get_scale_delta(long gesture);
-
+ /* GtkFontChooserDialog */
/**
* @param title cast=(const gchar *)
* @param parent cast=(GtkWindow *)
*/
public static final native long gtk_font_chooser_dialog_new(byte[] title, long parent);
- /**
- * @param fontchooser cast=(GtkFontChooser *)
- */
+
+ /* GtkFontChooser Interface */
+ /** @param fontchooser cast=(GtkFontChooser *) */
public static final native long gtk_font_chooser_get_font(long fontchooser);
/**
* @param fsd cast=(GtkFontChooser *)
@@ -789,9 +796,6 @@
*/
public static final native void gtk_frame_set_label_widget(long frame, long label_widget);
- /* GTK Initialization */
- public static final native long gtk_get_default_language();
-
/* GtkScale */
/**
* @param orientation cast=(GtkOrientation)
@@ -816,16 +820,18 @@
*/
public static final native long gtk_scrollbar_new(int orientation, long adjustment);
-
+ /* GtkSearchEntry */
public static final native long gtk_search_entry_new();
- /**
- * @param orientation cast=(GtkOrientation)
- */
+
+ /* GtkSeparator */
+ /** @param orientation cast=(GtkOrientation) */
public static final native long gtk_separator_new(int orientation);
+
// Get function pointer to gtk_status_icon_position_menu
// See os_custom.h
public static final native long gtk_status_icon_position_menu_func();
+ /* GtkIMContext */
/** @param context cast=(GtkIMContext *) */
public static final native void gtk_im_context_focus_in(long context);
/** @param context cast=(GtkIMContext *) */
@@ -850,6 +856,8 @@
* @param area cast=(GdkRectangle *),flags=no_out
*/
public static final native void gtk_im_context_set_cursor_location(long context, GdkRectangle area);
+
+ /* GtkIMMulticontext */
public static final native long gtk_im_multicontext_new();
/* GtkImage */
@@ -908,35 +916,7 @@
*/
public static final native void gtk_label_set_yalign(long label, float yalign);
- /* GtkLabel [GTK3 only] */
- /**
- * @method flags=dynamic
- * @param label cast=(GtkLabel *)
- * @param wrap cast=(gboolean)
- */
- public static final native void gtk_label_set_line_wrap(long label, boolean wrap);
- /**
- * @method flags=dynamic
- * @param label cast=(GtkLabel *)
- * @param wrap_mode cast=(PangoWrapMode)
- */
- public static final native void gtk_label_set_line_wrap_mode(long label, int wrap_mode);
-
- /* GtkLabel [GTK4 only] */
- /**
- * @method flags=dynamic
- * @param label cast=(GtkLabel *)
- * @param wrap cast=(gboolean)
- */
- public static final native void gtk_label_set_wrap(long label, boolean wrap);
- /**
- * @method flags=dynamic
- * @param label cast=(GtkLabel *)
- * @param wrap_mode cast=(PangoWrapMode)
- */
- public static final native void gtk_label_set_wrap_mode(long label, int wrap_mode);
-
-
+ /* GtkListStore */
/**
* @param list_store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
@@ -955,32 +935,6 @@
* @param types cast=(GType *)
*/
public static final native long gtk_list_store_newv(int numColumns, long [] types);
- public static final native long gtk_css_provider_new();
- /**
- * @param provider cast=(GtkCssProvider *)
- */
- public static final native long gtk_css_provider_to_string(long provider);
- /**
- * @param screen cast=(GdkScreen *)
- * @param provider cast=(GtkStyleProvider *)
- * @param priority cast=(guint)
- */
- /* [GTK3 only, if-def'd in os.h] */
- public static final native void gtk_style_context_add_provider_for_screen(long screen, long provider, int priority);
- /**
- * @method flags=dynamic
- * @param display cast=(GdkDisplay *)
- * @param provider cast=(GtkStyleProvider *)
- * @param priority cast=(guint)
- */
- /* [GTK4 only] */
- public static final native void gtk_style_context_add_provider_for_display(long display, long provider, int priority);
- /**
- * @param context cast=(GtkStyleContext *)
- * @param provider cast=(GtkStyleProvider *)
- * @param priority cast=(guint)
- */
- public static final native void gtk_style_context_add_provider(long context, long provider, int priority);
/**
* @param list_store cast=(GtkListStore *)
* @param iter cast=(GtkTreeIter *)
@@ -1012,15 +966,21 @@
* @param iter cast=(GtkTreeIter *)
*/
public static final native void gtk_list_store_set(long store, long iter, int column, boolean value, int terminator);
- public static final native int gtk_get_major_version();
- public static final native int gtk_get_minor_version();
- public static final native int gtk_get_micro_version();
- /** @method flags=dynamic */
- /* [GTK2/GTK3; 3.22 deprecated, replaced] */
- public static final native void gtk_menu_popup(long menu, long parent_menu_shell, long parent_menu_item, long func, long data, int button, int activate_time);
- /** @method flags=dynamic */
- public static final native void gtk_menu_popup_at_pointer(long menu, long trigger_event);
+ /* GtkCssProvider */
+ public static final native long gtk_css_provider_new();
+ /** @param provider cast=(GtkCssProvider *) */
+ public static final native long gtk_css_provider_to_string(long provider);
+
+ /* GtkStyleContext */
+ /**
+ * @param context cast=(GtkStyleContext *)
+ * @param provider cast=(GtkStyleProvider *)
+ * @param priority cast=(guint)
+ */
+ public static final native void gtk_style_context_add_provider(long context, long provider, int priority);
+
+ /* GtkMenuItem [GTK3 only] */
/** @method flags=dynamic */
public static final native void gtk_menu_popup_at_rect(long menu, long rect_window, GdkRectangle rect, int rect_anchor, int menu_anchor, long trigger_event);
@@ -1044,14 +1004,6 @@
/* GtkMenuButton */
public static final native long gtk_menu_button_new();
- /* GtkMenuButton [GTK4 only] */
- /**
- * @method flags=dynamic
- * @param menu_button cast=(GtkMenuButton *)
- */
- public static final native void gtk_menu_button_set_use_underline(long menu_button, boolean use_underline);
-
-
/* GtkMessageDialog */
/**
* @param parent cast=(GtkWindow *)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GTK3.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GTK3.java
index cc2cd2f..ac38bbb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GTK3.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk3/GTK3.java
@@ -605,8 +605,32 @@
*/
public static final native void gtk_selection_data_set(long selection_data, long type, int format, long data, int length);
- /* GtkMenu/GtkMenuItem */
+ /* GtkMenu */
+ public static final native long gtk_menu_new();
+ /** @param menu cast=(GtkMenu *) */
+ public static final native void gtk_menu_popdown(long menu);
+ /**
+ * @method flags=ignore_deprecations
+ * @param menu cast=(GtkMenu *)
+ * @param parent_menu_shell cast=(GtkWidget *)
+ * @param parent_menu_item cast=(GtkWidget *)
+ * @param func cast=(GtkMenuPositionFunc)
+ * @param data cast=(gpointer)
+ * @param button cast=(guint)
+ * @param activate_time cast=(guint32)
+ */
+ /* [GTK2/GTK3; 3.22 deprecated, replaced] */
+ public static final native void gtk_menu_popup(long menu, long parent_menu_shell, long parent_menu_item, long func, long data, int button, int activate_time);
+ /**
+ * @param menu cast=(GtkMenu *)
+ * @param trigger_event cast=(const GdkEvent*)
+ */
+ public static final native void gtk_menu_popup_at_pointer(long menu, long trigger_event);
+
+ /* GtkMenuBar */
public static final native long gtk_menu_bar_new();
+
+ /* GtkMenuItem */
/** @param menu_item cast=(GtkMenuItem *) */
public static final native long gtk_menu_item_get_submenu(long menu_item);
public static final native long gtk_menu_item_new();
@@ -615,22 +639,6 @@
* @param submenu cast=(GtkWidget *)
*/
public static final native void gtk_menu_item_set_submenu(long menu_item, long submenu);
- public static final native long gtk_menu_new();
- /** @param menu cast=(GtkMenu *) */
- public static final native void gtk_menu_popdown(long menu);
- /** @param menu_shell cast=(GtkMenuShell *) */
- public static final native void gtk_menu_shell_deactivate(long menu_shell);
- /**
- * @param menu_shell cast=(GtkMenuShell *)
- * @param child cast=(GtkWidget *)
- * @param position cast=(gint)
- */
- public static final native void gtk_menu_shell_insert(long menu_shell, long child, int position);
- /**
- * @param menu_shell cast=(GtkMenuShell *)
- * @param take_focus cast=(gboolean)
- */
- public static final native void gtk_menu_shell_set_take_focus(long menu_shell, boolean take_focus);
/** @param check_menu_item cast=(GtkCheckMenuItem *) */
public static final native boolean gtk_check_menu_item_get_active(long check_menu_item);
public static final native long gtk_check_menu_item_new();
@@ -645,6 +653,21 @@
public static final native long gtk_radio_menu_item_new(long group);
public static final native long gtk_separator_menu_item_new();
+ /* GtkMenuShell */
+ /** @param menu_shell cast=(GtkMenuShell *) */
+ public static final native void gtk_menu_shell_deactivate(long menu_shell);
+ /**
+ * @param menu_shell cast=(GtkMenuShell *)
+ * @param child cast=(GtkWidget *)
+ * @param position cast=(gint)
+ */
+ public static final native void gtk_menu_shell_insert(long menu_shell, long child, int position);
+ /**
+ * @param menu_shell cast=(GtkMenuShell *)
+ * @param take_focus cast=(gboolean)
+ */
+ public static final native void gtk_menu_shell_set_take_focus(long menu_shell, boolean take_focus);
+
/* GtkToolbar */
public static final native long gtk_toolbar_new();
/**
@@ -871,4 +894,24 @@
* @param context cast=(GtkStyleContext *)
*/
public static final native void gtk_style_context_invalidate(long context);
+
+ /* GtkLabel */
+ /**
+ * @param label cast=(GtkLabel *)
+ * @param wrap cast=(gboolean)
+ */
+ public static final native void gtk_label_set_line_wrap(long label, boolean wrap);
+ /**
+ * @param label cast=(GtkLabel *)
+ * @param wrap_mode cast=(PangoWrapMode)
+ */
+ public static final native void gtk_label_set_line_wrap_mode(long label, int wrap_mode);
+
+ /* GtkStyleContext */
+ /**
+ * @param screen cast=(GdkScreen *)
+ * @param provider cast=(GtkStyleProvider *)
+ * @param priority cast=(guint)
+ */
+ public static final native void gtk_style_context_add_provider_for_screen(long screen, long provider, int priority);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java
index 75aea38..85789b4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java
@@ -437,4 +437,28 @@
* @param length cast=(gssize)
*/
public static final native void gtk_css_provider_load_from_data(long css_provider, byte[] data, long length);
+
+ /* GtkLabel */
+ /**
+ * @param label cast=(GtkLabel *)
+ * @param wrap cast=(gboolean)
+ */
+ public static final native void gtk_label_set_wrap(long label, boolean wrap);
+ /**
+ * @param label cast=(GtkLabel *)
+ * @param wrap_mode cast=(PangoWrapMode)
+ */
+ public static final native void gtk_label_set_wrap_mode(long label, int wrap_mode);
+
+ /* GtkStyleContext */
+ /**
+ * @param display cast=(GdkDisplay *)
+ * @param provider cast=(GtkStyleProvider *)
+ * @param priority cast=(guint)
+ */
+ public static final native void gtk_style_context_add_provider_for_display(long display, long provider, int priority);
+
+ /* GtkMenuButton */
+ /** @param menu_button cast=(GtkMenuButton *) */
+ public static final native void gtk_menu_button_set_use_underline(long menu_button, boolean use_underline);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
index 8d35b79..c6379a7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
@@ -814,14 +814,14 @@
System.err.println("SWT Warning: Override of theme values failed. Reason: could not acquire display or provider.");
return;
}
- GTK.gtk_style_context_add_provider_for_display (display, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ GTK4.gtk_style_context_add_provider_for_display (display, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
} else {
long screen = GDK.gdk_screen_get_default();
if (screen == 0 || provider == 0) {
System.err.println("SWT Warning: Override of theme values failed. Reason: could not acquire screen or provider.");
return;
}
- GTK.gtk_style_context_add_provider_for_screen (screen, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ GTK3.gtk_style_context_add_provider_for_screen (screen, provider, GTK.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
if (GTK.GTK4) {
GTK4.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (combinedCSS.toString(), true), -1);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
index 627fdd6..626326a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
@@ -405,11 +405,11 @@
if ((style & SWT.WRAP) != 0) {
if (GTK.GTK4) {
- GTK.gtk_label_set_wrap(labelHandle, true);
- GTK.gtk_label_set_wrap_mode(labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ GTK4.gtk_label_set_wrap(labelHandle, true);
+ GTK4.gtk_label_set_wrap_mode(labelHandle, OS.PANGO_WRAP_WORD_CHAR);
} else {
- GTK.gtk_label_set_line_wrap (labelHandle, true);
- GTK.gtk_label_set_line_wrap_mode (labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ GTK3.gtk_label_set_line_wrap (labelHandle, true);
+ GTK3.gtk_label_set_line_wrap_mode (labelHandle, OS.PANGO_WRAP_WORD_CHAR);
}
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
index 15a46eb..3e1a395 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -242,7 +242,7 @@
GTK3.gtk_container_add(box, label);
GTK.gtk_widget_show(label);
- GTK.gtk_label_set_line_wrap(label, true);
+ GTK3.gtk_label_set_line_wrap(label, true);
GTK.gtk_box_set_homogeneous(box, false);
GTK.gtk_label_set_justify(label, GTK.GTK_JUSTIFY_CENTER);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
index d21ce2b..cbf1e29 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
@@ -304,11 +304,11 @@
if ((style & SWT.SEPARATOR) != 0) return;
if ((style & SWT.WRAP) != 0) {
if (GTK.GTK4) {
- GTK.gtk_label_set_wrap(labelHandle, true);
- GTK.gtk_label_set_wrap_mode(labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ GTK4.gtk_label_set_wrap(labelHandle, true);
+ GTK4.gtk_label_set_wrap_mode(labelHandle, OS.PANGO_WRAP_WORD_CHAR);
} else {
- GTK.gtk_label_set_line_wrap (labelHandle, true);
- GTK.gtk_label_set_line_wrap_mode (labelHandle, OS.PANGO_WRAP_WORD_CHAR);
+ GTK3.gtk_label_set_line_wrap (labelHandle, true);
+ GTK3.gtk_label_set_line_wrap_mode (labelHandle, OS.PANGO_WRAP_WORD_CHAR);
}
}
// In GTK 3 font description is inherited from parent widget which is not how SWT has always worked,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
index 3bf88ee..3f8d127 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
@@ -286,7 +286,7 @@
* will fail. The fix is to ensure that the timestamp of the last
* event processed is used.
*/
- GTK.gtk_menu_popup (handle, 0, 0, address, data, 0, display.getLastEventTime ());
+ GTK3.gtk_menu_popup (handle, 0, 0, address, data, 0, display.getLastEventTime ());
} else {
long eventPtr = 0;
if (ableToSetLocation()) {
@@ -360,7 +360,7 @@
}
adjustParentWindowWayland(eventPtr);
verifyMenuPosition(getItemCount());
- GTK.gtk_menu_popup_at_pointer(handle, eventPtr);
+ GTK3.gtk_menu_popup_at_pointer(handle, eventPtr);
if (GTK.GTK4) {
GDK.gdk_event_unref(eventPtr);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
index d6dc384..73e7073 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
@@ -228,7 +228,7 @@
GTK4.gtk_box_append(handle, menuButton);
arrowHandle = GTK4.gtk_widget_get_first_child(menuButton);
- GTK.gtk_menu_button_set_use_underline(menuButton, true);
+ GTK4.gtk_menu_button_set_use_underline(menuButton, true);
} else {
handle = GTK3.gtk_menu_tool_button_new(0, null);
if (handle == 0) error(SWT.ERROR_NO_HANDLES);