Skip to content

Commit

Permalink
[GTK4] Migrate FileDialog to new GTK FileDialog API
Browse files Browse the repository at this point in the history
The FileChooser API has been marked as deprecated with GTK 4.10 and
replaced by the FileDialog API. With this contribution, this old API has
now been limited to GTK3.

Following methods have been added to OS.java:

- g_list_store_new
- g_list_store_append

Following methods have been moved from GTK.java to GTK3.java:

- gtk_file_chooser_add_filter
- gtk_file_chooser_get_filter
- gtk_file_chooser_set_current_name
- gtk_file_chooser_set_filter
- gtk_file_chooser_set_select_multiple
- gtk_file_chooser_native_new

Following constant has been added to GTK.java:

- GTK_TYPE_FILE_FILTER

Following methods have been removed from GTK4.java:

- gtk_file_chooser_get_files
- gtk_file_chooser_get_file
- gtk_file_chooser_set_current_folder
- gtk_file_chooser_set_file

Following methods have been added to GTK4.java:

- gtk_file_dialog_set_initial_name
- gtk_file_dialog_set_initial_file
- gtk_file_dialog_set_title
- gtk_file_dialog_set_default_filter
- gtk_file_dialog_set_filters
- gtk_file_dialog_get_default_filter
- gtk_file_dialog_open_multiple
- gtk_file_dialog_open_multiple_finish
- gtk_file_dialog_open
- gtk_file_dialog_open_finish
- gtk_file_dialog_save
- gtk_file_dialog_save_finish

This commit also amends an oversight from
2e61b4b where the title of the
directory dialog was no longer set.

Contributes to:
#652
  • Loading branch information
ptziegler authored and akurtakov committed Sep 25, 2024
1 parent 3c8ed8e commit 31a81f1
Show file tree
Hide file tree
Showing 13 changed files with 454 additions and 200 deletions.
86 changes: 86 additions & 0 deletions bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,16 @@ JNIEXPORT jboolean JNICALL GTK3_NATIVE(gtk_1events_1pending)
}
#endif

#ifndef NO_gtk_1file_1chooser_1add_1filter
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1add_1filter)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1add_1filter_FUNC);
gtk_file_chooser_add_filter((GtkFileChooser *)arg0, (GtkFileFilter *)arg1);
GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1add_1filter_FUNC);
}
#endif

#ifndef NO_gtk_1file_1chooser_1get_1filename
JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1get_1filename)
(JNIEnv *env, jclass that, jlong arg0)
Expand All @@ -804,6 +814,18 @@ JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1get_1filenames)
}
#endif

#ifndef NO_gtk_1file_1chooser_1get_1filter
JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1get_1filter)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1filter_FUNC);
rc = (jlong)gtk_file_chooser_get_filter((GtkFileChooser *)arg0);
GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1filter_FUNC);
return rc;
}
#endif

#ifndef NO_gtk_1file_1chooser_1get_1uri
JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1get_1uri)
(JNIEnv *env, jclass that, jlong arg0)
Expand All @@ -828,6 +850,36 @@ JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1get_1uris)
}
#endif

#ifndef NO_gtk_1file_1chooser_1native_1new
JNIEXPORT jlong JNICALL GTK3_NATIVE(gtk_1file_1chooser_1native_1new)
(JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1, jint arg2, jbyteArray arg3, jbyteArray arg4)
{
jbyte *lparg0=NULL;
jbyte *lparg3=NULL;
jbyte *lparg4=NULL;
jlong rc = 0;
GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1native_1new_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
/*
rc = (jlong)gtk_file_chooser_native_new((const gchar *)lparg0, (GtkWindow *)arg1, arg2, (const gchar *)lparg3, (const gchar *)lparg4);
*/
{
GTK3_LOAD_FUNCTION(fp, gtk_file_chooser_native_new)
if (fp) {
rc = (jlong)((jlong (CALLING_CONVENTION*)(const gchar *, GtkWindow *, jint, const gchar *, const gchar *))fp)((const gchar *)lparg0, (GtkWindow *)arg1, arg2, (const gchar *)lparg3, (const gchar *)lparg4);
}
}
fail:
if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, JNI_ABORT);
if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, JNI_ABORT);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, JNI_ABORT);
GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1native_1new_FUNC);
return rc;
}
#endif

#ifndef NO_gtk_1file_1chooser_1set_1current_1folder
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1current_1folder)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
Expand All @@ -852,6 +904,20 @@ JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1current_1folder_1uri
}
#endif

#ifndef NO_gtk_1file_1chooser_1set_1current_1name
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1current_1name)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1current_1name_FUNC);
if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
gtk_file_chooser_set_current_name((GtkFileChooser *)arg0, (const gchar *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1current_1name_FUNC);
}
#endif

#ifndef NO_gtk_1file_1chooser_1set_1do_1overwrite_1confirmation
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1do_1overwrite_1confirmation)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
Expand Down Expand Up @@ -882,6 +948,16 @@ JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1filename)
}
#endif

