New ModestCountryComboBox for running modest in gtk.
[modest] / src / widgets / modest-toolkit-factory.h
1 #ifndef                                         __MODEST_TOOLKIT_FACTORY_H__
2 #define                                         __MODEST_TOOLKIT_FACTORY_H__
3
4 #include <glib-object.h>
5 #include <gtk/gtk.h>
6
7 G_BEGIN_DECLS
8
9 #define                                         MODEST_TYPE_TOOLKIT_FACTORY \
10                                                 (modest_toolkit_factory_get_type())
11
12 #define                                         MODEST_TOOLKIT_FACTORY(obj) \
13                                                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
14                                                 MODEST_TYPE_TOOLKIT_FACTORY, ModestToolkitFactory))
15
16 #define                                         MODEST_TOOLKIT_FACTORY_CLASS(klass) \
17                                                 (G_TYPE_CHECK_CLASS_CAST ((klass), \
18                                                 MODEST_TYPE_TOOLKIT_FACTORY, ModestToolkitFactory))
19
20 #define                                         MODEST_IS_TOOLKIT_FACTORY(obj) \
21                                                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MODEST_TYPE_TOOLKIT_FACTORY))
22
23 #define                                         MODEST_IS_TOOLKIT_FACTORY_CLASS(klass) \
24                                                 (G_TYPE_CHECK_CLASS_TYPE ((klass), MODEST_TYPE_TOOLKIT_FACTORY))
25
26 #define                                         MODEST_TOOLKIT_FACTORY_GET_CLASS(obj) \
27                                                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
28                                                 MODEST_TYPE_TOOLKIT_FACTORY, ModestToolkitFactoryClass))
29
30 typedef struct                                  _ModestToolkitFactory ModestToolkitFactory;
31
32 typedef struct                                  _ModestToolkitFactoryClass ModestToolkitFactoryClass;
33
34 struct                                          _ModestToolkitFactoryClass
35 {
36         GObjectClass parent_class;
37
38         GtkWidget * (*create_scrollable) (ModestToolkitFactory *self);
39         GtkWidget * (*create_check_button) (ModestToolkitFactory *self, const gchar *label);
40         GtkWidget * (*create_check_menu) (ModestToolkitFactory *self, const gchar *label);
41         GtkWidget * (*create_isearch_toolbar) (ModestToolkitFactory *self, const gchar *label);
42         GtkWidget * (*create_entry) (ModestToolkitFactory *self);
43         GtkWidget * (*create_number_entry) (ModestToolkitFactory *self, gint min, gint max);
44         GtkWidget * (*create_file_chooser_dialog) (ModestToolkitFactory *self, const gchar *title,
45                                                    GtkWindow *parent, GtkFileChooserAction action);
46         GtkWidget * (*create_country_selector) (ModestToolkitFactory *self);
47 };
48
49 struct                                          _ModestToolkitFactory
50 {
51     GObject parent;
52 };
53
54
55 GType
56 modest_toolkit_factory_get_type                       (void) G_GNUC_CONST;
57
58 ModestToolkitFactory *
59 modest_toolkit_factory_get_instance                            (void);
60
61 GtkWidget *
62 modest_toolkit_factory_create_scrollable              (ModestToolkitFactory *self);
63
64 GtkWidget *
65 modest_toolkit_factory_create_check_button (ModestToolkitFactory *self, const gchar *label);
66
67 GtkWidget *
68 modest_toolkit_factory_create_check_menu (ModestToolkitFactory *self, const gchar *label);
69
70 GtkWidget *
71 modest_toolkit_factory_create_isearch_toolbar (ModestToolkitFactory *self, const gchar *label);
72
73 GtkWidget *
74 modest_toolkit_factory_create_entry (ModestToolkitFactory *self);
75
76 GtkWidget *
77 modest_toolkit_factory_create_number_entry (ModestToolkitFactory *self, gint min, gint max);
78
79 GtkWidget *
80 modest_toolkit_factory_create_file_chooser_dialog (ModestToolkitFactory *self, const gchar *title,
81                                                    GtkWindow *parent, GtkFileChooserAction action);
82
83 GtkWidget *
84 modest_toolkit_factory_create_country_selector (ModestToolkitFactory *self);
85
86 gboolean
87 modest_togglable_get_active (GtkWidget *widget);
88
89 void
90 modest_togglable_set_active (GtkWidget *widget, gboolean active);
91
92 gboolean
93 modest_is_togglable (GtkWidget *widget);
94
95 void
96 modest_entry_set_text (GtkWidget *widget, const gchar *text);
97
98 const gchar *
99 modest_entry_get_text (GtkWidget *widget);
100
101 void
102 modest_entry_set_hint (GtkWidget *widget, const gchar *hint);
103
104 gboolean 
105 modest_is_entry (GtkWidget *widget);
106
107 gint
108 modest_number_entry_get_value (GtkWidget *widget);
109
110 void
111 modest_number_entry_set_value (GtkWidget *widget, gint value);
112
113 gboolean
114 modest_number_entry_is_valid (GtkWidget *widget);
115
116 gboolean
117 modest_is_number_entry (GtkWidget *widget);
118
119 gint
120 modest_country_selector_get_active_country_mcc (GtkWidget *widget);
121
122 void
123 modest_country_selector_load_data (GtkWidget *widget);
124
125 gboolean
126 modest_country_selector_set_active_country_locale (GtkWidget *widget);
127
128
129 #ifndef MODEST_TOOLKIT_HILDON2
130 #define USE_GTK_SPIN_BUTTON
131 #endif
132
133 #ifndef USE_GTK_SPIN_BUTTON
134 #define MODEST_NUMBER_ENTRY_SUPPORT_VALID_CHANGED
135 #endif
136
137 G_END_DECLS
138
139 #endif /* __MODEST_WP_TEXT_VIEW_H__ */