2 # include "elementary_config.h"
6 #include <dlfcn.h> /* dlopen,dlclose,etc */
9 #ifdef HAVE_CRT_EXTERNS_H
10 # include <crt_externs.h>
17 #include <Elementary.h>
20 #define SEMI_BROKEN_QUICKLAUNCH 1
22 static Elm_Version _version = { VMAJ, VMIN, VMIC, VREV };
23 EAPI Elm_Version *elm_version = &_version;
26 _elm_dangerous_call_check(const char *call)
31 snprintf(buf, sizeof(buf), "%i.%i.%i.%i", VMAJ, VMIN, VMIC, VREV);
32 eval = getenv("ELM_NO_FINGER_WAGGLING");
33 if ((eval) && (!strcmp(eval, buf)))
35 printf("ELEMENTARY FINGER WAGGLE!!!!!!!!!!\n"
38 "PLEASE see the API documentation for this function. This call\n"
39 "should almost never be used. Only in very special cases.\n"
41 "To remove this warning please set the environment variable:\n"
42 " ELM_NO_FINGER_WAGGLING\n"
43 "To the value of the Elementary version + revision number. e.g.:\n"
51 static Eina_Bool _elm_signal_exit(void *data,
55 static Eina_Prefix *pfx = NULL;
56 char *_elm_appname = NULL;
57 const char *_elm_data_dir = NULL;
58 const char *_elm_lib_dir = NULL;
59 int _elm_log_dom = -1;
61 EAPI int ELM_EVENT_POLICY_CHANGED = 0;
63 static int _elm_init_count = 0;
64 static int _elm_sub_init_count = 0;
65 static int _elm_ql_init_count = 0;
66 static int _elm_policies[ELM_POLICY_LAST];
67 static Ecore_Event_Handler *_elm_exit_handler = NULL;
68 static Eina_Bool quicklaunch_on = 0;
71 _elm_signal_exit(void *data __UNUSED__,
72 int ev_type __UNUSED__,
76 return ECORE_CALLBACK_PASS_ON;
82 edje_scale_set(_elm_config->scale);
83 _elm_win_rescale(NULL, EINA_FALSE);
86 static void *app_mainfunc = NULL;
87 static const char *app_domain = NULL;
88 static const char *app_checkfile = NULL;
90 static const char *app_compile_bin_dir = NULL;
91 static const char *app_compile_lib_dir = NULL;
92 static const char *app_compile_data_dir = NULL;
93 static const char *app_compile_locale_dir = NULL;
94 static const char *app_prefix_dir = NULL;
95 static const char *app_bin_dir = NULL;
96 static const char *app_lib_dir = NULL;
97 static const char *app_data_dir = NULL;
98 static const char *app_locale_dir = NULL;
100 static Eina_Prefix *app_pfx = NULL;
107 const char *dirs[4] = { NULL, NULL, NULL, NULL };
108 char *caps = NULL, *p1, *p2;
111 if (!app_domain) return;
113 ecore_app_args_get(&argc, &argv);
114 if (argc < 1) return;
116 dirs[0] = app_compile_bin_dir;
117 dirs[1] = app_compile_lib_dir;
118 dirs[2] = app_compile_data_dir;
119 dirs[3] = app_compile_locale_dir;
121 if (!dirs[1]) dirs[1] = dirs[0];
122 if (!dirs[0]) dirs[0] = dirs[1];
123 if (!dirs[3]) dirs[3] = dirs[2];
124 if (!dirs[2]) dirs[2] = dirs[3];
128 caps = alloca(strlen(app_domain) + 1);
129 for (p1 = (char *)app_domain, p2 = caps; *p1; p1++, p2++)
133 app_pfx = eina_prefix_new(argv[0], app_mainfunc, caps, app_domain,
134 app_checkfile, dirs[0], dirs[1], dirs[2], dirs[3]);
138 _prefix_shutdown(void)
140 if (app_pfx) eina_prefix_free(app_pfx);
141 if (app_domain) eina_stringshare_del(app_domain);
142 if (app_checkfile) eina_stringshare_del(app_checkfile);
143 if (app_compile_bin_dir) eina_stringshare_del(app_compile_bin_dir);
144 if (app_compile_lib_dir) eina_stringshare_del(app_compile_lib_dir);
145 if (app_compile_data_dir) eina_stringshare_del(app_compile_data_dir);
146 if (app_compile_locale_dir) eina_stringshare_del(app_compile_locale_dir);
147 if (app_prefix_dir) eina_stringshare_del(app_prefix_dir);
148 if (app_bin_dir) eina_stringshare_del(app_bin_dir);
149 if (app_lib_dir) eina_stringshare_del(app_lib_dir);
150 if (app_data_dir) eina_stringshare_del(app_data_dir);
151 if (app_locale_dir) eina_stringshare_del(app_locale_dir);
154 app_checkfile = NULL;
155 app_compile_bin_dir = NULL;
156 app_compile_lib_dir = NULL;
157 app_compile_data_dir = NULL;
158 app_compile_locale_dir = NULL;
159 app_prefix_dir = NULL;
163 app_locale_dir = NULL;
172 if (_elm_init_count > 1) return _elm_init_count;
173 elm_quicklaunch_init(argc, argv);
174 elm_quicklaunch_sub_init(argc, argv);
176 return _elm_init_count;
183 if (_elm_init_count > 0) return _elm_init_count;
185 while (_elm_win_deferred_free) ecore_main_loop_iterate();
187 // _prefix_shutdown();
188 elm_quicklaunch_sub_shutdown();
189 elm_quicklaunch_shutdown();
190 return _elm_init_count;
194 elm_app_info_set(void *mainfunc, const char *dom, const char *checkfile)
196 app_mainfunc = mainfunc;
197 eina_stringshare_replace(&app_domain, dom);
198 eina_stringshare_replace(&app_checkfile, checkfile);
202 elm_app_compile_bin_dir_set(const char *dir)
204 eina_stringshare_replace(&app_compile_bin_dir, dir);
208 elm_app_compile_lib_dir_set(const char *dir)
210 eina_stringshare_replace(&app_compile_lib_dir, dir);
214 elm_app_compile_data_dir_set(const char *dir)
216 eina_stringshare_replace(&app_compile_data_dir, dir);
220 elm_app_compile_locale_set(const char *dir)
222 eina_stringshare_replace(&app_compile_locale_dir, dir);
226 elm_app_prefix_dir_get(void)
228 if (app_prefix_dir) return app_prefix_dir;
230 if (!app_pfx) return "";
231 app_prefix_dir = eina_prefix_get(app_pfx);
232 return app_prefix_dir;
236 elm_app_bin_dir_get(void)
238 if (app_bin_dir) return app_bin_dir;
240 if (!app_pfx) return "";
241 app_bin_dir = eina_prefix_bin_get(app_pfx);
246 elm_app_lib_dir_get(void)
248 if (app_lib_dir) return app_lib_dir;
250 if (!app_pfx) return "";
251 app_lib_dir = eina_prefix_lib_get(app_pfx);
256 elm_app_data_dir_get(void)
258 if (app_data_dir) return app_data_dir;
260 if (!app_pfx) return "";
261 app_data_dir = eina_prefix_data_get(app_pfx);
266 elm_app_locale_dir_get(void)
268 if (app_locale_dir) return app_locale_dir;
270 if (!app_pfx) return "";
271 app_locale_dir = eina_prefix_locale_get(app_pfx);
272 return app_locale_dir;
276 static int _elm_need_e_dbus = 0;
279 elm_need_e_dbus(void)
282 if (_elm_need_e_dbus++) return EINA_TRUE;
291 _elm_unneed_e_dbus(void)
294 if (--_elm_need_e_dbus) return;
296 _elm_need_e_dbus = 0;
302 static int _elm_need_efreet = 0;
305 elm_need_efreet(void)
308 if (_elm_need_efreet++) return EINA_TRUE;
316 list = efreet_icon_extra_list_get();
319 e_user_dir_concat_static(buf, "icons");
320 *list = eina_list_prepend(*list, (void *)eina_stringshare_add(buf));
321 e_prefix_data_concat_static(buf, "data/icons");
322 *list = eina_list_prepend(*list, (void *)eina_stringshare_add(buf));
333 _elm_unneed_efreet(void)
336 if (--_elm_need_efreet) return;
338 _elm_need_efreet = 0;
339 efreet_trash_shutdown();
340 efreet_mime_shutdown();
346 elm_quicklaunch_mode_set(Eina_Bool ql_on)
348 quicklaunch_on = ql_on;
352 elm_quicklaunch_mode_get(void)
354 return quicklaunch_on;
358 elm_quicklaunch_init(int argc,
361 _elm_ql_init_count++;
362 if (_elm_ql_init_count > 1) return _elm_ql_init_count;
364 _elm_log_dom = eina_log_domain_register("elementary", EINA_COLOR_LIGHTBLUE);
367 EINA_LOG_ERR("could not register elementary log domain.");
368 _elm_log_dom = EINA_LOG_DOMAIN_GLOBAL;
374 #ifdef HAVE_ELEMENTARY_EMAP
377 ecore_app_args_set(argc, (const char **)argv);
379 memset(_elm_policies, 0, sizeof(_elm_policies));
380 if (!ELM_EVENT_POLICY_CHANGED)
381 ELM_EVENT_POLICY_CHANGED = ecore_event_type_new();
385 _elm_exit_handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _elm_signal_exit, NULL);
387 if (argv) _elm_appname = strdup(ecore_file_file_get(argv[0]));
389 pfx = eina_prefix_new(NULL, elm_quicklaunch_init,
390 "ELM", "elementary", "config/profile.cfg",
391 PACKAGE_LIB_DIR, /* don't have a bin dir currently */
397 _elm_data_dir = eina_stringshare_add(eina_prefix_data_get(pfx));
398 _elm_lib_dir = eina_stringshare_add(eina_prefix_lib_get(pfx));
400 if (!_elm_data_dir) _elm_data_dir = eina_stringshare_add("/");
401 if (!_elm_lib_dir) _elm_lib_dir = eina_stringshare_add("/");
404 return _elm_ql_init_count;
408 elm_quicklaunch_sub_init(int argc,
411 _elm_sub_init_count++;
412 if (_elm_sub_init_count > 1) return _elm_sub_init_count;
415 #ifdef SEMI_BROKEN_QUICKLAUNCH
416 return _elm_sub_init_count;
421 ecore_app_args_set(argc, (const char **)argv);
425 _elm_config_sub_init();
426 #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
427 if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
428 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
429 ENGINE_COMPARE(ELM_XRENDER_X11) ||
430 ENGINE_COMPARE(ELM_OPENGL_X11))
431 #undef ENGINE_COMPARE
433 #ifdef HAVE_ELEMENTARY_X
437 ecore_evas_init(); // FIXME: check errors
440 ecore_con_url_init();
442 return _elm_sub_init_count;
446 elm_quicklaunch_sub_shutdown(void)
448 _elm_sub_init_count--;
449 if (_elm_sub_init_count > 0) return _elm_sub_init_count;
452 #ifdef SEMI_BROKEN_QUICKLAUNCH
453 return _elm_sub_init_count;
459 _elm_module_shutdown();
460 ecore_con_url_shutdown();
461 ecore_con_shutdown();
462 ecore_imf_shutdown();
463 ecore_evas_shutdown();
464 #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
465 if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
466 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
467 ENGINE_COMPARE(ELM_XRENDER_X11) ||
468 ENGINE_COMPARE(ELM_OPENGL_X11))
469 #undef ENGINE_COMPARE
471 #ifdef HAVE_ELEMENTARY_X
472 ecore_x_disconnect();
475 #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
476 if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
477 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
478 ENGINE_COMPARE(ELM_XRENDER_X11) ||
479 ENGINE_COMPARE(ELM_OPENGL_X11) ||
480 ENGINE_COMPARE(ELM_SOFTWARE_SDL) ||
481 ENGINE_COMPARE(ELM_SOFTWARE_16_SDL) ||
482 ENGINE_COMPARE(ELM_OPENGL_SDL) ||
483 ENGINE_COMPARE(ELM_OPENGL_COCOA) ||
484 ENGINE_COMPARE(ELM_SOFTWARE_WIN32) ||
485 ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE))
486 #undef ENGINE_COMPARE
487 evas_cserve_disconnect();
491 return _elm_sub_init_count;
495 elm_quicklaunch_shutdown(void)
497 _elm_ql_init_count--;
498 if (_elm_ql_init_count > 0) return _elm_ql_init_count;
499 if (pfx) eina_prefix_free(pfx);
501 eina_stringshare_del(_elm_data_dir);
502 _elm_data_dir = NULL;
503 eina_stringshare_del(_elm_lib_dir);
509 _elm_config_shutdown();
511 ecore_event_handler_del(_elm_exit_handler);
512 _elm_exit_handler = NULL;
514 _elm_theme_shutdown();
515 _elm_unneed_efreet();
516 _elm_unneed_e_dbus();
517 _elm_unneed_ethumb();
519 ecore_file_shutdown();
521 #ifdef HAVE_ELEMENTARY_EMAP
528 if ((_elm_log_dom > -1) && (_elm_log_dom != EINA_LOG_DOMAIN_GLOBAL))
530 eina_log_domain_unregister(_elm_log_dom);
534 _elm_widget_type_clear();
537 return _elm_ql_init_count;
541 elm_quicklaunch_seed(void)
543 #ifndef SEMI_BROKEN_QUICKLAUNCH
546 Evas_Object *win, *bg, *bt;
548 win = elm_win_add(NULL, "seed", ELM_WIN_BASIC);
549 bg = elm_bg_add(win);
550 elm_win_resize_object_add(win, bg);
551 evas_object_show(bg);
552 bt = elm_button_add(win);
553 elm_button_label_set(bt, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~-_=+\\|]}[{;:'\",<.>/?");
554 elm_win_resize_object_add(win, bt);
555 ecore_main_loop_iterate();
556 evas_object_del(win);
557 ecore_main_loop_iterate();
558 #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
559 if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
560 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
561 ENGINE_COMPARE(ELM_XRENDER_X11) ||
562 ENGINE_COMPARE(ELM_OPENGL_X11))
563 #undef ENGINE_COMPARE
565 # ifdef HAVE_ELEMENTARY_X
569 ecore_main_loop_iterate();
574 static void *qr_handle = NULL;
575 static int (*qr_main)(int argc,
579 elm_quicklaunch_prepare(int argc __UNUSED__,
583 char *exe = elm_quicklaunch_exe_path_get(argv[0]);
586 ERR("requested quicklaunch binary '%s' does not exist\n", argv[0]);
594 exe2 = malloc(strlen(exe) + 1 + 10);
596 p = strrchr(exe2, '/');
599 exename = alloca(strlen(p) + 1);
602 strcat(p, "../lib/");
605 if (!access(exe2, R_OK | X_OK))
613 qr_handle = dlopen(exe, RTLD_NOW | RTLD_GLOBAL);
616 fprintf(stderr, "dlerr: %s\n", dlerror());
617 WRN("dlopen('%s') failed: %s", exe, dlerror());
621 INF("dlopen('%s') = %p", exe, qr_handle);
622 qr_main = dlsym(qr_handle, "elm_main");
623 INF("dlsym(%p, 'elm_main') = %p", qr_handle, qr_main);
626 WRN("not quicklauncher capable: no elm_main in '%s'", exe);
645 extern char **environ;
650 for (i = 0, size = 0; environ[i]; i++)
651 size += strlen(environ[i]) + 1;
653 p = malloc((i + 1) * sizeof(char *));
658 for (i = 0; oldenv[i]; i++)
659 environ[i] = strdup(oldenv[i]);
666 elm_quicklaunch_fork(int argc,
669 void (postfork_func) (void *data),
679 // need to accept current environment from elementary_run
686 if (child > 0) return EINA_TRUE;
689 perror("could not fork");
694 perror("could not chdir");
695 args = alloca((argc + 1) * sizeof(char *));
696 for (i = 0; i < argc; i++) args[i] = argv[i];
698 WRN("%s not quicklaunch capable, fallback...", argv[0]);
699 execvp(argv[0], args);
700 ERR("failed to execute '%s': %s", argv[0], strerror(errno));
704 if (child > 0) return EINA_TRUE;
707 perror("could not fork");
710 if (postfork_func) postfork_func(postfork_data);
714 #ifdef SEMI_BROKEN_QUICKLAUNCH
715 ecore_app_args_set(argc, (const char **)argv);
718 _elm_config_sub_init();
719 #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
720 if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
721 ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
722 ENGINE_COMPARE(ELM_XRENDER_X11) ||
723 ENGINE_COMPARE(ELM_OPENGL_X11))
724 #undef ENGINE_COMPARE
726 # ifdef HAVE_ELEMENTARY_X
730 ecore_evas_init(); // FIXME: check errors
738 perror("could not chdir");
739 // FIXME: this is very linux specific. it changes argv[0] of the process
740 // so ps etc. report what you'd expect. for other unixes and os's this
747 ecore_app_args_get(&real_argc, &real_argv);
748 lastarg = real_argv[real_argc - 1] + strlen(real_argv[real_argc - 1]);
749 for (p = real_argv[0]; p < lastarg; p++) *p = 0;
750 strcpy(real_argv[0], argv[0]);
752 ecore_app_args_set(argc, (const char **)argv);
753 ret = qr_main(argc, argv);
767 elm_quicklaunch_cleanup(void)
780 elm_quicklaunch_fallback(int argc,
784 elm_quicklaunch_init(argc, argv);
785 elm_quicklaunch_sub_init(argc, argv);
786 elm_quicklaunch_prepare(argc, argv);
787 ret = qr_main(argc, argv);
793 elm_quicklaunch_exe_path_get(const char *exe)
795 static char *path = NULL;
796 static Eina_List *pathlist = NULL;
800 if (exe[0] == '/') return strdup(exe);
801 if ((exe[0] == '.') && (exe[1] == '/')) return strdup(exe);
802 if ((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/')) return strdup(exe);
807 path = getenv("PATH");
808 buf2 = alloca(strlen(path) + 1);
813 if ((*p == ':') || (!*p))
818 strncpy(buf2, pp, len);
820 pathlist = eina_list_append(pathlist, eina_stringshare_add(buf2));
832 EINA_LIST_FOREACH(pathlist, l, pathitr)
834 snprintf(buf, sizeof(buf), "%s/%s", pathitr, exe);
835 if (!access(buf, R_OK | X_OK)) return strdup(buf);
843 ecore_main_loop_begin();
849 ecore_main_loop_quit();
853 elm_policy_set(unsigned int policy,
856 Elm_Event_Policy_Changed *ev;
858 if (policy >= ELM_POLICY_LAST)
861 if (value == _elm_policies[policy])
864 /* TODO: validade policy? */
866 ev = malloc(sizeof(*ev));
868 ev->new_value = value;
869 ev->old_value = _elm_policies[policy];
871 _elm_policies[policy] = value;
873 ecore_event_add(ELM_EVENT_POLICY_CHANGED, ev, NULL, NULL);
879 elm_policy_get(unsigned int policy)
881 if (policy >= ELM_POLICY_LAST)
883 return _elm_policies[policy];
887 elm_language_set(const char *lang)
889 setlocale(LC_ALL, lang);
890 _elm_win_translate();
894 elm_object_mirrored_get(const Evas_Object *obj)
896 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
897 return elm_widget_mirrored_get(obj);
901 elm_object_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
903 EINA_SAFETY_ON_NULL_RETURN(obj);
904 elm_widget_mirrored_set(obj, mirrored);
908 elm_object_mirrored_automatic_get(const Evas_Object *obj)
910 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
911 return elm_widget_mirrored_automatic_get(obj);
915 elm_object_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic)
917 EINA_SAFETY_ON_NULL_RETURN(obj);
918 elm_widget_mirrored_automatic_set(obj, automatic);
922 elm_object_scale_set(Evas_Object *obj,
925 EINA_SAFETY_ON_NULL_RETURN(obj);
926 elm_widget_scale_set(obj, scale);
930 elm_object_scale_get(const Evas_Object *obj)
932 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0.0);
933 return elm_widget_scale_get(obj);
937 elm_object_text_part_set(Evas_Object *obj, const char *part, const char *label)
939 EINA_SAFETY_ON_NULL_RETURN(obj);
940 elm_widget_text_part_set(obj, part, label);
944 elm_object_text_part_get(const Evas_Object *obj, const char *part)
946 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
947 return elm_widget_text_part_get(obj, part);
951 elm_object_domain_translatable_text_part_set(Evas_Object *obj, const char *part, const char *domain, const char *text)
953 EINA_SAFETY_ON_NULL_RETURN(obj);
954 elm_widget_domain_translatable_text_part_set(obj, part, domain, text);
958 elm_object_translatable_text_part_get(const Evas_Object *obj, const char *part)
960 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
961 return elm_widget_translatable_text_part_get(obj, part);
965 elm_object_content_part_set(Evas_Object *obj, const char *part, Evas_Object *content)
967 EINA_SAFETY_ON_NULL_RETURN(obj);
968 elm_widget_content_part_set(obj, part, content);
972 elm_object_content_part_get(const Evas_Object *obj, const char *part)
974 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
975 return elm_widget_content_part_get(obj, part);
979 elm_object_content_part_unset(Evas_Object *obj, const char *part)
981 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
982 return elm_widget_content_part_unset(obj, part);
988 return _elm_config->scale;
992 elm_scale_set(double scale)
994 if (_elm_config->scale == scale) return;
995 _elm_config->scale = scale;
1000 elm_scale_all_set(double scale)
1002 #ifdef HAVE_ELEMENTARY_X
1003 static Ecore_X_Atom atom = 0;
1004 unsigned int scale_i = (unsigned int)(scale * 1000.0);
1006 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_SCALE");
1007 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1013 elm_password_show_last_get(void)
1015 return _elm_config->password_show_last;
1019 elm_password_show_last_set(Eina_Bool password_show_last)
1021 if (_elm_config->password_show_last == password_show_last) return;
1022 _elm_config->password_show_last = password_show_last;
1023 edje_password_show_last_set(_elm_config->password_show_last);
1027 elm_password_show_last_timeout_get(void)
1029 return _elm_config->password_show_last_timeout;
1033 elm_password_show_last_timeout_set(double password_show_last_timeout)
1035 if (_elm_config->password_show_last_timeout == password_show_last_timeout) return;
1036 _elm_config->password_show_last_timeout = password_show_last_timeout;
1037 edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
1041 elm_object_style_set(Evas_Object *obj,
1044 EINA_SAFETY_ON_NULL_RETURN(obj);
1045 elm_widget_style_set(obj, style);
1049 elm_object_style_get(const Evas_Object *obj)
1051 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
1052 return elm_widget_style_get(obj);
1056 elm_object_disabled_set(Evas_Object *obj,
1059 EINA_SAFETY_ON_NULL_RETURN(obj);
1060 elm_widget_disabled_set(obj, disabled);
1064 elm_object_disabled_get(const Evas_Object *obj)
1066 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1067 return elm_widget_disabled_get(obj);
1071 elm_config_save(void)
1073 return _elm_config_save();
1077 elm_config_reload(void)
1079 _elm_config_reload();
1083 elm_profile_current_get(void)
1085 return _elm_config_current_profile_get();
1089 elm_profile_dir_get(const char *profile,
1092 return _elm_config_profile_dir_get(profile, is_user);
1096 elm_profile_dir_free(const char *p_dir)
1098 free((void *)p_dir);
1102 elm_profile_list_get(void)
1104 return _elm_config_profiles_list();
1108 elm_profile_list_free(Eina_List *l)
1112 EINA_LIST_FREE(l, dir)
1113 eina_stringshare_del(dir);
1117 elm_profile_set(const char *profile)
1119 EINA_SAFETY_ON_NULL_RETURN(profile);
1120 _elm_config_profile_set(profile);
1124 elm_profile_all_set(const char *profile)
1126 #ifdef HAVE_ELEMENTARY_X
1127 static Ecore_X_Atom atom = 0;
1129 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_PROFILE");
1130 ecore_x_window_prop_string_set(ecore_x_window_root_first_get(),
1136 elm_engine_current_get(void)
1138 return _elm_config->engine;
1142 elm_engine_set(const char *engine)
1144 EINA_SAFETY_ON_NULL_RETURN(engine);
1146 _elm_config_engine_set(engine);
1149 EAPI const Eina_List *
1150 elm_text_classes_list_get(void)
1152 return _elm_config_text_classes_get();
1156 elm_text_classes_list_free(const Eina_List *list)
1158 _elm_config_text_classes_free((Eina_List *)list);
1161 EAPI const Eina_List *
1162 elm_font_overlay_list_get(void)
1164 return _elm_config_font_overlays_list();
1168 elm_font_overlay_set(const char *text_class,
1170 Evas_Font_Size size)
1172 _elm_config_font_overlay_set(text_class, font, size);
1176 elm_font_overlay_unset(const char *text_class)
1178 _elm_config_font_overlay_remove(text_class);
1182 elm_font_overlay_apply(void)
1184 _elm_config_font_overlay_apply();
1188 elm_font_overlay_all_apply(void)
1190 #ifdef HAVE_ELEMENTARY_X
1191 static Ecore_X_Atom atom = 0;
1192 unsigned int dummy = (unsigned int)(1 * 1000.0);
1194 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_FONT_OVERLAY");
1195 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(), atom, &dummy,
1200 EAPI Elm_Font_Properties *
1201 elm_font_properties_get(const char *font)
1203 EINA_SAFETY_ON_NULL_RETURN_VAL(font, NULL);
1204 return _elm_font_properties_get(NULL, font);
1208 elm_font_properties_free(Elm_Font_Properties *efp)
1212 EINA_SAFETY_ON_NULL_RETURN(efp);
1213 EINA_LIST_FREE(efp->styles, str)
1214 if (str) eina_stringshare_del(str);
1215 if (efp->name) eina_stringshare_del(efp->name);
1220 elm_font_fontconfig_name_get(const char *name,
1225 EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
1226 if (!style || style[0] == 0) return eina_stringshare_add(name);
1227 snprintf(buf, 256, "%s" ELM_FONT_TOKEN_STYLE "%s", name, style);
1228 return eina_stringshare_add(buf);
1232 elm_font_fontconfig_name_free(const char *name)
1234 eina_stringshare_del(name);
1238 elm_font_available_hash_add(Eina_List *list)
1240 Eina_Hash *font_hash;
1246 /* populate with default font families */
1247 font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Regular");
1248 font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Bold");
1249 font_hash = _elm_font_available_hash_add(font_hash, "Sans:style=Oblique");
1250 font_hash = _elm_font_available_hash_add(font_hash,
1251 "Sans:style=Bold Oblique");
1253 font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Regular");
1254 font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Bold");
1255 font_hash = _elm_font_available_hash_add(font_hash, "Serif:style=Oblique");
1256 font_hash = _elm_font_available_hash_add(font_hash,
1257 "Serif:style=Bold Oblique");
1259 font_hash = _elm_font_available_hash_add(font_hash,
1260 "Monospace:style=Regular");
1261 font_hash = _elm_font_available_hash_add(font_hash,
1262 "Monospace:style=Bold");
1263 font_hash = _elm_font_available_hash_add(font_hash,
1264 "Monospace:style=Oblique");
1265 font_hash = _elm_font_available_hash_add(font_hash,
1266 "Monospace:style=Bold Oblique");
1268 EINA_LIST_FOREACH(list, l, key)
1269 font_hash = _elm_font_available_hash_add(font_hash, key);
1275 elm_font_available_hash_del(Eina_Hash *hash)
1277 _elm_font_available_hash_del(hash);
1281 elm_finger_size_get(void)
1283 return _elm_config->finger_size;
1287 elm_finger_size_set(Evas_Coord size)
1289 if (_elm_config->finger_size == size) return;
1290 _elm_config->finger_size = size;
1295 elm_finger_size_all_set(Evas_Coord size)
1297 #ifdef HAVE_ELEMENTARY_X
1298 static Ecore_X_Atom atom = 0;
1299 unsigned int size_i = (unsigned int)size;
1301 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_FINGER_SIZE");
1302 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1308 elm_autocapitalization_allow_all_set(Eina_Bool on)
1310 #ifdef HAVE_ELEMENTARY_X
1311 static Ecore_X_Atom atom = 0;
1312 unsigned int on_i = (unsigned int)on;
1314 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_AUTOCAPITAL_ALLOW");
1315 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1321 elm_autoperiod_allow_all_set(Eina_Bool on)
1323 #ifdef HAVE_ELEMENTARY_X
1324 static Ecore_X_Atom atom = 0;
1325 unsigned int on_i = (unsigned int)on;
1327 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_AUTOPERIOD_ALLOW");
1328 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1334 elm_coords_finger_size_adjust(int times_w,
1339 if ((w) && (*w < (_elm_config->finger_size * times_w)))
1340 *w = _elm_config->finger_size * times_w;
1341 if ((h) && (*h < (_elm_config->finger_size * times_h)))
1342 *h = _elm_config->finger_size * times_h;
1351 edje_file_cache_flush();
1352 edje_collection_cache_flush();
1354 EINA_LIST_FOREACH(_elm_win_list, l, obj)
1356 Evas *e = evas_object_evas_get(obj);
1357 evas_image_cache_flush(e);
1358 evas_font_cache_flush(e);
1359 evas_render_dump(e);
1364 elm_cache_flush_interval_get(void)
1366 return _elm_config->cache_flush_poll_interval;
1370 elm_cache_flush_interval_set(int size)
1372 if (_elm_config->cache_flush_poll_interval == size) return;
1373 _elm_config->cache_flush_poll_interval = size;
1379 elm_cache_flush_interval_all_set(int size)
1381 #ifdef HAVE_ELEMENTARY_X
1382 static Ecore_X_Atom atom = 0;
1383 unsigned int size_i = (unsigned int)size;
1385 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_CACHE_FLUSH_INTERVAL");
1386 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1392 elm_cache_flush_enabled_get(void)
1394 return _elm_config->cache_flush_enable;
1398 elm_cache_flush_enabled_set(Eina_Bool enabled)
1400 enabled = !!enabled;
1401 if (_elm_config->cache_flush_enable == enabled) return;
1402 _elm_config->cache_flush_enable = enabled;
1408 elm_cache_flush_enabled_all_set(Eina_Bool enabled)
1410 #ifdef HAVE_ELEMENTARY_X
1411 static Ecore_X_Atom atom = 0;
1412 unsigned int enabled_i = (unsigned int)enabled;
1414 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_CACHE_FLUSH_ENABLE");
1415 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1416 atom, &enabled_i, 1);
1421 elm_font_cache_get(void)
1423 return _elm_config->font_cache;
1427 elm_font_cache_set(int size)
1429 if (_elm_config->font_cache == size) return;
1430 _elm_config->font_cache = size;
1436 elm_font_cache_all_set(int size)
1438 #ifdef HAVE_ELEMENTARY_X
1439 static Ecore_X_Atom atom = 0;
1440 unsigned int size_i = (unsigned int)size;
1442 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_FONT_CACHE");
1443 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1449 elm_image_cache_get(void)
1451 return _elm_config->image_cache;
1455 elm_image_cache_set(int size)
1457 if (_elm_config->image_cache == size) return;
1458 _elm_config->image_cache = size;
1464 elm_image_cache_all_set(int size)
1466 #ifdef HAVE_ELEMENTARY_X
1467 static Ecore_X_Atom atom = 0;
1468 unsigned int size_i = (unsigned int)size;
1470 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_IMAGE_CACHE");
1471 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1477 elm_edje_file_cache_get(void)
1479 return _elm_config->edje_cache;
1483 elm_edje_file_cache_set(int size)
1485 if (_elm_config->edje_cache == size) return;
1486 _elm_config->edje_cache = size;
1492 elm_edje_file_cache_all_set(int size)
1494 #ifdef HAVE_ELEMENTARY_X
1495 static Ecore_X_Atom atom = 0;
1496 unsigned int size_i = (unsigned int)size;
1498 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_EDJE_FILE_CACHE");
1499 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1505 elm_edje_collection_cache_get(void)
1507 return _elm_config->edje_collection_cache;
1511 elm_edje_collection_cache_set(int size)
1513 if (_elm_config->edje_collection_cache == size) return;
1514 _elm_config->edje_collection_cache = size;
1520 elm_edje_collection_cache_all_set(int size)
1522 #ifdef HAVE_ELEMENTARY_X
1523 static Ecore_X_Atom atom = 0;
1524 unsigned int size_i = (unsigned int)size;
1526 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_EDJE_COLLECTION_CACHE");
1527 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1533 elm_object_focus_get(const Evas_Object *obj)
1535 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1536 return elm_widget_focus_get(obj);
1540 elm_object_focus_set(Evas_Object *obj,
1543 EINA_SAFETY_ON_NULL_RETURN(obj);
1546 if (elm_widget_focus_get(obj)) return;
1547 elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
1551 if (!elm_widget_can_focus_get(obj)) return;
1552 elm_widget_focused_object_clear(obj);
1557 elm_object_focus(Evas_Object *obj)
1559 EINA_SAFETY_ON_NULL_RETURN(obj);
1560 elm_object_focus_set(obj, EINA_TRUE);
1564 elm_object_unfocus(Evas_Object *obj)
1566 EINA_SAFETY_ON_NULL_RETURN(obj);
1567 elm_object_focus_set(obj, EINA_FALSE);
1571 elm_object_focus_allow_set(Evas_Object *obj,
1574 EINA_SAFETY_ON_NULL_RETURN(obj);
1575 elm_widget_can_focus_set(obj, enable);
1579 elm_object_focus_allow_get(const Evas_Object *obj)
1581 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1582 return (elm_widget_can_focus_get(obj)) || (elm_widget_child_can_focus_get(obj));
1586 elm_object_focus_custom_chain_set(Evas_Object *obj,
1589 EINA_SAFETY_ON_NULL_RETURN(obj);
1590 elm_widget_focus_custom_chain_set(obj, objs);
1594 elm_object_focus_custom_chain_unset(Evas_Object *obj)
1596 EINA_SAFETY_ON_NULL_RETURN(obj);
1597 elm_widget_focus_custom_chain_unset(obj);
1600 EAPI const Eina_List *
1601 elm_object_focus_custom_chain_get(const Evas_Object *obj)
1603 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
1604 return elm_widget_focus_custom_chain_get(obj);
1608 elm_object_focus_custom_chain_append(Evas_Object *obj,
1610 Evas_Object *relative_child)
1612 EINA_SAFETY_ON_NULL_RETURN(obj);
1613 EINA_SAFETY_ON_NULL_RETURN(child);
1614 elm_widget_focus_custom_chain_append(obj, child, relative_child);
1618 elm_object_focus_custom_chain_prepend(Evas_Object *obj,
1620 Evas_Object *relative_child)
1622 EINA_SAFETY_ON_NULL_RETURN(obj);
1623 EINA_SAFETY_ON_NULL_RETURN(child);
1624 elm_widget_focus_custom_chain_prepend(obj, child, relative_child);
1628 elm_object_focus_cycle(Evas_Object *obj,
1629 Elm_Focus_Direction dir)
1631 EINA_SAFETY_ON_NULL_RETURN(obj);
1632 elm_widget_focus_cycle(obj, dir);
1636 elm_object_focus_direction_go(Evas_Object *obj,
1640 EINA_SAFETY_ON_NULL_RETURN(obj);
1641 elm_widget_focus_direction_go(obj, x, y);
1645 elm_object_tree_unfocusable_set(Evas_Object *obj,
1646 Eina_Bool tree_unfocusable)
1648 EINA_SAFETY_ON_NULL_RETURN(obj);
1649 elm_widget_tree_unfocusable_set(obj, tree_unfocusable);
1653 elm_object_tree_unfocusable_get(const Evas_Object *obj)
1655 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1656 return elm_widget_tree_unfocusable_get(obj);
1660 elm_focus_highlight_enabled_get(void)
1662 return _elm_config->focus_highlight_enable;
1666 elm_focus_highlight_enabled_set(Eina_Bool enable)
1668 _elm_config->focus_highlight_enable = !!enable;
1672 elm_focus_highlight_animate_get(void)
1674 return _elm_config->focus_highlight_animate;
1678 elm_focus_highlight_animate_set(Eina_Bool animate)
1680 _elm_config->focus_highlight_animate = !!animate;
1684 elm_scroll_bounce_enabled_get(void)
1686 return _elm_config->thumbscroll_bounce_enable;
1690 elm_scroll_bounce_enabled_set(Eina_Bool enabled)
1692 _elm_config->thumbscroll_bounce_enable = enabled;
1696 elm_scroll_bounce_enabled_all_set(Eina_Bool enabled)
1698 #ifdef HAVE_ELEMENTARY_X
1699 static Ecore_X_Atom atom = 0;
1700 unsigned int bounce_enable_i = (unsigned int)enabled;
1703 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BOUNCE_ENABLE");
1704 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1705 atom, &bounce_enable_i, 1);
1710 elm_scroll_bounce_friction_get(void)
1712 return _elm_config->thumbscroll_bounce_friction;
1716 elm_scroll_bounce_friction_set(double friction)
1718 _elm_config->thumbscroll_bounce_friction = friction;
1722 elm_scroll_bounce_friction_all_set(double friction)
1724 #ifdef HAVE_ELEMENTARY_X
1725 static Ecore_X_Atom atom = 0;
1726 unsigned int bounce_friction_i = (unsigned int)(friction * 1000.0);
1729 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BOUNCE_FRICTION");
1730 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1731 atom, &bounce_friction_i, 1);
1736 elm_scroll_page_scroll_friction_get(void)
1738 return _elm_config->page_scroll_friction;
1742 elm_scroll_page_scroll_friction_set(double friction)
1744 _elm_config->page_scroll_friction = friction;
1748 elm_scroll_page_scroll_friction_all_set(double friction)
1750 #ifdef HAVE_ELEMENTARY_X
1751 static Ecore_X_Atom atom = 0;
1752 unsigned int page_scroll_friction_i = (unsigned int)(friction * 1000.0);
1755 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_PAGE_SCROLL_FRICTION");
1756 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1757 atom, &page_scroll_friction_i, 1);
1762 elm_scroll_bring_in_scroll_friction_get(void)
1764 return _elm_config->bring_in_scroll_friction;
1768 elm_scroll_bring_in_scroll_friction_set(double friction)
1770 _elm_config->bring_in_scroll_friction = friction;
1774 elm_scroll_bring_in_scroll_friction_all_set(double friction)
1776 #ifdef HAVE_ELEMENTARY_X
1777 static Ecore_X_Atom atom = 0;
1778 unsigned int bring_in_scroll_friction_i = (unsigned int)(friction * 1000.0);
1782 ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BRING_IN_SCROLL_FRICTION");
1783 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1784 atom, &bring_in_scroll_friction_i, 1);
1789 elm_scroll_zoom_friction_get(void)
1791 return _elm_config->zoom_friction;
1795 elm_scroll_zoom_friction_set(double friction)
1797 _elm_config->zoom_friction = friction;
1801 elm_scroll_zoom_friction_all_set(double friction)
1803 #ifdef HAVE_ELEMENTARY_X
1804 static Ecore_X_Atom atom = 0;
1805 unsigned int zoom_friction_i = (unsigned int)(friction * 1000.0);
1808 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_ZOOM_FRICTION");
1809 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1810 atom, &zoom_friction_i, 1);
1815 elm_scroll_thumbscroll_enabled_get(void)
1817 return _elm_config->thumbscroll_enable;
1821 elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled)
1823 _elm_config->thumbscroll_enable = enabled;
1827 elm_scroll_thumbscroll_enabled_all_set(Eina_Bool enabled)
1829 #ifdef HAVE_ELEMENTARY_X
1830 static Ecore_X_Atom atom = 0;
1831 unsigned int ts_enable_i = (unsigned int)enabled;
1833 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_ENABLE");
1834 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1835 atom, &ts_enable_i, 1);
1840 elm_scroll_thumbscroll_threshold_get(void)
1842 return _elm_config->thumbscroll_threshold;
1846 elm_scroll_thumbscroll_threshold_set(unsigned int threshold)
1848 _elm_config->thumbscroll_threshold = threshold;
1852 elm_scroll_thumbscroll_threshold_all_set(unsigned int threshold)
1854 #ifdef HAVE_ELEMENTARY_X
1855 static Ecore_X_Atom atom = 0;
1856 unsigned int ts_threshold_i = (unsigned int)threshold;
1858 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_THRESHOLD");
1859 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1860 atom, &ts_threshold_i, 1);
1865 elm_scroll_thumbscroll_momentum_threshold_get(void)
1867 return _elm_config->thumbscroll_momentum_threshold;
1871 elm_scroll_thumbscroll_momentum_threshold_set(double threshold)
1873 _elm_config->thumbscroll_momentum_threshold = threshold;
1877 elm_scroll_thumbscroll_momentum_threshold_all_set(double threshold)
1879 #ifdef HAVE_ELEMENTARY_X
1880 static Ecore_X_Atom atom = 0;
1881 unsigned int ts_momentum_threshold_i = (unsigned int)(threshold * 1000.0);
1884 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_MOMENTUM_THRESHOLD");
1885 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1886 atom, &ts_momentum_threshold_i, 1);
1891 elm_scroll_thumbscroll_friction_get(void)
1893 return _elm_config->thumbscroll_friction;
1897 elm_scroll_thumbscroll_friction_set(double friction)
1899 _elm_config->thumbscroll_friction = friction;
1903 elm_scroll_thumbscroll_friction_all_set(double friction)
1905 #ifdef HAVE_ELEMENTARY_X
1906 static Ecore_X_Atom atom = 0;
1907 unsigned int ts_friction_i = (unsigned int)(friction * 1000.0);
1909 if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_FRICTION");
1910 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1911 atom, &ts_friction_i, 1);
1916 elm_scroll_thumbscroll_border_friction_get(void)
1918 return _elm_config->thumbscroll_border_friction;
1922 elm_scroll_thumbscroll_border_friction_set(double friction)
1930 _elm_config->thumbscroll_friction = friction;
1934 elm_scroll_thumbscroll_border_friction_all_set(double friction)
1942 #ifdef HAVE_ELEMENTARY_X
1943 static Ecore_X_Atom atom = 0;
1944 unsigned int border_friction_i = (unsigned int)(friction * 1000.0);
1947 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_BORDER_FRICTION");
1948 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1949 atom, &border_friction_i, 1);
1954 elm_scroll_thumbscroll_sensitivity_friction_get(void)
1956 return _elm_config->thumbscroll_sensitivity_friction;
1960 elm_scroll_thumbscroll_sensitivity_friction_set(double friction)
1968 _elm_config->thumbscroll_friction = friction;
1972 elm_scroll_thumbscroll_sensitivity_friction_all_set(double friction)
1980 #ifdef HAVE_ELEMENTARY_X
1981 static Ecore_X_Atom atom = 0;
1982 unsigned int sensitivity_friction_i = (unsigned int)(friction * 1000.0);
1985 atom = ecore_x_atom_get("ENLIGHTENMENT_THUMBSCROLL_SENSITIVITY_FRICTION");
1986 ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
1987 atom, &sensitivity_friction_i, 1);
1992 elm_object_scroll_hold_push(Evas_Object *obj)
1994 EINA_SAFETY_ON_NULL_RETURN(obj);
1995 elm_widget_scroll_hold_push(obj);
1999 elm_object_scroll_hold_pop(Evas_Object *obj)
2001 EINA_SAFETY_ON_NULL_RETURN(obj);
2002 elm_widget_scroll_hold_pop(obj);
2006 elm_object_scroll_freeze_push(Evas_Object *obj)
2008 EINA_SAFETY_ON_NULL_RETURN(obj);
2009 elm_widget_scroll_freeze_push(obj);
2013 elm_object_scroll_lock_x_set(Evas_Object *obj,
2016 EINA_SAFETY_ON_NULL_RETURN(obj);
2017 elm_widget_drag_lock_x_set(obj, lock);
2021 elm_object_scroll_lock_y_set(Evas_Object *obj,
2024 EINA_SAFETY_ON_NULL_RETURN(obj);
2025 elm_widget_drag_lock_y_set(obj, lock);
2029 elm_object_scroll_lock_x_get(const Evas_Object *obj)
2031 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
2032 return elm_widget_drag_lock_x_get(obj);
2036 elm_object_scroll_lock_y_get(const Evas_Object *obj)
2038 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
2039 return elm_widget_drag_lock_y_get(obj);
2043 elm_object_scroll_freeze_pop(Evas_Object *obj)
2045 EINA_SAFETY_ON_NULL_RETURN(obj);
2046 elm_widget_scroll_freeze_pop(obj);
2050 elm_object_widget_check(const Evas_Object *obj)
2052 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
2053 return elm_widget_is(obj);
2057 elm_object_parent_widget_get(const Evas_Object *obj)
2059 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
2060 return elm_widget_parent_widget_get(obj);
2064 elm_object_top_widget_get(const Evas_Object *obj)
2066 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
2067 return elm_widget_top_get(obj);
2071 elm_object_widget_type_get(const Evas_Object *obj)
2073 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
2074 return elm_widget_type_get(obj);
2078 elm_object_signal_emit(Evas_Object *obj,
2079 const char *emission,
2082 EINA_SAFETY_ON_NULL_RETURN(obj);
2083 elm_widget_signal_emit(obj, emission, source);
2087 elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
2089 EINA_SAFETY_ON_NULL_RETURN(obj);
2090 EINA_SAFETY_ON_NULL_RETURN(func);
2091 elm_widget_signal_callback_add(obj, emission, source, func, data);
2095 elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source))
2097 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
2098 EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL);
2099 return elm_widget_signal_callback_del(obj, emission, source, func);
2103 elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data)
2105 EINA_SAFETY_ON_NULL_RETURN(obj);
2106 EINA_SAFETY_ON_NULL_RETURN(func);
2107 elm_widget_event_callback_add(obj, func, data);
2111 elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data)
2113 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
2114 EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL);
2115 return elm_widget_event_callback_del(obj, func, data);
2119 elm_object_tree_dump(const Evas_Object *top)
2122 elm_widget_tree_dump(top);
2130 elm_object_tree_dot_dump(const Evas_Object *top,
2134 FILE *f = fopen(file, "wb");
2135 elm_widget_tree_dot_dump(top, f);
2145 elm_longpress_timeout_set(double longpress_timeout)
2147 _elm_config->longpress_timeout = longpress_timeout;
2151 elm_longpress_timeout_get(void)
2153 return _elm_config->longpress_timeout;
2157 elm_object_item_object_get(const Elm_Object_Item *it)
2159 return ((Elm_Widget_Item *) it)->widget;
2163 elm_object_item_content_part_set(Elm_Object_Item *it,
2165 Evas_Object *content)
2167 elm_widget_item_content_part_set(it, part, content);
2171 elm_object_item_content_part_get(const Elm_Object_Item *it,
2174 return elm_widget_item_content_part_get(it, part);
2178 elm_object_item_content_part_unset(Elm_Object_Item *it, const char *part)
2180 return elm_widget_item_content_part_unset(it, part);
2184 elm_object_item_text_part_set(Elm_Object_Item *it,
2188 elm_widget_item_text_part_set(it, part, label);
2192 elm_object_item_text_part_get(const Elm_Object_Item *it, const char *part)
2194 return elm_widget_item_text_part_get(it, part);
2198 elm_object_item_data_get(const Elm_Object_Item *it)
2200 return elm_widget_item_data_get(it);
2204 elm_object_item_data_set(Elm_Object_Item *it, void *data)
2206 elm_widget_item_data_set(it, data);
2210 elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source)
2212 elm_widget_item_signal_emit(it, emission, source);
2216 elm_object_access_info_set(Evas_Object *obj, const char *txt)
2218 elm_widget_access_info_set(obj, txt);
2222 elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt)
2224 _elm_widget_item_access_info_set((Elm_Widget_Item *)it, txt);