comparison finch/libgnt/gntcombobox.h @ 15818:0e3a8505ebbe

renamed gaim-text to finch
author Sean Egan <seanegan@gmail.com>
date Sun, 18 Mar 2007 19:38:15 +0000
parents
children f00f2e283ffb
comparison
equal deleted inserted replaced
15817:317e7613e581 15818:0e3a8505ebbe
1 #ifndef GNT_COMBO_BOX_H
2 #define GNT_COMBO_BOX_H
3
4 #include "gnt.h"
5 #include "gntcolors.h"
6 #include "gntkeys.h"
7 #include "gntwidget.h"
8
9 #define GNT_TYPE_COMBO_BOX (gnt_combo_box_get_gtype())
10 #define GNT_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_COMBO_BOX, GntComboBox))
11 #define GNT_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_COMBO_BOX, GntComboBoxClass))
12 #define GNT_IS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_COMBO_BOX))
13 #define GNT_IS_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_COMBO_BOX))
14 #define GNT_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_COMBO_BOX, GntComboBoxClass))
15
16 #define GNT_COMBO_BOX_FLAGS(obj) (GNT_COMBO_BOX(obj)->priv.flags)
17 #define GNT_COMBO_BOX_SET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) |= flags)
18 #define GNT_COMBO_BOX_UNSET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) &= ~(flags))
19
20 typedef struct _GnComboBox GntComboBox;
21 typedef struct _GnComboBoxPriv GntComboBoxPriv;
22 typedef struct _GnComboBoxClass GntComboBoxClass;
23
24 struct _GnComboBox
25 {
26 GntWidget parent;
27
28 GntWidget *dropdown; /* This is a GntTree */
29
30 void *selected; /* Currently selected key */
31 };
32
33 struct _GnComboBoxClass
34 {
35 GntWidgetClass parent;
36
37 void (*gnt_reserved1)(void);
38 void (*gnt_reserved2)(void);
39 void (*gnt_reserved3)(void);
40 void (*gnt_reserved4)(void);
41 };
42
43 G_BEGIN_DECLS
44
45 GType gnt_combo_box_get_gtype(void);
46
47 GntWidget *gnt_combo_box_new(void);
48
49 void gnt_combo_box_add_data(GntComboBox *box, gpointer key, const char *text);
50
51 void gnt_combo_box_remove(GntComboBox *box, gpointer key);
52
53 void gnt_combo_box_remove_all(GntComboBox *box);
54
55 gpointer gnt_combo_box_get_selected_data(GntComboBox *box);
56
57 void gnt_combo_box_set_selected(GntComboBox *box, gpointer key);
58
59 G_END_DECLS
60
61 #endif /* GNT_COMBO_BOX_H */