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_webview.h"
23 // FIXME: totally disorganised. clean this up!
25 // Why EAPI in a private header ?
26 // EAPI is temporaty - that widget api will change, but makign it EAPI right now to indicate its bound for externalness
38 typedef enum _Elm_Engine
42 ELM_SOFTWARE_DIRECTFB,
47 ELM_SOFTWARE_16_WINCE,
53 typedef struct _Elm_Config Elm_Config;
58 int thumbscroll_enable;
59 int thumbscroll_threshhold;
60 double thumbscroll_momentum_threshhold;
61 double thumbscroll_friction;
62 double thumbscroll_bounce_friction;
63 double page_scroll_friction;
64 double bring_in_scroll_friction;
66 int thumbscroll_bounce_enable;
78 int input_panel_enable;
81 typedef struct _Elm_Module Elm_Module;
94 int (*init_func) (Elm_Module *m);
95 int (*shutdown_func) (Elm_Module *m);
107 enum _elm_sel_format {
108 ELM_SEL_MARKUP = 0x01,
109 ELM_SEL_IMAGE = 0x02,
112 #define ELM_NEW(t) calloc(1, sizeof(t))
114 void _elm_win_shutdown(void);
115 void _elm_win_rescale(void);
117 int _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style);
118 int _elm_theme_object_icon_set(Evas_Object *parent, Evas_Object *o, const char *group, const char *style);
119 int _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style);
120 int _elm_theme_icon_set(Elm_Theme *th, Evas_Object *o, const char *group, const char *style);
121 int _elm_theme_parse(Elm_Theme *th, const char *theme);
122 void _elm_theme_shutdown(void);
124 void _elm_module_init(void);
125 void _elm_module_shutdown(void);
126 void _elm_module_parse(const char *s);
127 Elm_Module *_elm_module_find_as(const char *as);
128 Elm_Module *_elm_module_add(const char *name, const char *as);
129 void _elm_module_del(Elm_Module *m);
130 const void *_elm_module_symbol_get(Elm_Module *m, const char *name);
132 /* FIXME: should this be public? for now - private (but public symbols) */
133 EAPI Evas_Object *elm_widget_add(Evas *evas);
134 EAPI void elm_widget_del_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
135 EAPI void elm_widget_del_pre_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
136 EAPI void elm_widget_focus_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
137 EAPI void elm_widget_activate_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
138 EAPI void elm_widget_disable_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
139 EAPI void elm_widget_theme_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
140 EAPI void elm_widget_changed_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
141 EAPI void elm_widget_theme(Evas_Object *obj);
142 EAPI void elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
143 EAPI void elm_widget_on_change_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
144 EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
145 EAPI void elm_widget_data_set(Evas_Object *obj, void *data);
146 EAPI void *elm_widget_data_get(const Evas_Object *obj);
147 EAPI void elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj);
148 EAPI void elm_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj);
149 EAPI void elm_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj);
150 EAPI void elm_widget_hover_object_set(Evas_Object *obj, Evas_Object *sobj);
151 EAPI void elm_widget_can_focus_set(Evas_Object *obj, int can_focus);
152 EAPI int elm_widget_can_focus_get(const Evas_Object *obj);
153 EAPI int elm_widget_focus_get(const Evas_Object *obj);
154 EAPI Evas_Object *elm_widget_focused_object_get(const Evas_Object *obj);
155 EAPI Evas_Object *elm_widget_top_get(const Evas_Object *obj);
156 EAPI int elm_widget_focus_jump(Evas_Object *obj, int forward);
157 EAPI void elm_widget_focus_set(Evas_Object *obj, int first);
158 EAPI void elm_widget_focused_object_clear(Evas_Object *obj);
159 EAPI Evas_Object *elm_widget_parent_get(const Evas_Object *obj);
160 EAPI void elm_widget_focus_steal(Evas_Object *obj);
161 EAPI void elm_widget_activate(Evas_Object *obj);
162 EAPI void elm_widget_change(Evas_Object *obj);
163 EAPI void elm_widget_disabled_set(Evas_Object *obj, int disabled);
164 EAPI int elm_widget_disabled_get(const Evas_Object *obj);
165 EAPI void elm_widget_show_region_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
166 EAPI void elm_widget_show_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
167 EAPI void elm_widget_scroll_hold_push(Evas_Object *obj);
168 EAPI void elm_widget_scroll_hold_pop(Evas_Object *obj);
169 EAPI int elm_widget_scroll_hold_get(const Evas_Object *obj);
170 EAPI void elm_widget_scroll_freeze_push(Evas_Object *obj);
171 EAPI void elm_widget_scroll_freeze_pop(Evas_Object *obj);
172 EAPI int elm_widget_scroll_freeze_get(const Evas_Object *obj);
173 EAPI void elm_widget_scale_set(Evas_Object *obj, double scale);
174 EAPI double elm_widget_scale_get(const Evas_Object *obj);
175 EAPI void elm_widget_theme_set(Evas_Object *obj, Elm_Theme *th);
176 EAPI Elm_Theme *elm_widget_theme_get(const Evas_Object *obj);
177 EAPI void elm_widget_style_set(Evas_Object *obj, const char *style);
178 EAPI const char *elm_widget_style_get(const Evas_Object *obj);
179 EAPI void elm_widget_type_set(Evas_Object *obj, const char *type);
180 EAPI const char *elm_widget_type_get(const Evas_Object *obj);
181 EAPI void elm_widget_drag_lock_x_set(Evas_Object *obj, Eina_Bool lock);
182 EAPI void elm_widget_drag_lock_y_set(Evas_Object *obj, Eina_Bool lock);
183 EAPI Eina_Bool elm_widget_drag_lock_x_get(Evas_Object *obj);
184 EAPI Eina_Bool elm_widget_drag_lock_y_get(Evas_Object *obj);
185 EAPI int elm_widget_drag_child_locked_x_get(Evas_Object *obj);
186 EAPI int elm_widget_drag_child_locked_y_get(Evas_Object *obj);
188 EAPI Eina_Bool elm_widget_is(const Evas_Object *obj);
189 EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj);
191 EAPI Eina_List *_elm_stringlist_get(const char *str);
192 EAPI void _elm_stringlist_free(Eina_List *list);
194 Eina_Bool _elm_widget_type_check(const Evas_Object *obj, const char *type);
196 void _elm_unneed_ethumb(void);
198 void _elm_rescale(void);
200 void _elm_config_init(void);
201 void _elm_config_sub_init(void);
202 void _elm_config_shutdown(void);
204 Eina_Bool elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget, enum _elm_sel_format format, const char *buf);
205 Eina_Bool elm_selection_clear(enum _elm_sel_type selection, Evas_Object *widget);
206 Eina_Bool elm_selection_get(enum _elm_sel_type selection, enum _elm_sel_format format, Evas_Object *widget);
208 #define ELM_SET_WIDTYPE(widtype, type) if (!widtype) widtype = eina_stringshare_add(type)
209 //#define ELM_CHECK_WIDTYPE(obj, widtype) if (elm_widget_type_get(obj) != widtype) return
210 #define ELM_CHECK_WIDTYPE(obj, widtype) if (!_elm_widget_type_check((obj), (widtype))) return
212 extern char *_elm_appname;
213 extern Elm_Config *_elm_config;
214 extern const char *_elm_data_dir;
215 extern const char *_elm_lib_dir;
216 extern int _elm_log_dom;
218 extern Eina_List *_elm_win_list;
220 #define CRITICAL(...) EINA_LOG_DOM_CRIT(_elm_log_dom, __VA_ARGS__)
221 #define ERR(...) EINA_LOG_DOM_ERR(_elm_log_dom, __VA_ARGS__)
222 #define WRN(...) EINA_LOG_DOM_WARN(_elm_log_dom, __VA_ARGS__)
223 #define INF(...) EINA_LOG_DOM_INFO(_elm_log_dom, __VA_ARGS__)
224 #define DBG(...) EINA_LOG_DOM_DBG(_elm_log_dom, __VA_ARGS__)