EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_update,
EFL_FUNC_CALL(move), double move)
EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_curr_page_change,
- EFL_FUNC_CALL(move), double move)
+ EFL_FUNC_CALL(diff), int diff)
EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_page_size_set,
EFL_FUNC_CALL(sz), Eina_Size2D sz)
EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_padding_size_set,
EOLIAN static void
_efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED,
Efl_Page_Transition_Scroll_Data *pd,
- double pos)
+ int diff)
{
Eina_List *list;
Page_Info *pi, *target = NULL;
// with a new id based on the new geometry of the boxes.
EINA_LIST_FOREACH(pd->page_infos, list, pi)
{
- if (EINA_DBL_EQ(pos, 1.0))
+ if (diff == 1)
{
pi->id = (pi->id - 1 + pd->page_info_num) % pd->page_info_num;
target = pi->prev;
}
- else if (EINA_DBL_EQ(pos, -1.0))
+ else if (diff == -1)
{
pi->id = (pi->id + 1) % pd->page_info_num;
target = pi->next;
pi->temp.h);
}
- if (EINA_DBL_EQ(pos, 1.0))
+ if (diff == 1)
{
pd->head = pd->head->next;
pd->tail = pd->tail->next;
}
- else if (EINA_DBL_EQ(pos, -1.0))
+ else if (diff == -1)
{
pd->head = pd->head->prev;
pd->tail = pd->tail->prev;
if (pd->curr.page != temp_page)
{
if (pd->change.delta < 0)
- efl_page_transition_curr_page_change(pd->transition, -1.0);
+ efl_page_transition_curr_page_change(pd->transition, -1);
else
- efl_page_transition_curr_page_change(pd->transition, 1.0);
+ efl_page_transition_curr_page_change(pd->transition, 1);
temp_pos = 0.0;
}
if (EINA_DBL_EQ(pd->curr.pos, 1.0))
{
- efl_page_transition_curr_page_change(pd->transition, 1.0);
+ efl_page_transition_curr_page_change(pd->transition, 1);
pd->curr.page = (pd->curr.page + 1 + pd->cnt) % pd->cnt;
pd->curr.pos = 0.0;
}
else if (EINA_DBL_EQ(pd->curr.pos, -1.0))
{
- efl_page_transition_curr_page_change(pd->transition, -1.0);
+ efl_page_transition_curr_page_change(pd->transition, -1);
pd->curr.page = (pd->curr.page - 1 + pd->cnt) % pd->cnt;
pd->curr.pos = 0.0;
}
EOAPI void efl_page_transition_page_size_set(Eo *obj, Eina_Size2D sz);
EOAPI void efl_page_transition_padding_size_set(Eo *obj, int padding);
EOAPI void efl_page_transition_update(Eo *obj, double pos);
-EOAPI void efl_page_transition_curr_page_change(Eo *obj, double move);
+EOAPI void efl_page_transition_curr_page_change(Eo *obj, int diff);
EOAPI void efl_page_transition_pack_end(Eo *obj, Efl_Gfx_Entity *subobj);
EOAPI Eina_Bool efl_page_transition_loop_set(Eo *obj, Efl_Ui_Pager_Loop loop);