From 7d668f63ab0c20d3e041dae45b4263c74520a76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Tue, 27 Aug 2024 10:51:43 +0200 Subject: [PATCH] Build GTK 4 binaries Currently the GTK4 binaries are not build as part of the build, this has several drawbacks: 1) If anything is adjusted for GTK4 part it might break without notice 2) We have no GTK4 binaries by default This enables *compilation* of the gtk4 parts to see at laest everything can be compiled. --- .github/workflows/maven.yml | 2 +- Jenkinsfile | 2 +- binaries/pom.xml | 2 - .../Eclipse SWT PI/gtk/library/build.sh | 33 ++-- .../Eclipse SWT PI/gtk/library/gtk3.h | 1 + .../Eclipse SWT PI/gtk/library/gtk4.c | 158 ++++++++++++++++-- .../Eclipse SWT PI/gtk/library/gtk4.h | 3 + .../org/eclipse/swt/internal/gtk4/GTK4.java | 46 +++-- container/Dockerfile | 2 +- 9 files changed, 202 insertions(+), 47 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 4c70c1e0bf1..a9de9913066 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -43,7 +43,7 @@ jobs: - name: Install Linux requirements run: | sudo apt-get update -qq - sudo apt-get install -qq -y libgtk-3-dev freeglut3-dev webkit2gtk-driver + sudo apt-get install -qq -y libgtk-3-dev libgtk-4-dev freeglut3-dev webkit2gtk-driver if: ${{ matrix.config.native == 'gtk.linux.x86_64'}} - name: Pull large static Windows binaries run: | diff --git a/Jenkinsfile b/Jenkinsfile index bd025c55829..b6b8da75995 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,7 +19,7 @@ def runOnNativeBuildAgent(String platform, Closure body) { def final nativeBuildStageName = 'Build SWT-native binaries' if (platform == 'gtk.linux.x86_64') { podTemplate(inheritFrom: 'centos-latest' /* inhert general configuration */, containers: [ - containerTemplate(name: 'swtbuild', image: 'eclipse/platformreleng-centos-swt-build:8', + containerTemplate(name: 'swtbuild', image: 'eclipse/platformreleng-debian-swtnativebuild:12', resourceRequestCpu:'1000m', resourceRequestMemory:'512Mi', resourceLimitCpu:'2000m', resourceLimitMemory:'4096Mi', alwaysPullImage: true, command: 'cat', ttyEnabled: true) diff --git a/binaries/pom.xml b/binaries/pom.xml index 74293da3cae..a87457c2520 100644 --- a/binaries/pom.xml +++ b/binaries/pom.xml @@ -136,12 +136,10 @@ - - diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh index 3702d6e1323..a41db3b016f 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh @@ -254,8 +254,9 @@ func_echo_plus "Building SWT/GTK+ for Architectures: $SWT_OS $SWT_ARCH" func_build_gtk4 () { export GTK_VERSION=4.0 - func_echo_plus "Building GTK4 bindings:" + pkg-config --libs gtk+4.0 + rpm -qi gtk4-devel ${MAKE_TYPE} -f $MAKEFILE all $MAKE_CAIRO $MAKE_AWT "${@}" RETURN_VALUE=$? #make can return 1 or 2 if it fails. Thus need to cache it in case it's used programmatically somewhere. if [ "$RETURN_VALUE" -eq 0 ]; then @@ -268,8 +269,9 @@ func_build_gtk4 () { func_build_gtk3 () { export GTK_VERSION=3.0 - func_echo_plus "Building GTK3 bindings:" + pkg-config --libs gtk+3.0 + rpm -qi gtk3-devel ${MAKE_TYPE} -f $MAKEFILE all $MAKE_CAIRO $MAKE_AWT "${@}" RETURN_VALUE=$? #make can return 1 or 2 if it fails. Thus need to cache it in case it's used programmatically somewhere. if [ "$RETURN_VALUE" -eq 0 ]; then @@ -280,14 +282,7 @@ func_build_gtk3 () { fi } -if [ "$1" = "-gtk-all" ]; then - shift - func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them." - func_clean_up - func_build_gtk4 "$@" - func_clean_up - func_build_gtk3 "$@" -elif [ "$1" = "-gtk4" ]; then +if [ "$1" = "-gtk4" ]; then shift func_build_gtk4 "$@" elif [ "$1" = "-gtk3" ]; then @@ -295,7 +290,21 @@ elif [ "$1" = "-gtk3" ]; then func_build_gtk3 "$@" elif [ "${GTK_VERSION}" = "4.0" ]; then func_build_gtk4 "$@" -elif [ "${GTK_VERSION}" = "3.0" -o "${GTK_VERSION}" = "" ]; then - export GTK_VERSION="3.0" +elif [ "${GTK_VERSION}" = "3.0" ]; then + func_build_gtk3 "$@" +else + if [ "$1" = "-gtk-all" ]; then + shift + fi + func_echo_plus "==== Building GTK3 + GTK 4 ====" + func_echo_plus "See below for installed GTK versions:" + dpkg --get-selections | grep libgtk + apt list --installed libgtk* + rpm -qa|grep gtk + func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them." + func_clean_up + func_build_gtk4 "$@" + func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them." + func_clean_up func_build_gtk3 "$@" fi diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h index b55dcb2b113..d8fca69aa52 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h @@ -10,6 +10,7 @@ * * Contributors: * Syntevo - initial API and implementation + * DUMMY CHANGE *******************************************************************************/ #ifndef INC_gtk3_H 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 589edf1b91b..dfaf3a62937 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 @@ -662,7 +662,15 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1get_1default_1filter) { jlong rc = 0; GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1get_1default_1filter_FUNC); - rc = (jlong)gtk_file_dialog_get_default_filter((GtkFileDialog *)arg0); +/* + rc = (jlong)gtk_file_dialog_get_default_filter(arg0); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_get_default_filter) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1get_1default_1filter_FUNC); return rc; } @@ -674,7 +682,15 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1new) { jlong rc = 0; GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1new_FUNC); +/* rc = (jlong)gtk_file_dialog_new(); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_new) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)())fp)(); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1new_FUNC); return rc; } @@ -685,7 +701,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1open) (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4) { GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1open_FUNC); - gtk_file_dialog_open((GtkFileDialog *)arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); +/* + gtk_file_dialog_open(arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_open) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, GtkWindow *, GCancellable *, GAsyncReadyCallback, gpointer))fp)(arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1open_FUNC); } #endif @@ -698,7 +722,15 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1open_1finish) jlong rc = 0; GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1open_1finish_FUNC); if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail; - rc = (jlong)gtk_file_dialog_open_finish((GtkFileDialog *)arg0, (GAsyncResult *)arg1, (GError **)lparg2); +/* + rc = (jlong)gtk_file_dialog_open_finish(arg0, (GAsyncResult *)arg1, (GError **)lparg2); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_open_finish) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, GAsyncResult *, GError **))fp)(arg0, (GAsyncResult *)arg1, (GError **)lparg2); + } + } fail: if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0); GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1open_1finish_FUNC); @@ -711,7 +743,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1open_1multiple) (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4) { GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1open_1multiple_FUNC); - gtk_file_dialog_open_multiple((GtkFileDialog *)arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); +/* + gtk_file_dialog_open_multiple(arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_open_multiple) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, GtkWindow *, GCancellable *, GAsyncReadyCallback, gpointer))fp)(arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1open_1multiple_FUNC); } #endif @@ -724,7 +764,15 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1open_1multiple_1finish) jlong rc = 0; GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1open_1multiple_1finish_FUNC); if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail; - rc = (jlong)gtk_file_dialog_open_multiple_finish((GtkFileDialog *)arg0, (GAsyncResult *)arg1, (GError **)lparg2); +/* + rc = (jlong)gtk_file_dialog_open_multiple_finish(arg0, (GAsyncResult *)arg1, (GError **)lparg2); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_open_multiple_finish) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, GAsyncResult *, GError **))fp)(arg0, (GAsyncResult *)arg1, (GError **)lparg2); + } + } fail: if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0); GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1open_1multiple_1finish_FUNC); @@ -737,7 +785,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1save) (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4) { GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1save_FUNC); - gtk_file_dialog_save((GtkFileDialog *)arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); +/* + gtk_file_dialog_save(arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_save) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, GtkWindow *, GCancellable *, GAsyncReadyCallback, gpointer))fp)(arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1save_FUNC); } #endif @@ -750,7 +806,15 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1save_1finish) jlong rc = 0; GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1save_1finish_FUNC); if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail; - rc = (jlong)gtk_file_dialog_save_finish((GtkFileDialog *)arg0, (GAsyncResult *)arg1, (GError **)lparg2); +/* + rc = (jlong)gtk_file_dialog_save_finish(arg0, (GAsyncResult *)arg1, (GError **)lparg2); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_save_finish) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, GAsyncResult *, GError **))fp)(arg0, (GAsyncResult *)arg1, (GError **)lparg2); + } + } fail: if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0); GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1save_1finish_FUNC); @@ -763,7 +827,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1select_1folder) (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4) { GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1select_1folder_FUNC); - gtk_file_dialog_select_folder((GtkFileDialog *)arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); +/* + gtk_file_dialog_select_folder(arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_select_folder) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, GtkWindow *, GCancellable *, GAsyncReadyCallback, gpointer))fp)(arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1select_1folder_FUNC); } #endif @@ -776,7 +848,15 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1select_1folder_1finish) jlong rc = 0; GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1select_1folder_1finish_FUNC); if (arg2) if ((lparg2 = (*env)->GetLongArrayElements(env, arg2, NULL)) == NULL) goto fail; - rc = (jlong)gtk_file_dialog_select_folder_finish((GtkFileDialog *)arg0, (GAsyncResult *)arg1, (GError **)lparg2); +/* + rc = (jlong)gtk_file_dialog_select_folder_finish(arg0, (GAsyncResult *)arg1, (GError **)lparg2); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_select_folder_finish) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong, GAsyncResult *, GError **))fp)(arg0, (GAsyncResult *)arg1, (GError **)lparg2); + } + } fail: if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0); GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1select_1folder_1finish_FUNC); @@ -789,7 +869,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1default_1filter) (JNIEnv *env, jclass that, jlong arg0, jlong arg1) { GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1set_1default_1filter_FUNC); - gtk_file_dialog_set_default_filter((GtkFileDialog *)arg0, (GtkFileFilter *)arg1); +/* + gtk_file_dialog_set_default_filter(arg0, (GtkFileFilter *)arg1); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_set_default_filter) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, GtkFileFilter *))fp)(arg0, (GtkFileFilter *)arg1); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1default_1filter_FUNC); } #endif @@ -799,7 +887,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1filters) (JNIEnv *env, jclass that, jlong arg0, jlong arg1) { GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1set_1filters_FUNC); - gtk_file_dialog_set_filters((GtkFileDialog *)arg0, (GListModel *)arg1); +/* + gtk_file_dialog_set_filters(arg0, (GListModel *)arg1); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_set_filters) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, GListModel *))fp)(arg0, (GListModel *)arg1); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1filters_FUNC); } #endif @@ -809,7 +905,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1initial_1file) (JNIEnv *env, jclass that, jlong arg0, jlong arg1) { GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1set_1initial_1file_FUNC); - gtk_file_dialog_set_initial_file((GtkFileDialog *)arg0, (GFile *)arg1); +/* + gtk_file_dialog_set_initial_file(arg0, (GFile *)arg1); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_set_initial_file) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, GFile *))fp)(arg0, (GFile *)arg1); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1initial_1file_FUNC); } #endif @@ -819,7 +923,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1initial_1folder) (JNIEnv *env, jclass that, jlong arg0, jlong arg1) { GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1set_1initial_1folder_FUNC); - gtk_file_dialog_set_initial_folder((GtkFileDialog *)arg0, (GFile *)arg1); +/* + gtk_file_dialog_set_initial_folder(arg0, (GFile *)arg1); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_set_initial_folder) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, GFile *))fp)(arg0, (GFile *)arg1); + } + } GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1initial_1folder_FUNC); } #endif @@ -831,7 +943,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1initial_1name) jbyte *lparg1=NULL; GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1set_1initial_1name_FUNC); if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; - gtk_file_dialog_set_initial_name((GtkFileDialog *)arg0, (char *)lparg1); +/* + gtk_file_dialog_set_initial_name(arg0, (char *)lparg1); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_set_initial_name) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, char *))fp)(arg0, (char *)lparg1); + } + } fail: if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1initial_1name_FUNC); @@ -845,7 +965,15 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1title) jbyte *lparg1=NULL; GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1set_1title_FUNC); if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; - gtk_file_dialog_set_title((GtkFileDialog *)arg0, (char *)lparg1); +/* + gtk_file_dialog_set_title(arg0, (char *)lparg1); +*/ + { + GTK4_LOAD_FUNCTION(fp, gtk_file_dialog_set_title) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, char *))fp)(arg0, (char *)lparg1); + } + } fail: if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1title_FUNC); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.h index 247632153fe..fa9ed326079 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.h @@ -22,4 +22,7 @@ #include +// Hard-link code generated from GTK4.java to LIB_GTK +#define GTK4_LOAD_FUNCTION(var, name) LOAD_FUNCTION_LIB(var, LIB_GTK, name) + #endif /* INC_gtk4_H */ 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 62368c29cf9..f255f723e25 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 @@ -175,9 +175,11 @@ public class GTK4 { public static final native long gdk_content_formats_builder_free_to_formats(long builder); /* GtkFileDialog */ + /** @method flags=dynamic **/ public static final native long gtk_file_dialog_new(); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param parent cast=(GtkWindow *) * @param cancellable cast=(GCancellable *) * @param callback cast=(GAsyncReadyCallback) @@ -185,47 +187,56 @@ public class GTK4 { */ public static final native void gtk_file_dialog_select_folder(long self, long parent, long cancellable, long callback, long user_data); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param result cast=(GAsyncResult *) * @param error cast=(GError **) */ public static final native long gtk_file_dialog_select_folder_finish(long self, long result, long[] error); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param folder cast=(GFile *) */ public static final native void gtk_file_dialog_set_initial_folder(long self, long folder); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param title cast=(char *) */ public static final native void gtk_file_dialog_set_initial_name(long self, byte[] title); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param file cast=(GFile *) */ public static final native void gtk_file_dialog_set_initial_file(long self, long file); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param title cast=(char *) */ public static final native void gtk_file_dialog_set_title(long self, byte[] title); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param filter cast=(GtkFileFilter *) */ public static final native void gtk_file_dialog_set_default_filter(long self, long filter); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param filters cast=(GListModel *) */ public static final native void gtk_file_dialog_set_filters(long self, long filters); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * */ public static final native long gtk_file_dialog_get_default_filter(long self); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param parent cast=(GtkWindow *) * @param cancellable cast=(GCancellable *) * @param callback cast=(GAsyncReadyCallback) @@ -233,27 +244,31 @@ public class GTK4 { */ public static final native void gtk_file_dialog_open_multiple(long self, long parent, long cancellable, long callback, long user_data); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param result cast=(GAsyncResult *) * @param error cast=(GError **) */ public static final native long gtk_file_dialog_open_multiple_finish(long self, long result, long[] error); /** - * @param self cast=(GtkFileDialog *) + * * @param parent cast=(GtkWindow *) * @param cancellable cast=(GCancellable *) * @param callback cast=(GAsyncReadyCallback) * @param user_data cast=(gpointer) + * @method flags=dynamic */ public static final native void gtk_file_dialog_open(long self, long parent, long cancellable, long callback, long user_data); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param result cast=(GAsyncResult *) * @param error cast=(GError **) */ public static final native long gtk_file_dialog_open_finish(long self, long result, long[] error); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param parent cast=(GtkWindow *) * @param cancellable cast=(GCancellable *) * @param callback cast=(GAsyncReadyCallback) @@ -261,7 +276,8 @@ public class GTK4 { */ public static final native void gtk_file_dialog_save(long self, long parent, long cancellable, long callback, long user_data); /** - * @param self cast=(GtkFileDialog *) + * @method flags=dynamic + * * @param result cast=(GAsyncResult *) * @param error cast=(GError **) */ diff --git a/container/Dockerfile b/container/Dockerfile index a3690a871df..1852cc1813d 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -21,7 +21,7 @@ RUN chmod 555 /usr/local/bin/jenkins-slave && \ ENTRYPOINT [ "uid_entrypoint", "jenkins-slave" ] RUN dnf -y update && dnf -y install \ - java-openjdk maven webkit2gtk3-devel \ + java-openjdk maven webkit2gtk3-devel libgtk-4-dev \ make gcc mesa-libGLU-devel mesa-libGL-devel \ libXt-devel procps-ng \ && dnf clean all