1 /* GTK - The GIMP Toolkit 2 * gtkfilechoosernativeprivate.h: Native File selector dialog 3 * Copyright (C) 2015, Red Hat, Inc. 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef __GTK_FILE_CHOOSER_NATIVE_PRIVATE_H__ 20 #define __GTK_FILE_CHOOSER_NATIVE_PRIVATE_H__ 21 22 #include <gtk/gtkfilechoosernative.h> 23 #ifdef GDK_WINDOWING_QUARTZ 24 #include <AvailabilityMacros.h> 25 #endif 26 27 G_BEGIN_DECLS 28 29 typedef struct { 30 char *id; 31 char *label; 32 char **options; 33 char **option_labels; 34 char *selected; 35 } GtkFileChooserNativeChoice; 36 37 struct _GtkFileChooserNative 38 { 39 GtkNativeDialog parent_instance; 40 41 char *accept_label; 42 char *cancel_label; 43 44 int mode; 45 GSList *custom_files; 46 47 GFile *current_folder; 48 GFile *current_file; 49 char *current_name; 50 GtkFileFilter *current_filter; 51 GSList *choices; 52 53 /* Fallback mode */ 54 GtkWidget *dialog; 55 GtkWidget *accept_button; 56 GtkWidget *cancel_button; 57 58 gpointer mode_data; 59 }; 60 61 gboolean gtk_file_chooser_native_win32_show (GtkFileChooserNative *self); 62 void gtk_file_chooser_native_win32_hide (GtkFileChooserNative *self); 63 64 #if defined GDK_WINDOWING_QUARTZ && MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 65 gboolean gtk_file_chooser_native_quartz_show (GtkFileChooserNative *self); 66 void gtk_file_chooser_native_quartz_hide (GtkFileChooserNative *self); 67 #endif 68 69 gboolean gtk_file_chooser_native_portal_show (GtkFileChooserNative *self); 70 void gtk_file_chooser_native_portal_hide (GtkFileChooserNative *self); 71 72 G_END_DECLS 73 74 #endif /* __GTK_FILE_CHOOSER_NATIVE_PRIVATE_H__ */ 75