forked from enlightenment/efl
parent
e4ca468612
commit
67b635e782
|
@ -315,6 +315,26 @@ _elm_rescale(void)
|
|||
_elm_win_rescale();
|
||||
}
|
||||
|
||||
static Eina_List *widtypes = NULL;
|
||||
|
||||
void
|
||||
_elm_widtype_register(const char **ptr)
|
||||
{
|
||||
widtypes = eina_list_append(widtypes, (void *)ptr);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_widtype_clear(void)
|
||||
{
|
||||
const char **ptr;
|
||||
|
||||
EINA_LIST_FREE(widtypes, ptr)
|
||||
{
|
||||
eina_stringshare_del(*ptr);
|
||||
*ptr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @defgroup General General
|
||||
*/
|
||||
|
@ -591,6 +611,8 @@ elm_quicklaunch_shutdown(void)
|
|||
_elm_log_dom = -1;
|
||||
}
|
||||
|
||||
_elm_widtype_clear();
|
||||
|
||||
eina_shutdown();
|
||||
}
|
||||
|
||||
|
|
|
@ -213,8 +213,17 @@ Eina_Bool elm_selection_get(enum _elm_sel_type selection, enum _elm_sel_format
|
|||
|
||||
Eina_Bool _elm_dangerous_call_check(const char *call);
|
||||
|
||||
void _elm_widtype_register(const char **ptr);
|
||||
|
||||
|
||||
#define ELM_SET_WIDTYPE(widtype, type) \
|
||||
do { \
|
||||
if (!widtype) { \
|
||||
widtype = eina_stringshare_add(type); \
|
||||
_elm_widtype_register(&widtype); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define ELM_SET_WIDTYPE(widtype, type) if (!widtype) widtype = eina_stringshare_add(type)
|
||||
//#define ELM_CHECK_WIDTYPE(obj, widtype) if (elm_widget_type_get(obj) != widtype) return
|
||||
#define ELM_CHECK_WIDTYPE(obj, widtype) if (!_elm_widget_type_check((obj), (widtype))) return
|
||||
|
||||
|
|
Loading…
Reference in New Issue