Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul D'Pong2020-11-06 18:12:23 +0000
committerAlexander Kurtakov2020-11-10 08:27:53 +0000
commit546c15828e803fd4e966e3a6fbe11463f02405fb (patch)
treef609fb4ed44c152da53c6cbc0fbae4f2da5660e6
parentc3e43dfdc3e618406841cbf5e4ebc5461041272d (diff)
downloadeclipse.platform.swt-546c15828e803fd4e966e3a6fbe11463f02405fb.tar.gz
eclipse.platform.swt-546c15828e803fd4e966e3a6fbe11463f02405fb.tar.xz
eclipse.platform.swt-546c15828e803fd4e966e3a6fbe11463f02405fb.zip
Bug 567485 - [GTK4] Cleanup old porting code - Cleaned up GTK
Change-Id: I1d1fd0981183e05f2f236e8dc6b7d1ebb8594430 Signed-off-by: Paul D'Pong <sdamrong@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c166
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java669
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java5
7 files changed, 494 insertions, 366 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 997c71a099..886ddc6276 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
@@ -3787,7 +3787,15 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1accel_1label_1new)
jlong rc = 0;
GTK_NATIVE_ENTER(env, that, gtk_1accel_1label_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
rc = (jlong)gtk_accel_label_new((const gchar *)lparg0);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_accel_label_new)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0);
+ }
+ }
fail:
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
GTK_NATIVE_EXIT(env, that, gtk_1accel_1label_1new_FUNC);
@@ -3898,7 +3906,15 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1accessible_1get_1widget)
{
jlong rc = 0;
GTK_NATIVE_ENTER(env, that, gtk_1accessible_1get_1widget_FUNC);
+/*
rc = (jlong)gtk_accessible_get_widget((GtkAccessible *)arg0);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_accessible_get_widget)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkAccessible *))fp)((GtkAccessible *)arg0);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1accessible_1get_1widget_FUNC);
return rc;
}
@@ -7299,7 +7315,7 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1im_1context_1filter_1keypress)
{
jboolean rc = 0;
GTK_NATIVE_ENTER(env, that, gtk_1im_1context_1filter_1keypress_FUNC);
- rc = (jboolean)gtk_im_context_filter_keypress((GtkIMContext *)arg0, arg1);
+ rc = (jboolean)gtk_im_context_filter_keypress((GtkIMContext *)arg0, (GdkEvent *)arg1);
GTK_NATIVE_EXIT(env, that, gtk_1im_1context_1filter_1keypress_FUNC);
return rc;
}
@@ -12732,7 +12748,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1class_1add_1binding_1signal)
GTK_NATIVE_ENTER(env, that, gtk_1widget_1class_1add_1binding_1signal_FUNC);
if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
- gtk_widget_class_add_binding_signal(arg0, arg1, arg2, lparg3, lparg4, arg5, arg6, arg7);
+/*
+ gtk_widget_class_add_binding_signal((GtkWidgetClass *)arg0, arg1, (GdkModifierType)arg2, (const char *)lparg3, (const char *)lparg4, arg5, arg6, arg7);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_class_add_binding_signal)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidgetClass *, jint, GdkModifierType, const char *, const char *, jboolean, jboolean, jboolean))fp)((GtkWidgetClass *)arg0, arg1, (GdkModifierType)arg2, (const char *)lparg3, (const char *)lparg4, arg5, arg6, arg7);
+ }
+ }
fail:
if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
@@ -12793,7 +12817,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1destroy)
(JNIEnv *env, jclass that, jlong arg0)
{
GTK_NATIVE_ENTER(env, that, gtk_1widget_1destroy_FUNC);
+/*
gtk_widget_destroy((GtkWidget *)arg0);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_destroy)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1destroy_FUNC);
}
#endif
@@ -12822,7 +12854,15 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1event)
{
jboolean rc = 0;
GTK_NATIVE_ENTER(env, that, gtk_1widget_1event_FUNC);
+/*
rc = (jboolean)gtk_widget_event((GtkWidget *)arg0, (GdkEvent *)arg1);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_event)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GtkWidget *, GdkEvent *))fp)((GtkWidget *)arg0, (GdkEvent *)arg1);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1event_FUNC);
return rc;
}
@@ -12834,7 +12874,15 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1accessible)
{
jlong rc = 0;
GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1accessible_FUNC);
+/*
rc = (jlong)gtk_widget_get_accessible((GtkWidget *)arg0);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_get_accessible)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1accessible_FUNC);
return rc;
}
@@ -12860,7 +12908,15 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1get_1can_1default)
{
jboolean rc = 0;
GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1can_1default_FUNC);
+/*
rc = (jboolean)gtk_widget_get_can_default((GtkWidget *)arg0);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_get_can_default)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1can_1default_FUNC);
return rc;
}
@@ -12946,7 +13002,15 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1get_1has_1window)
{
jboolean rc = 0;
GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1has_1window_FUNC);
+/*
rc = (jboolean)gtk_widget_get_has_window((GtkWidget *)arg0);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_get_has_window)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1has_1window_FUNC);
return rc;
}
@@ -13330,7 +13394,15 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1root)
{
jlong rc = 0;
GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1root_FUNC);
+/*
rc = (jlong)gtk_widget_get_root((GtkWidget *)arg0);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_get_root)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1root_FUNC);
return rc;
}
@@ -13354,7 +13426,15 @@ JNIEXPORT jlong JNICALL GTK_NATIVE(gtk_1widget_1get_1screen)
{
jlong rc = 0;
GTK_NATIVE_ENTER(env, that, gtk_1widget_1get_1screen_FUNC);
+/*
rc = (jlong)gtk_widget_get_screen((GtkWidget *)arg0);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_get_screen)
+ if (fp) {
+ rc = (jlong)((jlong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1get_1screen_FUNC);
return rc;
}
@@ -13570,7 +13650,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1measure)
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
+/*
gtk_widget_measure((GtkWidget *)arg0, (GtkOrientation)arg1, (int)arg2, (int *)lparg3, (int *)lparg4, (int *)lparg5, (int *)lparg6);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_measure)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, GtkOrientation, int, int *, int *, int *, int *))fp)((GtkWidget *)arg0, (GtkOrientation)arg1, (int)arg2, (int *)lparg3, (int *)lparg4, (int *)lparg5, (int *)lparg6);
+ }
+ }
fail:
if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
@@ -13694,7 +13782,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1can_1default)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1can_1default_FUNC);
+/*
gtk_widget_set_can_default((GtkWidget *)arg0, (gboolean)arg1);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_set_can_default)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, gboolean))fp)((GtkWidget *)arg0, (gboolean)arg1);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1can_1default_FUNC);
}
#endif
@@ -13736,7 +13832,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1cursor)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1cursor_FUNC);
+/*
gtk_widget_set_cursor((GtkWidget *)arg0, (GdkCursor *)arg1);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_set_cursor)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, GdkCursor *))fp)((GtkWidget *)arg0, (GdkCursor *)arg1);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1cursor_FUNC);
}
#endif
@@ -13812,7 +13916,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1has_1window)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1has_1window_FUNC);
+/*
gtk_widget_set_has_window((GtkWidget *)arg0, (gboolean)arg1);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_set_has_window)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, gboolean))fp)((GtkWidget *)arg0, (gboolean)arg1);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1has_1window_FUNC);
}
#endif
@@ -13935,22 +14047,20 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1parent)
}
#endif
-#ifndef NO_gtk_1widget_1set_1parent_1surface
-JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1parent_1surface)
- (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
-{
- GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1parent_1surface_FUNC);
- gtk_widget_set_parent_surface((GtkWidget *)arg0, (GdkSurface *)arg1);
- GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1parent_1surface_FUNC);
-}
-#endif
-
#ifndef NO_gtk_1widget_1set_1parent_1window
JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1set_1parent_1window)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
GTK_NATIVE_ENTER(env, that, gtk_1widget_1set_1parent_1window_FUNC);
+/*
gtk_widget_set_parent_window((GtkWidget *)arg0, (GdkWindow *)arg1);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_set_parent_window)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, GdkWindow *))fp)((GtkWidget *)arg0, (GdkWindow *)arg1);
+ }
+ }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1set_1parent_1window_FUNC);
}
#endif
@@ -14136,7 +14246,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1style_1get__J_3B_3IJ)
GTK_NATIVE_ENTER(env, that, gtk_1widget_1style_1get__J_3B_3IJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+/*
gtk_widget_style_get((GtkWidget *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_style_get)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, const gchar *, jint *, const gchar *))fp)((GtkWidget *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
+ }
+ }
fail:
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
@@ -14153,7 +14271,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1style_1get__J_3B_3JJ)
GTK_NATIVE_ENTER(env, that, gtk_1widget_1style_1get__J_3B_3JJ_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+/*
gtk_widget_style_get((GtkWidget *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_style_get)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, const gchar *, jlong *, const gchar *))fp)((GtkWidget *)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
+ }
+ }
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
@@ -14198,7 +14324,15 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(gtk_1widget_1translate_1coordinates__JJII_
GTK_NATIVE_ENTER(env, that, gtk_1widget_1translate_1coordinates__JJII_3I_3I_FUNC);
if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
+/*
rc = (jboolean)gtk_widget_translate_coordinates((GtkWidget *)arg0, (GtkWidget *)arg1, arg2, arg3, (gint *)lparg4, (gint *)lparg5);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_translate_coordinates)
+ if (fp) {
+ rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GtkWidget *, GtkWidget *, jint, jint, gint *, gint *))fp)((GtkWidget *)arg0, (GtkWidget *)arg1, arg2, arg3, (gint *)lparg4, (gint *)lparg5);
+ }
+ }
fail:
if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
@@ -14212,15 +14346,7 @@ JNIEXPORT void JNICALL GTK_NATIVE(gtk_1widget_1unparent)
(JNIEnv *env, jclass that, jlong arg0)
{
GTK_NATIVE_ENTER(env, that, gtk_1widget_1unparent_FUNC);
-/*
gtk_widget_unparent((GtkWidget *)arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_widget_unparent)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
- }
- }
GTK_NATIVE_EXIT(env, that, gtk_1widget_1unparent_FUNC);
}
#endif
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 ad2978dc4c..7cf24df4ea 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
@@ -236,7 +236,6 @@
#define NO_gtk_1target_1list_1unref
// No GdkScreen on GTK4, including parameter casts
-#define NO_gtk_1widget_1get_1screen
#define NO_gtk_1style_1context_1add_1provider_1for_1screen
#define NO_gdk_1screen_1get_1default
#define NO_gdk_1screen_1get_1monitor_1at_1point
@@ -301,7 +300,6 @@
// No GdkWindow on GTK4, this includes parameter casting
#define NO_gtk_1widget_1set_1has_1window
-#define NO_gtk_1widget_1get_1has_1window
#define NO_gtk_1im_1context_1set_1client_1window
#define NO_gtk_1widget_1set_1parent_1window
#define NO_gdk_1cairo_1set_1source_1window
@@ -502,6 +500,16 @@
#define NO_gtk_1dialog_1run
#define NO_gtk_1native_1dialog_1run
+// GtkCellRenderer changes
+#define NO_GtkCellRendererPixbufClass_1sizeof
+#define NO_GtkCellRendererPixbuf_1sizeof
+#define NO_GtkCellRendererToggleClass_1sizeof
+#define NO_GtkCellRendererToggle_1sizeof
+
+// GTK3 only macros
+#define NO_GTK_1IS_1ACCEL_1LABEL
+#define NO_GTK_1IS_1CONTAINER
+
#else
/**
@@ -555,7 +563,6 @@
// Miscellaneous functions not present on GTK3
#define NO_gtk_1widget_1measure
#define NO_gtk_1style_1context_1add_1provider_1for_1display
-#define NO_gtk_1widget_1get_1root
#define NO_gtk_1css_1provider_1load_1from_1data__I_3BI
#define NO_gtk_1css_1provider_1load_1from_1data__J_3BJ
#define NO_gdk_1display_1is_1composited
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 4f6940a078..7a388b8e8c 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
@@ -1049,7 +1049,6 @@ char * GTK_nativeFunctionNames[] = {
"gtk_1widget_1set_1margin_1top",
"gtk_1widget_1set_1opacity",
"gtk_1widget_1set_1parent",
- "gtk_1widget_1set_1parent_1surface",
"gtk_1widget_1set_1parent_1window",
"gtk_1widget_1set_1receives_1default",
"gtk_1widget_1set_1redraw_1on_1allocate",
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 5d2ad8118a..f9f5ad32cb 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
@@ -1047,7 +1047,6 @@ typedef enum {
gtk_1widget_1set_1margin_1top_FUNC,
gtk_1widget_1set_1opacity_FUNC,
gtk_1widget_1set_1parent_FUNC,
- gtk_1widget_1set_1parent_1surface_FUNC,
gtk_1widget_1set_1parent_1window_FUNC,
gtk_1widget_1set_1receives_1default_FUNC,
gtk_1widget_1set_1redraw_1on_1allocate_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 3b3d39142c..2af33ec6cd 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
@@ -204,23 +204,24 @@ public class GTK extends OS {
public static final native int GtkTextIter_sizeof();
public static final native int GtkCellRendererText_sizeof();
public static final native int GtkCellRendererTextClass_sizeof();
+ public static final native int GtkTreeIter_sizeof();
+
+ /** GTK3 sizeof() [if-def'd in os.h] */
public static final native int GtkCellRendererPixbuf_sizeof();
public static final native int GtkCellRendererPixbufClass_sizeof();
public static final native int GtkCellRendererToggle_sizeof();
public static final native int GtkCellRendererToggleClass_sizeof();
- public static final native int GtkTreeIter_sizeof();
+
/**
* Macros.
*
* Some of these are not found in dev documentation, only in the sources.
*/
-
/** @param widget cast=(GtkWidget *) */
public static final native long GTK_WIDGET_GET_CLASS(long widget);
/** @method flags=const */
public static final native long GTK_TYPE_TEXT_VIEW_ACCESSIBLE ();
- public static final native boolean GTK_IS_ACCEL_LABEL(long obj);
public static final native boolean GTK_IS_BOX(long obj);
public static final native boolean GTK_IS_BUTTON(long obj);
public static final native boolean GTK_IS_LABEL(long obj);
@@ -230,7 +231,6 @@ public class GTK extends OS {
public static final native boolean GTK_IS_CELL_RENDERER_PIXBUF(long obj);
public static final native boolean GTK_IS_CELL_RENDERER_TEXT(long obj);
public static final native boolean GTK_IS_CELL_RENDERER_TOGGLE(long obj);
- public static final native boolean GTK_IS_CONTAINER(long obj);
public static final native boolean GTK_IS_MENU_ITEM(long obj);
public static final native boolean GTK_IS_PLUG(long obj);
/** @method flags=const */
@@ -248,76 +248,14 @@ public class GTK extends OS {
/** @method flags=const */
public static final native long GTK_TYPE_WINDOW();
+ /** GTK3 Macros [if-def'd in os.h] */
+ public static final native boolean GTK_IS_ACCEL_LABEL(long obj);
+ public static final native boolean GTK_IS_CONTAINER(long obj);
+
// See os_custom.h
// Dynamically get's the function pointer to gtk_false(). Gtk2/Gtk3.
public static final native long GET_FUNCTION_POINTER_gtk_false();
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean gtk_widget_has_default(long widget);
-
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean gtk_widget_get_sensitive(long widget);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param css_class cast=(const char *)
- * */
- public static final native void gtk_widget_add_css_class(long widget, byte[] css_class);
-
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * */
- /* [GTK4 only] */
- public static final native long gtk_widget_get_first_child(long widget);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * */
- /* [GTK4 only] */
- public static final native long gtk_widget_get_last_child(long widget);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * */
- /* [GTK4 only] */
- public static final native long gtk_widget_get_next_sibling(long widget);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * */
- /* [GTK4 only] */
- public static final native long gtk_widget_get_prev_sibling(long widget);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * */
- /* [GTK4 only] */
- public static final native void gtk_widget_unparent(long widget);
-
- /**
- * @param widget cast=(GtkWidget *)
- */
- /* [GTK3 only, if-def'd in os.h] */
- public static final native long gtk_widget_get_screen(long widget);
-
- /**
- * @param widget cast=(GtkWidget *)
- */
- public static final native int gtk_widget_get_scale_factor(long widget);
-
- /** @param widget cast=(GtkWidget *) */
- public static final native long gtk_widget_get_name(long widget);
-
- /** @method flags=dynamic
- * @param widget_class cast=(GtkWidgetClass *)
- */
- public static final native long gtk_widget_class_get_css_name(long widget_class);
-
- public static final native void gtk_widget_class_add_binding_signal(long widget_class, int keyval, int mods, byte[] signal, byte[] format_string, boolean arg1, boolean arg2, boolean arg3);
-
- /** @param widget cast=(GtkWidget *) */
- public static final native long gtk_widget_get_root(long widget);
/* GtkButton */
public static final native long gtk_button_new();
@@ -371,7 +309,10 @@ public class GTK extends OS {
/* GtkAccelLabel [GTK3 only] */
- /** @param label cast=(const gchar *) */
+ /**
+ * @method flags=dynamic
+ * @param label cast=(const gchar *)
+ */
public static final native long gtk_accel_label_new(byte[] label);
/**
* @method flags=dynamic
@@ -389,6 +330,7 @@ public class GTK extends OS {
/**
+ * @method flags=dynamic
* @param accessible cast=(GtkAccessible *)
*/
public static final native long gtk_accessible_get_widget(long accessible);
@@ -638,38 +580,6 @@ public class GTK extends OS {
* @param height cast=(gint *)
*/
public static final native void gtk_cell_renderer_get_fixed_size(long cell, int[] width, int[] height);
- /**
- * @param widget cast=(GtkWidget *)
- * @param minimum_size cast=(GtkRequisition *)
- * @param natural_size cast=(GtkRequisition *)
- */
- public static final native void gtk_widget_get_preferred_size(long widget, GtkRequisition minimum_size, GtkRequisition natural_size);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param width cast=(gint)
- * @param minimum_size cast=(gint *)
- * @param natural_size cast=(gint *)
- */
- /* [GTK3 only] */
- public static final native void gtk_widget_get_preferred_height_for_width(long widget, int width, int[] minimum_size, int[] natural_size);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param minimum_size cast=(gint *)
- * @param natural_size cast=(gint *)
- */
- /* [GTK3 only] */
- public static final native void gtk_widget_get_preferred_height(long widget, int[] minimum_size, int[] natural_size);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param height cast=(gint)
- * @param minimum_size cast=(gint *)
- * @param natural_size cast=(gint *)
- */
- /* [GTK3 only] */
- public static final native void gtk_widget_get_preferred_width_for_height(long widget, int height, int[] minimum_size, int[] natural_size);
public static final native long gtk_cell_renderer_pixbuf_new();
public static final native long gtk_cell_renderer_text_new();
public static final native long gtk_cell_renderer_toggle_new();
@@ -1414,19 +1324,6 @@ public class GTK extends OS {
/**
* @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param controller cast=(GtkEventController *)
- */
- public static final native void gtk_widget_add_controller(long widget, long controller);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param parent cast=(GtkWidget *)
- */
- public static final native void gtk_widget_set_parent(long widget, long parent);
-
- /**
- * @method flags=dynamic
* @param title cast=(const gchar *),flags=no_out
* @param parent cast=(GtkWindow *)
* @param accept_label cast=(const gchar *),flags=no_out
@@ -1498,66 +1395,8 @@ public class GTK extends OS {
* @method flags=dynamic
*/
public static final native double gtk_gesture_zoom_get_scale_delta(long gesture);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- */
- public static final native void gtk_widget_set_clip(long widget, GtkAllocation allocation);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- */
- public static final native void gtk_widget_get_clip(long widget, GtkAllocation allocation);
- /**
- * @param widget cast=(GtkWidget *)
- * @param has_window cast=(gboolean)
- */
- /* [GTK3 only, if-def'd in os.h] */
- public static final native void gtk_widget_set_has_window(long widget, boolean has_window);
- /**
- * @param widget cast=(GtkWidget *)
- * @param expand cast=(gboolean)
- */
- public static final native void gtk_widget_set_hexpand(long widget, boolean expand);
- /**
- * @param widget cast=(GtkWidget *)
- * @param expand cast=(gboolean)
- */
- public static final native void gtk_widget_set_vexpand(long widget, boolean expand);
- /**
- * @param widget cast=(GtkWidget *)
- * @param gtk_align cast=(GtkAlign)
- */
- public static final native void gtk_widget_set_halign(long widget, int gtk_align);
- /**
- * @param widget cast=(GtkWidget *)
- * @param gtk_align cast=(GtkAlign)
- */
- public static final native void gtk_widget_set_valign(long widget, int gtk_align);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param margin cast=(gint)
- */
- public static final native void gtk_widget_set_margin_start(long widget, int margin);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param margin cast=(gint)
- */
- public static final native void gtk_widget_set_margin_end(long widget, int margin);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param margin cast=(gint)
- */
- public static final native void gtk_widget_set_margin_top(long widget, int margin);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param margin cast=(gint)
- */
- public static final native void gtk_widget_set_margin_bottom(long widget, int margin);
+
+
/**
* @param title cast=(const gchar *)
* @param parent cast=(GtkWindow *)
@@ -1690,7 +1529,10 @@ public class GTK extends OS {
public static final native long gtk_icon_paintable_get_file(long paintable);
- /** @param context cast=(GtkIMContext *) */
+ /**
+ * @param context cast=(GtkIMContext *)
+ * @param event cast=(GdkEvent *)
+ */
public static final native boolean gtk_im_context_filter_keypress(long context, long event);
/** @param context cast=(GtkIMContext *) */
public static final native void gtk_im_context_focus_in(long context);
@@ -2742,10 +2584,6 @@ public class GTK extends OS {
*/
public static final native void gtk_style_context_restore(long context);
/**
- * @param self cast=(GtkWidget *)
- */
- public static final native int gtk_widget_get_state_flags(long self);
- /**
* @param context cast=(GtkStyleContext *)
* @param flags cast=(GtkStateFlags)
*/
@@ -3547,105 +3385,119 @@ public class GTK extends OS {
public static final native long gtk_native_get_surface(long self);
- /* GtkWidget [GTK4 only] */
/**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
+ * @param context cast=(GtkStyleContext *)
+ * @param cr cast=(cairo_t *)
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
*/
- public static final native long gtk_widget_get_native(long widget);
+ public static final native void gtk_render_handle(long context, long cr, double x , double y, double width, double height);
+ /** @method flags=dynamic */
+ public static final native long gtk_printer_option_widget_get_type();
+
+
+ /* GtkWidget */
+ /** @param widget cast=(GtkWidget *) */
+ public static final native int gtk_widget_get_scale_factor(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_name(long widget);
/**
* @method flags=dynamic
+ * @param widget_class cast=(GtkWidgetClass *)
+ */
+ public static final native long gtk_widget_class_get_css_name(long widget_class);
+ /**
* @param widget cast=(GtkWidget *)
- * @param name cast=(const char *)
- * @param format_string cast=(const char *)
+ * @param minimum_size cast=(GtkRequisition *)
+ * @param natural_size cast=(GtkRequisition *)
*/
- public static final native boolean gtk_widget_activate_action(long widget, byte[] name, byte[] format_string);
+ public static final native void gtk_widget_get_preferred_size(long widget, GtkRequisition minimum_size, GtkRequisition natural_size);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native void gtk_widget_unparent(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param action_name cast=(const char *)
+ * @param parent cast=(GtkWidget *)
*/
- public static final native void gtk_widget_action_set_enabled(long widget, byte[] action_name, boolean enabled);
-
- /* GtkWidget [GTK3 only] */
+ public static final native void gtk_widget_set_parent(long widget, long parent);
/**
* @param widget cast=(GtkWidget *)
- * @param accel_signal cast=(const gchar *)
- * @param accel_group cast=(GtkAccelGroup *)
- * @param accel_key cast=(guint)
- * @param accel_mods cast=(GdkModifierType)
+ * @param expand cast=(gboolean)
*/
- public static final native void gtk_widget_add_accelerator(long widget, byte[] accel_signal, long accel_group, int accel_key, int accel_mods, int accel_flags);
+ public static final native void gtk_widget_set_hexpand(long widget, boolean expand);
/**
* @param widget cast=(GtkWidget *)
- * @param accel_group cast=(GtkAccelGroup *)
- * @param accel_key cast=(guint)
- * @param accel_mods cast=(GdkModifierType)
+ * @param expand cast=(gboolean)
*/
- public static final native void gtk_widget_remove_accelerator(long widget, long accel_group, int accel_key, int accel_mods);
+ public static final native void gtk_widget_set_vexpand(long widget, boolean expand);
/**
- * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param events cast=(gint)
+ * @param gtk_align cast=(GtkAlign)
*/
- public static final native void gtk_widget_add_events(long widget, int events);
-
-
-
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean gtk_widget_child_focus(long widget, int direction);
+ public static final native void gtk_widget_set_halign(long widget, int gtk_align);
/**
* @param widget cast=(GtkWidget *)
- * @param text cast=(const gchar *)
+ * @param gtk_align cast=(GtkAlign)
*/
- public static final native long gtk_widget_create_pango_layout(long widget, byte[] text);
+ public static final native void gtk_widget_set_valign(long widget, int gtk_align);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param text cast=(const gchar *)
+ * @param margin cast=(gint)
*/
- public static final native long gtk_widget_create_pango_layout(long widget, long text);
- /** @param widget cast=(GtkWidget *) */
- /* [GTK3 only] */
- public static final native void gtk_widget_destroy(long widget);
+ public static final native void gtk_widget_set_margin_start(long widget, int margin);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param cr cast=(cairo_t *)
+ * @param margin cast=(gint)
*/
- /* [GTK3 only] */
- public static final native void gtk_widget_draw(long widget, long cr);
+ public static final native void gtk_widget_set_margin_end(long widget, int margin);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param event cast=(GdkEvent *)
+ * @param margin cast=(gint)
*/
- public static final native boolean gtk_widget_event(long widget, long event);
- /** @param widget cast=(GtkWidget *) */
- public static final native long gtk_widget_get_accessible(long widget);
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean gtk_widget_get_visible(long widget);
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean gtk_widget_get_realized(long widget);
+ public static final native void gtk_widget_set_margin_top(long widget, int margin);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
+ * @param margin cast=(gint)
*/
- /* [GTK3 only, if-def'd in os.h] */
- public static final native boolean gtk_widget_get_has_window(long widget);
+ public static final native void gtk_widget_set_margin_bottom(long widget, int margin);
+ /** @param self cast=(GtkWidget *) */
+ public static final native int gtk_widget_get_state_flags(long self);
/** @param widget cast=(GtkWidget *) */
- public static final native boolean gtk_widget_get_can_default(long widget);
+ public static final native boolean gtk_widget_has_default(long widget);
+
/** @param widget cast=(GtkWidget *) */
- public static final native boolean gtk_widget_get_child_visible(long widget);
+ public static final native boolean gtk_widget_get_sensitive(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
+ * @param css_class cast=(const char *)
+ * */
+ public static final native void gtk_widget_add_css_class(long widget, byte[] css_class);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_child_focus(long widget, int direction);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param text cast=(const gchar *)
*/
- /* [GTK3 only] */
- public static final native int gtk_widget_get_events(long widget);
+ public static final native long gtk_widget_create_pango_layout(long widget, byte[] text);
/**
- * @method flags=dynamic
* @param widget cast=(GtkWidget *)
+ * @param text cast=(const gchar *)
*/
- /* [GTK3 only] */
- public static final native long gtk_widget_get_window(long widget);
+ public static final native long gtk_widget_create_pango_layout(long widget, long text);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_visible(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_realized(long widget);
+
+ /** @param widget cast=(GtkWidget *) */
+ public static final native boolean gtk_widget_get_child_visible(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
@@ -3688,14 +3540,10 @@ public class GTK extends OS {
* */
public static final native void gtk_widget_get_allocation(long widget, GtkAllocation allocation);
/**
- * @param context cast=(GtkStyleContext *)
- * @param cr cast=(cairo_t *)
- * @param x cast=(gdouble)
- * @param y cast=(gdouble)
- * @param width cast=(gdouble)
- * @param height cast=(gdouble)
+ * @param widget cast=(GtkWidget *)
+ * @param group_cycling cast=(gboolean)
*/
- public static final native void gtk_render_handle(long context, long cr, double x , double y, double width, double height);
+ public static final native boolean gtk_widget_mnemonic_activate(long widget, boolean group_cycling);
/**
* @param widget cast=(GtkWidget *)
*/
@@ -3706,14 +3554,6 @@ public class GTK extends OS {
* @param height cast=(gint *)
*/
public static final native void gtk_widget_get_size_request(long widget, int [] width, int [] height);
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * */
- /* [GTK3 only] */
- public static final native long gtk_widget_get_toplevel(long widget);
- /** @param widget cast=(GtkWidget *) */
- public static final native long gtk_widget_get_tooltip_text(long widget);
/** @param widget cast=(GtkWidget *) */
public static final native void gtk_widget_grab_focus(long widget);
/** @param widget cast=(GtkWidget *) */
@@ -3727,31 +3567,83 @@ public class GTK extends OS {
public static final native void gtk_widget_input_shape_combine_region(long widget, long region);
/** @param widget cast=(GtkWidget *) */
public static final native boolean gtk_widget_is_focus(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native void gtk_widget_queue_resize(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native void gtk_widget_realize(long widget);
+ /** @param dir cast=(GtkTextDirection) */
+ public static final native void gtk_widget_set_default_direction(int dir);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native void gtk_widget_queue_draw(long widget);
/**
* @param widget cast=(GtkWidget *)
- * @param orientation cast=(GtkOrientation)
- * @param for_size cast=(int)
- * @param minimum cast=(int *)
- * @param natural cast=(int *)
- * @param minimum_baseline cast=(int *)
- * @param natural_baseline cast=(int *)
+ * @param can_focus cast=(gboolean)
*/
- /* [GTK4 only, if-def'd in os.h] */
- public static final native void gtk_widget_measure(long widget, int orientation, int for_size, int[] minimum, int[] natural, int[] minimum_baseline, int[] natural_baseline);
+ public static final native void gtk_widget_set_can_focus(long widget, boolean can_focus);
/**
* @param widget cast=(GtkWidget *)
- * @param group_cycling cast=(gboolean)
+ * @param visible cast=(gboolean)
*/
- public static final native boolean gtk_widget_mnemonic_activate(long widget, boolean group_cycling);
+ public static final native void gtk_widget_set_visible(long widget, boolean visible);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param dir cast=(GtkTextDirection)
+ */
+ public static final native void gtk_widget_set_direction(long widget, int dir);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param receives_default cast=(gboolean)
+ */
+ public static final native void gtk_widget_set_receives_default(long widget, boolean receives_default);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param val cast=(gboolean)
+ */
+ public static final native void gtk_widget_set_focus_on_click(long widget, boolean val);
/**
* @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
*/
- /* [GTK3; 3.16 deprecated] */
- public static final native void gtk_widget_override_font(long widget, long font);
+ public static final native void gtk_widget_set_opacity(long widget, double opacity);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native double gtk_widget_get_opacity(long widget);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param sensitive cast=(gboolean)
+ */
+ public static final native void gtk_widget_set_sensitive(long widget, boolean sensitive);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param width cast=(gint)
+ * @param height cast=(gint)
+ */
+ public static final native void gtk_widget_set_size_request(long widget, int width, int height);
/** @param widget cast=(GtkWidget *) */
- public static final native void gtk_widget_queue_resize(long widget);
+ public static final native void gtk_widget_show(long widget);
/** @param widget cast=(GtkWidget *) */
- public static final native void gtk_widget_realize(long widget);
+ public static final native boolean gtk_widget_activate(long widget);
+ /** @param widget cast=(GtkWidget *) */
+ public static final native long gtk_widget_get_tooltip_text(long widget);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param tip_text cast=(const gchar *)
+ */
+ public static final native void gtk_widget_set_tooltip_text(long widget, byte[] tip_text);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param name cast=(const char *)
+ * @param group cast=(GActionGroup *)
+ */
+ public static final native void gtk_widget_insert_action_group(long widget, byte[] name, long group);
+
+ /* GtkWidget [GTK3 only] */
+ /** @method flags=dynamic */
+ /* [GTK3; 3.16 deprecated] */
+ public static final native void gtk_widget_override_font(long widget, long font);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
@@ -3759,126 +3651,192 @@ public class GTK extends OS {
*/
/* deprecated as of 3.14 */
public static final native void gtk_widget_reparent(long widget, long new_parent);
- /** @param dir cast=(GtkTextDirection) */
- public static final native void gtk_widget_set_default_direction(int dir);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param can_default cast=(gboolean)
+ * @param double_buffered cast=(gboolean)
*/
- public static final native void gtk_widget_set_can_default(long widget, boolean can_default);
- /** @param widget cast=(GtkWidget *) */
- public static final native void gtk_widget_queue_draw(long widget);
+ /* [GTK3 only; 3.14 deprecated] */
+ public static final native void gtk_widget_set_double_buffered(long widget, boolean double_buffered);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param can_focus cast=(gboolean)
+ * @param width cast=(gint)
+ * @param minimum_size cast=(gint *)
+ * @param natural_size cast=(gint *)
*/
- public static final native void gtk_widget_set_can_focus(long widget, boolean can_focus);
+ public static final native void gtk_widget_get_preferred_height_for_width(long widget, int width, int[] minimum_size, int[] natural_size);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param cursor cast=(GdkCursor *)
+ * @param minimum_size cast=(gint *)
+ * @param natural_size cast=(gint *)
*/
- /* [GTK4 only, if-def'd in os.h] */
- public static final native void gtk_widget_set_cursor(long widget, long cursor);
+ public static final native void gtk_widget_get_preferred_height(long widget, int[] minimum_size, int[] natural_size);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param visible cast=(gboolean)
+ * @param height cast=(gint)
+ * @param minimum_size cast=(gint *)
+ * @param natural_size cast=(gint *)
*/
- public static final native void gtk_widget_set_visible(long widget, boolean visible);
+ public static final native void gtk_widget_get_preferred_width_for_height(long widget, int height, int[] minimum_size, int[] natural_size);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param dir cast=(GtkTextDirection)
*/
- public static final native void gtk_widget_set_direction(long widget, int dir);
+ public static final native long gtk_widget_get_screen(long widget);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param receives_default cast=(gboolean)
*/
- public static final native void gtk_widget_set_receives_default(long widget, boolean receives_default);
+ public static final native void gtk_widget_set_clip(long widget, GtkAllocation allocation);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param double_buffered cast=(gboolean)
*/
- /* [GTK3 only; 3.14 deprecated] */
- public static final native void gtk_widget_set_double_buffered(long widget, boolean double_buffered);
+ public static final native void gtk_widget_get_clip(long widget, GtkAllocation allocation);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param val cast=(gboolean)
+ * @param has_window cast=(gboolean)
*/
- public static final native void gtk_widget_set_focus_on_click(long widget, boolean val);
+ public static final native void gtk_widget_set_has_window(long widget, boolean has_window);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param accel_signal cast=(const gchar *)
+ * @param accel_group cast=(GtkAccelGroup *)
+ * @param accel_key cast=(guint)
+ * @param accel_mods cast=(GdkModifierType)
+ */
+ public static final native void gtk_widget_add_accelerator(long widget, byte[] accel_signal, long accel_group, int accel_key, int accel_mods, int accel_flags);
+ /**
+ * @param widget cast=(GtkWidget *)
+ * @param accel_group cast=(GtkAccelGroup *)
+ * @param accel_key cast=(guint)
+ * @param accel_mods cast=(GdkModifierType)
+ */
+ public static final native void gtk_widget_remove_accelerator(long widget, long accel_group, int accel_key, int accel_mods);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
+ * @param events cast=(gint)
*/
- public static final native void gtk_widget_set_opacity(long widget, double opacity);
+ public static final native void gtk_widget_add_events(long widget, int events);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
*/
- public static final native double gtk_widget_get_opacity(long widget);
+ public static final native void gtk_widget_destroy(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param redraw cast=(gboolean)
*/
- /* [GTK3 only] */
- public static final native void gtk_widget_set_redraw_on_allocate(long widget, boolean redraw);
+ public static final native int gtk_widget_get_events(long widget);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param sensitive cast=(gboolean)
*/
- public static final native void gtk_widget_set_sensitive(long widget, boolean sensitive);
+ public static final native long gtk_widget_get_window(long widget);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param width cast=(gint)
- * @param height cast=(gint)
*/
- public static final native void gtk_widget_set_size_request(long widget, int width, int height);
- /** @param widget cast=(GtkWidget *) */
- public static final native void gtk_widget_show(long widget);
+ public static final native long gtk_widget_get_toplevel(long widget);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param allocation cast=(GtkAllocation *),flags=no_out
+ * @param redraw cast=(gboolean)
*/
- /* [GTK3 only, if-def'd in os.h] */
- public static final native void gtk_widget_size_allocate(long widget, GtkAllocation allocation);
+ public static final native void gtk_widget_set_redraw_on_allocate(long widget, boolean redraw);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param allocation cast=(GtkAllocation *),flags=no_out
*/
- /* [GTK4 only, if-def'd in os.h] */
- public static final native void gtk_widget_size_allocate(long widget, GtkAllocation allocation, int baseline);
+ public static final native void gtk_widget_set_allocation(long widget, GtkAllocation allocation);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param allocation cast=(GtkAllocation *),flags=no_out
*/
- /* [GTK3 only] */
- public static final native void gtk_widget_set_allocation(long widget, GtkAllocation allocation);
+ public static final native void gtk_widget_size_allocate(long widget, GtkAllocation allocation);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param event cast=(GdkEvent *)
+ */
+ public static final native boolean gtk_widget_event(long widget, long event);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param cr cast=(cairo_t *)
+ */
+ public static final native void gtk_widget_draw(long widget, long cr);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native long gtk_widget_get_accessible(long widget);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native boolean gtk_widget_get_has_window(long widget);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native boolean gtk_widget_get_can_default(long widget);
/**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param can_default cast=(gboolean)
+ */
+ public static final native void gtk_widget_set_can_default(long widget, boolean can_default);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param parent_window cast=(GdkWindow *)
+ */
+ public static final native void gtk_widget_set_parent_window(long widget, long parent_window);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param region cast=(cairo_region_t *)
+ */
+ public static final native void gtk_widget_shape_combine_region(long widget, long region);
+ /**
+ * @method flags=dynamic
+ * @param src_widget cast=(GtkWidget *)
+ * @param dest_widget cast=(GtkWidget *)
+ * @param dest_x cast=(gint *)
+ * @param dest_y cast=(gint *)
+ */
+ public static final native boolean gtk_widget_translate_coordinates(long src_widget, long dest_widget, int src_x, int src_y, int[] dest_x, int[] dest_y);
+ /**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param property_name cast=(const gchar *)
* @param terminator cast=(const gchar *),flags=sentinel
*/
- /* [GTK3 only, if-def'd in os.h] */
public static final native void gtk_widget_style_get(long widget, byte[] property_name, int[] value, long terminator);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param property_name cast=(const gchar *)
* @param terminator cast=(const gchar *),flags=sentinel
*/
- /* [GTK3 only, if-def'd in os.h] */
public static final native void gtk_widget_style_get(long widget, byte[] property_name, long[] value, long terminator);
+
+ /* GtkWidget [GTK4 only] */
/**
- * @param src_widget cast=(GtkWidget *)
- * @param dest_widget cast=(GtkWidget *)
- * @param dest_x cast=(gint *)
- * @param dest_y cast=(gint *)
+ * @param widget cast=(GtkWidget *)
+ * @param child cast=(GtkWidget *)
+ * @param snapshot cast=(GtkSnapshot *)
*/
- public static final native boolean gtk_widget_translate_coordinates(long src_widget, long dest_widget, int src_x, int src_y, int[] dest_x, int[] dest_y);
+ /* [If-def'd in os.h] */
+ public static final native void gtk_widget_snapshot_child(long widget, long child, long snapshot);
/**
* @method flags=dynamic
* @param src_widget cast=(GtkWidget *)
@@ -3887,49 +3845,86 @@ public class GTK extends OS {
* @param dest_y cast=(double *)
*/
public static final native boolean gtk_widget_translate_coordinates(long src_widget, long dest_widget, double src_x, double src_y, double[] dest_x, double[] dest_y);
- /** @param widget cast=(GtkWidget *) */
- public static final native boolean gtk_widget_activate(long widget);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param tip_text cast=(const gchar *)
+ * @param allocation cast=(GtkAllocation *),flags=no_out
*/
- public static final native void gtk_widget_set_tooltip_text(long widget, byte[] tip_text);
+ public static final native void gtk_widget_size_allocate(long widget, GtkAllocation allocation, int baseline);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param parent_window cast=(GdkWindow *)
+ * @param cursor cast=(GdkCursor *)
*/
- /* [GTK3 only, if-def'd in os.h] */
- public static final native void gtk_widget_set_parent_window(long widget, long parent_window);
+ public static final native void gtk_widget_set_cursor(long widget, long cursor);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param parent_surface cast=(GdkSurface *)
+ * @param orientation cast=(GtkOrientation)
+ * @param for_size cast=(int)
+ * @param minimum cast=(int *)
+ * @param natural cast=(int *)
+ * @param minimum_baseline cast=(int *)
+ * @param natural_baseline cast=(int *)
*/
- /* [GTK4 only, if-def'd in os.h] */
- public static final native void gtk_widget_set_parent_surface(long widget, long parent_surface);
- /** @method flags=dynamic */
- public static final native long gtk_printer_option_widget_get_type();
+ public static final native void gtk_widget_measure(long widget, int orientation, int for_size, int[] minimum, int[] natural, int[] minimum_baseline, int[] natural_baseline);
/**
* @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param region cast=(cairo_region_t *)
*/
- /* [GTK3 only] */
- public static final native void gtk_widget_shape_combine_region(long widget, long region);
+ public static final native long gtk_widget_get_native(long widget);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param child cast=(GtkWidget *)
- * @param snapshot cast=(GtkSnapshot *)
+ * @param name cast=(const char *)
+ * @param format_string cast=(const char *)
*/
- /* [GTK4 only, if-def'd in os.h] */
- public static final native void gtk_widget_snapshot_child(long widget, long child, long snapshot);
-
- /* GtkWidget [GTK4 only] */
+ public static final native boolean gtk_widget_activate_action(long widget, byte[] name, byte[] format_string);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param action_name cast=(const char *)
+ */
+ public static final native void gtk_widget_action_set_enabled(long widget, byte[] action_name, boolean enabled);
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
- * @param name cast=(const char *)
- * @param group cast=(GActionGroup *)
+ * @param controller cast=(GtkEventController *)
*/
- public static final native void gtk_widget_insert_action_group(long widget, byte[] name, long group);
+ public static final native void gtk_widget_add_controller(long widget, long controller);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * */
+ public static final native long gtk_widget_get_first_child(long widget);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * */
+ public static final native long gtk_widget_get_last_child(long widget);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * */
+ public static final native long gtk_widget_get_next_sibling(long widget);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * */
+ public static final native long gtk_widget_get_prev_sibling(long widget);
+ /**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ */
+ public static final native long gtk_widget_get_root(long widget);
+ /**
+ * @method flags=dynamic
+ * @param widget_class cast=(GtkWidgetClass *)
+ * @param mods cast=(GdkModifierType)
+ * @param signal cast=(const char *)
+ * @param format_string cast=(const char *)
+ */
+ public static final native void gtk_widget_class_add_binding_signal(long widget_class, int keyval, int mods, byte[] signal, byte[] format_string, boolean arg1, boolean arg2, boolean arg3);
/* GtkWindow */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index f7826257bf..a9a2cc9485 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -3811,8 +3811,9 @@ void setParentGdkResource (Control child) {
* signal using gtk_container_propagate_draw(). See bug 531928.
*/
if (GTK.GTK4) {
- long parentGdkSurface = eventSurface ();
- GTK.gtk_widget_set_parent_surface (child.topHandle(), parentGdkSurface);
+ // long parentGdkSurface = eventSurface ();
+ // TODO: GTK4 no gtk_widget_set_parent_surface
+ // GTK.gtk_widget_set_parent_surface (child.topHandle(), parentGdkSurface);
// TODO: implement connectFixedHandleDraw with the "snapshot" signal
} else {
long parentGdkWindow = eventWindow ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 91b40b315f..00a56a71de 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -3894,8 +3894,9 @@ void setParentGdkResource (Control child) {
* signal using gtk_container_propagate_draw(). See bug 531928.
*/
if (GTK.GTK4) {
- long parentGdkSurface = eventSurface ();
- GTK.gtk_widget_set_parent_surface (child.topHandle(), parentGdkSurface);
+ // long parentGdkSurface = eventSurface ();
+ // TODO: GTK4 no gtk_widget_set_parent_surface
+ // GTK.gtk_widget_set_parent_surface (child.topHandle(), parentGdkSurface);
// TODO: implement connectFixedHandleDraw with the "snapshot" signal
} else {
long parentGdkWindow = eventWindow ();

Back to the top