EAPI Eina_List *_elm_stringlist_get(const char *str);
EAPI void _elm_stringlist_free(Eina_List *list);
-Eina_Bool _elm_widget_type_check(Evas_Object *obj, const char *type);
-
+Eina_Bool _elm_widget_type_check(const Evas_Object *obj, const char *type);
+
#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((Evas_Object *)(obj), (const char *)(widtype))) return
+#define ELM_CHECK_WIDTYPE(obj, widtype) if (!_elm_widget_type_check((obj), (widtype))) return
extern char *_elm_appname;
extern Elm_Config *_elm_config;
}
Eina_Bool
-_elm_widget_type_check(Evas_Object *obj, const char *type)
+_elm_widget_type_check(const Evas_Object *obj, const char *type)
{
const char *provided, *expected = "(unknown)";
static int abort_on_warn = -1;
provided = elm_widget_type_get(obj);
- if (EINA_LIKELY(provided == type)) return 1;
+ if (EINA_LIKELY(provided == type)) return EINA_TRUE;
if (type) expected = type;
if ((!provided) || (provided[0] == 0))
{
else abort_on_warn = 0;
}
if (abort_on_warn == 1) abort();
- return 1;
+ return EINA_FALSE;
}
static inline Eina_Bool