summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2019-02-13 20:36:55 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2019-02-13 20:47:04 +0900
commit0ab6c36404ffe7bb4b343967097f2fc9e8ed6ca6 (patch)
tree68701e619c962809dbb4150e349fa1f1f4cd706a
parent9ad84605b66b0f96025bc93f6fe8933ae56e3961 (diff)
efl_ui_pager: change data type
-rw-r--r--src/lib/elementary/efl_page_transition.c2
-rw-r--r--src/lib/elementary/efl_page_transition_scroll.c10
-rw-r--r--src/lib/elementary/efl_ui_pager.c8
-rw-r--r--src/lib/elementary/elm_priv.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/elementary/efl_page_transition.c b/src/lib/elementary/efl_page_transition.c
index 11beb39a35..6c5c834d6e 100644
--- a/src/lib/elementary/efl_page_transition.c
+++ b/src/lib/elementary/efl_page_transition.c
@@ -85,7 +85,7 @@ _efl_page_transition_loop_set(Eo *obj EINA_UNUSED,
85EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_update, 85EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_update,
86 EFL_FUNC_CALL(move), double move) 86 EFL_FUNC_CALL(move), double move)
87EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_curr_page_change, 87EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_curr_page_change,
88 EFL_FUNC_CALL(move), double move) 88 EFL_FUNC_CALL(diff), int diff)
89EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_page_size_set, 89EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_page_size_set,
90 EFL_FUNC_CALL(sz), Eina_Size2D sz) 90 EFL_FUNC_CALL(sz), Eina_Size2D sz)
91EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_padding_size_set, 91EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_padding_size_set,
diff --git a/src/lib/elementary/efl_page_transition_scroll.c b/src/lib/elementary/efl_page_transition_scroll.c
index 169bce6c12..432ada89ea 100644
--- a/src/lib/elementary/efl_page_transition_scroll.c
+++ b/src/lib/elementary/efl_page_transition_scroll.c
@@ -401,7 +401,7 @@ _efl_page_transition_scroll_update(Eo *obj,
401EOLIAN static void 401EOLIAN static void
402_efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED, 402_efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED,
403 Efl_Page_Transition_Scroll_Data *pd, 403 Efl_Page_Transition_Scroll_Data *pd,
404 double pos) 404 int diff)
405{ 405{
406 Eina_List *list; 406 Eina_List *list;
407 Page_Info *pi, *target = NULL; 407 Page_Info *pi, *target = NULL;
@@ -410,12 +410,12 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED,
410 // with a new id based on the new geometry of the boxes. 410 // with a new id based on the new geometry of the boxes.
411 EINA_LIST_FOREACH(pd->page_infos, list, pi) 411 EINA_LIST_FOREACH(pd->page_infos, list, pi)
412 { 412 {
413 if (EINA_DBL_EQ(pos, 1.0)) 413 if (diff == 1)
414 { 414 {
415 pi->id = (pi->id - 1 + pd->page_info_num) % pd->page_info_num; 415 pi->id = (pi->id - 1 + pd->page_info_num) % pd->page_info_num;
416 target = pi->prev; 416 target = pi->prev;
417 } 417 }
418 else if (EINA_DBL_EQ(pos, -1.0)) 418 else if (diff == -1)
419 { 419 {
420 pi->id = (pi->id + 1) % pd->page_info_num; 420 pi->id = (pi->id + 1) % pd->page_info_num;
421 target = pi->next; 421 target = pi->next;
@@ -438,12 +438,12 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED,
438 pi->temp.h); 438 pi->temp.h);
439 } 439 }
440 440
441 if (EINA_DBL_EQ(pos, 1.0)) 441 if (diff == 1)
442 { 442 {
443 pd->head = pd->head->next; 443 pd->head = pd->head->next;
444 pd->tail = pd->tail->next; 444 pd->tail = pd->tail->next;
445 } 445 }
446 else if (EINA_DBL_EQ(pos, -1.0)) 446 else if (diff == -1)
447 { 447 {
448 pd->head = pd->head->prev; 448 pd->head = pd->head->prev;
449 pd->tail = pd->tail->prev; 449 pd->tail = pd->tail->prev;
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
index cc48b9b43f..c912125033 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -95,9 +95,9 @@ _page_set_animation(void *data, const Efl_Event *event)
95 if (pd->curr.page != temp_page) 95 if (pd->curr.page != temp_page)
96 { 96 {
97 if (pd->change.delta < 0) 97 if (pd->change.delta < 0)
98 efl_page_transition_curr_page_change(pd->transition, -1.0); 98 efl_page_transition_curr_page_change(pd->transition, -1);
99 else 99 else
100 efl_page_transition_curr_page_change(pd->transition, 1.0); 100 efl_page_transition_curr_page_change(pd->transition, 1);
101 temp_pos = 0.0; 101 temp_pos = 0.0;
102 } 102 }
103 103
@@ -139,13 +139,13 @@ _mouse_up_animation(void *data, const Efl_Event *event)
139 139
140 if (EINA_DBL_EQ(pd->curr.pos, 1.0)) 140 if (EINA_DBL_EQ(pd->curr.pos, 1.0))
141 { 141 {
142 efl_page_transition_curr_page_change(pd->transition, 1.0); 142 efl_page_transition_curr_page_change(pd->transition, 1);
143 pd->curr.page = (pd->curr.page + 1 + pd->cnt) % pd->cnt; 143 pd->curr.page = (pd->curr.page + 1 + pd->cnt) % pd->cnt;
144 pd->curr.pos = 0.0; 144 pd->curr.pos = 0.0;
145 } 145 }
146 else if (EINA_DBL_EQ(pd->curr.pos, -1.0)) 146 else if (EINA_DBL_EQ(pd->curr.pos, -1.0))
147 { 147 {
148 efl_page_transition_curr_page_change(pd->transition, -1.0); 148 efl_page_transition_curr_page_change(pd->transition, -1);
149 pd->curr.page = (pd->curr.page - 1 + pd->cnt) % pd->cnt; 149 pd->curr.page = (pd->curr.page - 1 + pd->cnt) % pd->cnt;
150 pd->curr.pos = 0.0; 150 pd->curr.pos = 0.0;
151 } 151 }
diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h
index cd0a987615..1ac0bfed07 100644
--- a/src/lib/elementary/elm_priv.h
+++ b/src/lib/elementary/elm_priv.h
@@ -784,7 +784,7 @@ void _elm_widget_full_eval_children(Eo *obj, Elm_Widget_Smart_Da
784EOAPI void efl_page_transition_page_size_set(Eo *obj, Eina_Size2D sz); 784EOAPI void efl_page_transition_page_size_set(Eo *obj, Eina_Size2D sz);
785EOAPI void efl_page_transition_padding_size_set(Eo *obj, int padding); 785EOAPI void efl_page_transition_padding_size_set(Eo *obj, int padding);
786EOAPI void efl_page_transition_update(Eo *obj, double pos); 786EOAPI void efl_page_transition_update(Eo *obj, double pos);
787EOAPI void efl_page_transition_curr_page_change(Eo *obj, double move); 787EOAPI void efl_page_transition_curr_page_change(Eo *obj, int diff);
788EOAPI void efl_page_transition_pack_end(Eo *obj, Efl_Gfx_Entity *subobj); 788EOAPI void efl_page_transition_pack_end(Eo *obj, Efl_Gfx_Entity *subobj);
789EOAPI Eina_Bool efl_page_transition_loop_set(Eo *obj, Efl_Ui_Pager_Loop loop); 789EOAPI Eina_Bool efl_page_transition_loop_set(Eo *obj, Efl_Ui_Pager_Loop loop);
790 790