[elm] Here, better.

SVN revision: 74679
This commit is contained in:
Gustavo Lima Chaves 2012-07-31 22:05:50 +00:00
parent 68c6df3ec7
commit 1cbb9301ca
2 changed files with 13 additions and 12 deletions

View File

@ -483,6 +483,19 @@ EAPI const Elm_Pan_Smart_Class *elm_pan_smart_class_get(void);
const Elm_Scrollable_Smart_Interface * iface; \
iface = evas_object_smart_interface_get(obj, ELM_SCROLLABLE_IFACE_NAME);
#define ELM_SCROLLABLE_CHECK(obj, ...) \
const Elm_Scrollable_Smart_Interface * s_iface = \
evas_object_smart_interface_get(obj, ELM_SCROLLABLE_IFACE_NAME); \
\
if (!s_iface) \
{ \
ERR("Passing object (%p) of type '%s' in function %s, but it doesn't" \
" implement the Elementary scrollable interface.", obj, \
elm_widget_type_get(obj), __func__); \
if (getenv("ELM_ERROR_ABORT")) abort(); \
return __VA_ARGS__; \
}
/**
* @}
*/

View File

@ -32,18 +32,6 @@ static const char SCROLLER_SMART_NAME[] = "elm_scroller";
if (!obj || !elm_widget_type_check((obj), SCROLLER_SMART_NAME, __func__)) \
return
#define ELM_SCROLLABLE_CHECK(obj, ...) \
const Elm_Scrollable_Smart_Interface * s_iface = \
evas_object_smart_interface_get(obj, ELM_SCROLLABLE_IFACE_NAME); \
\
if (!s_iface) \
{ \
ERR("Passing object (%p) of type '%s' in function %s, but it doesn't" \
" implement the Elementary scrollable interface.", obj, \
elm_widget_type_get(obj), __func__); \
if (getenv("ELM_ERROR_ABORT")) abort(); \
return __VA_ARGS__; \
}
struct _Elm_Scroller_Smart_Data
{