#ifndef NO_gtk_1file_1chooser_1set_1filter
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1filter)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
{
GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1filter_FUNC);
gtk_file_chooser_set_filter((GtkFileChooser *)arg0, (GtkFileFilter *)arg1);
GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1filter_FUNC);
}
#endif

#ifndef NO_gtk_1file_1chooser_1set_1local_1only
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1local_1only)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
Expand All @@ -892,6 +968,16 @@ JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1local_1only)
}
#endif

#ifndef NO_gtk_1file_1chooser_1set_1select_1multiple
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1select_1multiple)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
GTK3_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1select_1multiple_FUNC);
gtk_file_chooser_set_select_multiple((GtkFileChooser *)arg0, (gboolean)arg1);
GTK3_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1select_1multiple_FUNC);
}
#endif

#ifndef NO_gtk_1file_1chooser_1set_1uri
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1file_1chooser_1set_1uri)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
Expand Down
2 changes: 2 additions & 0 deletions bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@
#define GTK_DISABLE_SINGLE_INCLUDES

#include <gtk/gtk.h>
// Hard-link code generated from GTK3.java to LIB_GTK
#define GTK3_LOAD_FUNCTION(var, name) LOAD_FUNCTION_LIB(var, LIB_GTK, name)

#endif /* INC_gtk3_H */
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,22 @@ typedef enum {
gtk_1event_1box_1new_FUNC,
gtk_1event_1controller_1handle_1event_FUNC,
gtk_1events_1pending_FUNC,
gtk_1file_1chooser_1add_1filter_FUNC,
gtk_1file_1chooser_1get_1filename_FUNC,
gtk_1file_1chooser_1get_1filenames_FUNC,
gtk_1file_1chooser_1get_1filter_FUNC,
gtk_1file_1chooser_1get_1uri_FUNC,
gtk_1file_1chooser_1get_1uris_FUNC,
gtk_1file_1chooser_1native_1new_FUNC,
gtk_1file_1chooser_1set_1current_1folder_FUNC,
gtk_1file_1chooser_1set_1current_1folder_1uri_FUNC,
gtk_1file_1chooser_1set_1current_1name_FUNC,
gtk_1file_1chooser_1set_1do_1overwrite_1confirmation_FUNC,
gtk_1file_1chooser_1set_1extra_1widget_FUNC,
gtk_1file_1chooser_1set_1filename_FUNC,
gtk_1file_1chooser_1set_1filter_FUNC,
gtk_1file_1chooser_1set_1local_1only_FUNC,
gtk_1file_1chooser_1set_1select_1multiple_FUNC,
gtk_1file_1chooser_1set_1uri_FUNC,
gtk_1frame_1set_1shadow_1type_FUNC,
gtk_1gesture_1drag_1new_FUNC,
Expand Down
162 changes: 131 additions & 31 deletions bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,62 +656,104 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1expander_1set_1child)
}
#endif

#ifndef NO_gtk_1file_1chooser_1get_1file
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1chooser_1get_1file)
#ifndef NO_gtk_1file_1dialog_1get_1default_1filter
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1get_1default_1filter)
(JNIEnv *env, jclass that, jlong arg0)
{
jlong rc = 0;
GTK4_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1file_FUNC);
rc = (jlong)gtk_file_chooser_get_file((GtkFileChooser *)arg0);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1file_FUNC);
GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1get_1default_1filter_FUNC);
rc = (jlong)gtk_file_dialog_get_default_filter((GtkFileDialog *)arg0);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1get_1default_1filter_FUNC);
return rc;
}
#endif

#ifndef NO_gtk_1file_1chooser_1get_1files
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1chooser_1get_1files)
(JNIEnv *env, jclass that, jlong arg0)
#ifndef NO_gtk_1file_1dialog_1new
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1new)
(JNIEnv *env, jclass that)
{
jlong rc = 0;
GTK4_NATIVE_ENTER(env, that, gtk_1file_1chooser_1get_1files_FUNC);
rc = (jlong)gtk_file_chooser_get_files((GtkFileChooser *)arg0);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1chooser_1get_1files_FUNC);
GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1new_FUNC);
rc = (jlong)gtk_file_dialog_new();
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1new_FUNC);
return rc;
}
#endif

#ifndef NO_gtk_1file_1chooser_1set_1current_1folder
JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1file_1chooser_1set_1current_1folder)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
#ifndef NO_gtk_1file_1dialog_1open
JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1open)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
jboolean rc = 0;
GTK4_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1current_1folder_FUNC);
rc = (jboolean)gtk_file_chooser_set_current_folder((GtkFileChooser *)arg0, (GFile *)arg1, (GError **)arg2);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1current_1folder_FUNC);
GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1open_FUNC);
gtk_file_dialog_open((GtkFileDialog *)arg0, (GtkWindow *)arg1, (GCancellable *)arg2, (GAsyncReadyCallback)arg3, (gpointer)arg4);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1open_FUNC);
}
#endif

#ifndef NO_gtk_1file_1dialog_1open_1finish
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1open_1finish)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
jlong *lparg2=NULL;
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);
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1open_1finish_FUNC);
return rc;
}
#endif

#ifndef NO_gtk_1file_1chooser_1set_1file
JNIEXPORT jboolean JNICALL GTK4_NATIVE(gtk_1file_1chooser_1set_1file)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
#ifndef NO_gtk_1file_1dialog_1open_1multiple
JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1open_1multiple)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2, jlong arg3, jlong arg4)
{
jboolean rc = 0;
GTK4_NATIVE_ENTER(env, that, gtk_1file_1chooser_1set_1file_FUNC);
rc = (jboolean)gtk_file_chooser_set_file((GtkFileChooser *)arg0, (GFile *)arg1, (GError **)arg2);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1chooser_1set_1file_FUNC);
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);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1open_1multiple_FUNC);
}
#endif

#ifndef NO_gtk_1file_1dialog_1open_1multiple_1finish
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1open_1multiple_1finish)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
jlong *lparg2=NULL;
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);
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1open_1multiple_1finish_FUNC);
return rc;
}
#endif

#ifndef NO_gtk_1file_1dialog_1new
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1new)
(JNIEnv *env, jclass that)
#ifndef NO_gtk_1file_1dialog_1save
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);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1save_FUNC);
}
#endif

#ifndef NO_gtk_1file_1dialog_1save_1finish
JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1save_1finish)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
{
jlong *lparg2=NULL;
jlong rc = 0;
GTK4_NATIVE_ENTER(env, that, gtk_1file_1dialog_1new_FUNC);
rc = (jlong)gtk_file_dialog_new();
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1new_FUNC);
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);
fail:
if (arg2 && lparg2) (*env)->ReleaseLongArrayElements(env, arg2, lparg2, 0);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1save_1finish_FUNC);
return rc;
}
#endif
Expand Down Expand Up @@ -742,6 +784,36 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1file_1dialog_1select_1folder_1finish)
}
#endif

#ifndef NO_gtk_1file_1dialog_1set_1default_1filter
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);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1default_1filter_FUNC);
}
#endif

#ifndef NO_gtk_1file_1dialog_1set_1filters
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);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1filters_FUNC);
}
#endif

#ifndef NO_gtk_1file_1dialog_1set_1initial_1file
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);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1initial_1file_FUNC);
}
#endif

#ifndef NO_gtk_1file_1dialog_1set_1initial_1folder
JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1initial_1folder)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
Expand All @@ -752,6 +824,34 @@ JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1initial_1folder)
}
#endif

#ifndef NO_gtk_1file_1dialog_1set_1initial_1name
JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1initial_1name)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
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);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1initial_1name_FUNC);
}
#endif

#ifndef NO_gtk_1file_1dialog_1set_1title
JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1file_1dialog_1set_1title)
(JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1)
{
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);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
GTK4_NATIVE_EXIT(env, that, gtk_1file_1dialog_1set_1title_FUNC);
}
#endif

#ifndef NO_gtk_1frame_1set_1child
JNIEXPORT void JNICALL GTK4_NATIVE(gtk_1frame_1set_1child)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1)
Expand Down
16 changes: 12 additions & 4 deletions bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,22 @@ typedef enum {
gtk_1event_1controller_1motion_1new_FUNC,
gtk_1event_1controller_1scroll_1new_FUNC,
gtk_1expander_1set_1child_FUNC,
gtk_1file_1chooser_1get_1file_FUNC,
gtk_1file_1chooser_1get_1files_FUNC,
gtk_1file_1chooser_1set_1current_1folder_FUNC,
gtk_1file_1chooser_1set_1file_FUNC,
gtk_1file_1dialog_1get_1default_1filter_FUNC,
gtk_1file_1dialog_1new_FUNC,
gtk_1file_1dialog_1open_FUNC,
gtk_1file_1dialog_1open_1finish_FUNC,
gtk_1file_1dialog_1open_1multiple_FUNC,
gtk_1file_1dialog_1open_1multiple_1finish_FUNC,
gtk_1file_1dialog_1save_FUNC,
gtk_1file_1dialog_1save_1finish_FUNC,
gtk_1file_1dialog_1select_1folder_FUNC,
gtk_1file_1dialog_1select_1folder_1finish_FUNC,
gtk_1file_1dialog_1set_1default_1filter_FUNC,
gtk_1file_1dialog_1set_1filters_FUNC,
gtk_1file_1dialog_1set_1initial_1file_FUNC,
gtk_1file_1dialog_1set_1initial_1folder_FUNC,
gtk_1file_1dialog_1set_1initial_1name_FUNC,
gtk_1file_1dialog_1set_1title_FUNC,
gtk_1frame_1set_1child_FUNC,
gtk_1gesture_1click_1new_FUNC,
gtk_1gesture_1drag_1new_FUNC,
Expand Down
Loading

0 comments on commit 31a81f1

Please sign in to comment.