2010-03-06 08:46:08 -08:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
2010-11-29 05:14:37 -08:00
|
|
|
#include <dlfcn.h> /* dlopen,dlclose,etc */
|
2009-01-13 01:20:53 -08:00
|
|
|
|
2010-03-06 08:46:08 -08:00
|
|
|
#ifdef HAVE_CRT_EXTERNS_H
|
|
|
|
# include <crt_externs.h>
|
2008-12-18 16:34:56 -08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_EVIL
|
|
|
|
# include <Evil.h>
|
|
|
|
#endif
|
|
|
|
|
2013-11-12 05:56:05 -08:00
|
|
|
#include <Emotion.h>
|
2012-07-02 19:13:42 -07:00
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
#include <Elementary.h>
|
|
|
|
#include "elm_priv.h"
|
|
|
|
|
2010-10-20 21:05:35 -07:00
|
|
|
#define SEMI_BROKEN_QUICKLAUNCH 1
|
2010-10-20 07:12:17 -07:00
|
|
|
|
2012-11-07 09:58:09 -08:00
|
|
|
#ifdef __CYGWIN__
|
|
|
|
# define LIBEXT ".dll"
|
|
|
|
#else
|
|
|
|
# define LIBEXT ".so"
|
|
|
|
#endif
|
|
|
|
|
2010-05-29 02:48:05 -07:00
|
|
|
static Elm_Version _version = { VMAJ, VMIN, VMIC, VREV };
|
|
|
|
EAPI Elm_Version *elm_version = &_version;
|
|
|
|
|
2010-07-15 23:38:59 -07:00
|
|
|
Eina_Bool
|
|
|
|
_elm_dangerous_call_check(const char *call)
|
|
|
|
{
|
|
|
|
char buf[256];
|
|
|
|
const char *eval;
|
2010-11-29 05:14:37 -08:00
|
|
|
|
2010-07-16 13:39:17 -07:00
|
|
|
snprintf(buf, sizeof(buf), "%i.%i.%i.%i", VMAJ, VMIN, VMIC, VREV);
|
2010-07-15 23:38:59 -07:00
|
|
|
eval = getenv("ELM_NO_FINGER_WAGGLING");
|
|
|
|
if ((eval) && (!strcmp(eval, buf)))
|
|
|
|
return 0;
|
2013-06-04 22:40:03 -07:00
|
|
|
ERR("ELEMENTARY FINGER WAGGLE!!!!!!!!!!\n"
|
|
|
|
"\n"
|
|
|
|
" %s() used.\n"
|
|
|
|
"PLEASE see the API documentation for this function. This call\n"
|
|
|
|
"should almost never be used. Only in very special cases.\n"
|
|
|
|
"\n"
|
|
|
|
"To remove this warning please set the environment variable:\n"
|
|
|
|
" ELM_NO_FINGER_WAGGLING\n"
|
|
|
|
"To the value of the Elementary version + revision number. e.g.:\n"
|
|
|
|
" 1.2.5.40295\n"
|
|
|
|
"\n"
|
|
|
|
,
|
|
|
|
call);
|
2010-07-15 23:38:59 -07:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2010-11-29 05:14:37 -08:00
|
|
|
static Eina_Bool _elm_signal_exit(void *data,
|
|
|
|
int ev_type,
|
|
|
|
void *ev);
|
2008-11-14 22:09:04 -08:00
|
|
|
|
2011-04-24 01:18:00 -07:00
|
|
|
static Eina_Prefix *pfx = NULL;
|
2008-09-29 23:58:56 -07:00
|
|
|
char *_elm_appname = NULL;
|
2009-01-13 01:20:53 -08:00
|
|
|
const char *_elm_data_dir = NULL;
|
2009-09-28 21:35:35 -07:00
|
|
|
const char *_elm_lib_dir = NULL;
|
2009-09-11 07:21:58 -07:00
|
|
|
int _elm_log_dom = -1;
|
2009-01-13 01:20:53 -08:00
|
|
|
|
2009-12-01 05:32:48 -08:00
|
|
|
EAPI int ELM_EVENT_POLICY_CHANGED = 0;
|
|
|
|
|
2010-03-26 18:24:21 -07:00
|
|
|
static int _elm_init_count = 0;
|
2010-10-20 07:12:17 -07:00
|
|
|
static int _elm_sub_init_count = 0;
|
|
|
|
static int _elm_ql_init_count = 0;
|
2009-12-01 05:32:48 -08:00
|
|
|
static int _elm_policies[ELM_POLICY_LAST];
|
2009-02-25 03:00:07 -08:00
|
|
|
static Ecore_Event_Handler *_elm_exit_handler = NULL;
|
2010-10-20 21:05:35 -07:00
|
|
|
static Eina_Bool quicklaunch_on = 0;
|
2008-12-09 22:43:21 -08:00
|
|
|
|
2010-06-25 02:58:14 -07:00
|
|
|
static Eina_Bool
|
2014-01-06 06:30:02 -08:00
|
|
|
_elm_signal_exit(void *data EINA_UNUSED,
|
|
|
|
int ev_type EINA_UNUSED,
|
|
|
|
void *ev EINA_UNUSED)
|
2008-09-29 23:58:56 -07:00
|
|
|
{
|
|
|
|
elm_exit();
|
2010-06-25 02:58:14 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2008-09-29 23:58:56 -07:00
|
|
|
}
|
|
|
|
|
2010-05-07 08:49:06 -07:00
|
|
|
void
|
2008-11-14 22:09:04 -08:00
|
|
|
_elm_rescale(void)
|
|
|
|
{
|
|
|
|
edje_scale_set(_elm_config->scale);
|
2010-11-05 01:37:31 -07:00
|
|
|
_elm_win_rescale(NULL, EINA_FALSE);
|
2011-10-05 15:18:22 -07:00
|
|
|
_elm_ews_wm_rescale(NULL, EINA_FALSE);
|
2008-11-14 22:09:04 -08:00
|
|
|
}
|
|
|
|
|
2012-07-02 19:13:42 -07:00
|
|
|
static Eina_Bool _emotion_inited = EINA_FALSE;
|
|
|
|
|
|
|
|
void
|
|
|
|
_elm_emotion_init(void)
|
|
|
|
{
|
|
|
|
if (_emotion_inited) return ;
|
|
|
|
|
|
|
|
emotion_init();
|
|
|
|
_emotion_inited = EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_elm_emotion_shutdown(void)
|
|
|
|
{
|
|
|
|
if (!_emotion_inited) return ;
|
|
|
|
|
|
|
|
emotion_shutdown();
|
|
|
|
_emotion_inited = EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2011-04-24 02:51:48 -07:00
|
|
|
static void *app_mainfunc = NULL;
|
2012-12-04 10:09:54 -08:00
|
|
|
static const char *app_name = NULL;
|
|
|
|
static const char *app_desktop_entry = NULL;
|
2011-04-24 02:51:48 -07:00
|
|
|
static const char *app_domain = NULL;
|
|
|
|
static const char *app_checkfile = NULL;
|
|
|
|
|
|
|
|
static const char *app_compile_bin_dir = NULL;
|
|
|
|
static const char *app_compile_lib_dir = NULL;
|
|
|
|
static const char *app_compile_data_dir = NULL;
|
|
|
|
static const char *app_compile_locale_dir = NULL;
|
|
|
|
static const char *app_prefix_dir = NULL;
|
|
|
|
static const char *app_bin_dir = NULL;
|
|
|
|
static const char *app_lib_dir = NULL;
|
|
|
|
static const char *app_data_dir = NULL;
|
|
|
|
static const char *app_locale_dir = NULL;
|
|
|
|
|
|
|
|
static Eina_Prefix *app_pfx = NULL;
|
|
|
|
|
2013-08-16 14:17:17 -07:00
|
|
|
static Ecore_Event_Handler *system_handlers[2] = { NULL, NULL };
|
|
|
|
|
2011-04-24 02:51:48 -07:00
|
|
|
static void
|
|
|
|
_prefix_check(void)
|
|
|
|
{
|
|
|
|
int argc = 0;
|
|
|
|
char **argv = NULL;
|
|
|
|
const char *dirs[4] = { NULL, NULL, NULL, NULL };
|
|
|
|
char *caps = NULL, *p1, *p2;
|
2012-03-29 05:00:14 -07:00
|
|
|
char buf[PATH_MAX];
|
2011-04-26 19:42:50 -07:00
|
|
|
|
2011-04-24 02:51:48 -07:00
|
|
|
if (app_pfx) return;
|
|
|
|
if (!app_domain) return;
|
2011-04-26 19:42:50 -07:00
|
|
|
|
2011-04-24 02:51:48 -07:00
|
|
|
ecore_app_args_get(&argc, &argv);
|
|
|
|
if (argc < 1) return;
|
|
|
|
|
|
|
|
dirs[0] = app_compile_bin_dir;
|
|
|
|
dirs[1] = app_compile_lib_dir;
|
|
|
|
dirs[2] = app_compile_data_dir;
|
|
|
|
dirs[3] = app_compile_locale_dir;
|
2012-10-10 17:35:00 -07:00
|
|
|
|
2012-03-29 05:00:14 -07:00
|
|
|
if (!dirs[0]) dirs[0] = "/usr/local/bin";
|
|
|
|
if (!dirs[1]) dirs[1] = "/usr/local/lib";
|
|
|
|
if (!dirs[2])
|
|
|
|
{
|
|
|
|
snprintf(buf, sizeof(buf), "/usr/local/share/%s", app_domain);
|
|
|
|
dirs[2] = buf;
|
|
|
|
}
|
2011-04-24 02:51:48 -07:00
|
|
|
if (!dirs[3]) dirs[3] = dirs[2];
|
|
|
|
|
|
|
|
if (app_domain)
|
|
|
|
{
|
2013-06-27 03:21:44 -07:00
|
|
|
caps = alloca(eina_stringshare_strlen(app_domain) + 1);
|
2011-04-24 02:51:48 -07:00
|
|
|
for (p1 = (char *)app_domain, p2 = caps; *p1; p1++, p2++)
|
|
|
|
*p2 = toupper(*p1);
|
|
|
|
*p2 = 0;
|
|
|
|
}
|
|
|
|
app_pfx = eina_prefix_new(argv[0], app_mainfunc, caps, app_domain,
|
|
|
|
app_checkfile, dirs[0], dirs[1], dirs[2], dirs[3]);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_prefix_shutdown(void)
|
|
|
|
{
|
|
|
|
if (app_pfx) eina_prefix_free(app_pfx);
|
2014-01-21 17:12:44 -08:00
|
|
|
ELM_SAFE_FREE(app_domain, eina_stringshare_del);
|
|
|
|
ELM_SAFE_FREE(app_checkfile, eina_stringshare_del);
|
|
|
|
ELM_SAFE_FREE(app_compile_bin_dir, eina_stringshare_del);
|
|
|
|
ELM_SAFE_FREE(app_compile_lib_dir, eina_stringshare_del);
|
|
|
|
ELM_SAFE_FREE(app_compile_data_dir, eina_stringshare_del);
|
|
|
|
ELM_SAFE_FREE(app_compile_locale_dir, eina_stringshare_del);
|
2011-04-24 02:51:48 -07:00
|
|
|
app_mainfunc = NULL;
|
|
|
|
app_prefix_dir = NULL;
|
|
|
|
app_bin_dir = NULL;
|
|
|
|
app_lib_dir = NULL;
|
|
|
|
app_data_dir = NULL;
|
|
|
|
app_locale_dir = NULL;
|
|
|
|
app_pfx = NULL;
|
|
|
|
}
|
|
|
|
|
2013-04-29 06:48:27 -07:00
|
|
|
static struct {
|
|
|
|
Eina_Module *handle;
|
|
|
|
void (*init)(void);
|
|
|
|
void (*shutdown)(void);
|
|
|
|
Eina_Bool (*app_connect)(const char *appname);
|
2013-05-20 05:03:43 -07:00
|
|
|
Eina_Bool is_init;
|
2013-04-29 06:48:27 -07:00
|
|
|
} _clouseau_info;
|
|
|
|
|
|
|
|
#define _CLOUSEAU_LOAD_SYMBOL(cls_struct, sym) \
|
|
|
|
do \
|
|
|
|
{ \
|
|
|
|
(cls_struct).sym = eina_module_symbol_get((cls_struct).handle, "clouseau_" #sym); \
|
|
|
|
if (!(cls_struct).sym) \
|
|
|
|
{ \
|
|
|
|
WRN("Failed loading symbol '%s' from the clouseau library.", "clouseau_" #sym); \
|
|
|
|
eina_module_free((cls_struct).handle); \
|
|
|
|
(cls_struct).handle = NULL; \
|
|
|
|
return EINA_FALSE; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
while (0)
|
|
|
|
|
2013-05-20 05:03:43 -07:00
|
|
|
static void
|
|
|
|
_elm_clouseau_unload()
|
|
|
|
{
|
|
|
|
if (!_clouseau_info.is_init)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (_clouseau_info.shutdown)
|
|
|
|
{
|
|
|
|
_clouseau_info.shutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (_clouseau_info.handle)
|
|
|
|
{
|
|
|
|
eina_module_free(_clouseau_info.handle);
|
|
|
|
_clouseau_info.handle = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
_clouseau_info.is_init = EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
Eina_Bool
|
|
|
|
_elm_clouseau_reload()
|
2013-04-29 06:48:27 -07:00
|
|
|
{
|
2013-05-20 05:03:43 -07:00
|
|
|
if (!_elm_config->clouseau_enable)
|
|
|
|
{
|
|
|
|
_elm_clouseau_unload();
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
2013-04-29 06:48:27 -07:00
|
|
|
|
2013-05-20 05:03:43 -07:00
|
|
|
if (_clouseau_info.is_init)
|
|
|
|
return EINA_TRUE;
|
2013-04-29 06:48:27 -07:00
|
|
|
|
|
|
|
_clouseau_info.handle = eina_module_new(
|
|
|
|
PACKAGE_LIB_DIR "/libclouseau" LIBEXT);
|
|
|
|
if (!eina_module_load(_clouseau_info.handle))
|
|
|
|
{
|
|
|
|
WRN("Failed loading the clouseau library.");
|
|
|
|
eina_module_free(_clouseau_info.handle);
|
|
|
|
_clouseau_info.handle = NULL;
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
_CLOUSEAU_LOAD_SYMBOL(_clouseau_info, init);
|
|
|
|
_CLOUSEAU_LOAD_SYMBOL(_clouseau_info, shutdown);
|
|
|
|
_CLOUSEAU_LOAD_SYMBOL(_clouseau_info, app_connect);
|
|
|
|
|
2013-05-20 05:03:43 -07:00
|
|
|
_clouseau_info.init();
|
2014-05-10 07:15:54 -07:00
|
|
|
if (!_clouseau_info.app_connect(elm_app_name_get()))
|
2013-05-20 05:03:43 -07:00
|
|
|
{
|
|
|
|
ERR("Failed connecting to the clouseau server.");
|
|
|
|
}
|
|
|
|
|
|
|
|
_clouseau_info.is_init = EINA_TRUE;
|
|
|
|
|
2013-04-29 06:48:27 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
2013-08-16 14:17:17 -07:00
|
|
|
Eina_Bool _sys_memory_changed(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Ecore_Memory_State state = ecore_memory_state_get();
|
|
|
|
|
|
|
|
if (state != ECORE_MEMORY_STATE_LOW)
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
|
|
|
|
elm_cache_all_flush();
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
}
|
|
|
|
|
|
|
|
Eina_Bool _sys_lang_changed(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
char *lang;
|
|
|
|
|
|
|
|
lang = getenv("LANG");
|
|
|
|
if (!lang)
|
|
|
|
lang = getenv("LC_MESSAGES");
|
|
|
|
if (!lang)
|
|
|
|
lang = getenv("LC_ALL");
|
|
|
|
|
|
|
|
if (lang)
|
|
|
|
elm_language_set(lang);
|
|
|
|
else
|
|
|
|
ERR("Language not set in environment");
|
|
|
|
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
}
|
|
|
|
|
2010-10-20 07:12:17 -07:00
|
|
|
EAPI int
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_init(int argc,
|
|
|
|
char **argv)
|
2009-02-25 03:00:07 -08:00
|
|
|
{
|
2012-10-03 09:41:46 -07:00
|
|
|
_elm_init_count++;
|
2012-08-07 00:37:14 -07:00
|
|
|
if (_elm_init_count > 1) return _elm_init_count;
|
2012-10-03 09:41:46 -07:00
|
|
|
elm_quicklaunch_init(argc, argv);
|
2009-02-25 03:00:07 -08:00
|
|
|
elm_quicklaunch_sub_init(argc, argv);
|
2011-04-24 02:51:48 -07:00
|
|
|
_prefix_shutdown();
|
2013-04-29 06:48:27 -07:00
|
|
|
|
2013-08-16 14:17:17 -07:00
|
|
|
system_handlers[0] = ecore_event_handler_add(ECORE_EVENT_MEMORY_STATE, _sys_memory_changed, NULL);
|
|
|
|
system_handlers[1] = ecore_event_handler_add(ECORE_EVENT_LOCALE_CHANGED, _sys_lang_changed, NULL);
|
|
|
|
|
2014-06-25 02:56:36 -07:00
|
|
|
if (_elm_config->atspi_mode != ELM_ATSPI_MODE_OFF)
|
|
|
|
_elm_atspi_bridge_init();
|
2013-12-03 00:07:05 -08:00
|
|
|
|
2010-10-20 07:12:17 -07:00
|
|
|
return _elm_init_count;
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
|
|
|
|
2010-10-20 07:12:17 -07:00
|
|
|
EAPI int
|
2009-02-25 03:00:07 -08:00
|
|
|
elm_shutdown(void)
|
|
|
|
{
|
2012-05-30 03:08:41 -07:00
|
|
|
if (_elm_init_count <= 0)
|
|
|
|
{
|
|
|
|
ERR("Init count not greater than 0 in shutdown.");
|
|
|
|
return 0;
|
|
|
|
}
|
2010-03-26 18:24:21 -07:00
|
|
|
_elm_init_count--;
|
2010-10-20 07:12:17 -07:00
|
|
|
if (_elm_init_count > 0) return _elm_init_count;
|
2013-08-16 14:17:17 -07:00
|
|
|
|
2014-01-21 17:47:03 -08:00
|
|
|
ecore_event_handler_del(system_handlers[0]);
|
|
|
|
ecore_event_handler_del(system_handlers[1]);
|
2013-08-16 14:17:17 -07:00
|
|
|
|
2011-03-09 22:35:33 -08:00
|
|
|
_elm_win_shutdown();
|
2014-04-20 20:46:11 -07:00
|
|
|
_elm_atspi_bridge_shutdown();
|
|
|
|
|
2011-03-09 22:35:33 -08:00
|
|
|
while (_elm_win_deferred_free) ecore_main_loop_iterate();
|
2013-04-29 06:48:27 -07:00
|
|
|
|
2013-05-20 05:03:43 -07:00
|
|
|
_elm_clouseau_unload();
|
2011-04-26 19:42:50 -07:00
|
|
|
// wrningz :(
|
2011-04-24 02:51:48 -07:00
|
|
|
// _prefix_shutdown();
|
2013-05-29 05:00:40 -07:00
|
|
|
ELM_SAFE_FREE(app_name, eina_stringshare_del);
|
|
|
|
ELM_SAFE_FREE(app_desktop_entry, eina_stringshare_del);
|
2012-12-04 10:09:54 -08:00
|
|
|
|
2009-02-25 03:00:07 -08:00
|
|
|
elm_quicklaunch_sub_shutdown();
|
|
|
|
elm_quicklaunch_shutdown();
|
2010-10-20 07:12:17 -07:00
|
|
|
return _elm_init_count;
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
|
|
|
|
2011-04-24 02:51:48 -07:00
|
|
|
EAPI void
|
|
|
|
elm_app_info_set(void *mainfunc, const char *dom, const char *checkfile)
|
|
|
|
{
|
|
|
|
app_mainfunc = mainfunc;
|
|
|
|
eina_stringshare_replace(&app_domain, dom);
|
|
|
|
eina_stringshare_replace(&app_checkfile, checkfile);
|
|
|
|
}
|
|
|
|
|
2012-12-04 10:09:54 -08:00
|
|
|
EAPI void
|
|
|
|
elm_app_name_set(const char *name)
|
|
|
|
{
|
|
|
|
eina_stringshare_replace(&app_name, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_app_desktop_entry_set(const char *path)
|
|
|
|
{
|
|
|
|
eina_stringshare_replace(&app_desktop_entry, path);
|
|
|
|
}
|
|
|
|
|
2011-04-24 02:51:48 -07:00
|
|
|
EAPI void
|
|
|
|
elm_app_compile_bin_dir_set(const char *dir)
|
|
|
|
{
|
|
|
|
eina_stringshare_replace(&app_compile_bin_dir, dir);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_app_compile_lib_dir_set(const char *dir)
|
|
|
|
{
|
|
|
|
eina_stringshare_replace(&app_compile_lib_dir, dir);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_app_compile_data_dir_set(const char *dir)
|
|
|
|
{
|
|
|
|
eina_stringshare_replace(&app_compile_data_dir, dir);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_app_compile_locale_set(const char *dir)
|
|
|
|
{
|
|
|
|
eina_stringshare_replace(&app_compile_locale_dir, dir);
|
|
|
|
}
|
|
|
|
|
2012-12-04 10:09:54 -08:00
|
|
|
EAPI const char *
|
|
|
|
elm_app_name_get(void)
|
|
|
|
{
|
|
|
|
if (app_name) return app_name;
|
|
|
|
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
elm_app_desktop_entry_get(void)
|
|
|
|
{
|
|
|
|
if (app_desktop_entry) return app_desktop_entry;
|
|
|
|
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2011-04-24 02:51:48 -07:00
|
|
|
EAPI const char *
|
|
|
|
elm_app_prefix_dir_get(void)
|
|
|
|
{
|
|
|
|
if (app_prefix_dir) return app_prefix_dir;
|
|
|
|
_prefix_check();
|
|
|
|
if (!app_pfx) return "";
|
|
|
|
app_prefix_dir = eina_prefix_get(app_pfx);
|
|
|
|
return app_prefix_dir;
|
|
|
|
}
|
2011-04-26 19:42:50 -07:00
|
|
|
|
2011-04-24 02:51:48 -07:00
|
|
|
EAPI const char *
|
|
|
|
elm_app_bin_dir_get(void)
|
|
|
|
{
|
|
|
|
if (app_bin_dir) return app_bin_dir;
|
|
|
|
_prefix_check();
|
|
|
|
if (!app_pfx) return "";
|
|
|
|
app_bin_dir = eina_prefix_bin_get(app_pfx);
|
|
|
|
return app_bin_dir;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
elm_app_lib_dir_get(void)
|
|
|
|
{
|
|
|
|
if (app_lib_dir) return app_lib_dir;
|
|
|
|
_prefix_check();
|
|
|
|
if (!app_pfx) return "";
|
|
|
|
app_lib_dir = eina_prefix_lib_get(app_pfx);
|
|
|
|
return app_lib_dir;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
elm_app_data_dir_get(void)
|
|
|
|
{
|
|
|
|
if (app_data_dir) return app_data_dir;
|
|
|
|
_prefix_check();
|
|
|
|
if (!app_pfx) return "";
|
|
|
|
app_data_dir = eina_prefix_data_get(app_pfx);
|
|
|
|
return app_data_dir;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
elm_app_locale_dir_get(void)
|
|
|
|
{
|
|
|
|
if (app_locale_dir) return app_locale_dir;
|
|
|
|
_prefix_check();
|
|
|
|
if (!app_pfx) return "";
|
|
|
|
app_locale_dir = eina_prefix_locale_get(app_pfx);
|
|
|
|
return app_locale_dir;
|
|
|
|
}
|
|
|
|
|
2012-12-05 06:35:04 -08:00
|
|
|
static Eina_Bool _elm_need_e_dbus = EINA_FALSE;
|
2013-01-09 23:50:14 -08:00
|
|
|
static void *e_dbus_handle = NULL;
|
|
|
|
|
2010-10-27 21:13:09 -07:00
|
|
|
EAPI Eina_Bool
|
2009-09-12 02:37:29 -07:00
|
|
|
elm_need_e_dbus(void)
|
|
|
|
{
|
2013-01-09 23:50:14 -08:00
|
|
|
int (*init_func)(void) = NULL;
|
|
|
|
|
2012-12-05 06:35:04 -08:00
|
|
|
if (_elm_need_e_dbus) return EINA_TRUE;
|
2013-04-23 09:05:43 -07:00
|
|
|
/* We use RTLD_NOLOAD when available, so we are sure to use the 'libeldbus' that was linked to the binary */
|
2013-01-10 16:23:58 -08:00
|
|
|
#ifndef RTLD_NOLOAD
|
|
|
|
# define RTLD_NOLOAD RTLD_GLOBAL
|
|
|
|
#endif
|
2014-07-07 10:21:57 -07:00
|
|
|
if (!e_dbus_handle) e_dbus_handle = dlopen("libedbus.so", RTLD_LAZY | RTLD_NOLOAD);
|
|
|
|
if (!e_dbus_handle) e_dbus_handle = dlopen("libedbus.so.1", RTLD_LAZY | RTLD_NOLOAD);
|
2013-01-09 23:50:14 -08:00
|
|
|
if (!e_dbus_handle) return EINA_FALSE;
|
|
|
|
init_func = dlsym(e_dbus_handle, "e_dbus_init");
|
|
|
|
if (!init_func) return EINA_FALSE;
|
2012-12-05 06:35:04 -08:00
|
|
|
_elm_need_e_dbus = EINA_TRUE;
|
2013-01-09 23:50:14 -08:00
|
|
|
init_func();
|
2010-10-27 21:13:09 -07:00
|
|
|
return EINA_TRUE;
|
2009-09-12 02:37:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_elm_unneed_e_dbus(void)
|
|
|
|
{
|
2013-01-09 23:50:14 -08:00
|
|
|
int (*shutdown_func)(void) = NULL;
|
|
|
|
|
2012-12-05 06:35:04 -08:00
|
|
|
if (!_elm_need_e_dbus) return;
|
2013-01-09 23:50:14 -08:00
|
|
|
shutdown_func = dlsym(e_dbus_handle, "e_dbus_shutdown");
|
|
|
|
if (!shutdown_func) return;
|
2012-12-05 06:35:04 -08:00
|
|
|
_elm_need_e_dbus = EINA_FALSE;
|
2013-01-09 23:50:14 -08:00
|
|
|
shutdown_func();
|
|
|
|
|
|
|
|
dlclose(e_dbus_handle);
|
|
|
|
e_dbus_handle = NULL;
|
2009-09-12 02:37:29 -07:00
|
|
|
}
|
|
|
|
|
2013-04-23 09:05:43 -07:00
|
|
|
static Eina_Bool _elm_need_eldbus = EINA_FALSE;
|
2012-12-03 13:45:48 -08:00
|
|
|
EAPI Eina_Bool
|
2013-04-23 09:05:43 -07:00
|
|
|
elm_need_eldbus(void)
|
2012-12-03 13:45:48 -08:00
|
|
|
{
|
2013-04-23 09:05:43 -07:00
|
|
|
if (_elm_need_eldbus) return EINA_TRUE;
|
|
|
|
_elm_need_eldbus = EINA_TRUE;
|
|
|
|
eldbus_init();
|
2012-12-03 13:45:48 -08:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-04-23 09:05:43 -07:00
|
|
|
_elm_unneed_eldbus(void)
|
2012-12-03 13:45:48 -08:00
|
|
|
{
|
2013-04-23 09:05:43 -07:00
|
|
|
if (!_elm_need_eldbus) return;
|
|
|
|
_elm_need_eldbus = EINA_FALSE;
|
|
|
|
eldbus_shutdown();
|
2012-12-03 13:45:48 -08:00
|
|
|
}
|
|
|
|
|
2012-12-11 06:05:48 -08:00
|
|
|
#ifdef ELM_ELOCATION
|
|
|
|
static Eina_Bool _elm_need_elocation = EINA_FALSE;
|
|
|
|
#endif
|
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_need_elocation(void)
|
|
|
|
{
|
|
|
|
#ifdef ELM_ELOCATION
|
|
|
|
if (_elm_need_elocation) return EINA_TRUE;
|
|
|
|
_elm_need_elocation = EINA_TRUE;
|
|
|
|
elocation_init();
|
|
|
|
return EINA_TRUE;
|
|
|
|
#else
|
|
|
|
return EINA_FALSE;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_elm_unneed_elocation(void)
|
|
|
|
{
|
|
|
|
#ifdef ELM_ELOCATION
|
|
|
|
if (!_elm_need_elocation) return;
|
|
|
|
_elm_need_elocation = EINA_FALSE;
|
2013-04-23 09:05:43 -07:00
|
|
|
eldbus_shutdown();
|
2012-12-11 06:05:48 -08:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2012-12-05 06:35:04 -08:00
|
|
|
static Eina_Bool _elm_need_efreet = EINA_FALSE;
|
2013-11-12 05:56:05 -08:00
|
|
|
|
2010-10-27 21:13:09 -07:00
|
|
|
EAPI Eina_Bool
|
2009-09-12 02:37:29 -07:00
|
|
|
elm_need_efreet(void)
|
|
|
|
{
|
2012-12-05 06:35:04 -08:00
|
|
|
if (_elm_need_efreet) return EINA_TRUE;
|
|
|
|
_elm_need_efreet = EINA_TRUE;
|
2009-09-12 02:37:29 -07:00
|
|
|
efreet_init();
|
|
|
|
efreet_mime_init();
|
|
|
|
efreet_trash_init();
|
2010-11-26 01:05:12 -08:00
|
|
|
/*
|
2009-09-12 02:37:29 -07:00
|
|
|
{
|
|
|
|
Eina_List **list;
|
2010-11-29 05:14:37 -08:00
|
|
|
|
2009-09-12 02:37:29 -07:00
|
|
|
list = efreet_icon_extra_list_get();
|
|
|
|
if (list)
|
|
|
|
{
|
|
|
|
e_user_dir_concat_static(buf, "icons");
|
|
|
|
*list = eina_list_prepend(*list, (void *)eina_stringshare_add(buf));
|
|
|
|
e_prefix_data_concat_static(buf, "data/icons");
|
|
|
|
*list = eina_list_prepend(*list, (void *)eina_stringshare_add(buf));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
2010-10-27 21:13:09 -07:00
|
|
|
return EINA_TRUE;
|
2009-09-12 02:37:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_elm_unneed_efreet(void)
|
|
|
|
{
|
2012-12-05 06:35:04 -08:00
|
|
|
if (!_elm_need_efreet) return;
|
|
|
|
_elm_need_efreet = EINA_FALSE;
|
2010-09-14 00:01:57 -07:00
|
|
|
efreet_trash_shutdown();
|
|
|
|
efreet_mime_shutdown();
|
|
|
|
efreet_shutdown();
|
2009-09-12 02:37:29 -07:00
|
|
|
}
|
|
|
|
|
2010-10-20 21:05:35 -07:00
|
|
|
EAPI void
|
|
|
|
elm_quicklaunch_mode_set(Eina_Bool ql_on)
|
|
|
|
{
|
|
|
|
quicklaunch_on = ql_on;
|
|
|
|
}
|
|
|
|
|
2010-10-27 07:38:37 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_quicklaunch_mode_get(void)
|
|
|
|
{
|
|
|
|
return quicklaunch_on;
|
|
|
|
}
|
|
|
|
|
2010-10-20 07:12:17 -07:00
|
|
|
EAPI int
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_quicklaunch_init(int argc,
|
|
|
|
char **argv)
|
2008-09-29 23:58:56 -07:00
|
|
|
{
|
2010-10-20 07:12:17 -07:00
|
|
|
_elm_ql_init_count++;
|
|
|
|
if (_elm_ql_init_count > 1) return _elm_ql_init_count;
|
2009-09-11 07:21:58 -07:00
|
|
|
eina_init();
|
|
|
|
_elm_log_dom = eina_log_domain_register("elementary", EINA_COLOR_LIGHTBLUE);
|
|
|
|
if (!_elm_log_dom)
|
|
|
|
{
|
2010-11-29 05:14:37 -08:00
|
|
|
EINA_LOG_ERR("could not register elementary log domain.");
|
|
|
|
_elm_log_dom = EINA_LOG_DOMAIN_GLOBAL;
|
2009-09-11 07:21:58 -07:00
|
|
|
}
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
eet_init();
|
2009-07-06 23:46:51 -07:00
|
|
|
ecore_init();
|
2011-06-25 07:30:10 -07:00
|
|
|
|
|
|
|
#ifdef HAVE_ELEMENTARY_EMAP
|
|
|
|
emap_init();
|
|
|
|
#endif
|
2008-09-29 23:58:56 -07:00
|
|
|
ecore_app_args_set(argc, (const char **)argv);
|
2009-12-01 05:32:48 -08:00
|
|
|
|
|
|
|
memset(_elm_policies, 0, sizeof(_elm_policies));
|
2010-10-22 14:41:27 -07:00
|
|
|
if (!ELM_EVENT_POLICY_CHANGED)
|
2009-12-01 05:32:48 -08:00
|
|
|
ELM_EVENT_POLICY_CHANGED = ecore_event_type_new();
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
ecore_file_init();
|
2014-07-03 22:29:24 -07:00
|
|
|
eio_init();
|
2009-11-14 17:52:25 -08:00
|
|
|
|
2009-02-25 03:00:07 -08:00
|
|
|
_elm_exit_handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _elm_signal_exit, NULL);
|
2012-10-10 17:35:00 -07:00
|
|
|
|
2012-12-04 10:09:54 -08:00
|
|
|
if (argv)
|
|
|
|
{
|
|
|
|
_elm_appname = strdup(ecore_file_file_get(argv[0]));
|
|
|
|
elm_app_name_set(_elm_appname);
|
|
|
|
}
|
2008-09-29 23:58:56 -07:00
|
|
|
|
2011-12-28 07:19:31 -08:00
|
|
|
pfx = eina_prefix_new(argv ? argv[0] : NULL, elm_quicklaunch_init,
|
2011-04-24 01:18:00 -07:00
|
|
|
"ELM", "elementary", "config/profile.cfg",
|
|
|
|
PACKAGE_LIB_DIR, /* don't have a bin dir currently */
|
|
|
|
PACKAGE_LIB_DIR,
|
|
|
|
PACKAGE_DATA_DIR,
|
|
|
|
LOCALE_DIR);
|
|
|
|
if (pfx)
|
2009-01-13 01:20:53 -08:00
|
|
|
{
|
2011-04-24 01:18:00 -07:00
|
|
|
_elm_data_dir = eina_stringshare_add(eina_prefix_data_get(pfx));
|
|
|
|
_elm_lib_dir = eina_stringshare_add(eina_prefix_lib_get(pfx));
|
2009-01-13 01:20:53 -08:00
|
|
|
}
|
2011-04-24 01:18:00 -07:00
|
|
|
if (!_elm_data_dir) _elm_data_dir = eina_stringshare_add("/");
|
|
|
|
if (!_elm_lib_dir) _elm_lib_dir = eina_stringshare_add("/");
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2013-03-27 06:36:53 -07:00
|
|
|
eina_log_timing(_elm_log_dom,
|
2013-10-13 22:40:35 -07:00
|
|
|
EINA_LOG_STATE_STOP,
|
|
|
|
EINA_LOG_STATE_INIT);
|
2013-03-27 06:36:53 -07:00
|
|
|
|
2013-11-15 04:53:39 -08:00
|
|
|
if (quicklaunch_on)
|
2013-11-05 01:17:58 -08:00
|
|
|
_elm_init_count++;
|
2010-10-20 07:12:17 -07:00
|
|
|
return _elm_ql_init_count;
|
2008-09-29 23:58:56 -07:00
|
|
|
}
|
|
|
|
|
2010-10-20 07:12:17 -07:00
|
|
|
EAPI int
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_quicklaunch_sub_init(int argc,
|
|
|
|
char **argv)
|
2008-09-29 23:58:56 -07:00
|
|
|
{
|
2010-10-20 07:12:17 -07:00
|
|
|
_elm_sub_init_count++;
|
|
|
|
if (_elm_sub_init_count > 1) return _elm_sub_init_count;
|
2010-10-20 21:05:35 -07:00
|
|
|
if (quicklaunch_on)
|
2010-10-20 07:12:17 -07:00
|
|
|
{
|
2012-02-22 00:54:34 -08:00
|
|
|
_elm_config_init();
|
2010-10-20 21:05:35 -07:00
|
|
|
#ifdef SEMI_BROKEN_QUICKLAUNCH
|
|
|
|
return _elm_sub_init_count;
|
2010-10-20 07:12:17 -07:00
|
|
|
#endif
|
|
|
|
}
|
2012-10-10 17:35:00 -07:00
|
|
|
|
2010-10-20 21:05:35 -07:00
|
|
|
if (!quicklaunch_on)
|
|
|
|
{
|
|
|
|
ecore_app_args_set(argc, (const char **)argv);
|
|
|
|
evas_init();
|
|
|
|
edje_init();
|
2010-11-18 01:30:46 -08:00
|
|
|
_elm_module_init();
|
2012-02-22 00:54:34 -08:00
|
|
|
_elm_config_init();
|
2010-10-20 21:05:35 -07:00
|
|
|
_elm_config_sub_init();
|
|
|
|
ecore_evas_init(); // FIXME: check errors
|
|
|
|
ecore_imf_init();
|
2011-07-26 22:59:01 -07:00
|
|
|
ecore_con_init();
|
|
|
|
ecore_con_url_init();
|
2012-11-30 06:41:39 -08:00
|
|
|
_elm_prefs_init();
|
2011-10-05 15:18:22 -07:00
|
|
|
_elm_ews_wm_init();
|
2010-10-20 21:05:35 -07:00
|
|
|
}
|
2010-10-20 07:12:17 -07:00
|
|
|
return _elm_sub_init_count;
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
2008-12-09 22:33:24 -08:00
|
|
|
|
2010-10-20 07:12:17 -07:00
|
|
|
EAPI int
|
2009-02-25 03:00:07 -08:00
|
|
|
elm_quicklaunch_sub_shutdown(void)
|
|
|
|
{
|
2010-10-20 07:12:17 -07:00
|
|
|
_elm_sub_init_count--;
|
|
|
|
if (_elm_sub_init_count > 0) return _elm_sub_init_count;
|
2010-10-20 21:05:35 -07:00
|
|
|
if (quicklaunch_on)
|
|
|
|
{
|
|
|
|
#ifdef SEMI_BROKEN_QUICKLAUNCH
|
|
|
|
return _elm_sub_init_count;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
if (!quicklaunch_on)
|
2010-10-20 07:12:17 -07:00
|
|
|
{
|
2010-10-20 21:05:35 -07:00
|
|
|
_elm_win_shutdown();
|
|
|
|
_elm_module_shutdown();
|
2012-11-30 06:41:39 -08:00
|
|
|
_elm_prefs_shutdown();
|
2011-10-05 15:18:22 -07:00
|
|
|
_elm_ews_wm_shutdown();
|
2011-07-26 22:59:01 -07:00
|
|
|
ecore_con_url_shutdown();
|
|
|
|
ecore_con_shutdown();
|
2010-10-20 21:05:35 -07:00
|
|
|
ecore_imf_shutdown();
|
|
|
|
ecore_evas_shutdown();
|
2011-09-28 19:00:20 -07:00
|
|
|
_elm_config_sub_shutdown();
|
2010-10-20 21:05:35 -07:00
|
|
|
edje_shutdown();
|
|
|
|
evas_shutdown();
|
2010-10-20 07:12:17 -07:00
|
|
|
}
|
|
|
|
return _elm_sub_init_count;
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
2009-01-13 01:20:53 -08:00
|
|
|
|
2010-10-20 07:12:17 -07:00
|
|
|
EAPI int
|
2009-02-25 03:00:07 -08:00
|
|
|
elm_quicklaunch_shutdown(void)
|
|
|
|
{
|
2010-10-20 07:12:17 -07:00
|
|
|
_elm_ql_init_count--;
|
|
|
|
if (_elm_ql_init_count > 0) return _elm_ql_init_count;
|
2013-03-27 06:36:53 -07:00
|
|
|
|
|
|
|
eina_log_timing(_elm_log_dom,
|
|
|
|
EINA_LOG_STATE_STOP,
|
|
|
|
EINA_LOG_STATE_SHUTDOWN);
|
|
|
|
|
2011-04-24 01:18:00 -07:00
|
|
|
if (pfx) eina_prefix_free(pfx);
|
|
|
|
pfx = NULL;
|
2013-05-29 05:00:40 -07:00
|
|
|
ELM_SAFE_FREE(_elm_data_dir, eina_stringshare_del);
|
|
|
|
ELM_SAFE_FREE(_elm_lib_dir, eina_stringshare_del);
|
|
|
|
ELM_SAFE_FREE(_elm_appname, free);
|
2010-11-29 05:14:37 -08:00
|
|
|
|
2010-05-07 08:49:06 -07:00
|
|
|
_elm_config_shutdown();
|
2010-11-29 05:14:37 -08:00
|
|
|
|
2013-05-29 05:00:40 -07:00
|
|
|
ELM_SAFE_FREE(_elm_exit_handler, ecore_event_handler_del);
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2010-04-28 16:14:04 -07:00
|
|
|
_elm_theme_shutdown();
|
2012-12-27 05:38:40 -08:00
|
|
|
_elm_unneed_systray();
|
2012-12-05 14:24:00 -08:00
|
|
|
_elm_unneed_sys_notify();
|
2009-09-12 02:37:29 -07:00
|
|
|
_elm_unneed_efreet();
|
|
|
|
_elm_unneed_e_dbus();
|
2013-04-23 09:05:43 -07:00
|
|
|
_elm_unneed_eldbus();
|
2012-12-11 06:05:48 -08:00
|
|
|
_elm_unneed_elocation();
|
2010-03-31 05:38:58 -07:00
|
|
|
_elm_unneed_ethumb();
|
2011-09-29 13:58:22 -07:00
|
|
|
_elm_unneed_web();
|
2014-07-03 22:29:24 -07:00
|
|
|
eio_shutdown();
|
2008-09-29 23:58:56 -07:00
|
|
|
ecore_file_shutdown();
|
2011-06-25 07:30:10 -07:00
|
|
|
|
|
|
|
#ifdef HAVE_ELEMENTARY_EMAP
|
|
|
|
emap_shutdown();
|
|
|
|
#endif
|
2012-07-02 19:13:42 -07:00
|
|
|
_elm_emotion_shutdown();
|
2011-06-25 07:30:10 -07:00
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
ecore_shutdown();
|
|
|
|
eet_shutdown();
|
2009-09-11 07:21:58 -07:00
|
|
|
|
|
|
|
if ((_elm_log_dom > -1) && (_elm_log_dom != EINA_LOG_DOMAIN_GLOBAL))
|
|
|
|
{
|
2010-11-29 05:14:37 -08:00
|
|
|
eina_log_domain_unregister(_elm_log_dom);
|
|
|
|
_elm_log_dom = -1;
|
2009-09-11 07:21:58 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
eina_shutdown();
|
2010-10-20 07:12:17 -07:00
|
|
|
return _elm_ql_init_count;
|
2008-09-29 23:58:56 -07:00
|
|
|
}
|
|
|
|
|
2009-02-25 03:00:07 -08:00
|
|
|
EAPI void
|
|
|
|
elm_quicklaunch_seed(void)
|
|
|
|
{
|
2010-11-29 05:14:37 -08:00
|
|
|
#ifndef SEMI_BROKEN_QUICKLAUNCH
|
2010-10-20 21:05:35 -07:00
|
|
|
if (quicklaunch_on)
|
2009-02-25 03:00:07 -08:00
|
|
|
{
|
2010-10-20 21:05:35 -07:00
|
|
|
Evas_Object *win, *bg, *bt;
|
2010-11-29 05:14:37 -08:00
|
|
|
|
2010-10-20 21:05:35 -07:00
|
|
|
win = elm_win_add(NULL, "seed", ELM_WIN_BASIC);
|
|
|
|
bg = elm_bg_add(win);
|
|
|
|
elm_win_resize_object_add(win, bg);
|
|
|
|
evas_object_show(bg);
|
|
|
|
bt = elm_button_add(win);
|
2012-03-05 23:33:58 -08:00
|
|
|
elm_object_text_set(bt, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~-_=+\\|]}[{;:'\",<.>/?");
|
2010-10-20 21:05:35 -07:00
|
|
|
elm_win_resize_object_add(win, bt);
|
|
|
|
ecore_main_loop_iterate();
|
|
|
|
evas_object_del(win);
|
|
|
|
ecore_main_loop_iterate();
|
|
|
|
# ifdef HAVE_ELEMENTARY_X
|
2014-08-21 22:48:13 -07:00
|
|
|
if (ecore_x_display_get()) ecore_x_sync();
|
2010-10-20 21:05:35 -07:00
|
|
|
# endif
|
|
|
|
ecore_main_loop_iterate();
|
|
|
|
}
|
2010-11-29 05:14:37 -08:00
|
|
|
#endif
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
|
|
|
|
2011-10-20 14:14:39 -07:00
|
|
|
#ifdef HAVE_FORK
|
2009-02-25 03:00:07 -08:00
|
|
|
static void *qr_handle = NULL;
|
2011-10-20 14:14:39 -07:00
|
|
|
#endif
|
2010-11-29 05:14:37 -08:00
|
|
|
static int (*qr_main)(int argc,
|
|
|
|
char **argv) = NULL;
|
2009-02-25 03:00:07 -08:00
|
|
|
|
2009-06-17 08:35:19 -07:00
|
|
|
EAPI Eina_Bool
|
2012-12-06 00:15:08 -08:00
|
|
|
elm_quicklaunch_prepare(int argc,
|
2013-11-03 22:12:51 -08:00
|
|
|
char **argv,
|
|
|
|
const char *cwd)
|
2009-02-25 03:00:07 -08:00
|
|
|
{
|
2009-03-01 01:33:41 -08:00
|
|
|
#ifdef HAVE_FORK
|
2013-11-03 22:12:51 -08:00
|
|
|
char *exe, *exe2, *p;
|
|
|
|
char *exename;
|
2012-12-06 00:15:08 -08:00
|
|
|
|
|
|
|
if (argc <= 0 || argv == NULL) return EINA_FALSE;
|
|
|
|
|
2013-11-03 22:12:51 -08:00
|
|
|
exe = elm_quicklaunch_exe_path_get(argv[0], cwd);
|
2009-02-25 03:00:07 -08:00
|
|
|
if (!exe)
|
|
|
|
{
|
2010-11-29 05:14:37 -08:00
|
|
|
ERR("requested quicklaunch binary '%s' does not exist\n", argv[0]);
|
|
|
|
return EINA_FALSE;
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
2013-11-03 22:12:51 -08:00
|
|
|
|
|
|
|
exe2 = malloc(strlen(exe) + 1 + 7 + strlen(LIBEXT));
|
|
|
|
strcpy(exe2, exe);
|
|
|
|
p = strrchr(exe2, '/');
|
|
|
|
if (p) p++;
|
|
|
|
else p = exe2;
|
|
|
|
exename = alloca(strlen(p) + 1);
|
|
|
|
strcpy(exename, p);
|
|
|
|
*p = 0;
|
|
|
|
strcat(p, "../lib/");
|
|
|
|
strcat(p, exename);
|
|
|
|
strcat(p, LIBEXT);
|
|
|
|
if (access(exe2, R_OK | X_OK) != 0)
|
2014-01-21 18:08:47 -08:00
|
|
|
ELM_SAFE_FREE(exe2, free);
|
2013-11-03 22:12:51 -08:00
|
|
|
|
|
|
|
/* Try linking to executable first. Works with PIE files. */
|
|
|
|
qr_handle = dlopen(exe, RTLD_NOW | RTLD_GLOBAL);
|
|
|
|
if (qr_handle)
|
2009-02-25 03:00:07 -08:00
|
|
|
{
|
2013-11-03 22:12:51 -08:00
|
|
|
INF("dlopen('%s') = %p", exe, qr_handle);
|
|
|
|
qr_main = dlsym(qr_handle, "elm_main");
|
|
|
|
if (qr_main)
|
2010-11-29 05:14:37 -08:00
|
|
|
{
|
2013-11-03 22:12:51 -08:00
|
|
|
INF("dlsym(%p, 'elm_main') = %p", qr_handle, qr_main);
|
|
|
|
free(exe2);
|
2010-11-29 05:14:37 -08:00
|
|
|
free(exe);
|
2013-11-03 22:12:51 -08:00
|
|
|
return EINA_TRUE;
|
2010-11-29 05:14:37 -08:00
|
|
|
}
|
2013-11-03 22:12:51 -08:00
|
|
|
dlclose(qr_handle);
|
|
|
|
qr_handle = NULL;
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
2013-11-03 22:12:51 -08:00
|
|
|
|
|
|
|
if (!exe2)
|
|
|
|
{
|
|
|
|
WRN("not quicklauncher capable: '%s'", exe);
|
|
|
|
free(exe);
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
free(exe);
|
|
|
|
|
|
|
|
/* Open companion .so file.
|
|
|
|
* Support for legacy quicklaunch apps with separate library.
|
|
|
|
*/
|
|
|
|
qr_handle = dlopen(exe2, RTLD_NOW | RTLD_GLOBAL);
|
2009-09-11 08:02:07 -07:00
|
|
|
if (!qr_handle)
|
|
|
|
{
|
2009-09-13 21:20:51 -07:00
|
|
|
fprintf(stderr, "dlerr: %s\n", dlerror());
|
2013-11-03 22:12:51 -08:00
|
|
|
WRN("dlopen('%s') failed: %s", exe2, dlerror());
|
|
|
|
free(exe2);
|
2010-11-29 05:14:37 -08:00
|
|
|
return EINA_FALSE;
|
2009-09-11 08:02:07 -07:00
|
|
|
}
|
2013-11-03 22:12:51 -08:00
|
|
|
INF("dlopen('%s') = %p", exe2, qr_handle);
|
2009-02-25 03:00:07 -08:00
|
|
|
qr_main = dlsym(qr_handle, "elm_main");
|
2009-09-11 08:02:07 -07:00
|
|
|
INF("dlsym(%p, 'elm_main') = %p", qr_handle, qr_main);
|
2009-02-25 03:00:07 -08:00
|
|
|
if (!qr_main)
|
|
|
|
{
|
2013-11-03 22:12:51 -08:00
|
|
|
WRN("not quicklauncher capable: no elm_main in '%s'", exe2);
|
2010-11-29 05:14:37 -08:00
|
|
|
dlclose(qr_handle);
|
|
|
|
qr_handle = NULL;
|
2013-11-03 22:12:51 -08:00
|
|
|
free(exe2);
|
2010-11-29 05:14:37 -08:00
|
|
|
return EINA_FALSE;
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
2013-11-03 22:12:51 -08:00
|
|
|
free(exe2);
|
2009-06-17 08:35:19 -07:00
|
|
|
return EINA_TRUE;
|
2009-03-01 01:33:41 -08:00
|
|
|
#else
|
2013-03-21 06:35:45 -07:00
|
|
|
(void)argc;
|
2010-10-19 11:25:57 -07:00
|
|
|
(void)argv;
|
2014-06-10 22:04:48 -07:00
|
|
|
(void)cwd;
|
2013-03-21 06:35:45 -07:00
|
|
|
return EINA_FALSE;
|
2009-03-01 01:33:41 -08:00
|
|
|
#endif
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
|
|
|
|
2009-06-17 08:35:19 -07:00
|
|
|
EAPI Eina_Bool
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_quicklaunch_fork(int argc,
|
|
|
|
char **argv,
|
|
|
|
char *cwd,
|
|
|
|
void (postfork_func) (void *data),
|
|
|
|
void *postfork_data)
|
2009-02-25 03:00:07 -08:00
|
|
|
{
|
2009-03-01 01:33:41 -08:00
|
|
|
#ifdef HAVE_FORK
|
2009-02-25 03:00:07 -08:00
|
|
|
pid_t child;
|
|
|
|
int ret;
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2009-02-25 03:00:07 -08:00
|
|
|
if (!qr_main)
|
|
|
|
{
|
2010-11-29 05:14:37 -08:00
|
|
|
int i;
|
|
|
|
char **args;
|
|
|
|
|
|
|
|
child = fork();
|
|
|
|
if (child > 0) return EINA_TRUE;
|
|
|
|
else if (child < 0)
|
|
|
|
{
|
|
|
|
perror("could not fork");
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
setsid();
|
2012-08-07 00:37:14 -07:00
|
|
|
if (chdir(cwd) != 0) perror("could not chdir");
|
2010-11-29 05:14:37 -08:00
|
|
|
args = alloca((argc + 1) * sizeof(char *));
|
|
|
|
for (i = 0; i < argc; i++) args[i] = argv[i];
|
|
|
|
args[argc] = NULL;
|
|
|
|
WRN("%s not quicklaunch capable, fallback...", argv[0]);
|
|
|
|
execvp(argv[0], args);
|
|
|
|
ERR("failed to execute '%s': %s", argv[0], strerror(errno));
|
|
|
|
exit(-1);
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
|
|
|
child = fork();
|
2009-06-17 08:35:19 -07:00
|
|
|
if (child > 0) return EINA_TRUE;
|
2009-02-25 07:54:26 -08:00
|
|
|
else if (child < 0)
|
|
|
|
{
|
2010-11-29 05:14:37 -08:00
|
|
|
perror("could not fork");
|
|
|
|
return EINA_FALSE;
|
2009-02-25 07:54:26 -08:00
|
|
|
}
|
2009-02-25 22:20:41 -08:00
|
|
|
if (postfork_func) postfork_func(postfork_data);
|
2010-11-29 05:14:37 -08:00
|
|
|
|
2012-08-09 05:23:15 -07:00
|
|
|
ecore_fork_reset();
|
2013-03-21 22:44:54 -07:00
|
|
|
eina_main_loop_define();
|
2012-08-09 05:23:15 -07:00
|
|
|
|
2010-10-20 21:05:35 -07:00
|
|
|
if (quicklaunch_on)
|
2010-10-20 07:12:17 -07:00
|
|
|
{
|
2014-01-21 18:08:47 -08:00
|
|
|
ELM_SAFE_FREE(_elm_appname, free);
|
2012-08-07 00:37:14 -07:00
|
|
|
if ((argv) && (argv[0]))
|
|
|
|
_elm_appname = strdup(ecore_file_file_get(argv[0]));
|
2012-10-10 17:35:00 -07:00
|
|
|
|
2010-10-20 21:05:35 -07:00
|
|
|
#ifdef SEMI_BROKEN_QUICKLAUNCH
|
|
|
|
ecore_app_args_set(argc, (const char **)argv);
|
|
|
|
evas_init();
|
|
|
|
edje_init();
|
2012-08-07 00:37:14 -07:00
|
|
|
_elm_module_init();
|
2010-10-20 21:05:35 -07:00
|
|
|
_elm_config_sub_init();
|
|
|
|
# ifdef HAVE_ELEMENTARY_X
|
2014-08-21 22:48:13 -07:00
|
|
|
{
|
|
|
|
const char *ev = getenv("ELM_DISPLAY");
|
|
|
|
if (((ev) && (!strcmp(ev, "x11")) && (getenv("DISPLAY"))) ||
|
|
|
|
(getenv("DISPLAY")))
|
|
|
|
ecore_x_init(NULL);
|
2010-10-20 21:05:35 -07:00
|
|
|
}
|
2014-08-21 22:48:13 -07:00
|
|
|
# endif
|
2010-10-20 21:05:35 -07:00
|
|
|
ecore_evas_init(); // FIXME: check errors
|
|
|
|
ecore_imf_init();
|
2010-10-20 07:12:17 -07:00
|
|
|
#endif
|
|
|
|
}
|
2010-11-29 05:14:37 -08:00
|
|
|
|
2009-02-25 18:13:34 -08:00
|
|
|
setsid();
|
2012-08-07 00:37:14 -07:00
|
|
|
if (chdir(cwd) != 0) perror("could not chdir");
|
2009-02-25 22:20:41 -08:00
|
|
|
ecore_app_args_set(argc, (const char **)argv);
|
2009-02-25 03:00:07 -08:00
|
|
|
ret = qr_main(argc, argv);
|
|
|
|
exit(ret);
|
2009-06-17 08:35:19 -07:00
|
|
|
return EINA_TRUE;
|
2009-03-01 01:33:41 -08:00
|
|
|
#else
|
2009-06-17 08:35:19 -07:00
|
|
|
return EINA_FALSE;
|
2010-10-19 11:25:57 -07:00
|
|
|
(void)argc;
|
|
|
|
(void)argv;
|
|
|
|
(void)cwd;
|
|
|
|
(void)postfork_func;
|
|
|
|
(void)postfork_data;
|
2009-07-06 23:46:51 -07:00
|
|
|
#endif
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_quicklaunch_cleanup(void)
|
|
|
|
{
|
2009-03-01 01:33:41 -08:00
|
|
|
#ifdef HAVE_FORK
|
2009-02-25 03:00:07 -08:00
|
|
|
if (qr_handle)
|
|
|
|
{
|
2010-11-29 05:14:37 -08:00
|
|
|
dlclose(qr_handle);
|
|
|
|
qr_handle = NULL;
|
|
|
|
qr_main = NULL;
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
2009-03-01 01:33:41 -08:00
|
|
|
#endif
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI int
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_quicklaunch_fallback(int argc,
|
|
|
|
char **argv)
|
2009-02-25 03:00:07 -08:00
|
|
|
{
|
|
|
|
int ret;
|
2013-11-03 22:12:51 -08:00
|
|
|
char cwd[PATH_MAX];
|
2009-02-25 03:00:07 -08:00
|
|
|
elm_quicklaunch_init(argc, argv);
|
|
|
|
elm_quicklaunch_sub_init(argc, argv);
|
2013-11-03 22:12:51 -08:00
|
|
|
elm_quicklaunch_prepare(argc, argv, getcwd(cwd, sizeof(cwd)));
|
2009-02-25 03:00:07 -08:00
|
|
|
ret = qr_main(argc, argv);
|
|
|
|
exit(ret);
|
2009-03-01 01:33:41 -08:00
|
|
|
return ret;
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI char *
|
2013-11-03 22:12:51 -08:00
|
|
|
elm_quicklaunch_exe_path_get(const char *exe, const char *cwd)
|
2009-02-25 03:00:07 -08:00
|
|
|
{
|
|
|
|
static char *path = NULL;
|
|
|
|
static Eina_List *pathlist = NULL;
|
2009-02-25 11:50:45 -08:00
|
|
|
const char *pathitr;
|
|
|
|
const Eina_List *l;
|
2009-02-25 03:00:07 -08:00
|
|
|
char buf[PATH_MAX];
|
|
|
|
if (exe[0] == '/') return strdup(exe);
|
2013-11-03 22:12:51 -08:00
|
|
|
if (cwd)
|
|
|
|
pathlist = eina_list_append(pathlist, eina_stringshare_add(cwd));
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ((exe[0] == '.') && (exe[1] == '/')) return strdup(exe);
|
|
|
|
if ((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/')) return strdup(exe);
|
|
|
|
}
|
2009-02-25 03:00:07 -08:00
|
|
|
if (!path)
|
|
|
|
{
|
2010-11-29 05:14:37 -08:00
|
|
|
const char *p, *pp;
|
|
|
|
char *buf2;
|
|
|
|
path = getenv("PATH");
|
|
|
|
buf2 = alloca(strlen(path) + 1);
|
|
|
|
p = path;
|
|
|
|
pp = p;
|
|
|
|
for (;; )
|
|
|
|
{
|
|
|
|
if ((*p == ':') || (!*p))
|
|
|
|
{
|
|
|
|
int len;
|
|
|
|
|
|
|
|
len = p - pp;
|
|
|
|
strncpy(buf2, pp, len);
|
|
|
|
buf2[len] = 0;
|
|
|
|
pathlist = eina_list_append(pathlist, eina_stringshare_add(buf2));
|
|
|
|
if (!*p) break;
|
|
|
|
p++;
|
|
|
|
pp = p;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!*p) break;
|
|
|
|
p++;
|
|
|
|
}
|
|
|
|
}
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
2009-02-25 11:50:45 -08:00
|
|
|
EINA_LIST_FOREACH(pathlist, l, pathitr)
|
2009-02-25 03:00:07 -08:00
|
|
|
{
|
2010-11-29 05:14:37 -08:00
|
|
|
snprintf(buf, sizeof(buf), "%s/%s", pathitr, exe);
|
|
|
|
if (!access(buf, R_OK | X_OK)) return strdup(buf);
|
2009-02-25 03:00:07 -08:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
EAPI void
|
|
|
|
elm_run(void)
|
|
|
|
{
|
|
|
|
ecore_main_loop_begin();
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_exit(void)
|
|
|
|
{
|
|
|
|
ecore_main_loop_quit();
|
2012-10-02 10:06:11 -07:00
|
|
|
|
|
|
|
if (elm_policy_get(ELM_POLICY_EXIT) == ELM_POLICY_EXIT_WINDOWS_DEL)
|
|
|
|
{
|
|
|
|
Eina_List *l, *l_next;
|
|
|
|
Evas_Object *win;
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH_SAFE(_elm_win_list, l, l_next, win)
|
2013-03-16 01:28:10 -07:00
|
|
|
evas_object_del(win);
|
2012-10-02 10:06:11 -07:00
|
|
|
}
|
2008-09-29 23:58:56 -07:00
|
|
|
}
|
2009-02-02 21:09:03 -08:00
|
|
|
|
2012-07-06 23:27:18 -07:00
|
|
|
//FIXME: Use Elm_Policy Parameter when 2.0 is released.
|
2009-12-01 05:32:48 -08:00
|
|
|
EAPI Eina_Bool
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_policy_set(unsigned int policy,
|
|
|
|
int value)
|
2009-12-01 05:32:48 -08:00
|
|
|
{
|
|
|
|
Elm_Event_Policy_Changed *ev;
|
|
|
|
|
|
|
|
if (policy >= ELM_POLICY_LAST)
|
|
|
|
return EINA_FALSE;
|
|
|
|
|
|
|
|
if (value == _elm_policies[policy])
|
|
|
|
return EINA_TRUE;
|
|
|
|
|
2012-07-29 23:50:44 -07:00
|
|
|
/* TODO: validate policy? */
|
2009-12-01 05:32:48 -08:00
|
|
|
|
|
|
|
ev = malloc(sizeof(*ev));
|
|
|
|
ev->policy = policy;
|
|
|
|
ev->new_value = value;
|
|
|
|
ev->old_value = _elm_policies[policy];
|
|
|
|
|
|
|
|
_elm_policies[policy] = value;
|
|
|
|
|
|
|
|
ecore_event_add(ELM_EVENT_POLICY_CHANGED, ev, NULL, NULL);
|
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
2012-07-06 23:34:16 -07:00
|
|
|
//FIXME: Use Elm_Policy Parameter when 2.0 is released.
|
2009-12-01 05:32:48 -08:00
|
|
|
EAPI int
|
|
|
|
elm_policy_get(unsigned int policy)
|
|
|
|
{
|
|
|
|
if (policy >= ELM_POLICY_LAST)
|
|
|
|
return 0;
|
|
|
|
return _elm_policies[policy];
|
|
|
|
}
|
|
|
|
|
2011-10-19 07:17:14 -07:00
|
|
|
EAPI void
|
|
|
|
elm_language_set(const char *lang)
|
|
|
|
{
|
|
|
|
setlocale(LC_ALL, lang);
|
|
|
|
_elm_win_translate();
|
|
|
|
}
|
|
|
|
|
2011-02-10 00:29:24 -08:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_mirrored_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
|
|
|
return elm_widget_mirrored_get(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
|
|
|
elm_widget_mirrored_set(obj, mirrored);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_mirrored_automatic_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
|
|
|
return elm_widget_mirrored_automatic_get(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_mirrored_automatic_set(Evas_Object *obj, Eina_Bool automatic)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
|
|
|
elm_widget_mirrored_automatic_set(obj, automatic);
|
|
|
|
}
|
|
|
|
|
2011-08-10 12:56:17 -07:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2009-02-02 21:09:03 -08:00
|
|
|
EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_scale_set(Evas_Object *obj,
|
|
|
|
double scale)
|
2009-02-02 21:09:03 -08:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2009-11-29 08:02:05 -08:00
|
|
|
elm_widget_scale_set(obj, scale);
|
2009-02-02 21:09:03 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI double
|
2009-02-25 07:54:26 -08:00
|
|
|
elm_object_scale_get(const Evas_Object *obj)
|
2009-02-02 21:09:03 -08:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0.0);
|
2009-02-02 21:09:03 -08:00
|
|
|
return elm_widget_scale_get(obj);
|
|
|
|
}
|
|
|
|
|
2011-11-16 12:17:25 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_part_text_set(Evas_Object *obj, const char *part, const char *label)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2013-02-13 03:02:36 -08:00
|
|
|
elm_widget_part_text_set(obj, part, label);
|
2011-11-16 12:17:25 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
elm_object_part_text_get(const Evas_Object *obj, const char *part)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
2013-02-13 03:02:36 -08:00
|
|
|
return elm_widget_part_text_get(obj, part);
|
2011-11-16 12:17:25 -08:00
|
|
|
}
|
|
|
|
|
2011-10-19 07:17:14 -07:00
|
|
|
EAPI void
|
2013-02-12 03:43:39 -08:00
|
|
|
elm_object_domain_translatable_part_text_set(Evas_Object *obj, const char *part, const char *domain, const char *text)
|
2011-10-19 07:17:14 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2013-02-12 03:43:39 -08:00
|
|
|
elm_widget_domain_translatable_part_text_set(obj, part, domain, text);
|
2011-10-19 07:17:14 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
2013-02-12 03:43:39 -08:00
|
|
|
elm_object_translatable_part_text_get(const Evas_Object *obj, const char *part)
|
2011-10-19 07:17:14 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
2013-02-12 03:43:39 -08:00
|
|
|
return elm_widget_translatable_part_text_get(obj, part);
|
|
|
|
}
|
|
|
|
|
2013-04-23 00:49:49 -07:00
|
|
|
EAPI void
|
|
|
|
elm_object_domain_part_text_translatable_set(Evas_Object *obj, const char *part, const char *domain, Eina_Bool translatable)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
|
|
|
elm_widget_domain_part_text_translatable_set(obj, part, domain, translatable);
|
|
|
|
}
|
|
|
|
|
2013-02-12 03:43:39 -08:00
|
|
|
EINA_DEPRECATED EAPI void
|
|
|
|
elm_object_domain_translatable_text_part_set(Evas_Object *obj, const char *part, const char *domain, const char *text)
|
|
|
|
{
|
|
|
|
elm_object_domain_translatable_part_text_set(obj, part, domain, text);
|
|
|
|
}
|
|
|
|
|
|
|
|
EINA_DEPRECATED EAPI const char *
|
|
|
|
elm_object_translatable_text_part_get(const Evas_Object *obj, const char *part)
|
|
|
|
{
|
|
|
|
return elm_object_translatable_part_text_get(obj, part);
|
2011-10-19 07:17:14 -07:00
|
|
|
}
|
|
|
|
|
2011-11-17 13:02:31 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_part_content_set(Evas_Object *obj, const char *part, Evas_Object *content)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
|
|
|
elm_widget_content_part_set(obj, part, content);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_part_content_get(const Evas_Object *obj, const char *part)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
|
|
|
return elm_widget_content_part_get(obj, part);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_part_content_unset(Evas_Object *obj, const char *part)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
|
|
|
return elm_widget_content_part_unset(obj, part);
|
|
|
|
}
|
|
|
|
|
2012-03-06 10:39:53 -08:00
|
|
|
EAPI Eina_Bool
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_style_set(Evas_Object *obj,
|
|
|
|
const char *style)
|
2009-04-22 21:03:27 -07:00
|
|
|
{
|
2012-03-06 10:39:53 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
|
|
|
return elm_widget_style_set(obj, style);
|
2009-04-22 21:03:27 -07:00
|
|
|
}
|
|
|
|
|
2014-02-05 02:17:41 -08:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_focus_highlight_style_set(Evas_Object *obj,
|
|
|
|
const char *style)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
|
|
|
return elm_widget_focus_highlight_style_set(obj, style);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
elm_object_focus_highlight_style_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
|
|
|
return elm_widget_focus_highlight_style_get(obj);
|
|
|
|
}
|
|
|
|
|
2009-04-22 21:03:27 -07:00
|
|
|
EAPI const char *
|
|
|
|
elm_object_style_get(const Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
2009-04-22 21:03:27 -07:00
|
|
|
return elm_widget_style_get(obj);
|
|
|
|
}
|
|
|
|
|
2009-08-16 04:35:55 -07:00
|
|
|
EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_disabled_set(Evas_Object *obj,
|
|
|
|
Eina_Bool disabled)
|
2009-08-16 04:35:55 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2009-08-16 04:35:55 -07:00
|
|
|
elm_widget_disabled_set(obj, disabled);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_disabled_get(const Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
2009-08-16 04:35:55 -07:00
|
|
|
return elm_widget_disabled_get(obj);
|
|
|
|
}
|
|
|
|
|
2010-11-21 22:56:06 -08:00
|
|
|
EAPI void
|
2012-02-16 21:12:56 -08:00
|
|
|
elm_cache_all_flush(void)
|
2010-10-04 09:55:32 -07:00
|
|
|
{
|
2010-11-21 22:56:06 -08:00
|
|
|
const Eina_List *l;
|
|
|
|
Evas_Object *obj;
|
|
|
|
|
2011-01-31 00:32:15 -08:00
|
|
|
edje_file_cache_flush();
|
|
|
|
edje_collection_cache_flush();
|
|
|
|
eet_clearcache();
|
2010-11-21 22:56:06 -08:00
|
|
|
EINA_LIST_FOREACH(_elm_win_list, l, obj)
|
|
|
|
{
|
|
|
|
Evas *e = evas_object_evas_get(obj);
|
|
|
|
evas_image_cache_flush(e);
|
|
|
|
evas_font_cache_flush(e);
|
|
|
|
evas_render_dump(e);
|
|
|
|
}
|
2010-10-04 09:55:32 -07:00
|
|
|
}
|
|
|
|
|
2010-05-19 06:17:02 -07:00
|
|
|
EAPI Eina_Bool
|
2010-10-21 11:58:40 -07:00
|
|
|
elm_object_focus_get(const Evas_Object *obj)
|
2010-05-19 06:17:02 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
2010-05-19 06:17:02 -07:00
|
|
|
return elm_widget_focus_get(obj);
|
|
|
|
}
|
|
|
|
|
2009-05-19 06:50:06 -07:00
|
|
|
EAPI void
|
2011-08-03 04:46:23 -07:00
|
|
|
elm_object_focus_set(Evas_Object *obj,
|
|
|
|
Eina_Bool focus)
|
2009-05-19 06:50:06 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2012-02-21 04:36:54 -08:00
|
|
|
|
2012-05-28 17:31:38 -07:00
|
|
|
if (elm_widget_is(obj))
|
|
|
|
{
|
2012-08-22 03:02:32 -07:00
|
|
|
const char *type;
|
2012-10-10 17:35:00 -07:00
|
|
|
|
2012-05-28 17:31:38 -07:00
|
|
|
if (focus == elm_widget_focus_get(obj)) return;
|
2012-10-10 17:35:00 -07:00
|
|
|
|
2012-08-22 03:02:32 -07:00
|
|
|
// ugly, but, special case for inlined windows
|
|
|
|
type = evas_object_type_get(obj);
|
|
|
|
if ((type) && (!strcmp(type, "elm_win")))
|
|
|
|
{
|
|
|
|
Evas_Object *inlined = elm_win_inlined_image_object_get(obj);
|
2012-10-10 17:35:00 -07:00
|
|
|
|
2012-08-22 03:02:32 -07:00
|
|
|
if (inlined)
|
|
|
|
{
|
|
|
|
evas_object_focus_set(inlined, focus);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2012-05-28 17:31:38 -07:00
|
|
|
if (focus)
|
|
|
|
elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
|
|
|
|
else
|
|
|
|
elm_widget_focused_object_clear(obj);
|
|
|
|
}
|
2011-08-03 04:46:23 -07:00
|
|
|
else
|
2012-05-28 17:31:38 -07:00
|
|
|
{
|
|
|
|
evas_object_focus_set(obj, focus);
|
|
|
|
}
|
2011-08-03 04:46:23 -07:00
|
|
|
}
|
2010-10-08 13:16:52 -07:00
|
|
|
|
2009-10-22 01:04:34 -07:00
|
|
|
EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_focus_allow_set(Evas_Object *obj,
|
|
|
|
Eina_Bool enable)
|
2009-10-22 01:04:34 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2009-10-22 01:04:34 -07:00
|
|
|
elm_widget_can_focus_set(obj, enable);
|
2012-02-21 04:36:54 -08:00
|
|
|
/*FIXME: According to the elm_object_focus_allow_get(), child_can_focus field
|
|
|
|
of the parent should be updated. Otherwise, the checking of it's child focus allow states should not be in elm_object_focus_allow_get() */
|
2009-10-22 01:04:34 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
2010-03-23 20:06:00 -07:00
|
|
|
elm_object_focus_allow_get(const Evas_Object *obj)
|
2009-10-22 01:04:34 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
2010-10-22 14:41:22 -07:00
|
|
|
return (elm_widget_can_focus_get(obj)) || (elm_widget_child_can_focus_get(obj));
|
2009-10-22 01:04:34 -07:00
|
|
|
}
|
|
|
|
|
2010-10-19 07:17:03 -07:00
|
|
|
EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_focus_custom_chain_set(Evas_Object *obj,
|
|
|
|
Eina_List *objs)
|
2010-10-19 07:17:03 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2010-10-19 07:17:03 -07:00
|
|
|
elm_widget_focus_custom_chain_set(obj, objs);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_focus_custom_chain_unset(Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2010-10-19 07:17:03 -07:00
|
|
|
elm_widget_focus_custom_chain_unset(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const Eina_List *
|
|
|
|
elm_object_focus_custom_chain_get(const Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
2010-10-19 07:17:03 -07:00
|
|
|
return elm_widget_focus_custom_chain_get(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_focus_custom_chain_append(Evas_Object *obj,
|
|
|
|
Evas_Object *child,
|
|
|
|
Evas_Object *relative_child)
|
2010-10-19 07:17:03 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2010-10-19 07:17:03 -07:00
|
|
|
elm_widget_focus_custom_chain_append(obj, child, relative_child);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_focus_custom_chain_prepend(Evas_Object *obj,
|
|
|
|
Evas_Object *child,
|
|
|
|
Evas_Object *relative_child)
|
2010-10-19 07:17:03 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2010-10-19 07:17:03 -07:00
|
|
|
elm_widget_focus_custom_chain_prepend(obj, child, relative_child);
|
|
|
|
}
|
|
|
|
|
2012-03-05 17:06:41 -08:00
|
|
|
EINA_DEPRECATED EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_focus_cycle(Evas_Object *obj,
|
|
|
|
Elm_Focus_Direction dir)
|
2012-03-05 17:06:41 -08:00
|
|
|
{
|
|
|
|
elm_object_focus_next(obj, dir);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_focus_next(Evas_Object *obj,
|
|
|
|
Elm_Focus_Direction dir)
|
2010-10-20 05:38:27 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2010-10-20 05:38:27 -07:00
|
|
|
elm_widget_focus_cycle(obj, dir);
|
|
|
|
}
|
|
|
|
|
2013-03-22 17:36:21 -07:00
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_focus_next_object_get(const Evas_Object *obj,
|
|
|
|
Elm_Focus_Direction dir)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
|
|
|
return elm_widget_focus_next_object_get(obj, dir);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_focus_next_object_set(Evas_Object *obj,
|
|
|
|
Evas_Object *next,
|
|
|
|
Elm_Focus_Direction dir)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
|
|
|
elm_widget_focus_next_object_set(obj, next, dir);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_focused_object_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
|
|
|
return elm_widget_focused_object_get(obj);
|
|
|
|
}
|
|
|
|
|
2012-03-06 04:30:16 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_tree_focus_allow_set(Evas_Object *obj,
|
2012-03-06 09:57:20 -08:00
|
|
|
Eina_Bool tree_focusable)
|
2011-07-27 23:58:29 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2012-03-06 09:57:20 -08:00
|
|
|
elm_widget_tree_unfocusable_set(obj, !tree_focusable);
|
2011-07-27 23:58:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
2012-03-06 04:30:16 -08:00
|
|
|
elm_object_tree_focus_allow_get(const Evas_Object *obj)
|
2011-07-27 23:58:29 -07:00
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
2012-03-14 22:23:06 -07:00
|
|
|
return !elm_widget_tree_unfocusable_get(obj);
|
2011-07-27 23:58:29 -07:00
|
|
|
}
|
|
|
|
|
2009-09-07 21:40:27 -07:00
|
|
|
EAPI void
|
|
|
|
elm_object_scroll_hold_push(Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2009-09-07 21:40:27 -07:00
|
|
|
elm_widget_scroll_hold_push(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_scroll_hold_pop(Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2009-09-07 21:40:27 -07:00
|
|
|
elm_widget_scroll_hold_pop(obj);
|
|
|
|
}
|
|
|
|
|
2012-06-08 01:59:07 -07:00
|
|
|
EAPI int
|
|
|
|
elm_object_scroll_hold_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0);
|
2012-06-11 01:19:04 -07:00
|
|
|
return elm_widget_scroll_hold_get(obj);
|
2012-06-08 01:59:07 -07:00
|
|
|
}
|
|
|
|
|
2009-09-07 21:40:27 -07:00
|
|
|
EAPI void
|
|
|
|
elm_object_scroll_freeze_push(Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2009-09-07 21:40:27 -07:00
|
|
|
elm_widget_scroll_freeze_push(obj);
|
|
|
|
}
|
|
|
|
|
2012-06-08 01:59:07 -07:00
|
|
|
EAPI void
|
|
|
|
elm_object_scroll_freeze_pop(Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
|
|
|
elm_widget_scroll_freeze_pop(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI int
|
|
|
|
elm_object_scroll_freeze_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0);
|
2012-06-11 01:19:04 -07:00
|
|
|
return elm_widget_scroll_freeze_get(obj);
|
2012-06-08 01:59:07 -07:00
|
|
|
}
|
|
|
|
|
2010-06-30 23:59:30 -07:00
|
|
|
EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_scroll_lock_x_set(Evas_Object *obj,
|
|
|
|
Eina_Bool lock)
|
2010-06-30 23:59:30 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2010-06-30 23:59:30 -07:00
|
|
|
elm_widget_drag_lock_x_set(obj, lock);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_scroll_lock_y_set(Evas_Object *obj,
|
|
|
|
Eina_Bool lock)
|
2010-06-30 23:59:30 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2010-06-30 23:59:30 -07:00
|
|
|
elm_widget_drag_lock_y_set(obj, lock);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_scroll_lock_x_get(const Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
2010-06-30 23:59:30 -07:00
|
|
|
return elm_widget_drag_lock_x_get(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_scroll_lock_y_get(const Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
2010-06-30 23:59:30 -07:00
|
|
|
return elm_widget_drag_lock_y_get(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-24 01:35:07 -07:00
|
|
|
EAPI void
|
|
|
|
elm_object_scroll_item_loop_enabled_set(Evas_Object *obj,
|
|
|
|
Eina_Bool enable)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
|
|
|
elm_widget_item_loop_enabled_set(obj, enable);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_scroll_item_loop_enabled_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
|
|
|
return elm_widget_item_loop_enabled_get(obj);
|
|
|
|
}
|
|
|
|
|
2010-03-22 14:36:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_widget_check(const Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
2010-03-22 14:36:59 -07:00
|
|
|
return elm_widget_is(obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_parent_widget_get(const Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
2010-03-22 14:36:59 -07:00
|
|
|
return elm_widget_parent_widget_get(obj);
|
|
|
|
}
|
2010-05-13 15:02:26 -07:00
|
|
|
|
2010-06-23 01:51:58 -07:00
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_top_widget_get(const Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
2010-06-23 01:51:58 -07:00
|
|
|
return elm_widget_top_get(obj);
|
|
|
|
}
|
|
|
|
|
2010-05-13 15:02:26 -07:00
|
|
|
EAPI const char *
|
|
|
|
elm_object_widget_type_get(const Evas_Object *obj)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
2010-05-13 15:02:26 -07:00
|
|
|
return elm_widget_type_get(obj);
|
|
|
|
}
|
2010-06-15 07:11:13 -07:00
|
|
|
|
2010-11-29 05:14:37 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_signal_emit(Evas_Object *obj,
|
|
|
|
const char *emission,
|
|
|
|
const char *source)
|
2010-06-15 07:11:13 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_widget_signal_emit(obj, emission, source);
|
2010-06-15 07:11:13 -07:00
|
|
|
}
|
2010-06-25 15:38:32 -07:00
|
|
|
|
2011-04-08 07:36:29 -07:00
|
|
|
EAPI void
|
2011-07-22 04:10:10 -07:00
|
|
|
elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data)
|
2010-06-25 15:38:32 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(func);
|
2010-06-28 08:32:20 -07:00
|
|
|
elm_widget_signal_callback_add(obj, emission, source, func, data);
|
2010-06-25 15:38:32 -07:00
|
|
|
}
|
|
|
|
|
2010-09-21 13:09:29 -07:00
|
|
|
EAPI void *
|
2011-07-22 04:10:10 -07:00
|
|
|
elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func)
|
2010-06-25 15:38:32 -07:00
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL);
|
2010-06-28 08:32:20 -07:00
|
|
|
return elm_widget_signal_callback_del(obj, emission, source, func);
|
2010-06-25 15:38:32 -07:00
|
|
|
}
|
2010-10-01 12:03:23 -07:00
|
|
|
|
2010-11-29 05:56:30 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN(func);
|
2010-11-29 05:56:30 -08:00
|
|
|
elm_widget_event_callback_add(obj, func, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void *
|
|
|
|
elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data)
|
|
|
|
{
|
2010-12-03 06:08:33 -08:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL);
|
2010-11-29 05:56:30 -08:00
|
|
|
return elm_widget_event_callback_del(obj, func, data);
|
|
|
|
}
|
2010-10-06 13:24:22 -07:00
|
|
|
|
2010-10-01 12:03:23 -07:00
|
|
|
EAPI void
|
|
|
|
elm_object_tree_dump(const Evas_Object *top)
|
|
|
|
{
|
|
|
|
#ifdef ELM_DEBUG
|
|
|
|
elm_widget_tree_dump(top);
|
2010-10-19 11:24:27 -07:00
|
|
|
#else
|
|
|
|
(void)top;
|
2013-01-09 01:02:22 -08:00
|
|
|
return;
|
2010-10-01 12:03:23 -07:00
|
|
|
#endif
|
|
|
|
}
|
2010-10-04 11:37:48 -07:00
|
|
|
|
|
|
|
EAPI void
|
2010-11-29 05:14:37 -08:00
|
|
|
elm_object_tree_dot_dump(const Evas_Object *top,
|
|
|
|
const char *file)
|
2010-10-04 11:37:48 -07:00
|
|
|
{
|
|
|
|
#ifdef ELM_DEBUG
|
2011-06-17 14:41:17 -07:00
|
|
|
FILE *f = fopen(file, "wb");
|
2010-10-04 11:37:48 -07:00
|
|
|
elm_widget_tree_dot_dump(top, f);
|
|
|
|
fclose(f);
|
2010-10-19 11:24:27 -07:00
|
|
|
#else
|
|
|
|
(void)top;
|
|
|
|
(void)file;
|
2013-01-09 01:02:22 -08:00
|
|
|
return;
|
2010-10-04 11:37:48 -07:00
|
|
|
#endif
|
|
|
|
}
|
2010-11-24 09:11:34 -08:00
|
|
|
|
|
|
|
EAPI void
|
2012-06-08 14:05:51 -07:00
|
|
|
elm_coords_finger_size_adjust(int times_w,
|
2012-03-06 01:49:24 -08:00
|
|
|
Evas_Coord *w,
|
2012-06-08 14:05:51 -07:00
|
|
|
int times_h,
|
2012-03-06 01:49:24 -08:00
|
|
|
Evas_Coord *h)
|
2010-11-24 09:11:34 -08:00
|
|
|
{
|
2012-06-08 14:05:51 -07:00
|
|
|
if ((w) && (*w < (elm_config_finger_size_get() * times_w)))
|
|
|
|
*w = elm_config_finger_size_get() * times_w;
|
|
|
|
if ((h) && (*h < (elm_config_finger_size_get() * times_h)))
|
|
|
|
*h = elm_config_finger_size_get() * times_h;
|
2010-11-24 09:11:34 -08:00
|
|
|
}
|
2011-08-03 02:34:00 -07:00
|
|
|
|
2011-10-05 18:13:51 -07:00
|
|
|
EAPI Evas_Object *
|
2012-01-15 19:23:32 -08:00
|
|
|
elm_object_item_widget_get(const Elm_Object_Item *it)
|
2011-10-05 18:13:51 -07:00
|
|
|
{
|
2012-07-01 18:38:21 -07:00
|
|
|
return elm_widget_item_widget_get(it);
|
2011-10-05 18:13:51 -07:00
|
|
|
}
|
|
|
|
|
2011-11-17 13:02:52 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_item_part_content_set(Elm_Object_Item *it,
|
|
|
|
const char *part,
|
|
|
|
Evas_Object *content)
|
|
|
|
{
|
2012-04-12 16:39:36 -07:00
|
|
|
_elm_widget_item_part_content_set((Elm_Widget_Item *)it, part, content);
|
2011-11-17 13:02:52 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_item_part_content_get(const Elm_Object_Item *it,
|
|
|
|
const char *part)
|
|
|
|
{
|
2012-04-12 16:39:36 -07:00
|
|
|
return _elm_widget_item_part_content_get((Elm_Widget_Item *)it, part);
|
2011-11-17 13:02:52 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part)
|
|
|
|
{
|
2012-04-12 16:39:36 -07:00
|
|
|
return _elm_widget_item_part_content_unset((Elm_Widget_Item *)it, part);
|
2011-11-17 13:02:52 -08:00
|
|
|
}
|
|
|
|
|
2011-11-17 13:02:43 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_item_part_text_set(Elm_Object_Item *it,
|
|
|
|
const char *part,
|
|
|
|
const char *label)
|
|
|
|
{
|
2012-04-12 16:39:36 -07:00
|
|
|
_elm_widget_item_part_text_set((Elm_Widget_Item *)it, part, label);
|
2011-11-17 13:02:43 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part)
|
|
|
|
{
|
2012-04-12 16:39:36 -07:00
|
|
|
return _elm_widget_item_part_text_get((Elm_Widget_Item *)it, part);
|
2011-08-03 02:34:00 -07:00
|
|
|
}
|
2011-08-19 04:47:30 -07:00
|
|
|
|
2013-02-12 02:38:33 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_item_domain_translatable_part_text_set(Elm_Object_Item *it, const char *part, const char *domain, const char *text)
|
|
|
|
{
|
|
|
|
_elm_widget_item_domain_translatable_part_text_set((Elm_Widget_Item *)it, part, domain, text);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
elm_object_item_translatable_part_text_get(const Elm_Object_Item *it, const char *part)
|
|
|
|
{
|
|
|
|
return _elm_widget_item_translatable_part_text_get((Elm_Widget_Item *)it, part);
|
|
|
|
}
|
|
|
|
|
2013-04-23 01:11:28 -07:00
|
|
|
EAPI void
|
|
|
|
elm_object_item_domain_part_text_translatable_set(Elm_Object_Item *it, const char *part, const char *domain, Eina_Bool translatable)
|
|
|
|
{
|
|
|
|
_elm_widget_item_domain_part_text_translatable_set((Elm_Widget_Item *)it, part, domain, translatable);
|
|
|
|
}
|
|
|
|
|
2012-01-10 15:35:29 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_access_info_set(Evas_Object *obj, const char *txt)
|
|
|
|
{
|
|
|
|
elm_widget_access_info_set(obj, txt);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_name_find(const Evas_Object *obj, const char *name, int recurse)
|
|
|
|
{
|
|
|
|
return elm_widget_name_find(obj, name, recurse);
|
|
|
|
}
|
|
|
|
|
2013-02-13 21:38:26 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled)
|
|
|
|
{
|
|
|
|
elm_widget_orientation_mode_disabled_set(obj, disabled);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_orientation_mode_disabled_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
return elm_widget_orientation_mode_disabled_get(obj);
|
|
|
|
}
|
|
|
|
|
2014-02-18 06:40:48 -08:00
|
|
|
EAPI Elm_Object_Item *
|
|
|
|
elm_object_focused_item_get(const Evas_Object *obj)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
|
|
|
return elm_widget_focused_item_get(obj);
|
|
|
|
}
|
|
|
|
|
2011-08-23 23:39:29 -07:00
|
|
|
EAPI void
|
|
|
|
elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt)
|
|
|
|
{
|
2012-03-06 03:51:42 -08:00
|
|
|
_elm_widget_item_access_info_set((Elm_Widget_Item *)it, txt);
|
2011-08-23 23:39:29 -07:00
|
|
|
}
|
|
|
|
|
2013-01-14 20:20:37 -08:00
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_item_access_register(Elm_Object_Item *item)
|
|
|
|
{
|
|
|
|
Elm_Widget_Item *it;
|
|
|
|
|
|
|
|
it = (Elm_Widget_Item *)item;
|
|
|
|
|
|
|
|
_elm_access_widget_item_register(it);
|
|
|
|
|
|
|
|
if (it) return it->access_obj;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_item_access_unregister(Elm_Object_Item *item)
|
|
|
|
{
|
|
|
|
_elm_access_widget_item_unregister((Elm_Widget_Item *)item);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_item_access_object_get(const Elm_Object_Item *item)
|
|
|
|
{
|
|
|
|
if (!item) return NULL;
|
|
|
|
|
|
|
|
return ((Elm_Widget_Item *)item)->access_obj;
|
|
|
|
}
|
|
|
|
|
2013-02-07 05:01:34 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs)
|
|
|
|
{
|
|
|
|
_elm_access_widget_item_access_order_set((Elm_Widget_Item *)item, objs);
|
|
|
|
}
|
|
|
|
|
2013-02-08 07:16:09 -08:00
|
|
|
EAPI const Eina_List *
|
2013-02-07 05:01:34 -08:00
|
|
|
elm_object_item_access_order_get(const Elm_Object_Item *item)
|
|
|
|
{
|
2013-02-08 07:16:09 -08:00
|
|
|
return _elm_access_widget_item_access_order_get((Elm_Widget_Item *)item);
|
2013-02-07 05:01:34 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_item_access_order_unset(Elm_Object_Item *item)
|
|
|
|
{
|
|
|
|
_elm_access_widget_item_access_order_unset((Elm_Widget_Item *)item);
|
|
|
|
}
|
|
|
|
|
2011-09-10 08:54:43 -07:00
|
|
|
EAPI void *
|
|
|
|
elm_object_item_data_get(const Elm_Object_Item *it)
|
|
|
|
{
|
|
|
|
return elm_widget_item_data_get(it);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_item_data_set(Elm_Object_Item *it, void *data)
|
|
|
|
{
|
|
|
|
elm_widget_item_data_set(it, data);
|
|
|
|
}
|
2011-09-15 19:10:07 -07:00
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source)
|
|
|
|
{
|
2012-03-06 03:51:42 -08:00
|
|
|
_elm_widget_item_signal_emit((Elm_Widget_Item *)it, emission, source);
|
2011-09-15 19:10:07 -07:00
|
|
|
}
|
2011-11-16 17:58:03 -08:00
|
|
|
|
2013-03-06 04:33:13 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_item_signal_callback_add(Elm_Object_Item *it, const char *emission, const char *source, Elm_Object_Item_Signal_Cb func, void *data)
|
|
|
|
{
|
|
|
|
_elm_widget_item_signal_callback_add((Elm_Widget_Item *)it, emission, source, (Elm_Widget_Item_Signal_Cb) func, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void *
|
|
|
|
elm_object_item_signal_callback_del(Elm_Object_Item *it, const char *emission, const char *source, Elm_Object_Item_Signal_Cb func)
|
|
|
|
{
|
|
|
|
return _elm_widget_item_signal_callback_del((Elm_Widget_Item *)it, emission, source, (Elm_Widget_Item_Signal_Cb) func);
|
|
|
|
}
|
|
|
|
|
2013-12-27 03:00:03 -08:00
|
|
|
EAPI void
|
|
|
|
elm_object_item_style_set(Elm_Object_Item *it, const char *style)
|
|
|
|
{
|
|
|
|
elm_widget_item_style_set(it, style);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
|
|
|
elm_object_item_style_get(Elm_Object_Item *it)
|
|
|
|
{
|
|
|
|
return elm_widget_item_style_get(it);
|
|
|
|
}
|
|
|
|
|
2012-01-10 15:35:29 -08:00
|
|
|
EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled)
|
2011-11-16 17:58:03 -08:00
|
|
|
{
|
2012-03-06 03:51:42 -08:00
|
|
|
_elm_widget_item_disabled_set((Elm_Widget_Item *)it, disabled);
|
2011-11-16 17:58:03 -08:00
|
|
|
}
|
|
|
|
|
2012-01-10 15:35:29 -08:00
|
|
|
EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it)
|
2011-11-16 17:58:03 -08:00
|
|
|
{
|
2012-03-06 03:51:42 -08:00
|
|
|
return _elm_widget_item_disabled_get((Elm_Widget_Item *)it);
|
2011-11-16 17:58:03 -08:00
|
|
|
}
|
|
|
|
|
2012-01-10 15:35:29 -08:00
|
|
|
EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb)
|
2012-01-02 03:46:32 -08:00
|
|
|
{
|
2012-03-06 03:51:42 -08:00
|
|
|
_elm_widget_item_del_cb_set((Elm_Widget_Item *)it, del_cb);
|
2012-01-02 03:46:32 -08:00
|
|
|
}
|
2012-01-03 16:15:03 -08:00
|
|
|
|
2012-01-09 02:48:06 -08:00
|
|
|
EAPI void elm_object_item_del(Elm_Object_Item *it)
|
|
|
|
{
|
2014-03-03 01:17:32 -08:00
|
|
|
if (!it) return;
|
2012-03-06 03:51:42 -08:00
|
|
|
_elm_widget_item_del((Elm_Widget_Item *)it);
|
2012-01-09 02:48:06 -08:00
|
|
|
}
|
|
|
|
|
2012-01-03 16:22:08 -08:00
|
|
|
EAPI void
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text)
|
2012-01-03 16:22:08 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_widget_item_tooltip_text_set(it, text);
|
2012-01-03 16:22:08 -08:00
|
|
|
}
|
|
|
|
|
2012-01-03 16:15:03 -08:00
|
|
|
EAPI void
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb)
|
2012-01-03 16:15:03 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_widget_item_tooltip_content_cb_set(it, func, data, del_cb);
|
2012-01-03 16:15:03 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_tooltip_unset(Elm_Object_Item *it)
|
2012-01-03 16:15:03 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_widget_item_tooltip_unset(it);
|
2012-01-03 16:15:03 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable)
|
2012-01-03 16:15:03 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
return elm_widget_item_tooltip_window_mode_set(it, disable);
|
2012-01-03 16:15:03 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it)
|
2012-01-03 16:15:03 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
return elm_widget_item_tooltip_window_mode_get(it);
|
2012-01-03 16:15:03 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style)
|
2012-01-03 16:15:03 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_widget_item_tooltip_style_set(it, style);
|
2012-01-03 16:15:03 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_tooltip_style_get(const Elm_Object_Item *it)
|
2012-01-03 16:15:03 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
return elm_widget_item_tooltip_style_get(it);
|
2012-01-03 16:15:03 -08:00
|
|
|
}
|
|
|
|
|
2012-01-20 02:13:56 -08:00
|
|
|
EAPI void
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor)
|
2012-01-20 02:13:56 -08:00
|
|
|
{
|
2012-01-30 20:45:19 -08:00
|
|
|
elm_widget_item_cursor_set(it, cursor);
|
2012-01-20 02:13:56 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_cursor_get(const Elm_Object_Item *it)
|
2012-01-20 02:13:56 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
return elm_widget_item_cursor_get(it);
|
2012-01-20 02:13:56 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_cursor_unset(Elm_Object_Item *it)
|
2012-01-20 02:13:56 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_widget_item_cursor_unset(it);
|
2012-01-20 02:13:56 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style)
|
2012-01-20 02:13:56 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_widget_item_cursor_style_set(it, style);
|
2012-01-20 02:13:56 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI const char *
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_cursor_style_get(const Elm_Object_Item *it)
|
2012-01-20 02:13:56 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
return elm_widget_item_cursor_style_get(it);
|
2012-01-20 02:13:56 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only)
|
2012-01-20 02:13:56 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_widget_item_cursor_engine_only_set(it, engine_only);
|
2012-01-20 02:13:56 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
2012-01-30 16:32:20 -08:00
|
|
|
elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it)
|
2012-01-20 02:13:56 -08:00
|
|
|
{
|
2012-01-30 16:32:20 -08:00
|
|
|
return elm_widget_item_cursor_engine_only_get(it);
|
2012-01-20 02:13:56 -08:00
|
|
|
}
|
2013-09-12 07:24:02 -07:00
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_object_item_track(Elm_Object_Item *it)
|
|
|
|
{
|
|
|
|
return elm_widget_item_track((Elm_Widget_Item *)it);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
elm_object_item_untrack(Elm_Object_Item *it)
|
|
|
|
{
|
|
|
|
elm_widget_item_untrack((Elm_Widget_Item *)it);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
elm_object_item_track_get(const Elm_Object_Item *it)
|
|
|
|
{
|
|
|
|
return elm_widget_item_track_get((Elm_Widget_Item *)it);
|
|
|
|
}
|
2014-02-18 06:40:48 -08:00
|
|
|
|
|
|
|
EAPI void
|
|
|
|
elm_object_item_focus_set(Elm_Object_Item *item, Eina_Bool focused)
|
|
|
|
{
|
|
|
|
elm_widget_item_focus_set(item, focused);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_object_item_focus_get(const Elm_Object_Item *item)
|
|
|
|
{
|
|
|
|
return elm_widget_item_focus_get(item);
|
|
|
|
}
|