1 /* modest-combo-box.h */
2 /* insert (c)/licensing information) */
4 #ifndef __MODEST_COMBO_BOX_H__
5 #define __MODEST_COMBO_BOX_H__
8 /* other include files */
12 /* convenience macros */
13 #define MODEST_TYPE_COMBO_BOX (modest_combo_box_get_type())
14 #define MODEST_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_COMBO_BOX,ModestComboBox))
15 #define MODEST_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_COMBO_BOX,GtkComboBox))
16 #define MODEST_IS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_COMBO_BOX))
17 #define MODEST_IS_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_COMBO_BOX))
18 #define MODEST_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_COMBO_BOX,ModestComboBoxClass))
20 typedef struct _ModestComboBox ModestComboBox;
21 typedef struct _ModestComboBoxClass ModestComboBoxClass;
23 struct _ModestComboBox {
25 /* insert public members, if any */
28 struct _ModestComboBoxClass {
29 GtkComboBoxClass parent_class;
30 /* insert signal callback declarations, eg. */
31 /* void (* my_event) (ModestComboBox* obj); */
35 struct _ModestComboBoxLemma {
36 const gchar *display_name;
39 typedef struct _ModestComboBoxLemma ModestComboBoxLemma;
42 * modest_combo_box_get_type
44 * Returns: the id of the ModestComboBox type
46 GType modest_combo_box_get_type (void) G_GNUC_CONST;
49 * modest_combo_box_new
50 * @lemmas: a ptr to a NULL terminated list of ModestComboBox lemmas,
51 * each corresponding to a display_name, and the corresponding value
52 * create a new modest combo box,
54 * create a new modest combo box
56 * Returns: a new ModestComboBox instance, or NULL in case of failure
58 GtkWidget* modest_combo_box_new (ModestComboBoxLemma *lemmas);
62 * modest_combo_box_get_active_id
63 * @self: a valid ModestComboBox instance
65 * get the id for the currently active lemma, or NULL if there's nothing chosen
67 * Returns: the id or NULL if there's nothing chosen.
69 gpointer modest_combo_box_get_active_id (ModestComboBox *self);
75 #endif /* __MODEST_COMBO_BOX_H__ */