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>
16 //#include "els_pan.h"
17 //#include "els_scroller.h"
18 //#include "els_box.h"
19 //#include "els_icon.h"
21 #include "elm_widget.h"
23 #define CRITICAL(...) EINA_LOG_DOM_CRIT(_elm_log_dom, __VA_ARGS__)
24 #define ERR(...) EINA_LOG_DOM_ERR (_elm_log_dom, __VA_ARGS__)
25 #define WRN(...) EINA_LOG_DOM_WARN(_elm_log_dom, __VA_ARGS__)
26 #define INF(...) EINA_LOG_DOM_INFO(_elm_log_dom, __VA_ARGS__)
27 #define DBG(...) EINA_LOG_DOM_DBG (_elm_log_dom, __VA_ARGS__)
29 #define E_(string) dgettext(PACKAGE, string)
31 Evas_Object *_elm_smart_pan_add (Evas *evas);
32 void _elm_smart_pan_child_set (Evas_Object *obj, Evas_Object *child);
33 Evas_Object *_elm_smart_pan_child_get (Evas_Object *obj);
34 void _elm_smart_pan_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
35 void _elm_smart_pan_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
36 void _elm_smart_pan_max_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
37 void _elm_smart_pan_min_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
38 void _elm_smart_pan_child_size_get (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
40 typedef enum _Elm_Smart_Scroller_Policy
42 ELM_SMART_SCROLLER_POLICY_AUTO,
43 ELM_SMART_SCROLLER_POLICY_ON,
44 ELM_SMART_SCROLLER_POLICY_OFF
46 Elm_Smart_Scroller_Policy;
48 Evas_Object *elm_smart_scroller_add (Evas *evas);
49 void elm_smart_scroller_child_set (Evas_Object *obj, Evas_Object *child);
50 void elm_smart_scroller_extern_pan_set (Evas_Object *obj, Evas_Object *pan, void (*pan_set) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*pan_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_max_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_min_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_child_size_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y));
51 void elm_smart_scroller_custom_edje_file_set (Evas_Object *obj, char *file, char *group);
52 void elm_smart_scroller_child_pos_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
53 void elm_smart_scroller_child_pos_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
54 void elm_smart_scroller_child_region_show (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
55 void elm_smart_scroller_child_viewport_size_get (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
56 void elm_smart_scroller_step_size_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
57 void elm_smart_scroller_step_size_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
58 void elm_smart_scroller_page_size_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
59 void elm_smart_scroller_page_size_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
60 void elm_smart_scroller_policy_set (Evas_Object *obj, Elm_Smart_Scroller_Policy hbar, Elm_Smart_Scroller_Policy vbar);
61 void elm_smart_scroller_policy_get (Evas_Object *obj, Elm_Smart_Scroller_Policy *hbar, Elm_Smart_Scroller_Policy *vbar);
62 Evas_Object *elm_smart_scroller_edje_object_get (Evas_Object *obj);
63 void elm_smart_scroller_single_dir_set (Evas_Object *obj, Eina_Bool single_dir);
64 Eina_Bool elm_smart_scroller_single_dir_get (Evas_Object *obj);
65 void elm_smart_scroller_object_theme_set (Evas_Object *parent, Evas_Object *obj, const char *clas, const char *group, const char *style);
66 void elm_smart_scroller_hold_set (Evas_Object *obj, Eina_Bool hold);
67 void elm_smart_scroller_freeze_set (Evas_Object *obj, Eina_Bool freeze);
68 void elm_smart_scroller_bounce_allow_set (Evas_Object *obj, Eina_Bool horiz, Eina_Bool vert);
69 void elm_smart_scroller_bounce_allow_get (const Evas_Object *obj, Eina_Bool *horiz, Eina_Bool *vert);
70 void elm_smart_scroller_paging_set (Evas_Object *obj, double pagerel_h, double pagerel_v, Evas_Coord pagesize_h, Evas_Coord pagesize_v);
71 void elm_smart_scroller_paging_get (Evas_Object *obj, double *pagerel_h, double *pagerel_v, Evas_Coord *pagesize_h, Evas_Coord *pagesize_v);
72 void elm_smart_scroller_region_bring_in (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
73 void elm_smart_scroller_widget_set (Evas_Object *obj, Evas_Object *wid);
74 Eina_Bool elm_smart_scroller_momentum_animator_disabled_get (Evas_Object *obj);
75 void elm_smart_scroller_momentum_animator_disabled_set (Evas_Object *obj, Eina_Bool disabled);
76 void elm_smart_scroller_bounce_animator_disabled_set (Evas_Object *obj, Eina_Bool disabled);
77 Eina_Bool elm_smart_scroller_bounce_animator_disabled_get (Evas_Object *obj);
79 void _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, int horizontal, int homogeneous, int rtl);
81 Evas_Object *_els_smart_icon_add (Evas *evas);
82 Eina_Bool _els_smart_icon_file_key_set (Evas_Object *obj, const char *file, const char *key);
83 Eina_Bool _els_smart_icon_file_edje_set (Evas_Object *obj, const char *file, const char *part);
84 void _els_smart_icon_file_get (const Evas_Object *obj, const char **file, const char **key);
85 void _els_smart_icon_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth);
86 Eina_Bool _els_smart_icon_smooth_scale_get (const Evas_Object *obj);
87 Evas_Object *_els_smart_icon_object_get (const Evas_Object *obj);
88 void _els_smart_icon_size_get (const Evas_Object *obj, int *w, int *h);
89 void _els_smart_icon_fill_inside_set (Evas_Object *obj, Eina_Bool fill_inside);
90 Eina_Bool _els_smart_icon_fill_inside_get (const Evas_Object *obj);
91 void _els_smart_icon_scale_up_set (Evas_Object *obj, Eina_Bool scale_up);
92 Eina_Bool _els_smart_icon_scale_up_get (const Evas_Object *obj);
93 void _els_smart_icon_scale_down_set (Evas_Object *obj, Eina_Bool scale_down);
94 Eina_Bool _els_smart_icon_scale_down_get (const Evas_Object *obj);
95 void _els_smart_icon_scale_size_set (Evas_Object *obj, int size);
96 int _els_smart_icon_scale_size_get (const Evas_Object *obj);
97 void _els_smart_icon_scale_set (Evas_Object *obj, double scale);
98 double _els_smart_icon_scale_get (const Evas_Object *obj);
99 void _els_smart_icon_orient_set (Evas_Object *obj, Elm_Image_Orient orient);
100 Elm_Image_Orient _els_smart_icon_orient_get (const Evas_Object *obj);
101 void _els_smart_icon_edit_set (Evas_Object *obj, Eina_Bool, Evas_Object *parent);
102 Eina_Bool _els_smart_icon_edit_get (const Evas_Object *obj);
103 Evas_Object *_els_smart_icon_edje_get(Evas_Object *obj);
106 typedef struct _Elm_Config Elm_Config;
107 typedef struct _Elm_Module Elm_Module;
113 Eina_List *extension;
115 Elm_Theme *ref_theme;
116 Eina_List *referrers;
121 /* increment this whenever we change config enough that you need new
122 * defaults for elm to work.
124 #define ELM_CONFIG_EPOCH 0x0001
125 /* increment this whenever a new set of config values are added but the users
126 * config doesn't need to be wiped - simply new values need to be put in
128 #define ELM_CONFIG_FILE_GENERATION 0x0003
129 #define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << 16) | ELM_CONFIG_FILE_GENERATION)
130 /* NB: profile configuration files (.src) must have their
131 * "config_version" entry's value up-to-date with ELM_CONFIG_VERSION
134 /* note: always remember to sync it with elm_config.c */
135 extern const char *_elm_engines[];
137 #define ELM_SOFTWARE_X11 (_elm_engines[0])
138 #define ELM_SOFTWARE_FB (_elm_engines[1])
139 #define ELM_SOFTWARE_DIRECTFB (_elm_engines[2])
140 #define ELM_SOFTWARE_16_X11 (_elm_engines[3])
141 #define ELM_SOFTWARE_8_X11 (_elm_engines[4])
142 #define ELM_XRENDER_X11 (_elm_engines[5])
143 #define ELM_OPENGL_X11 (_elm_engines[6])
144 #define ELM_SOFTWARE_WIN32 (_elm_engines[7])
145 #define ELM_SOFTWARE_16_WINCE (_elm_engines[8])
146 #define ELM_SOFTWARE_SDL (_elm_engines[9])
147 #define ELM_SOFTWARE_16_SDL (_elm_engines[10])
148 #define ELM_OPENGL_SDL (_elm_engines[11])
150 #define ELM_FONT_TOKEN_STYLE ":style="
157 unsigned char thumbscroll_enable;
158 int thumbscroll_threshold;
159 double thumbscroll_momentum_threshold;
160 double thumbscroll_friction;
161 double thumbscroll_bounce_friction;
162 double page_scroll_friction;
163 double bring_in_scroll_friction;
164 double zoom_friction;
165 unsigned char thumbscroll_bounce_enable;
166 double thumbscroll_border_friction;
170 Eina_List *font_dirs;
171 Eina_List *font_overlays;
173 int cache_flush_poll_interval;
174 unsigned char cache_flush_enable;
178 int edje_collection_cache;
183 double tooltip_delay;
184 unsigned char cursor_engine_only;
185 unsigned char focus_highlight_enable;
186 unsigned char focus_highlight_animate;
187 int toolbar_shrink_mode;
188 unsigned char fileselector_expand_enable;
189 unsigned char inwin_dialogs_enable;
191 double longpress_timeout;
192 unsigned char effect_enable;
193 unsigned char desktop_entry;
195 Eina_Bool is_mirrored : 1;
197 int input_panel_enable;
198 int autocapital_allow;
199 int autoperiod_allow;
200 Eina_Bool password_show_last_character;
209 const char *data_dir;
214 int (*init_func) (Elm_Module *m);
215 int (*shutdown_func) (Elm_Module *m);
219 #define ELM_NEW(t) calloc(1, sizeof(t))
221 void _elm_win_shutdown(void);
222 void _elm_win_rescale(Elm_Theme *th, Eina_Bool use_theme);
224 Eina_Bool _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style);
225 Eina_Bool _elm_theme_object_icon_set(Evas_Object *parent, Evas_Object *o, const char *group, const char *style);
226 Eina_Bool _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style);
227 Eina_Bool _elm_theme_icon_set(Elm_Theme *th, Evas_Object *o, const char *group, const char *style);
228 Eina_Bool _elm_theme_parse(Elm_Theme *th, const char *theme);
229 void _elm_theme_shutdown(void);
231 void _elm_module_init(void);
232 void _elm_module_shutdown(void);
233 void _elm_module_parse(const char *s);
234 Elm_Module *_elm_module_find_as(const char *as);
235 Elm_Module *_elm_module_add(const char *name, const char *as);
236 void _elm_module_del(Elm_Module *m);
237 Eina_Bool _elm_module_load(Elm_Module *m);
238 void _elm_module_unload(Elm_Module *m);
239 const void *_elm_module_symbol_get(Elm_Module *m, const char *name);
241 void _elm_widget_type_clear(void);
242 void _elm_widget_focus_region_show(const Evas_Object *obj);
244 void _elm_unneed_ethumb(void);
246 void _elm_rescale(void);
247 void _elm_widget_mirrored_reload(Evas_Object *obj);
249 void _elm_config_init(void);
250 void _elm_config_sub_init(void);
251 void _elm_config_shutdown(void);
252 Eina_Bool _elm_config_save(void);
253 void _elm_config_reload(void);
255 void _elm_recache(void);
257 const char *_elm_config_current_profile_get(void);
258 const char *_elm_config_profile_dir_get(const char *prof, Eina_Bool is_user);
259 Eina_List *_elm_config_profiles_list(void);
260 void _elm_config_profile_set(const char *profile);
262 void _elm_config_engine_set(const char *engine);
264 Eina_List *_elm_config_font_overlays_list(void);
265 void _elm_config_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size);
266 void _elm_config_font_overlay_remove(const char *text_class);
267 void _elm_config_font_overlay_apply(void);
268 Eina_List *_elm_config_text_classes_get(void);
269 void _elm_config_text_classes_free(Eina_List *l);
271 Elm_Font_Properties *_elm_font_properties_get(Eina_Hash **font_hash, const char *font);
272 Eina_Hash *_elm_font_available_hash_add(Eina_Hash *font_hash, const char *full_name);
273 void _elm_font_available_hash_del(Eina_Hash *hash);
275 void elm_tooltip_theme(Elm_Tooltip *tt);
276 void elm_object_sub_tooltip_content_cb_set(Evas_Object *eventarea, Evas_Object *owner, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
277 void elm_cursor_theme(Elm_Cursor *cur);
278 void elm_object_sub_cursor_set(Evas_Object *eventarea, Evas_Object *owner, const char *cursor);
280 void elm_menu_clone(Evas_Object *from_menu, Evas_Object *to_menu, Elm_Menu_Item *parent);
282 Eina_Bool _elm_dangerous_call_check(const char *call);
284 Evas_Object *_elm_scroller_edje_object_get(Evas_Object *obj);
286 char *_elm_util_mkup_to_text(const char *mkup);
287 char *_elm_util_text_to_mkup(const char *text);
288 /* do not use except clipboard history module */
289 EAPI Eina_Bool elm_cbhm_helper_init(Evas_Object *self);
290 EAPI void elm_cbhm_send_raw_data(char *cmd);
292 extern char *_elm_appname;
293 extern Elm_Config *_elm_config;
294 extern const char *_elm_data_dir;
295 extern const char *_elm_lib_dir;
296 extern int _elm_log_dom;
297 extern Eina_List *_elm_win_list;
298 extern int _elm_win_deferred_free;