Add modest_entry API for refactoring access to hildon entry
[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 };
44
45 struct                                          _ModestToolkitFactory
46 {
47     GObject parent;
48 };
49
50
51 GType
52 modest_toolkit_factory_get_type                       (void) G_GNUC_CONST;
53
54 ModestToolkitFactory *
55 modest_toolkit_factory_get_instance                            (void);
56
57 GtkWidget *
58 modest_toolkit_factory_create_scrollable              (ModestToolkitFactory *self);
59
60 GtkWidget *
61 modest_toolkit_factory_create_check_button (ModestToolkitFactory *self, const gchar *label);
62
63 GtkWidget *
64 modest_toolkit_factory_create_check_menu (ModestToolkitFactory *self, const gchar *label);
65
66 GtkWidget *
67 modest_toolkit_factory_create_isearch_toolbar (ModestToolkitFactory *self, const gchar *label);
68
69 GtkWidget *
70 modest_toolkit_factory_create_entry (ModestToolkitFactory *self);
71
72 gboolean
73 modest_togglable_get_active (GtkWidget *widget);
74
75 void
76 modest_togglable_set_active (GtkWidget *widget, gboolean active);
77
78 gboolean
79 modest_is_togglable (GtkWidget *widget);
80
81 void
82 modest_entry_set_text (GtkWidget *widget, const gchar *text);
83
84 const gchar *
85 modest_entry_get_text (GtkWidget *widget);
86
87 void
88 modest_entry_set_hint (GtkWidget *widget, const gchar *hint);
89
90 gboolean 
91 modest_is_entry (GtkWidget *widget);
92
93 G_END_DECLS
94
95 #endif /* __MODEST_WP_TEXT_VIEW_H__ */