Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkfilechooser.h
Go to the documentation of this file.
1/* GTK - The GIMP Toolkit
2 * gtkfilechooser.h: Abstract interface for file selector GUIs
3 * Copyright (C) 2003, 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#pragma once
20
21#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22#error "Only <gtk/gtk.h> can be included directly."
23#endif
24
25#include <gtk/gtkfilefilter.h>
26#include <gtk/gtkwidget.h>
27
29
30#define GTK_TYPE_FILE_CHOOSER (gtk_file_chooser_get_type ())
31#define GTK_FILE_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_CHOOSER, GtkFileChooser))
32#define GTK_IS_FILE_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_CHOOSER))
33
34typedef struct _GtkFileChooser GtkFileChooser;
35
36/**
37 * GtkFileChooserAction:
38 * @GTK_FILE_CHOOSER_ACTION_OPEN: Indicates open mode. The file chooser
39 * will only let the user pick an existing file.
40 * @GTK_FILE_CHOOSER_ACTION_SAVE: Indicates save mode. The file chooser
41 * will let the user pick an existing file, or type in a new
42 * filename.
43 * @GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER: Indicates an Open mode for
44 * selecting folders. The file chooser will let the user pick an
45 * existing folder.
46 *
47 * Describes whether a `GtkFileChooser` is being used to open existing files
48 * or to save to a possibly new file.
49 */
56
59
60/* GError enumeration for GtkFileChooser */
61/**
62 * GTK_FILE_CHOOSER_ERROR:
63 *
64 * Used to get the `GError` quark for `GtkFileChooser` errors.
65 */
66#define GTK_FILE_CHOOSER_ERROR (gtk_file_chooser_error_quark ())
67
68/**
69 * GtkFileChooserError:
70 * @GTK_FILE_CHOOSER_ERROR_NONEXISTENT: Indicates that a file does not exist.
71 * @GTK_FILE_CHOOSER_ERROR_BAD_FILENAME: Indicates a malformed filename.
72 * @GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS: Indicates a duplicate path (e.g. when
73 * adding a bookmark).
74 * @GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME: Indicates an incomplete hostname
75 * (e.g. "http://foo" without a slash after that).
76 *
77 * These identify the various errors that can occur while calling
78 * `GtkFileChooser` functions.
79 */
86
89
90/* Configuration */
91
99 gboolean select_multiple);
104 gboolean create_folders);
107
108/* Suggested name for the Save-type actions */
109
112 const char *name);
115
116/* GFile manipulation */
117
122 GFile *file,
123 GError **error);
128 GFile *file,
129 GError **error);
132
133/* List of user selectable filters */
134
137 GtkFileFilter *filter);
140 GtkFileFilter *filter);
143
144/* Current filter */
145
148 GtkFileFilter *filter);
151
152/* Per-application shortcut folders */
153
156 GFile *folder,
157 GError **error);
160 (GtkFileChooser *chooser,
161 GFile *folder,
162 GError **error);
165
166/* Custom widgets */
167
170 const char *id,
171 const char *label,
172 const char **options,
173 const char **option_labels);
176 const char *id);
179 const char *id,
180 const char *option);
183 const char *id);
184
186
#define GDK_DEPRECATED_IN_4_10
#define GDK_AVAILABLE_IN_ALL
struct _GFile GFile
Definition giotypes.h:74
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
G_BEGIN_DECLS typedef guint32 GQuark
Definition gquark.h:38
GDK_DEPRECATED_IN_4_10 const char * gtk_file_chooser_get_choice(GtkFileChooser *chooser, const char *id)
GDK_DEPRECATED_IN_4_10 GFile * gtk_file_chooser_get_file(GtkFileChooser *chooser)
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_set_choice(GtkFileChooser *chooser, const char *id, const char *option)
GDK_DEPRECATED_IN_4_10 gboolean gtk_file_chooser_set_file(GtkFileChooser *chooser, GFile *file, GError **error)
GDK_DEPRECATED_IN_4_10 GListModel * gtk_file_chooser_get_files(GtkFileChooser *chooser)
GDK_DEPRECATED_IN_4_10 GtkFileChooserAction gtk_file_chooser_get_action(GtkFileChooser *chooser)
GDK_DEPRECATED_IN_4_10 char * gtk_file_chooser_get_current_name(GtkFileChooser *chooser)
GDK_DEPRECATED_IN_4_10 gboolean gtk_file_chooser_set_current_folder(GtkFileChooser *chooser, GFile *file, GError **error)
GDK_DEPRECATED_IN_4_10 GQuark gtk_file_chooser_error_quark(void)
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_add_choice(GtkFileChooser *chooser, const char *id, const char *label, const char **options, const char **option_labels)
GDK_DEPRECATED_IN_4_10 gboolean gtk_file_chooser_get_select_multiple(GtkFileChooser *chooser)
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_set_action(GtkFileChooser *chooser, GtkFileChooserAction action)
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_set_create_folders(GtkFileChooser *chooser, gboolean create_folders)
GtkFileChooserAction
@ GTK_FILE_CHOOSER_ACTION_SAVE
@ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
@ GTK_FILE_CHOOSER_ACTION_OPEN
struct _GtkFileChooser GtkFileChooser
GtkFileChooserError
@ GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME
@ GTK_FILE_CHOOSER_ERROR_BAD_FILENAME
@ GTK_FILE_CHOOSER_ERROR_NONEXISTENT
@ GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_remove_filter(GtkFileChooser *chooser, GtkFileFilter *filter)
GDK_DEPRECATED_IN_4_10 gboolean gtk_file_chooser_get_create_folders(GtkFileChooser *chooser)
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_add_filter(GtkFileChooser *chooser, GtkFileFilter *filter)
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_set_select_multiple(GtkFileChooser *chooser, gboolean select_multiple)
GDK_DEPRECATED_IN_4_10 gboolean gtk_file_chooser_remove_shortcut_folder(GtkFileChooser *chooser, GFile *folder, GError **error)
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_remove_choice(GtkFileChooser *chooser, const char *id)
GDK_DEPRECATED_IN_4_10 GListModel * gtk_file_chooser_get_filters(GtkFileChooser *chooser)
GDK_DEPRECATED_IN_4_10 gboolean gtk_file_chooser_add_shortcut_folder(GtkFileChooser *chooser, GFile *folder, GError **error)
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_set_filter(GtkFileChooser *chooser, GtkFileFilter *filter)
GDK_DEPRECATED_IN_4_10 GListModel * gtk_file_chooser_get_shortcut_folders(GtkFileChooser *chooser)
GDK_DEPRECATED_IN_4_10 void gtk_file_chooser_set_current_name(GtkFileChooser *chooser, const char *name)
GDK_DEPRECATED_IN_4_10 GFile * gtk_file_chooser_get_current_folder(GtkFileChooser *chooser)
GDK_DEPRECATED_IN_4_10 GtkFileFilter * gtk_file_chooser_get_filter(GtkFileChooser *chooser)
GDK_AVAILABLE_IN_ALL GType gtk_file_chooser_get_type(void) G_GNUC_CONST
struct _GtkFileFilter GtkFileFilter
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
const char * name
Definition lsqlite3.c:2154
static void error(LoadState *S, const char *why)