summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_pager.c
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2019-01-24 19:06:07 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2019-01-25 14:26:08 +0900
commita91197537c1f9a0e71d93978a0d4aad93f6e577b (patch)
tree9dfd056262168037e3fcb13c7edacf1af80f21a8 /src/lib/elementary/efl_ui_pager.c
parentbfce85d1634c6e3615b32475cd601f03649d821f (diff)
efl_ui_pager: implement unpack function
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_pager.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
index ba20c6192d..64c6207333 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -815,11 +815,38 @@ _efl_ui_pager_efl_pack_unpack_all(Eo *obj EINA_UNUSED,
815 815
816EOLIAN static Eina_Bool 816EOLIAN static Eina_Bool
817_efl_ui_pager_efl_pack_unpack(Eo *obj EINA_UNUSED, 817_efl_ui_pager_efl_pack_unpack(Eo *obj EINA_UNUSED,
818 Efl_Ui_Pager_Data *pd EINA_UNUSED, 818 Efl_Ui_Pager_Data *pd,
819 Efl_Gfx_Entity *subobj EINA_UNUSED) 819 Efl_Gfx_Entity *subobj)
820{ 820{
821 ERR("Soon to be implemented"); 821 if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
822 return EINA_FALSE; 822
823 if (!subobj) return EINA_FALSE;
824
825 int index = eina_list_data_idx(pd->content_list, subobj);
826 if (index == -1) return EINA_FALSE;
827
828 pd->content_list = eina_list_remove(pd->content_list, subobj);
829 pd->cnt--;
830
831 if (((index == pd->curr.page) && ((index != 0) || (pd->cnt == 0))) ||
832 (index < pd->curr.page))
833 pd->curr.page--;
834
835 //FIXME if the number of pages is not enough after unpacking a page,
836 // loop mode needs to be disabled
837 if (pd->transition)
838 efl_page_transition_update(pd->transition, pd->curr.pos);
839 else
840 {
841 efl_pack_unpack(pd->page_box, subobj);
842 if (pd->curr.page != -1)
843 efl_pack(pd->page_box, eina_list_nth(pd->content_list, pd->curr.page));
844 }
845
846 if (pd->indicator)
847 efl_page_indicator_unpack(pd->indicator, index);
848
849 return EINA_TRUE;
823} 850}
824 851
825EOLIAN static Efl_Gfx_Entity * 852EOLIAN static Efl_Gfx_Entity *