Initial import of ephy (rev# 7126) from svn
[ephy-soc.git] / lib / .svn / text-base / ephy-file-chooser.h.svn-base
blob4bcd66f9aa78777608926e016c8c0ed4277f3287
1 /*
2  *  Copyright © 2003, 2004 Christian Persch
3  *  
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)
7  *  any later version.
8  *
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.
13  *
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.
17  *
18  *  $Id$
19  */
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>
30 G_BEGIN_DECLS
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;
43 typedef enum
45         EPHY_FILE_FILTER_ALL_SUPPORTED,
46         EPHY_FILE_FILTER_WEBPAGES,
47         EPHY_FILE_FILTER_IMAGES,
48         EPHY_FILE_FILTER_ALL,
49         EPHY_FILE_FILTER_NONE,
50         EPHY_FILE_FILTER_LAST = EPHY_FILE_FILTER_NONE
51 } EphyFileFilterDefault;
53 struct _EphyFileChooser
55         GtkFileChooserDialog parent;
57         /*< private >*/
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,
69                                                          GtkWidget *parent,
70                                                          GtkFileChooserAction action,
71                                                          const char *persist_key,
72                                                          EphyFileFilterDefault default_filter);
74 void             ephy_file_chooser_set_persist_key      (EphyFileChooser *dialog,
75                                                          const char *key);
77 const char      *ephy_file_chooser_get_persist_key      (EphyFileChooser *dialog);
79 GtkFileFilter   *ephy_file_chooser_add_pattern_filter   (EphyFileChooser *dialog,
80                                                          const char *title,
81                                                          const char *first_pattern,
82                                                          ...);
84 GtkFileFilter   *ephy_file_chooser_add_mime_filter      (EphyFileChooser *dialog,
85                                                          const char *title,
86                                                          const char *first_mimetype,
87                                                          ...);
89 G_END_DECLS
91 #endif