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)
32 Evas_Object *_elm_smart_pan_add (Evas *evas);
33 void _elm_smart_pan_child_set (Evas_Object *obj, Evas_Object *child);
34 Evas_Object *_elm_smart_pan_child_get (Evas_Object *obj);
35 void _elm_smart_pan_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
36 void _elm_smart_pan_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
37 void _elm_smart_pan_max_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
38 void _elm_smart_pan_min_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
39 void _elm_smart_pan_child_size_get (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
40 void _elm_smart_pan_gravity_set (Evas_Object *obj, double x, double y);
41 void _elm_smart_pan_gravity_get (Evas_Object *obj, double *x, double *y);
44 typedef enum _Elm_Smart_Scroller_Policy
46 ELM_SMART_SCROLLER_POLICY_AUTO,
47 ELM_SMART_SCROLLER_POLICY_ON,
48 ELM_SMART_SCROLLER_POLICY_OFF
50 Elm_Smart_Scroller_Policy;
52 Evas_Object *elm_smart_scroller_add (Evas *evas);
53 void elm_smart_scroller_child_set (Evas_Object *obj, Evas_Object *child);
54 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));
55 void elm_smart_scroller_custom_edje_file_set (Evas_Object *obj, char *file, char *group);
56 void elm_smart_scroller_child_pos_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
57 void elm_smart_scroller_child_pos_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
58 void elm_smart_scroller_child_region_show (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
59 void elm_smart_scroller_child_region_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
60 void elm_smart_scroller_child_viewport_size_get (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
61 void elm_smart_scroller_step_size_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
62 void elm_smart_scroller_step_size_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
63 void elm_smart_scroller_page_size_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
64 void elm_smart_scroller_page_size_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y);
65 void elm_smart_scroller_policy_set (Evas_Object *obj, Elm_Smart_Scroller_Policy hbar, Elm_Smart_Scroller_Policy vbar);
66 void elm_smart_scroller_policy_get (Evas_Object *obj, Elm_Smart_Scroller_Policy *hbar, Elm_Smart_Scroller_Policy *vbar);
67 Evas_Object *elm_smart_scroller_edje_object_get (Evas_Object *obj);
68 void elm_smart_scroller_single_dir_set (Evas_Object *obj, Eina_Bool single_dir);
69 Eina_Bool elm_smart_scroller_single_dir_get (Evas_Object *obj);
70 void elm_smart_scroller_object_theme_set (Evas_Object *parent, Evas_Object *obj, const char *clas, const char *group, const char *style);
71 void elm_smart_scroller_mirrored_set (Evas_Object *obj, Eina_Bool mirrored);
72 void elm_smart_scroller_hold_set (Evas_Object *obj, Eina_Bool hold);
73 void elm_smart_scroller_freeze_set (Evas_Object *obj, Eina_Bool freeze);
74 void elm_smart_scroller_bounce_allow_set (Evas_Object *obj, Eina_Bool horiz, Eina_Bool vert);
75 void elm_smart_scroller_bounce_allow_get (const Evas_Object *obj, Eina_Bool *horiz, Eina_Bool *vert);
76 void elm_smart_scroller_paging_set (Evas_Object *obj, double pagerel_h, double pagerel_v, Evas_Coord pagesize_h, Evas_Coord pagesize_v);
77 void elm_smart_scroller_paging_get (Evas_Object *obj, double *pagerel_h, double *pagerel_v, Evas_Coord *pagesize_h, Evas_Coord *pagesize_v);
78 void elm_smart_scroller_region_bring_in (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
79 void elm_smart_scroller_widget_set (Evas_Object *obj, Evas_Object *wid);
80 Eina_Bool elm_smart_scroller_momentum_animator_disabled_get (Evas_Object *obj);
81 void elm_smart_scroller_momentum_animator_disabled_set (Evas_Object *obj, Eina_Bool disabled);
82 void elm_smart_scroller_bounce_animator_disabled_set (Evas_Object *obj, Eina_Bool disabled);
83 Eina_Bool elm_smart_scroller_bounce_animator_disabled_get (Evas_Object *obj);
84 Eina_Bool elm_smart_scroller_wheel_disabled_get (Evas_Object *obj);
85 void elm_smart_scroller_wheel_disabled_set (Evas_Object *obj, Eina_Bool disabled);
88 void _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, int horizontal, int homogeneous, int rtl);
91 Evas_Object *_els_smart_icon_add (Evas *evas);
92 Eina_Bool _els_smart_icon_file_key_set (Evas_Object *obj, const char *file, const char *key);
93 Eina_Bool _els_smart_icon_file_edje_set (Evas_Object *obj, const char *file, const char *part);
94 void _els_smart_icon_file_get (const Evas_Object *obj, const char **file, const char **key);
95 void _els_smart_icon_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth);
96 Eina_Bool _els_smart_icon_smooth_scale_get (const Evas_Object *obj);
97 Evas_Object *_els_smart_icon_object_get (const Evas_Object *obj);
98 void _els_smart_icon_size_get (const Evas_Object *obj, int *w, int *h);
99 void _els_smart_icon_fill_inside_set (Evas_Object *obj, Eina_Bool fill_inside);
100 Eina_Bool _els_smart_icon_fill_inside_get (const Evas_Object *obj);
101 void _els_smart_icon_scale_up_set (Evas_Object *obj, Eina_Bool scale_up);
102 Eina_Bool _els_smart_icon_scale_up_get (const Evas_Object *obj);
103 void _els_smart_icon_scale_down_set (Evas_Object *obj, Eina_Bool scale_down);
104 Eina_Bool _els_smart_icon_scale_down_get (const Evas_Object *obj);
105 void _els_smart_icon_scale_size_set (Evas_Object *obj, int size);
106 int _els_smart_icon_scale_size_get (const Evas_Object *obj);
107 void _els_smart_icon_scale_set (Evas_Object *obj, double scale);
108 double _els_smart_icon_scale_get (const Evas_Object *obj);
109 void _els_smart_icon_orient_set (Evas_Object *obj, Elm_Image_Orient orient);
110 Elm_Image_Orient _els_smart_icon_orient_get (const Evas_Object *obj);
111 void _els_smart_icon_edit_set (Evas_Object *obj, Eina_Bool, Evas_Object *parent);
112 Eina_Bool _els_smart_icon_edit_get (const Evas_Object *obj);
113 Evas_Object *_els_smart_icon_edje_get(Evas_Object *obj);
114 void _els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained);
115 Eina_Bool _els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj);
118 # include <libintl.h>
119 # define E_(string) dgettext(PACKAGE, string)
121 # define bindtextdomain(domain,dir)
122 # define E_(string) (string)
126 typedef struct _Elm_Config Elm_Config;
127 typedef struct _Elm_Module Elm_Module;
133 Eina_List *extension;
135 Elm_Theme *ref_theme;
136 Eina_List *referrers;
141 /* increment this whenever we change config enough that you need new
142 * defaults for elm to work.
144 #define ELM_CONFIG_EPOCH 0x0001
145 /* increment this whenever a new set of config values are added but the users
146 * config doesn't need to be wiped - simply new values need to be put in
148 #define ELM_CONFIG_FILE_GENERATION 0x0003
149 #define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << 16) | ELM_CONFIG_FILE_GENERATION)
150 /* NB: profile configuration files (.src) must have their
151 * "config_version" entry's value up-to-date with ELM_CONFIG_VERSION
154 /* note: always remember to sync it with elm_config.c */
155 extern const char *_elm_engines[];
157 #define ELM_SOFTWARE_X11 (_elm_engines[0])
158 #define ELM_SOFTWARE_FB (_elm_engines[1])
159 #define ELM_SOFTWARE_DIRECTFB (_elm_engines[2])
160 #define ELM_SOFTWARE_16_X11 (_elm_engines[3])
161 #define ELM_SOFTWARE_8_X11 (_elm_engines[4])
162 #define ELM_XRENDER_X11 (_elm_engines[5])
163 #define ELM_OPENGL_X11 (_elm_engines[6])
164 #define ELM_SOFTWARE_WIN32 (_elm_engines[7])
165 #define ELM_SOFTWARE_16_WINCE (_elm_engines[8])
166 #define ELM_SOFTWARE_SDL (_elm_engines[9])
167 #define ELM_SOFTWARE_16_SDL (_elm_engines[10])
168 #define ELM_OPENGL_SDL (_elm_engines[11])
170 #define ELM_FONT_TOKEN_STYLE ":style="
177 unsigned char thumbscroll_enable;
178 int thumbscroll_threshold;
179 double thumbscroll_momentum_threshold;
180 double thumbscroll_friction;
181 double thumbscroll_bounce_friction;
182 double page_scroll_friction;
183 double bring_in_scroll_friction;
184 double zoom_friction;
185 unsigned char thumbscroll_bounce_enable;
186 double thumbscroll_border_friction;
187 double thumbscroll_sensitivity_friction;
188 double scroll_smooth_time_interval;
189 double scroll_smooth_amount;
190 double scroll_smooth_history_weight;
191 double scroll_smooth_future_time;
192 double scroll_smooth_time_window;
196 Eina_List *font_dirs;
197 Eina_List *font_overlays;
199 int cache_flush_poll_interval;
200 unsigned char cache_flush_enable;
204 int edje_collection_cache;
209 double tooltip_delay;
210 unsigned char cursor_engine_only;
211 unsigned char focus_highlight_enable;
212 unsigned char focus_highlight_animate;
213 int toolbar_shrink_mode;
214 unsigned char fileselector_expand_enable;
215 unsigned char inwin_dialogs_enable;
217 double longpress_timeout;
218 unsigned char effect_enable;
219 unsigned char desktop_entry;
220 Eina_Bool is_mirrored : 1;
221 Eina_Bool password_show_last;
222 double password_show_last_timeout;
223 double glayer_zoom_finger_factor;
224 double glayer_zoom_wheel_factor;
225 double glayer_zoom_distance_tolerance;
226 double glayer_rotate_angular_tolerance;
227 double glayer_line_min_length;
228 double glayer_line_distance_tolerance;
229 double glayer_line_angular_tolerance;
230 unsigned int glayer_flick_time_limit_ms;
231 double glayer_long_tap_start_timeout;
240 const char *data_dir;
245 int (*init_func) (Elm_Module *m);
246 int (*shutdown_func) (Elm_Module *m);
250 void _elm_win_shutdown(void);
251 void _elm_win_rescale(Elm_Theme *th, Eina_Bool use_theme);
253 Eina_Bool _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style);
254 Eina_Bool _elm_theme_object_icon_set(Evas_Object *parent, Evas_Object *o, const char *group, const char *style);
255 Eina_Bool _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style);
256 Eina_Bool _elm_theme_icon_set(Elm_Theme *th, Evas_Object *o, const char *group, const char *style);
257 Eina_Bool _elm_theme_parse(Elm_Theme *th, const char *theme);
258 void _elm_theme_shutdown(void);
260 void _elm_module_init(void);
261 void _elm_module_shutdown(void);
262 void _elm_module_parse(const char *s);
263 Elm_Module *_elm_module_find_as(const char *as);
264 Elm_Module *_elm_module_add(const char *name, const char *as);
265 void _elm_module_del(Elm_Module *m);
266 Eina_Bool _elm_module_load(Elm_Module *m);
267 void _elm_module_unload(Elm_Module *m);
268 const void *_elm_module_symbol_get(Elm_Module *m, const char *name);
270 void _elm_widget_type_clear(void);
271 void _elm_widget_focus_region_show(const Evas_Object *obj);
273 void _elm_unneed_ethumb(void);
275 void _elm_rescale(void);
276 void _elm_widget_mirrored_reload(Evas_Object *obj);
278 void _elm_config_init(void);
279 void _elm_config_sub_init(void);
280 void _elm_config_shutdown(void);
281 Eina_Bool _elm_config_save(void);
282 void _elm_config_reload(void);
284 void _elm_recache(void);
286 const char *_elm_config_current_profile_get(void);
287 const char *_elm_config_profile_dir_get(const char *prof, Eina_Bool is_user);
288 Eina_List *_elm_config_profiles_list(void);
289 void _elm_config_profile_set(const char *profile);
291 void _elm_config_engine_set(const char *engine);
293 Eina_List *_elm_config_font_overlays_list(void);
294 void _elm_config_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size);
295 void _elm_config_font_overlay_remove(const char *text_class);
296 void _elm_config_font_overlay_apply(void);
297 Eina_List *_elm_config_text_classes_get(void);
298 void _elm_config_text_classes_free(Eina_List *l);
300 Elm_Font_Properties *_elm_font_properties_get(Eina_Hash **font_hash, const char *font);
301 Eina_Hash *_elm_font_available_hash_add(Eina_Hash *font_hash, const char *full_name);
302 void _elm_font_available_hash_del(Eina_Hash *hash);
304 void elm_tooltip_theme(Elm_Tooltip *tt);
305 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);
306 void elm_cursor_theme(Elm_Cursor *cur);
307 void elm_object_sub_cursor_set(Evas_Object *eventarea, Evas_Object *owner, const char *cursor);
309 void elm_menu_clone(Evas_Object *from_menu, Evas_Object *to_menu, Elm_Menu_Item *parent);
311 Eina_Bool _elm_dangerous_call_check(const char *call);
313 Evas_Object *_elm_scroller_edje_object_get(Evas_Object *obj);
315 char *_elm_util_mkup_to_text(const char *mkup);
316 char *_elm_util_text_to_mkup(const char *text);
317 /* do not use except clipboard history module */
318 EAPI Eina_Bool elm_cbhm_helper_init(Evas_Object *self);
319 EAPI void elm_cbhm_send_raw_data(char *cmd);
321 Eina_Bool _elm_video_check(Evas_Object *video);
324 extern char *_elm_appname;
325 extern Elm_Config *_elm_config;
326 extern const char *_elm_data_dir;
327 extern const char *_elm_lib_dir;
328 extern int _elm_log_dom;
329 extern Eina_List *_elm_win_list;
330 extern int _elm_win_deferred_free;