4 # include "elementary_config.h"
6 #ifdef HAVE_ELEMENTARY_X
9 #ifdef HAVE_ELEMENTARY_FB
10 # include <Ecore_Fb.h>
12 #ifdef HAVE_ELEMENTARY_WINCE
13 # include <Ecore_WinCE.h>
17 #include "els_scroller.h"
20 #include "els_hor_scroller.h"
21 #include "els_touch.h"
22 #include "els_webview.h"
24 // FIXME: totally disorganised. clean this up!
26 // Why EAPI in a private header ?
27 // EAPI is temporaty - that widget api will change, but makign it EAPI right now to indicate its bound for externalness
39 typedef enum _Elm_Engine
43 ELM_SOFTWARE_DIRECTFB,
48 ELM_SOFTWARE_16_WINCE,
54 typedef struct _Elm_Config Elm_Config;
59 int thumbscroll_enable;
60 int thumbscroll_threshhold;
61 double thumbscroll_momentum_threshhold;
62 double thumbscroll_friction;
63 double thumbscroll_bounce_friction;
64 double page_scroll_friction;
65 double bring_in_scroll_friction;
67 int thumbscroll_bounce_enable;
79 int input_panel_enable;
82 typedef struct _Elm_Module Elm_Module;
95 int (*init_func) (Elm_Module *m);
96 int (*shutdown_func) (Elm_Module *m);
108 enum _elm_sel_format {
109 ELM_SEL_MARKUP = 0x01,
110 ELM_SEL_IMAGE = 0x02,
113 #define ELM_NEW(t) calloc(1, sizeof(t))
115 void _elm_win_shutdown(void);
116 void _elm_win_rescale(void);
118 int _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style);
119 int _elm_theme_object_icon_set(Evas_Object *parent, Evas_Object *o, const char *group, const char *style);
120 int _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style);
121 int _elm_theme_icon_set(Elm_Theme *th, Evas_Object *o, const char *group, const char *style);
122 int _elm_theme_parse(Elm_Theme *th, const char *theme);
123 void _elm_theme_shutdown(void);
125 void _elm_module_init(void);
126 void _elm_module_shutdown(void);
127 void _elm_module_parse(const char *s);
128 Elm_Module *_elm_module_find_as(const char *as);
129 Elm_Module *_elm_module_add(const char *name, const char *as);
130 void _elm_module_del(Elm_Module *m);
131 const void *_elm_module_symbol_get(Elm_Module *m, const char *name);
133 /* FIXME: should this be public? for now - private (but public symbols) */
134 EAPI Evas_Object *elm_widget_add(Evas *evas);
135 EAPI void elm_widget_del_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
136 EAPI void elm_widget_del_pre_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
137 EAPI void elm_widget_focus_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
138 EAPI void elm_widget_activate_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
139 EAPI void elm_widget_disable_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
140 EAPI void elm_widget_theme_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
141 EAPI void elm_widget_changed_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
142 EAPI void elm_widget_theme(Evas_Object *obj);
143 EAPI void elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
144 EAPI void elm_widget_on_change_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
145 EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
146 EAPI void elm_widget_data_set(Evas_Object *obj, void *data);
147 EAPI void *elm_widget_data_get(const Evas_Object *obj);
148 EAPI void elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj);
149 EAPI void elm_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj);
150 EAPI void elm_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj);
151 EAPI void elm_widget_hover_object_set(Evas_Object *obj, Evas_Object *sobj);
152 EAPI void elm_widget_can_focus_set(Evas_Object *obj, int can_focus);
153 EAPI int elm_widget_can_focus_get(const Evas_Object *obj);
154 EAPI int elm_widget_focus_get(const Evas_Object *obj);
155 EAPI Evas_Object *elm_widget_focused_object_get(const Evas_Object *obj);
156 EAPI Evas_Object *elm_widget_top_get(const Evas_Object *obj);
157 EAPI int elm_widget_focus_jump(Evas_Object *obj, int forward);
158 EAPI void elm_widget_focus_set(Evas_Object *obj, int first);
159 EAPI void elm_widget_focused_object_clear(Evas_Object *obj);
160 EAPI Evas_Object *elm_widget_parent_get(const Evas_Object *obj);
161 EAPI void elm_widget_focus_steal(Evas_Object *obj);
162 EAPI void elm_widget_activate(Evas_Object *obj);
163 EAPI void elm_widget_change(Evas_Object *obj);
164 EAPI void elm_widget_disabled_set(Evas_Object *obj, int disabled);
165 EAPI int elm_widget_disabled_get(const Evas_Object *obj);
166 EAPI void elm_widget_show_region_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
167 EAPI void elm_widget_show_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
168 EAPI void elm_widget_scroll_hold_push(Evas_Object *obj);
169 EAPI void elm_widget_scroll_hold_pop(Evas_Object *obj);
170 EAPI int elm_widget_scroll_hold_get(const Evas_Object *obj);
171 EAPI void elm_widget_scroll_freeze_push(Evas_Object *obj);
172 EAPI void elm_widget_scroll_freeze_pop(Evas_Object *obj);
173 EAPI int elm_widget_scroll_freeze_get(const Evas_Object *obj);
174 EAPI void elm_widget_scale_set(Evas_Object *obj, double scale);
175 EAPI double elm_widget_scale_get(const Evas_Object *obj);
176 EAPI void elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th);
177 EAPI Elm_Theme *elm_widget_theme_get(const Evas_Object *obj);
178 EAPI void elm_widget_style_set(Evas_Object *obj, const char *style);
179 EAPI const char *elm_widget_style_get(const Evas_Object *obj);
180 EAPI void elm_widget_type_set(Evas_Object *obj, const char *type);
181 EAPI const char *elm_widget_type_get(const Evas_Object *obj);
182 EAPI void elm_widget_drag_lock_x_set(Evas_Object *obj, Eina_Bool lock);
183 EAPI void elm_widget_drag_lock_y_set(Evas_Object *obj, Eina_Bool lock);
184 EAPI Eina_Bool elm_widget_drag_lock_x_get(Evas_Object *obj);
185 EAPI Eina_Bool elm_widget_drag_lock_y_get(Evas_Object *obj);
186 EAPI int elm_widget_drag_child_locked_x_get(Evas_Object *obj);
187 EAPI int elm_widget_drag_child_locked_y_get(Evas_Object *obj);
189 EAPI Eina_Bool elm_widget_is(const Evas_Object *obj);
190 EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj);
192 EAPI Eina_List *_elm_stringlist_get(const char *str);
193 EAPI void _elm_stringlist_free(Eina_List *list);
195 Eina_Bool _elm_widget_type_check(const Evas_Object *obj, const char *type);
197 void _elm_unneed_ethumb(void);
199 void _elm_rescale(void);
201 void _elm_config_init(void);
202 void _elm_config_sub_init(void);
203 void _elm_config_shutdown(void);
205 Eina_Bool elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget, enum _elm_sel_format format, const char *buf);
206 Eina_Bool elm_selection_clear(enum _elm_sel_type selection, Evas_Object *widget);
207 Eina_Bool elm_selection_get(enum _elm_sel_type selection, enum _elm_sel_format format, Evas_Object *widget);
209 void _elm_widtype_register(const char **ptr);
212 #define ELM_SET_WIDTYPE(widtype, type) \
215 widtype = eina_stringshare_add(type); \
216 _elm_widtype_register(&widtype); \
220 //#define ELM_CHECK_WIDTYPE(obj, widtype) if (elm_widget_type_get(obj) != widtype) return
221 #define ELM_CHECK_WIDTYPE(obj, widtype) if (!_elm_widget_type_check((obj), (widtype))) return
223 extern char *_elm_appname;
224 extern Elm_Config *_elm_config;
225 extern const char *_elm_data_dir;
226 extern const char *_elm_lib_dir;
227 extern int _elm_log_dom;
229 extern Eina_List *_elm_win_list;
231 #define CRITICAL(...) EINA_LOG_DOM_CRIT(_elm_log_dom, __VA_ARGS__)
232 #define ERR(...) EINA_LOG_DOM_ERR(_elm_log_dom, __VA_ARGS__)
233 #define WRN(...) EINA_LOG_DOM_WARN(_elm_log_dom, __VA_ARGS__)
234 #define INF(...) EINA_LOG_DOM_INFO(_elm_log_dom, __VA_ARGS__)
235 #define DBG(...) EINA_LOG_DOM_DBG(_elm_log_dom, __VA_ARGS__)