2 * Copyright © 2003, 2004 Christian Persch
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef EPHY_FILE_CHOOSER_H
22 #define EPHY_FILE_CHOOSER_H
24 #include <glib-object.h>
26 #include <gtk/gtkwidget.h>
27 #include <gtk/gtkfilefilter.h>
28 #include <gtk/gtkfilechooserdialog.h>
32 #define EPHY_TYPE_FILE_CHOOSER (ephy_file_chooser_get_type ())
33 #define EPHY_FILE_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_FILE_CHOOSER, EphyFileChooser))
34 #define EPHY_FILE_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EPHY_TYPE_FILE_CHOOSER, EphyFileChooserClass))
35 #define EPHY_IS_FILE_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_FILE_CHOOSER))
36 #define EPHY_IS_FILE_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_FILE_CHOOSER))
37 #define EPHY_FILE_CHOOSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_FILE_CHOOSER, EphyFileChooserClass))
39 typedef struct _EphyFileChooser EphyFileChooser;
40 typedef struct _EphyFileChooserPrivate EphyFileChooserPrivate;
41 typedef struct _EphyFileChooserClass EphyFileChooserClass;
45 EPHY_FILE_FILTER_ALL_SUPPORTED,
46 EPHY_FILE_FILTER_WEBPAGES,
47 EPHY_FILE_FILTER_IMAGES,
49 EPHY_FILE_FILTER_NONE,
50 EPHY_FILE_FILTER_LAST = EPHY_FILE_FILTER_NONE
51 } EphyFileFilterDefault;
53 struct _EphyFileChooser
55 GtkFileChooserDialog parent;
58 EphyFileChooserPrivate *priv;
61 struct _EphyFileChooserClass
63 GtkFileChooserDialogClass parent_class;
66 GType ephy_file_chooser_get_type (void);
68 EphyFileChooser *ephy_file_chooser_new (const char *title,
70 GtkFileChooserAction action,
71 const char *persist_key,
72 EphyFileFilterDefault default_filter);
74 void ephy_file_chooser_set_persist_key (EphyFileChooser *dialog,
77 const char *ephy_file_chooser_get_persist_key (EphyFileChooser *dialog);
79 GtkFileFilter *ephy_file_chooser_add_pattern_filter (EphyFileChooser *dialog,
81 const char *first_pattern,
84 GtkFileFilter *ephy_file_chooser_add_mime_filter (EphyFileChooser *dialog,
86 const char *first_mimetype,