]> www.fi.muni.cz Git - evince.git/blob - cut-n-paste/fileformatchooser/eggfileformatchooser.h
Allow exporting images in any format supported by GdkPixbuf. Fixes bug
[evince.git] / cut-n-paste / fileformatchooser / eggfileformatchooser.h
1 /* EggFileFormatChooser
2  * Copyright (C) 2007 Mathias Hasselmann
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library 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 GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 #ifndef __EGG_FILE_FORMAT_CHOOSER_H__
20 #define __EGG_FILE_FORMAT_CHOOSER_H__
21
22 #include <gtk/gtkexpander.h>
23
24 G_BEGIN_DECLS
25
26 #define EGG_TYPE_FILE_FORMAT_CHOOSER           (egg_file_format_chooser_get_type())
27 #define EGG_FILE_FORMAT_CHOOSER(obj)           (G_TYPE_CHECK_INSTANCE_CAST(obj, EGG_TYPE_FILE_FORMAT_CHOOSER, EggFileFormatChooser))
28 #define EGG_FILE_FORMAT_CHOOSER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST(klass, EGG_TYPE_FILE_FORMAT_CHOOSER, EggFileFormatChooserClass))
29 #define EGG_IS_FILE_FORMAT_CHOOSER(obj)        (G_TYPE_CHECK_INSTANCE_TYPE(obj, EGG_TYPE_FILE_FORMAT_CHOOSER))
30 #define EGG_IS_FILE_FORMAT_CHOOSER_CLASS(obj)  (G_TYPE_CHECK_CLASS_TYPE(obj, EGG_TYPE_FILE_FORMAT_CHOOSER))
31 #define EGG_FILE_FORMAT_CHOOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), EGG_TYPE_FILE_FORMAT_CHOOSER, EggFileFormatChooserClass))
32
33 typedef struct _EggFileFormatChooser        EggFileFormatChooser;
34 typedef struct _EggFileFormatChooserClass   EggFileFormatChooserClass;
35 typedef struct _EggFileFormatChooserPrivate EggFileFormatChooserPrivate;
36
37 struct _EggFileFormatChooser
38 {
39   GtkExpander parent;
40   EggFileFormatChooserPrivate *priv;
41 };
42
43 struct _EggFileFormatChooserClass
44 {
45   GtkExpanderClass parent;
46
47   void (*selection_changed)(EggFileFormatChooser *self);
48 };
49
50 GType           egg_file_format_chooser_get_type           (void) G_GNUC_CONST;
51 GtkWidget*      egg_file_format_chooser_new                (void);
52
53 guint           egg_file_format_chooser_add_format         (EggFileFormatChooser *self,
54                                                             guint                 parent,
55                                                             const gchar          *name,
56                                                             const gchar          *icon,
57                                                             ...) G_GNUC_NULL_TERMINATED;
58 void            egg_file_format_chooser_add_pixbuf_formats (EggFileFormatChooser *self,
59                                                             guint                 parent,
60                                                             guint               **formats);
61 void            egg_file_format_chooser_remove_format      (EggFileFormatChooser *self,
62                                                             guint                 format);
63
64 void            egg_file_format_chooser_set_format         (EggFileFormatChooser *self,
65                                                             guint                 format);
66 guint           egg_file_format_chooser_get_format         (EggFileFormatChooser *self,
67                                                             const gchar          *filename);
68
69 void            egg_file_format_chooser_set_format_data    (EggFileFormatChooser *self,
70                                                             guint                 format,
71                                                             gpointer              data,
72                                                             GDestroyNotify        destroy);
73 gpointer        egg_file_format_chooser_get_format_data    (EggFileFormatChooser *self,
74                                                             guint                 format);
75
76 gchar*          egg_file_format_chooser_append_extension   (EggFileFormatChooser *self,
77                                                             const gchar          *filename,
78                                                             guint                 format);
79
80 G_END_DECLS
81
82 #endif /* __EGG_FILE_FORMAT_CHOOSER_H__ */
83
84 /* vim: set sw=2 sta et: */