1 #ifndef __MODEST_TOOLKIT_FACTORY_H__
2 #define __MODEST_TOOLKIT_FACTORY_H__
4 #include <glib-object.h>
9 #define MODEST_TYPE_TOOLKIT_FACTORY \
10 (modest_toolkit_factory_get_type())
12 #define MODEST_TOOLKIT_FACTORY(obj) \
13 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
14 MODEST_TYPE_TOOLKIT_FACTORY, ModestToolkitFactory))
16 #define MODEST_TOOLKIT_FACTORY_CLASS(klass) \
17 (G_TYPE_CHECK_CLASS_CAST ((klass), \
18 MODEST_TYPE_TOOLKIT_FACTORY, ModestToolkitFactory))
20 #define MODEST_IS_TOOLKIT_FACTORY(obj) \
21 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MODEST_TYPE_TOOLKIT_FACTORY))
23 #define MODEST_IS_TOOLKIT_FACTORY_CLASS(klass) \
24 (G_TYPE_CHECK_CLASS_TYPE ((klass), MODEST_TYPE_TOOLKIT_FACTORY))
26 #define MODEST_TOOLKIT_FACTORY_GET_CLASS(obj) \
27 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
28 MODEST_TYPE_TOOLKIT_FACTORY, ModestToolkitFactoryClass))
30 typedef struct _ModestToolkitFactory ModestToolkitFactory;
32 typedef struct _ModestToolkitFactoryClass ModestToolkitFactoryClass;
34 struct _ModestToolkitFactoryClass
36 GObjectClass parent_class;
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);
48 struct _ModestToolkitFactory
55 modest_toolkit_factory_get_type (void) G_GNUC_CONST;
57 ModestToolkitFactory *
58 modest_toolkit_factory_get_instance (void);
61 modest_toolkit_factory_create_scrollable (ModestToolkitFactory *self);
64 modest_toolkit_factory_create_check_button (ModestToolkitFactory *self, const gchar *label);
67 modest_toolkit_factory_create_check_menu (ModestToolkitFactory *self, const gchar *label);
70 modest_toolkit_factory_create_isearch_toolbar (ModestToolkitFactory *self, const gchar *label);
73 modest_toolkit_factory_create_entry (ModestToolkitFactory *self);
76 modest_toolkit_factory_create_number_entry (ModestToolkitFactory *self, gint min, gint max);
79 modest_toolkit_factory_create_file_chooser_dialog (ModestToolkitFactory *self, const gchar *title,
80 GtkWindow *parent, GtkFileChooserAction action);
83 modest_togglable_get_active (GtkWidget *widget);
86 modest_togglable_set_active (GtkWidget *widget, gboolean active);
89 modest_is_togglable (GtkWidget *widget);
92 modest_entry_set_text (GtkWidget *widget, const gchar *text);
95 modest_entry_get_text (GtkWidget *widget);
98 modest_entry_set_hint (GtkWidget *widget, const gchar *hint);
101 modest_is_entry (GtkWidget *widget);
104 modest_number_entry_get_value (GtkWidget *widget);
107 modest_number_entry_set_value (GtkWidget *widget, gint value);
110 modest_number_entry_is_valid (GtkWidget *widget);
113 modest_is_number_entry (GtkWidget *widget);
115 #ifndef MODEST_TOOLKIT_HILDON2
116 #define USE_GTK_SPIN_BUTTON
119 #ifndef USE_GTK_SPIN_BUTTON
120 #define MODEST_NUMBER_ENTRY_SUPPORT_VALID_CHANGED
125 #endif /* __MODEST_WP_TEXT_VIEW_H__ */