From: Jaeun Choi Date: Thu, 28 Mar 2019 10:26:01 +0000 (+0900) Subject: efl_ui_pager: implement unpack_at function X-Git-Tag: submit/tizen/20190402.051338~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=134102b8fff3290ac7ae710e0b4a958aec53fe28;p=platform%2Fupstream%2Fefl.git efl_ui_pager: implement unpack_at function --- diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c index 71bd804..78fd7a3 100644 --- a/src/lib/elementary/efl_ui_pager.c +++ b/src/lib/elementary/efl_ui_pager.c @@ -851,12 +851,19 @@ _efl_ui_pager_efl_pack_unpack(Eo *obj, } EOLIAN static Efl_Gfx_Entity * -_efl_ui_pager_efl_pack_linear_pack_unpack_at(Eo *obj EINA_UNUSED, - Efl_Ui_Pager_Data *pd EINA_UNUSED, - int index EINA_UNUSED) +_efl_ui_pager_efl_pack_linear_pack_unpack_at(Eo *obj, + Efl_Ui_Pager_Data *pd, + int index) { - ERR("Soon to be implemented"); - return NULL; + if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return NULL; + + if ((index >= pd->cnt) || (index < 0)) return NULL; + + Efl_Gfx_Entity *subobj = eina_list_nth(pd->content_list, index); + + _unpack(obj, pd, subobj, index); + + return subobj; }