summaryrefslogtreecommitdiff
path: root/src/eggfileformatchooser.h
blob: 07877bf9dabe36bee50355859726c298fbeadeb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* EggFileFormatChooser
 * Copyright (C) 2007 Mathias Hasselmann
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */
#ifndef __EGG_FILE_FORMAT_CHOOSER_H__
#define __EGG_FILE_FORMAT_CHOOSER_H__

#include <gtk/gtk.h>

G_BEGIN_DECLS

#define EGG_TYPE_FILE_FORMAT_CHOOSER           (egg_file_format_chooser_get_type())
#define EGG_FILE_FORMAT_CHOOSER(obj)           (G_TYPE_CHECK_INSTANCE_CAST(obj, EGG_TYPE_FILE_FORMAT_CHOOSER, EggFileFormatChooser))
#define EGG_FILE_FORMAT_CHOOSER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST(klass, EGG_TYPE_FILE_FORMAT_CHOOSER, EggFileFormatChooserClass))
#define EGG_IS_FILE_FORMAT_CHOOSER(obj)        (G_TYPE_CHECK_INSTANCE_TYPE(obj, EGG_TYPE_FILE_FORMAT_CHOOSER))
#define EGG_IS_FILE_FORMAT_CHOOSER_CLASS(obj)  (G_TYPE_CHECK_CLASS_TYPE(obj, EGG_TYPE_FILE_FORMAT_CHOOSER))
#define EGG_FILE_FORMAT_CHOOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), EGG_TYPE_FILE_FORMAT_CHOOSER, EggFileFormatChooserClass))

typedef struct _EggFileFormatChooser        EggFileFormatChooser;
typedef struct _EggFileFormatChooserClass   EggFileFormatChooserClass;
typedef struct _EggFileFormatChooserPrivate EggFileFormatChooserPrivate;

struct _EggFileFormatChooser
{
  GtkExpander parent;
  EggFileFormatChooserPrivate *priv;
};

struct _EggFileFormatChooserClass
{
  GtkExpanderClass parent;

  void (*selection_changed)(EggFileFormatChooser *self);
};

GType           egg_file_format_chooser_get_type           (void) G_GNUC_CONST;
GtkWidget*      egg_file_format_chooser_new                (void);

guint           egg_file_format_chooser_add_format         (EggFileFormatChooser *self,
                                                            guint                 parent,
                                                            const gchar          *name,
                                                            const gchar          *icon,
                                                            ...) G_GNUC_NULL_TERMINATED;
void            egg_file_format_chooser_add_pixbuf_formats (EggFileFormatChooser *self,
                                                            guint                 parent,
                                                            guint               **formats);
void            egg_file_format_chooser_remove_format      (EggFileFormatChooser *self,
                                                            guint                 format);

void            egg_file_format_chooser_set_format         (EggFileFormatChooser *self,
                                                            guint                 format);
guint           egg_file_format_chooser_get_format         (EggFileFormatChooser *self,
                                                            const gchar          *filename);

void            egg_file_format_chooser_set_format_data    (EggFileFormatChooser *self,
                                                            guint                 format,
                                                            gpointer              data,
                                                            GDestroyNotify        destroy);
gpointer        egg_file_format_chooser_get_format_data    (EggFileFormatChooser *self,
                                                            guint                 format);

gchar*          egg_file_format_chooser_append_extension   (EggFileFormatChooser *self,
                                                            const gchar          *filename,
                                                            guint                 format);
void            egg_file_format_chooser_emit_size_changed  (EggFileFormatChooser *self);

G_END_DECLS

#endif /* __EGG_FILE_FORMAT_CHOOSER_H__ */

/* vim: set sw=2 sta et: */