2 # include "elementary_config.h"
5 #include <dlfcn.h> /* dlopen,dlclose,etc */
7 #ifdef HAVE_CRT_EXTERNS_H
8 # include <crt_externs.h>
15 #include <Elementary.h>
18 #define SEMI_BROKEN_QUICKLAUNCH 1
20 static Elm_Version _version = { VMAJ, VMIN, VMIC, VREV };
21 EAPI Elm_Version *elm_version = &_version;
24 _elm_dangerous_call_check(const char *call)
29 snprintf(buf, sizeof(buf), "%i.%i.%i.%i", VMAJ, VMIN, VMIC, VREV);
30 eval = getenv("ELM_NO_FINGER_WAGGLING");
31 if ((eval) && (!strcmp(eval, buf)))
33 printf("ELEMENTARY FINGER WAGGLE!!!!!!!!!!\n"
36 "PLEASE see the API documentation for this function. This call\n"
37 "should almost never be used. Only in very special cases.\n"
39 "To remove this warning please set the environment variable:\n"
40 " ELM_NO_FINGER_WAGGLING\n"
41 "To the value of the Elementary version + revision number. e.g.:\n"
49 static Eina_Bool _elm_signal_exit(void *data,
53 static Eina_Prefix *pfx = NULL;
54 char *_elm_appname = NULL;
55 const char *_elm_data_dir = NULL;
56 const char *_elm_lib_dir = NULL;
57 int _elm_log_dom = -1;
59 EAPI int ELM_EVENT_POLICY_CHANGED = 0;
61 static int _elm_init_count = 0;
62 static int _elm_sub_init_count = 0;
63 static int _elm_ql_init_count = 0;
64 static int _elm_policies[ELM_POLICY_LAST];
65 static Ecore_Event_Handler *_elm_exit_handler = NULL;
66 static Eina_Bool quicklaunch_on = 0;
69 _elm_signal_exit(void *data __UNUSED__,
70 int ev_type __UNUSED__,
74 return ECORE_CALLBACK_PASS_ON;
80 edje_scale_set(_elm_config->scale);
81 _elm_win_rescale(NULL, EINA_FALSE);
82 _elm_ews_wm_rescale(NULL, EINA_FALSE);
85 static void *app_mainfunc = NULL;
86 static const char *app_domain = NULL;
87 static const char *app_checkfile = NULL;
89 static const char *app_compile_bin_dir = NULL;
90 static const char *app_compile_lib_dir = NULL;
91 static const char *app_compile_data_dir = NULL;
92 static const char *app_compile_locale_dir = NULL;
93 static const char *app_prefix_dir = NULL;
94 static const char *app_bin_dir = NULL;
95 static const char *app_lib_dir = NULL;
96 static const char *app_data_dir = NULL;
97 static const char *app_locale_dir = NULL;
99 static Eina_Prefix *app_pfx = NULL;
106 const char *dirs[4] = { NULL, NULL, NULL, NULL };
107 char *caps = NULL, *p1, *p2;
110 if (!app_domain) return;
112 ecore_app_args_get(&argc, &argv);
113 if (argc < 1) return;
115 dirs[0] = app_compile_bin_dir;
116 dirs[1] = app_compile_lib_dir;
117 dirs[2] = app_compile_data_dir;
118 dirs[3] = app_compile_locale_dir;
120 if (!dirs[1]) dirs[1] = dirs[0];
121 if (!dirs[0]) dirs[0] = dirs[1];
122 if (!dirs[3]) dirs[3] = dirs[2];
123 if (!dirs[2]) dirs[2] = dirs[3];
127 caps = alloca(strlen(app_domain) + 1);
128 for (p1 = (char *)app_domain, p2 = caps; *p1; p1++, p2++)
132 app_pfx = eina_prefix_new(argv[0], app_mainfunc, caps, app_domain,
133 app_checkfile, dirs[0], dirs[1], dirs[2], dirs[3]);
137 _prefix_shutdown(void)
139 if (app_pfx) eina_prefix_free(app_pfx);
140 if (app_domain) eina_stringshare_del(app_domain);
141 if (app_checkfile) eina_stringshare_del(app_checkfile);
142 if (app_compile_bin_dir) eina_stringshare_del(app_compile_bin_dir);
143 if (app_compile_lib_dir) eina_stringshare_del(app_compile_lib_dir);
144 if (app_compile_data_dir) eina_stringshare_del(app_compile_data_dir);
145 if (app_compile_locale_dir) eina_stringshare_del(app_compile_locale_dir);
146 if (app_prefix_dir) eina_stringshare_del(app_prefix_dir);
147 if (app_bin_dir) eina_stringshare_del(app_bin_dir);
148 if (app_lib_dir) eina_stringshare_del(app_lib_dir);
149 if (app_data_dir) eina_stringshare_del(app_data_dir);
150 if (app_locale_dir) eina_stringshare_del(app_locale_dir);
153 app_checkfile = NULL;
154 app_compile_bin_dir = NULL;
155 app_compile_lib_dir = NULL;
156 app_compile_data_dir = NULL;
157 app_compile_locale_dir = NULL;
158 app_prefix_dir = NULL;
162 app_locale_dir = NULL;
171 if (_elm_init_count > 1) return _elm_init_count;
172 elm_quicklaunch_init(argc, argv);
173 elm_quicklaunch_sub_init(argc, argv);
175 return _elm_init_count;
182 if (_elm_init_count > 0) return _elm_init_count;
184 while (_elm_win_deferred_free) ecore_main_loop_iterate();
186 // _prefix_shutdown();
187 elm_quicklaunch_sub_shutdown();
188 elm_quicklaunch_shutdown();
189 return _elm_init_count;
193 elm_app_info_set(void *mainfunc, const char *dom, const char *checkfile)
195 app_mainfunc = mainfunc;
196 eina_stringshare_replace(&app_domain, dom);
197 eina_stringshare_replace(&app_checkfile, checkfile);
201 elm_app_compile_bin_dir_set(const char *dir)
203 eina_stringshare_replace(&app_compile_bin_dir, dir);
207 elm_app_compile_lib_dir_set(const char *dir)
209 eina_stringshare_replace(&app_compile_lib_dir, dir);
213 elm_app_compile_data_dir_set(const char *dir)
215 eina_stringshare_replace(&app_compile_data_dir, dir);
219 elm_app_compile_locale_set(const char *dir)
221 eina_stringshare_replace(&app_compile_locale_dir, dir);
225 elm_app_prefix_dir_get(void)
227 if (app_prefix_dir) return app_prefix_dir;
229 if (!app_pfx) return "";
230 app_prefix_dir = eina_prefix_get(app_pfx);
231 return app_prefix_dir;
235 elm_app_bin_dir_get(void)
237 if (app_bin_dir) return app_bin_dir;
239 if (!app_pfx) return "";
240 app_bin_dir = eina_prefix_bin_get(app_pfx);
245 elm_app_lib_dir_get(void)
247 if (app_lib_dir) return app_lib_dir;
249 if (!app_pfx) return "";
250 app_lib_dir = eina_prefix_lib_get(app_pfx);
255 elm_app_data_dir_get(void)
257 if (app_data_dir) return app_data_dir;
259 if (!app_pfx) return "";
260 app_data_dir = eina_prefix_data_get(app_pfx);
265 elm_app_locale_dir_get(void)
267 if (app_locale_dir) return app_locale_dir;
269 if (!app_pfx) return "";
270 app_locale_dir = eina_prefix_locale_get(app_pfx);
271 return app_locale_dir;
275 static int _elm_need_e_dbus = 0;
278 elm_need_e_dbus(void)
281 if (_elm_need_e_dbus++) return EINA_TRUE;
290 _elm_unneed_e_dbus(void)
293 if (--_elm_need_e_dbus) return;
295 _elm_need_e_dbus = 0;
301 static int _elm_need_efreet = 0;
304 elm_need_efreet(void)
307 if (_elm_need_efreet++) return EINA_TRUE;
315 list = efreet_icon_extra_list_get();
318 e_user_dir_concat_static(buf, "icons");
319 *list = eina_list_prepend(*list, (void *)eina_stringshare_add(buf));
320 e_prefix_data_concat_static(buf, "data/icons");
321 *list = eina_list_prepend(*list, (void *)eina_stringshare_add(buf));
332 _elm_unneed_efreet(void)
335 if (--_elm_need_efreet) return;
337 _elm_need_efreet = 0;
338 efreet_trash_shutdown();
339 efreet_mime_shutdown();
345 elm_quicklaunch_mode_set(Eina_Bool ql_on)
347 quicklaunch_on = ql_on;
351 elm_quicklaunch_mode_get(void)
353 return quicklaunch_on;
357 elm_quicklaunch_init(int argc,
360 _elm_ql_init_count++;
361 if (_elm_ql_init_count > 1) return _elm_ql_init_count;
363 _elm_log_dom = eina_log_domain_register("elementary", EINA_COLOR_LIGHTBLUE);
366 EINA_LOG_ERR("could not register elementary log domain.");
367 _elm_log_dom = EINA_LOG_DOMAIN_GLOBAL;
373 #ifdef HAVE_ELEMENTARY_EMAP
376 ecore_app_args_set(argc, (const char **)argv);
378 memset(_elm_policies, 0, sizeof(_elm_policies));
379 if (!ELM_EVENT_POLICY_CHANGED)
380 ELM_EVENT_POLICY_CHANGED = ecore_event_type_new();
384 _elm_exit_handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _elm_signal_exit, NULL);
386 if (argv) _elm_appname = strdup(ecore_file_file_get(argv[0]));
388 pfx = eina_prefix_new(argv[0], elm_quicklaunch_init,
389 "ELM", "elementary", "config/profile.cfg",
390 PACKAGE_LIB_DIR, /* don't have a bin dir currently */
396 _elm_data_dir = eina_stringshare_add(eina_prefix_data_get(pfx));
397 _elm_lib_dir = eina_stringshare_add(eina_prefix_lib_get(pfx));
399 if (!_elm_data_dir) _elm_data_dir = eina_stringshare_add("/");
400 if (!_elm_lib_dir) _elm_lib_dir = eina_stringshare_add("/");
403 return _elm_ql_init_count;
407 elm_quicklaunch_sub_init(int argc,
410 _elm_sub_init_count++;
411 if (_elm_sub_init_count > 1) return _elm_sub_init_count;
414 #ifdef SEMI_BROKEN_QUICKLAUNCH
415 return _elm_sub_init_count;
420 ecore_app_args_set(argc, (const char **)argv);
424 _elm_config_sub_init();
425 ecore_evas_init(); // FIXME: check errors
428 ecore_con_url_init();
431 return _elm_sub_init_count;
435 elm_quicklaunch_sub_shutdown(void)
437 _elm_sub_init_count--;
438 if (_elm_sub_init_count > 0) return _elm_sub_init_count;
441 #ifdef SEMI_BROKEN_QUICKLAUNCH
442 return _elm_sub_init_count;
448 _elm_module_shutdown();
449 _elm_ews_wm_shutdown();
450 ecore_con_url_shutdown();
451 ecore_con_shutdown();
452 ecore_imf_shutdown();
453 ecore_evas_shutdown();
454 _elm_config_sub_shutdown();
455 #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
456 if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
457 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
458 ENGINE_COMPARE(ELM_XRENDER_X11) ||
459 ENGINE_COMPARE(ELM_OPENGL_X11) ||
460 ENGINE_COMPARE(ELM_SOFTWARE_SDL) ||
461 ENGINE_COMPARE(ELM_SOFTWARE_16_SDL) ||
462 ENGINE_COMPARE(ELM_OPENGL_SDL) ||
463 ENGINE_COMPARE(ELM_SOFTWARE_WIN32) ||
464 ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE) ||
465 ENGINE_COMPARE(ELM_EWS))
466 #undef ENGINE_COMPARE
467 evas_cserve_disconnect();
471 return _elm_sub_init_count;
475 elm_quicklaunch_shutdown(void)
477 _elm_ql_init_count--;
478 if (_elm_ql_init_count > 0) return _elm_ql_init_count;
479 if (pfx) eina_prefix_free(pfx);
481 eina_stringshare_del(_elm_data_dir);
482 _elm_data_dir = NULL;
483 eina_stringshare_del(_elm_lib_dir);
489 _elm_config_shutdown();
491 ecore_event_handler_del(_elm_exit_handler);
492 _elm_exit_handler = NULL;
494 _elm_theme_shutdown();
495 _elm_unneed_efreet();
496 _elm_unneed_e_dbus();
497 _elm_unneed_ethumb();
499 ecore_file_shutdown();
501 #ifdef HAVE_ELEMENTARY_EMAP
508 if ((_elm_log_dom > -1) && (_elm_log_dom != EINA_LOG_DOMAIN_GLOBAL))
510 eina_log_domain_unregister(_elm_log_dom);
514 _elm_widget_type_clear();
517 return _elm_ql_init_count;
521 elm_quicklaunch_seed(void)
523 #ifndef SEMI_BROKEN_QUICKLAUNCH
526 Evas_Object *win, *bg, *bt;
528 win = elm_win_add(NULL, "seed", ELM_WIN_BASIC);
529 bg = elm_bg_add(win);
530 elm_win_resize_object_add(win, bg);
531 evas_object_show(bg);
532 bt = elm_button_add(win);
533 elm_button_label_set(bt, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~-_=+\\|]}[{;:'\",<.>/?");
534 elm_win_resize_object_add(win, bt);
535 ecore_main_loop_iterate();
536 evas_object_del(win);
537 ecore_main_loop_iterate();
538 #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
539 if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
540 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
541 ENGINE_COMPARE(ELM_XRENDER_X11) ||
542 ENGINE_COMPARE(ELM_OPENGL_X11))
543 #undef ENGINE_COMPARE
545 # ifdef HAVE_ELEMENTARY_X
549 ecore_main_loop_iterate();
554 static void *qr_handle = NULL;
555 static int (*qr_main)(int argc,
559 elm_quicklaunch_prepare(int argc __UNUSED__,
563 char *exe = elm_quicklaunch_exe_path_get(argv[0]);
566 ERR("requested quicklaunch binary '%s' does not exist\n", argv[0]);
574 exe2 = malloc(strlen(exe) + 1 + 10);
576 p = strrchr(exe2, '/');
579 exename = alloca(strlen(p) + 1);
582 strcat(p, "../lib/");
585 if (!access(exe2, R_OK | X_OK))
593 qr_handle = dlopen(exe, RTLD_NOW | RTLD_GLOBAL);
596 fprintf(stderr, "dlerr: %s\n", dlerror());
597 WRN("dlopen('%s') failed: %s", exe, dlerror());
601 INF("dlopen('%s') = %p", exe, qr_handle);
602 qr_main = dlsym(qr_handle, "elm_main");
603 INF("dlsym(%p, 'elm_main') = %p", qr_handle, qr_main);
606 WRN("not quicklauncher capable: no elm_main in '%s'", exe);
625 extern char **environ;
630 for (i = 0, size = 0; environ[i]; i++)
631 size += strlen(environ[i]) + 1;
633 p = malloc((i + 1) * sizeof(char *));
638 for (i = 0; oldenv[i]; i++)
639 environ[i] = strdup(oldenv[i]);
646 elm_quicklaunch_fork(int argc,
649 void (postfork_func) (void *data),
659 // need to accept current environment from elementary_run
666 if (child > 0) return EINA_TRUE;
669 perror("could not fork");
674 perror("could not chdir");
675 args = alloca((argc + 1) * sizeof(char *));
676 for (i = 0; i < argc; i++) args[i] = argv[i];
678 WRN("%s not quicklaunch capable, fallback...", argv[0]);
679 execvp(argv[0], args);
680 ERR("failed to execute '%s': %s", argv[0], strerror(errno));
684 if (child > 0) return EINA_TRUE;
687 perror("could not fork");
690 if (postfork_func) postfork_func(postfork_data);
694 #ifdef SEMI_BROKEN_QUICKLAUNCH
695 ecore_app_args_set(argc, (const char **)argv);
698 _elm_config_sub_init();
699 #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
700 if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
701 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
702 ENGINE_COMPARE(ELM_XRENDER_X11) ||
703 ENGINE_COMPARE(ELM_OPENGL_X11))
704 #undef ENGINE_COMPARE
706 # ifdef HAVE_ELEMENTARY_X
710 ecore_evas_init(); // FIXME: check errors
718 perror("could not chdir");
719 // FIXME: this is very linux specific. it changes argv[0] of the process
720 // so ps etc. report what you'd expect. for other unixes and os's this
727 ecore_app_args_get(&real_argc, &real_argv);
728 lastarg = real_argv[real_argc - 1] + strlen(real_argv[real_argc - 1]);
729 for (p = real_argv[0]; p < lastarg; p++) *p = 0;
730 strcpy(real_argv[0], argv[0]);
732 ecore_app_args_set(argc, (const char **)argv);
733 ret = qr_main(argc, argv);
747 elm_quicklaunch_cleanup(void)
760 elm_quicklaunch_fallback(int argc,
764 elm_quicklaunch_init(argc, argv);
765 elm_quicklaunch_sub_init(argc, argv);
766 elm_quicklaunch_prepare(argc, argv);
767 ret = qr_main(argc, argv);
773 elm_quicklaunch_exe_path_get(const char *exe)
775 static char *path = NULL;
776 static Eina_List *pathlist = NULL;
780 if (exe[0] == '/') return strdup(exe);
781 if ((exe[0] == '.') && (exe[1] == '/')) return strdup(exe);
782 if ((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/')) return strdup(exe);
787 path = getenv("PATH");
788 buf2 = alloca(strlen(path) + 1);
793 if ((*p == ':') || (!*p))
798 strncpy(buf2, pp, len);
800 pathlist = eina_list_append(pathlist, eina_stringshare_add(buf2));
812 EINA_LIST_FOREACH(pathlist, l, pathitr)
814 snprintf(buf, sizeof(buf), "%s/%s", pathitr, exe);
815 if (!access(buf, R_OK | X_OK)) return strdup(buf);
823 ecore_main_loop_begin();
829 ecore_main_loop_quit();
833 elm_policy_set(unsigned int policy,
836 Elm_Event_Policy_Changed *ev;
838 if (policy >= ELM_POLICY_LAST)
841 if (value == _elm_policies[policy])
844 /* TODO: validade policy? */
846 ev = malloc(sizeof(*ev));
848 ev->new_value = value;
849 ev->old_value = _elm_policies[policy];
851 _elm_policies[policy] = value;
853 ecore_event_add(ELM_EVENT_POLICY_CHANGED, ev, NULL, NULL);
859 elm_policy_get(unsigned int policy)
861 if (policy >= ELM_POLICY_LAST)
863 return _elm_policies[policy];
867 elm_object_mirrored_get(const Evas_Object *obj)
869 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
870 return elm_widget_mirrored_get(obj);
874 elm_object_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
876 EINA_SAFETY_ON_NULL_RETURN(obj);
877 elm_widget_mirrored_set(obj, mirrored);
881 elm_object_mirrored_automatic_get(const Evas_Object *obj)
883 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
884 return elm_widget_mirrored_automatic_get(obj);
888 elm_object_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic)
890 EINA_SAFETY_ON_NULL_RETURN(obj);
891 elm_widget_mirrored_automatic_set(obj, automatic);
899 elm_object_scale_set(Evas_Object *obj,
902 EINA_SAFETY_ON_NULL_RETURN(obj);
903 elm_widget_scale_set(obj, scale);
907 elm_object_scale_get(const Evas_Object *obj)
909 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0.0);
910 return elm_widget_scale_get(obj);
914 elm_object_text_part_set(Evas_Object *obj, const char *part, const char *label)
916 EINA_SAFETY_ON_NULL_RETURN(obj);
917 elm_widget_text_part_set(obj, part, label);
921 elm_object_text_part_get(const Evas_Object *obj, const char *part)
923 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
924 return elm_widget_text_part_get(obj, part);
928 elm_object_content_part_set(Evas_Object *obj, const char *part, Evas_Object *content)
930 EINA_SAFETY_ON_NULL_RETURN(obj);
931 elm_widget_content_part_set(obj, part, content);
935 elm_object_content_part_get(const Evas_Object *obj, const char *part)
937 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
938 return elm_widget_content_part_get(obj, part);
942 elm_object_content_part_unset(Evas_Object *obj, const char *part)
944 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
945 return elm_widget_content_part_unset(obj, part);
951 return _elm_config->scale;
955 elm_scale_set(double scale)
957 if (_elm_config->scale == scale) return;
958 _elm_config->scale = scale;
963 elm_scale_all_set(double scale)
965 #ifdef HAVE_ELEMENTARY_X
966 static Ecore_X_Atom atom = 0;
967 unsigned int scale_i = (unsigned int)(scale * 1000.0);
969 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_SCALE");
970 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
976 elm_password_show_last_get(void)
978 return _elm_config->password_show_last;
982 elm_password_show_last_set(Eina_Bool password_show_last)
984 if (_elm_config->password_show_last == password_show_last) return;
985 _elm_config->password_show_last = password_show_last;
986 edje_password_show_last_set(_elm_config->password_show_last);
990 elm_password_show_last_timeout_get(void)
992 return _elm_config->password_show_last_timeout;
996 elm_password_show_last_timeout_set(double password_show_last_timeout)
998 if (_elm_config->password_show_last_timeout == password_show_last_timeout) return;
999 _elm_config->password_show_last_timeout = password_show_last_timeout;
1000 edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
1004 elm_object_style_set(Evas_Object *obj,
1007 EINA_SAFETY_ON_NULL_RETURN(obj);
1008 elm_widget_style_set(obj, style);
1012 elm_object_style_get(const Evas_Object *obj)
1014 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
1015 return elm_widget_style_get(obj);
1019 elm_object_disabled_set(Evas_Object *obj,
1022 EINA_SAFETY_ON_NULL_RETURN(obj);
1023 elm_widget_disabled_set(obj, disabled);
1027 elm_object_disabled_get(const Evas_Object *obj)
1029 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1030 return elm_widget_disabled_get(obj);
1034 elm_config_save(void)
1036 return _elm_config_save();
1040 elm_config_reload(void)
1042 _elm_config_reload();
1046 elm_profile_current_get(void)
1048 return _elm_config_current_profile_get();
1052 elm_profile_dir_get(const char *profile,
1055 return _elm_config_profile_dir_get(profile, is_user);
1059 elm_profile_dir_free(const char *p_dir)
1061 free((void *)p_dir);
1065 elm_profile_list_get(void)
1067 return _elm_config_profiles_list();
1071 elm_profile_list_free(Eina_List *l)
1075 EINA_LIST_FREE(l, dir)
1076 eina_stringshare_del(dir);
1080 elm_profile_set(const char *profile)
1082 EINA_SAFETY_ON_NULL_RETURN(profile);
1083 _elm_config_profile_set(profile);
1087 elm_profile_all_set(const char *profile)
1089 #ifdef HAVE_ELEMENTARY_X
1090 static Ecore_X_Atom atom = 0;
1092 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_PROFILE");
1093 ecore_x_window_prop_string_set(ecore_x_window_root_first_get(),
1099 elm_engine_current_get(void)
1101 return _elm_config->engine;
1105 elm_engine_set(const char *engine)
1107 EINA_SAFETY_ON_NULL_RETURN(engine);
1109 _elm_config_engine_set(engine);
1112 EAPI const Eina_List *
1113 elm_text_classes_list_get(void)
1115 return _elm_config_text_classes_get();
1119 elm_text_classes_list_free(const Eina_List *list)
1121 _elm_config_text_classes_free((Eina_List *)list);
1124 EAPI const Eina_List *
1125 elm_font_overlay_list_get(void)
1127 return _elm_config_font_overlays_list();
1131 elm_font_overlay_set(const char *text_class,
1133 Evas_Font_Size size)
1135 _elm_config_font_overlay_set(text_class, font, size);
1139 elm_font_overlay_unset(const char *text_class)
1141 _elm_config_font_overlay_remove(text_class);
1145 elm_font_overlay_apply(void)
1147 _elm_config_font_overlay_apply();
1151 elm_font_overlay_all_apply(void)
1153 #ifdef HAVE_ELEMENTARY_X
1154 static Ecore_X_Atom atom = 0;
1155 unsigned int dummy = (unsigned int)(1 * 1000.0);
1157 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_FONT_OVERLAY");
1158 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(), atom, &dummy,
1163 EAPI Elm_Font_Properties *
1164 elm_font_properties_get(const char *font)
1166 EINA_SAFETY_ON_NULL_RETURN_VAL(font, NULL);
1167 return _elm_font_properties_get(NULL, font);
1171 elm_font_properties_free(Elm_Font_Properties *efp)
1175 EINA_SAFETY_ON_NULL_RETURN(efp);
1176 EINA_LIST_FREE(efp->styles, str)
1177 if (str) eina_stringshare_del(str);
1178 if (efp->name) eina_stringshare_del(efp->name);
1183 elm_font_fontconfig_name_get(const char *name,
1188 EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
1189 if (!style || style[0] == 0) return eina_stringshare_add(name);
1190 snprintf(buf, 256, "%s" ELM_FONT_TOKEN_STYLE "%s", name, style);
1191 return eina_stringshare_add(buf);
1195 elm_font_fontconfig_name_free(const char *name)
1197 eina_stringshare_del(name);
1201 elm_font_available_hash_add(Eina_List *list)
1203 Eina_Hash *font_hash;
1209 /* populate with default font families */
1210 font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Regular");
1211 font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Bold");
1212 font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Oblique");
1213 font_hash = _elm_font_available_hash_add(font_hash,
1214 "Sans:style=Bold Oblique");
1216 font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Regular");
1217 font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Bold");
1218 font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Oblique");
1219 font_hash = _elm_font_available_hash_add(font_hash,
1220 "Serif:style=Bold Oblique");
1222 font_hash = _elm_font_available_hash_add(font_hash,
1223 "Monospace:style=Regular");
1224 font_hash = _elm_font_available_hash_add(font_hash,
1225 "Monospace:style=Bold");
1226 font_hash = _elm_font_available_hash_add(font_hash,
1227 "Monospace:style=Oblique");
1228 font_hash = _elm_font_available_hash_add(font_hash,
1229 "Monospace:style=Bold Oblique");
1231 EINA_LIST_FOREACH(list, l, key)
1232 font_hash = _elm_font_available_hash_add(font_hash, key);
1238 elm_font_available_hash_del(Eina_Hash *hash)
1240 _elm_font_available_hash_del(hash);
1244 elm_finger_size_get(void)
1246 return _elm_config->finger_size;
1250 elm_finger_size_set(Evas_Coord size)
1252 if (_elm_config->finger_size == size) return;
1253 _elm_config->finger_size = size;
1258 elm_finger_size_all_set(Evas_Coord size)
1260 #ifdef HAVE_ELEMENTARY_X
1261 static Ecore_X_Atom atom = 0;
1262 unsigned int size_i = (unsigned int)size;
1264 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_FINGER_SIZE");
1265 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1271 elm_coords_finger_size_adjust(int times_w,
1276 if ((w) && (*w < (_elm_config->finger_size * times_w)))
1277 *w = _elm_config->finger_size * times_w;
1278 if ((h) && (*h < (_elm_config->finger_size * times_h)))
1279 *h = _elm_config->finger_size * times_h;
1288 edje_file_cache_flush();
1289 edje_collection_cache_flush();
1291 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1293 Evas *e = evas_object_evas_get(obj);
1294 evas_image_cache_flush(e);
1295 evas_font_cache_flush(e);
1296 evas_render_dump(e);
1301 elm_cache_flush_interval_get(void)
1303 return _elm_config->cache_flush_poll_interval;
1307 elm_cache_flush_interval_set(int size)
1309 if (_elm_config->cache_flush_poll_interval == size) return;
1310 _elm_config->cache_flush_poll_interval = size;
1316 elm_cache_flush_interval_all_set(int size)
1318 #ifdef HAVE_ELEMENTARY_X
1319 static Ecore_X_Atom atom = 0;
1320 unsigned int size_i = (unsigned int)size;
1322 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_CACHE_FLUSH_INTERVAL");
1323 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1329 elm_cache_flush_enabled_get(void)
1331 return _elm_config->cache_flush_enable;
1335 elm_cache_flush_enabled_set(Eina_Bool enabled)
1337 enabled = !!enabled;
1338 if (_elm_config->cache_flush_enable == enabled) return;
1339 _elm_config->cache_flush_enable = enabled;
1345 elm_cache_flush_enabled_all_set(Eina_Bool enabled)
1347 #ifdef HAVE_ELEMENTARY_X
1348 static Ecore_X_Atom atom = 0;
1349 unsigned int enabled_i = (unsigned int)enabled;
1351 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_CACHE_FLUSH_ENABLE");
1352 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1353 atom, &enabled_i, 1);
1358 elm_font_cache_get(void)
1360 return _elm_config->font_cache;
1364 elm_font_cache_set(int size)
1366 if (_elm_config->font_cache == size) return;
1367 _elm_config->font_cache = size;
1373 elm_font_cache_all_set(int size)
1375 #ifdef HAVE_ELEMENTARY_X
1376 static Ecore_X_Atom atom = 0;
1377 unsigned int size_i = (unsigned int)size;
1379 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_FONT_CACHE");
1380 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1386 elm_image_cache_get(void)
1388 return _elm_config->image_cache;
1392 elm_image_cache_set(int size)
1394 if (_elm_config->image_cache == size) return;
1395 _elm_config->image_cache = size;
1401 elm_image_cache_all_set(int size)
1403 #ifdef HAVE_ELEMENTARY_X
1404 static Ecore_X_Atom atom = 0;
1405 unsigned int size_i = (unsigned int)size;
1407 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_IMAGE_CACHE");
1408 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1414 elm_edje_file_cache_get(void)
1416 return _elm_config->edje_cache;
1420 elm_edje_file_cache_set(int size)
1422 if (_elm_config->edje_cache == size) return;
1423 _elm_config->edje_cache = size;
1429 elm_edje_file_cache_all_set(int size)
1431 #ifdef HAVE_ELEMENTARY_X
1432 static Ecore_X_Atom atom = 0;
1433 unsigned int size_i = (unsigned int)size;
1435 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_EDJE_FILE_CACHE");
1436 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1442 elm_edje_collection_cache_get(void)
1444 return _elm_config->edje_collection_cache;
1448 elm_edje_collection_cache_set(int size)
1450 if (_elm_config->edje_collection_cache == size) return;
1451 _elm_config->edje_collection_cache = size;
1457 elm_edje_collection_cache_all_set(int size)
1459 #ifdef HAVE_ELEMENTARY_X
1460 static Ecore_X_Atom atom = 0;
1461 unsigned int size_i = (unsigned int)size;
1463 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_EDJE_COLLECTION_CACHE");
1464 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1470 elm_object_focus_get(const Evas_Object *obj)
1472 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1473 return elm_widget_focus_get(obj);
1477 elm_object_focus_set(Evas_Object *obj,
1480 EINA_SAFETY_ON_NULL_RETURN(obj);
1483 if (elm_widget_focus_get(obj)) return;
1484 elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
1488 if (!elm_widget_can_focus_get(obj)) return;
1489 elm_widget_focused_object_clear(obj);
1494 elm_object_focus(Evas_Object *obj)
1496 EINA_SAFETY_ON_NULL_RETURN(obj);
1497 elm_object_focus_set(obj, EINA_TRUE);
1501 elm_object_unfocus(Evas_Object *obj)
1503 EINA_SAFETY_ON_NULL_RETURN(obj);
1504 elm_object_focus_set(obj, EINA_FALSE);
1508 elm_object_focus_allow_set(Evas_Object *obj,
1511 EINA_SAFETY_ON_NULL_RETURN(obj);
1512 elm_widget_can_focus_set(obj, enable);
1516 elm_object_focus_allow_get(const Evas_Object *obj)
1518 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1519 return (elm_widget_can_focus_get(obj)) || (elm_widget_child_can_focus_get(obj));
1523 elm_object_focus_custom_chain_set(Evas_Object *obj,
1526 EINA_SAFETY_ON_NULL_RETURN(obj);
1527 elm_widget_focus_custom_chain_set(obj, objs);
1531 elm_object_focus_custom_chain_unset(Evas_Object *obj)
1533 EINA_SAFETY_ON_NULL_RETURN(obj);
1534 elm_widget_focus_custom_chain_unset(obj);
1537 EAPI const Eina_List *
1538 elm_object_focus_custom_chain_get(const Evas_Object *obj)
1540 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
1541 return elm_widget_focus_custom_chain_get(obj);
1545 elm_object_focus_custom_chain_append(Evas_Object *obj,
1547 Evas_Object *relative_child)
1549 EINA_SAFETY_ON_NULL_RETURN(obj);
1550 EINA_SAFETY_ON_NULL_RETURN(child);
1551 elm_widget_focus_custom_chain_append(obj, child, relative_child);
1555 elm_object_focus_custom_chain_prepend(Evas_Object *obj,
1557 Evas_Object *relative_child)
1559 EINA_SAFETY_ON_NULL_RETURN(obj);
1560 EINA_SAFETY_ON_NULL_RETURN(child);
1561 elm_widget_focus_custom_chain_prepend(obj, child, relative_child);
1565 elm_object_focus_cycle(Evas_Object *obj,
1566 Elm_Focus_Direction dir)
1568 EINA_SAFETY_ON_NULL_RETURN(obj);
1569 elm_widget_focus_cycle(obj, dir);
1573 elm_object_focus_direction_go(Evas_Object *obj,
1577 EINA_SAFETY_ON_NULL_RETURN(obj);
1578 elm_widget_focus_direction_go(obj, x, y);
1582 elm_object_tree_unfocusable_set(Evas_Object *obj,
1583 Eina_Bool tree_unfocusable)
1585 EINA_SAFETY_ON_NULL_RETURN(obj);
1586 elm_widget_tree_unfocusable_set(obj, tree_unfocusable);
1590 elm_object_tree_unfocusable_get(const Evas_Object *obj)
1592 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1593 return elm_widget_tree_unfocusable_get(obj);
1597 elm_focus_highlight_enabled_get(void)
1599 return _elm_config->focus_highlight_enable;
1603 elm_focus_highlight_enabled_set(Eina_Bool enable)
1605 _elm_config->focus_highlight_enable = !!enable;
1609 elm_focus_highlight_animate_get(void)
1611 return _elm_config->focus_highlight_animate;
1615 elm_focus_highlight_animate_set(Eina_Bool animate)
1617 _elm_config->focus_highlight_animate = !!animate;
1621 elm_scroll_bounce_enabled_get(void)
1623 return _elm_config->thumbscroll_bounce_enable;
1627 elm_scroll_bounce_enabled_set(Eina_Bool enabled)
1629 _elm_config->thumbscroll_bounce_enable = enabled;
1633 elm_scroll_bounce_enabled_all_set(Eina_Bool enabled)
1635 #ifdef HAVE_ELEMENTARY_X
1636 static Ecore_X_Atom atom = 0;
1637 unsigned int bounce_enable_i = (unsigned int)enabled;
1640 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BOUNCE_ENABLE");
1641 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1642 atom, &bounce_enable_i, 1);
1647 elm_scroll_bounce_friction_get(void)
1649 return _elm_config->thumbscroll_bounce_friction;
1653 elm_scroll_bounce_friction_set(double friction)
1655 _elm_config->thumbscroll_bounce_friction = friction;
1659 elm_scroll_bounce_friction_all_set(double friction)
1661 #ifdef HAVE_ELEMENTARY_X
1662 static Ecore_X_Atom atom = 0;
1663 unsigned int bounce_friction_i = (unsigned int)(friction * 1000.0);
1666 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BOUNCE_FRICTION");
1667 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1668 atom, &bounce_friction_i, 1);
1673 elm_scroll_page_scroll_friction_get(void)
1675 return _elm_config->page_scroll_friction;
1679 elm_scroll_page_scroll_friction_set(double friction)
1681 _elm_config->page_scroll_friction = friction;
1685 elm_scroll_page_scroll_friction_all_set(double friction)
1687 #ifdef HAVE_ELEMENTARY_X
1688 static Ecore_X_Atom atom = 0;
1689 unsigned int page_scroll_friction_i = (unsigned int)(friction * 1000.0);
1692 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_PAGE_SCROLL_FRICTION");
1693 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1694 atom, &page_scroll_friction_i, 1);
1699 elm_scroll_bring_in_scroll_friction_get(void)
1701 return _elm_config->bring_in_scroll_friction;
1705 elm_scroll_bring_in_scroll_friction_set(double friction)
1707 _elm_config->bring_in_scroll_friction = friction;
1711 elm_scroll_bring_in_scroll_friction_all_set(double friction)
1713 #ifdef HAVE_ELEMENTARY_X
1714 static Ecore_X_Atom atom = 0;
1715 unsigned int bring_in_scroll_friction_i = (unsigned int)(friction * 1000.0);
1719 ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BRING_IN_SCROLL_FRICTION");
1720 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1721 atom, &bring_in_scroll_friction_i, 1);
1726 elm_scroll_zoom_friction_get(void)
1728 return _elm_config->zoom_friction;
1732 elm_scroll_zoom_friction_set(double friction)
1734 _elm_config->zoom_friction = friction;
1738 elm_scroll_zoom_friction_all_set(double friction)
1740 #ifdef HAVE_ELEMENTARY_X
1741 static Ecore_X_Atom atom = 0;
1742 unsigned int zoom_friction_i = (unsigned int)(friction * 1000.0);
1745 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_ZOOM_FRICTION");
1746 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1747 atom, &zoom_friction_i, 1);
1752 elm_scroll_thumbscroll_enabled_get(void)
1754 return _elm_config->thumbscroll_enable;
1758 elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled)
1760 _elm_config->thumbscroll_enable = enabled;
1764 elm_scroll_thumbscroll_enabled_all_set(Eina_Bool enabled)
1766 #ifdef HAVE_ELEMENTARY_X
1767 static Ecore_X_Atom atom = 0;
1768 unsigned int ts_enable_i = (unsigned int)enabled;
1770 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_ENABLE");
1771 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1772 atom, &ts_enable_i, 1);
1777 elm_scroll_thumbscroll_threshold_get(void)
1779 return _elm_config->thumbscroll_threshold;
1783 elm_scroll_thumbscroll_threshold_set(unsigned int threshold)
1785 _elm_config->thumbscroll_threshold = threshold;
1789 elm_scroll_thumbscroll_threshold_all_set(unsigned int threshold)
1791 #ifdef HAVE_ELEMENTARY_X
1792 static Ecore_X_Atom atom = 0;
1793 unsigned int ts_threshold_i = (unsigned int)threshold;
1795 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_THRESHOLD");
1796 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1797 atom, &ts_threshold_i, 1);
1802 elm_scroll_thumbscroll_momentum_threshold_get(void)
1804 return _elm_config->thumbscroll_momentum_threshold;
1808 elm_scroll_thumbscroll_momentum_threshold_set(double threshold)
1810 _elm_config->thumbscroll_momentum_threshold = threshold;
1814 elm_scroll_thumbscroll_momentum_threshold_all_set(double threshold)
1816 #ifdef HAVE_ELEMENTARY_X
1817 static Ecore_X_Atom atom = 0;
1818 unsigned int ts_momentum_threshold_i = (unsigned int)(threshold * 1000.0);
1821 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_MOMENTUM_THRESHOLD");
1822 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1823 atom, &ts_momentum_threshold_i, 1);
1828 elm_scroll_thumbscroll_friction_get(void)
1830 return _elm_config->thumbscroll_friction;
1834 elm_scroll_thumbscroll_friction_set(double friction)
1836 _elm_config->thumbscroll_friction = friction;
1840 elm_scroll_thumbscroll_friction_all_set(double friction)
1842 #ifdef HAVE_ELEMENTARY_X
1843 static Ecore_X_Atom atom = 0;
1844 unsigned int ts_friction_i = (unsigned int)(friction * 1000.0);
1846 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_FRICTION");
1847 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1848 atom, &ts_friction_i, 1);
1853 elm_scroll_thumbscroll_border_friction_get(void)
1855 return _elm_config->thumbscroll_border_friction;
1859 elm_scroll_thumbscroll_border_friction_set(double friction)
1867 _elm_config->thumbscroll_friction = friction;
1871 elm_scroll_thumbscroll_border_friction_all_set(double friction)
1879 #ifdef HAVE_ELEMENTARY_X
1880 static Ecore_X_Atom atom = 0;
1881 unsigned int border_friction_i = (unsigned int)(friction * 1000.0);
1884 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BORDER_FRICTION");
1885 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1886 atom, &border_friction_i, 1);
1891 elm_scroll_thumbscroll_sensitivity_friction_get(void)
1893 return _elm_config->thumbscroll_sensitivity_friction;
1897 elm_scroll_thumbscroll_sensitivity_friction_set(double friction)
1905 _elm_config->thumbscroll_friction = friction;
1909 elm_scroll_thumbscroll_sensitivity_friction_all_set(double friction)
1917 #ifdef HAVE_ELEMENTARY_X
1918 static Ecore_X_Atom atom = 0;
1919 unsigned int sensitivity_friction_i = (unsigned int)(friction * 1000.0);
1922 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_SENSITIVITY_FRICTION");
1923 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1924 atom, &sensitivity_friction_i, 1);
1929 elm_object_scroll_hold_push(Evas_Object *obj)
1931 EINA_SAFETY_ON_NULL_RETURN(obj);
1932 elm_widget_scroll_hold_push(obj);
1936 elm_object_scroll_hold_pop(Evas_Object *obj)
1938 EINA_SAFETY_ON_NULL_RETURN(obj);
1939 elm_widget_scroll_hold_pop(obj);
1943 elm_object_scroll_freeze_push(Evas_Object *obj)
1945 EINA_SAFETY_ON_NULL_RETURN(obj);
1946 elm_widget_scroll_freeze_push(obj);
1950 elm_object_scroll_lock_x_set(Evas_Object *obj,
1953 EINA_SAFETY_ON_NULL_RETURN(obj);
1954 elm_widget_drag_lock_x_set(obj, lock);
1958 elm_object_scroll_lock_y_set(Evas_Object *obj,
1961 EINA_SAFETY_ON_NULL_RETURN(obj);
1962 elm_widget_drag_lock_y_set(obj, lock);
1966 elm_object_scroll_lock_x_get(const Evas_Object *obj)
1968 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1969 return elm_widget_drag_lock_x_get(obj);
1973 elm_object_scroll_lock_y_get(const Evas_Object *obj)
1975 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1976 return elm_widget_drag_lock_y_get(obj);
1980 elm_object_scroll_freeze_pop(Evas_Object *obj)
1982 EINA_SAFETY_ON_NULL_RETURN(obj);
1983 elm_widget_scroll_freeze_pop(obj);
1987 elm_object_widget_check(const Evas_Object *obj)
1989 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1990 return elm_widget_is(obj);
1994 elm_object_parent_widget_get(const Evas_Object *obj)
1996 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
1997 return elm_widget_parent_widget_get(obj);
2001 elm_object_top_widget_get(const Evas_Object *obj)
2003 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
2004 return elm_widget_top_get(obj);
2008 elm_object_widget_type_get(const Evas_Object *obj)
2010 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
2011 return elm_widget_type_get(obj);
2015 elm_object_signal_emit(Evas_Object *obj,
2016 const char *emission,
2019 EINA_SAFETY_ON_NULL_RETURN(obj);
2020 elm_widget_signal_emit(obj, emission, source);
2024 elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data)
2026 EINA_SAFETY_ON_NULL_RETURN(obj);
2027 EINA_SAFETY_ON_NULL_RETURN(func);
2028 elm_widget_signal_callback_add(obj, emission, source, func, data);
2032 elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func)
2034 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
2035 EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL);
2036 return elm_widget_signal_callback_del(obj, emission, source, func);
2040 elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data)
2042 EINA_SAFETY_ON_NULL_RETURN(obj);
2043 EINA_SAFETY_ON_NULL_RETURN(func);
2044 elm_widget_event_callback_add(obj, func, data);
2048 elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data)
2050 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
2051 EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL);
2052 return elm_widget_event_callback_del(obj, func, data);
2056 elm_object_tree_dump(const Evas_Object *top)
2059 elm_widget_tree_dump(top);
2067 elm_object_tree_dot_dump(const Evas_Object *top,
2071 FILE *f = fopen(file, "wb");
2072 elm_widget_tree_dot_dump(top, f);
2082 elm_longpress_timeout_set(double longpress_timeout)
2084 _elm_config->longpress_timeout = longpress_timeout;
2088 elm_longpress_timeout_get(void)
2090 return _elm_config->longpress_timeout;
2094 elm_object_item_object_get(const Elm_Object_Item *it)
2096 return ((Elm_Widget_Item *) it)->widget;
2100 elm_object_item_content_part_set(Elm_Object_Item *it,
2102 Evas_Object *content)
2104 _elm_widget_item_content_part_set(ELM_CAST(it), part, content);
2108 elm_object_item_content_part_get(const Elm_Object_Item *it,
2111 return _elm_widget_item_content_part_get(ELM_CAST(it), part);
2115 elm_object_item_content_part_unset(Elm_Object_Item *it, const char *part)
2117 return _elm_widget_item_content_part_unset(ELM_CAST(it), part);
2121 elm_object_item_text_part_set(Elm_Object_Item *it,
2125 _elm_widget_item_text_part_set(ELM_CAST(it), part, label);
2129 elm_object_item_text_part_get(const Elm_Object_Item *it, const char *part)
2131 return _elm_widget_item_text_part_get(ELM_CAST(it), part);
2135 elm_object_access_info_set(Evas_Object *obj, const char *txt)
2137 elm_widget_access_info_set(obj, txt);
2141 elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt)
2143 _elm_widget_item_access_info_set(ELM_CAST(it), txt);
2147 elm_object_item_data_get(const Elm_Object_Item *it)
2149 return elm_widget_item_data_get(it);
2153 elm_object_item_data_set(Elm_Object_Item *it, void *data)
2155 elm_widget_item_data_set(it, data);
2159 elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source)
2161 _elm_widget_item_signal_emit(ELM_CAST(it), emission, source);