efl_ui_pager: change data type

This commit is contained in:
Jaeun Choi 2019-02-13 20:36:55 +09:00
parent 9ad84605b6
commit 0ab6c36404
4 changed files with 11 additions and 11 deletions

View File

@ -85,7 +85,7 @@ _efl_page_transition_loop_set(Eo *obj EINA_UNUSED,
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,

View File

@ -401,7 +401,7 @@ _efl_page_transition_scroll_update(Eo *obj,
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;
@ -410,12 +410,12 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED,
// 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;
@ -438,12 +438,12 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED,
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;

View File

@ -95,9 +95,9 @@ _page_set_animation(void *data, const Efl_Event *event)
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;
}
@ -139,13 +139,13 @@ _mouse_up_animation(void *data, const Efl_Event *event)
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;
}

View File

@ -784,7 +784,7 @@ void _elm_widget_full_eval_children(Eo *obj, Elm_Widget_Smart_Da
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);