From: discomfitor Date: Tue, 11 Oct 2011 21:06:59 +0000 (+0000) Subject: add elm_pager_content_del() for deleting arbitrary pages from a pager X-Git-Tag: REL_F_I9500_20120323_1~17^2~1656 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6e7a26061426447f276031f5821025f3974d779;p=framework%2Fuifw%2Felementary.git add elm_pager_content_del() for deleting arbitrary pages from a pager git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@63993 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index c3a0730..296c9d3 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -19692,6 +19692,14 @@ extern "C" { */ EAPI void elm_pager_content_push(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1); /** + * @brief Delete an arbitrary page from the stack + * @param obj The pager object + * @param subobj The content object to remove + * This removes a content item from the pager stack. If necessary, elm_pager_content_pop() + * will be called to animate a change. + */ + EAPI void elm_pager_content_del(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1, 2); + /** * @brief Pop the object that is on top of the stack * * @param obj The pager object diff --git a/src/lib/elm_pager.c b/src/lib/elm_pager.c index 802a77b..8d17e04 100644 --- a/src/lib/elm_pager.c +++ b/src/lib/elm_pager.c @@ -372,6 +372,21 @@ elm_pager_content_push(Evas_Object *obj, Evas_Object *content) } EAPI void +elm_pager_content_del(Evas_Object *obj, Evas_Object *subobj) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + if (!subobj) return; + if (!wd) return; + if (!wd->stack) return; + + if (subobj == wd->top->content) + elm_pager_content_pop(obj); + else + _content_del(obj, NULL, subobj, NULL); +} + +EAPI void elm_pager_content_pop(Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype);