From: Gustavo Lima Chaves Date: Tue, 31 Jul 2012 22:05:50 +0000 (+0000) Subject: [elm] Here, better. X-Git-Tag: v1.7.0~184 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa637aee3b27c6e521c38abab2701b850a27dd9f;p=platform%2Fupstream%2Felementary.git [elm] Here, better. SVN revision: 74679 --- diff --git a/src/lib/elm_interface_scrollable.h b/src/lib/elm_interface_scrollable.h index 2c9541c..c5369fd 100644 --- a/src/lib/elm_interface_scrollable.h +++ b/src/lib/elm_interface_scrollable.h @@ -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__; \ + } + /** * @} */ diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c index 52d63ec..07ac148 100644 --- a/src/lib/elm_scroller.c +++ b/src/lib/elm_scroller.c @@ -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 {