summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-16 19:29:35 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-30 11:48:18 +0200
commit37266b93a5ec5c9345190f91418480c7108407fb (patch)
tree93b9e0d56162b53bc4adf884a1eab47c6e4385f5
parentbdc63d57d527bf0fb1bd69b7006abae359776249 (diff)
efl.ui.pager: remove!
This can be done with Efl.Ui.Active_View Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com> Differential Revision: https://phab.enlightenment.org/D8907
-rw-r--r--src/Makefile_Elementary.am17
-rw-r--r--src/bin/elementary/meson.build2
-rw-r--r--src/bin/elementary/test.c5
-rw-r--r--src/lib/elementary/Elementary.h12
-rw-r--r--src/lib/elementary/efl_page_indicator.c95
-rw-r--r--src/lib/elementary/efl_page_indicator.eo18
-rw-r--r--src/lib/elementary/efl_page_indicator.h24
-rw-r--r--src/lib/elementary/efl_page_indicator_icon.eo12
-rw-r--r--src/lib/elementary/efl_page_indicator_icon.h19
-rw-r--r--src/lib/elementary/efl_page_transition.c132
-rw-r--r--src/lib/elementary/efl_page_transition.eo17
-rw-r--r--src/lib/elementary/efl_page_transition.h27
-rw-r--r--src/lib/elementary/efl_page_transition_scroll.c688
-rw-r--r--src/lib/elementary/efl_page_transition_scroll.eo22
-rw-r--r--src/lib/elementary/efl_page_transition_scroll.h92
-rw-r--r--src/lib/elementary/efl_ui_pager.c973
-rw-r--r--src/lib/elementary/efl_ui_pager.eo109
-rw-r--r--src/lib/elementary/efl_ui_tab_pager.c1
-rw-r--r--src/lib/elementary/efl_ui_widget_pager.h69
-rw-r--r--src/lib/elementary/elm_priv.h13
-rw-r--r--src/lib/elementary/meson.build15
-rw-r--r--src/tests/elementary/spec/efl_test_pack_linear.c2
22 files changed, 1 insertions, 2363 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 06209a7bc5..166f2457e7 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -118,7 +118,6 @@ elm_public_eolian_files = \
118 lib/elementary/efl_ui_dnd.eo \ 118 lib/elementary/efl_ui_dnd.eo \
119 lib/elementary/efl_ui_dnd_container.eo \ 119 lib/elementary/efl_ui_dnd_container.eo \
120 lib/elementary/efl_ui_focus_manager_window_root.eo \ 120 lib/elementary/efl_ui_focus_manager_window_root.eo \
121 lib/elementary/efl_ui_pager.eo \
122 lib/elementary/efl_ui_active_view_container.eo \ 121 lib/elementary/efl_ui_active_view_container.eo \
123 lib/elementary/efl_ui_active_view_view_manager.eo \ 122 lib/elementary/efl_ui_active_view_view_manager.eo \
124 lib/elementary/efl_ui_active_view_view_manager_plain.eo \ 123 lib/elementary/efl_ui_active_view_view_manager_plain.eo \
@@ -126,10 +125,6 @@ elm_public_eolian_files = \
126 lib/elementary/efl_ui_active_view_view_manager_stack.eo \ 125 lib/elementary/efl_ui_active_view_view_manager_stack.eo \
127 lib/elementary/efl_ui_active_view_indicator.eo \ 126 lib/elementary/efl_ui_active_view_indicator.eo \
128 lib/elementary/efl_ui_active_view_indicator_icon.eo \ 127 lib/elementary/efl_ui_active_view_indicator_icon.eo \
129 lib/elementary/efl_page_transition.eo \
130 lib/elementary/efl_page_transition_scroll.eo \
131 lib/elementary/efl_page_indicator.eo \
132 lib/elementary/efl_page_indicator_icon.eo \
133 lib/elementary/efl_ui_tab_pager.eo \ 128 lib/elementary/efl_ui_tab_pager.eo \
134 lib/elementary/efl_ui_tab_bar.eo \ 129 lib/elementary/efl_ui_tab_bar.eo \
135 lib/elementary/efl_ui_tab_page.eo \ 130 lib/elementary/efl_ui_tab_page.eo \
@@ -768,11 +763,6 @@ includesunstable_HEADERS = \
768 lib/elementary/efl_ui_widget_pan.h \ 763 lib/elementary/efl_ui_widget_pan.h \
769 lib/elementary/efl_ui_nstate_private.h \ 764 lib/elementary/efl_ui_nstate_private.h \
770 lib/elementary/Efl_Ui.h \ 765 lib/elementary/Efl_Ui.h \
771 lib/elementary/efl_ui_widget_pager.h \
772 lib/elementary/efl_page_transition.h \
773 lib/elementary/efl_page_transition_scroll.h \
774 lib/elementary/efl_page_indicator.h \
775 lib/elementary/efl_page_indicator_icon.h \
776 lib/elementary/efl_ui_tab_pager_private.h \ 766 lib/elementary/efl_ui_tab_pager_private.h \
777 lib/elementary/efl_ui_tab_bar_private.h \ 767 lib/elementary/efl_ui_tab_bar_private.h \
778 lib/elementary/efl_ui_tab_page_private.h \ 768 lib/elementary/efl_ui_tab_page_private.h \
@@ -1203,7 +1193,6 @@ lib_elementary_libelementary_la_SOURCES = \
1203 lib/elementary/elm_focus_legacy.c \ 1193 lib/elementary/elm_focus_legacy.c \
1204 static_libs/buildsystem/buildsystem.h \ 1194 static_libs/buildsystem/buildsystem.h \
1205 static_libs/buildsystem/buildsystem_autotools.c \ 1195 static_libs/buildsystem/buildsystem_autotools.c \
1206 lib/elementary/efl_ui_pager.c \
1207 lib/elementary/efl_ui_active_view_container.c \ 1196 lib/elementary/efl_ui_active_view_container.c \
1208 lib/elementary/efl_ui_active_view_view_manager.c \ 1197 lib/elementary/efl_ui_active_view_view_manager.c \
1209 lib/elementary/efl_ui_active_view_view_manager_plain.c \ 1198 lib/elementary/efl_ui_active_view_view_manager_plain.c \
@@ -1211,10 +1200,6 @@ lib_elementary_libelementary_la_SOURCES = \
1211 lib/elementary/efl_ui_active_view_view_manager_stack.c \ 1200 lib/elementary/efl_ui_active_view_view_manager_stack.c \
1212 lib/elementary/efl_ui_active_view_indicator.c \ 1201 lib/elementary/efl_ui_active_view_indicator.c \
1213 lib/elementary/efl_ui_active_view_indicator_icon.c \ 1202 lib/elementary/efl_ui_active_view_indicator_icon.c \
1214 lib/elementary/efl_page_transition.c \
1215 lib/elementary/efl_page_transition_scroll.c \
1216 lib/elementary/efl_page_indicator.c \
1217 lib/elementary/efl_page_indicator_icon.c \
1218 lib/elementary/efl_ui_focus_graph.h \ 1203 lib/elementary/efl_ui_focus_graph.h \
1219 lib/elementary/efl_ui_focus_graph.c \ 1204 lib/elementary/efl_ui_focus_graph.c \
1220 lib/elementary/efl_ui_tab_pager.c \ 1205 lib/elementary/efl_ui_tab_pager.c \
@@ -1447,8 +1432,6 @@ bin/elementary/test_win_stack.c \
1447bin/elementary/test_win_indicator.c \ 1432bin/elementary/test_win_indicator.c \
1448bin/elementary/test_gesture_framework.c \ 1433bin/elementary/test_gesture_framework.c \
1449bin/elementary/test_ui_tab_pager.c \ 1434bin/elementary/test_ui_tab_pager.c \
1450bin/elementary/test_ui_pager.c \
1451bin/elementary/test_ui_pager_scroll.c \
1452bin/elementary/test_ui_active_view.c \ 1435bin/elementary/test_ui_active_view.c \
1453bin/elementary/test_ui_relative_layout.c \ 1436bin/elementary/test_ui_relative_layout.c \
1454bin/elementary/test.h 1437bin/elementary/test.h
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index 29e98f9ff5..65479f79ee 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -99,8 +99,6 @@ elementary_test_src = [
99 'test_panes.c', 99 'test_panes.c',
100 'test_ui_panes.c', 100 'test_ui_panes.c',
101 'test_ui_panel.c', 101 'test_ui_panel.c',
102 'test_ui_pager.c',
103 'test_ui_pager_scroll.c',
104 'test_ui_active_view.c', 102 'test_ui_active_view.c',
105 'test_part_bg.c', 103 'test_part_bg.c',
106 'test_part_shadow.c', 104 'test_part_shadow.c',
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 1409831cd3..31a0fa0db6 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -386,9 +386,6 @@ void test_efl_anim_interpolator(void *data, Evas_Object *obj, void *event_info);
386void test_gesture_framework(void *data, Evas_Object *obj, void *event_info); 386void test_gesture_framework(void *data, Evas_Object *obj, void *event_info);
387 387
388void test_ui_tab_pager(void *data, Evas_Object *obj, void *event_info); 388void test_ui_tab_pager(void *data, Evas_Object *obj, void *event_info);
389void test_ui_pager(void *data, Evas_Object *obj, void *event_info);
390void test_ui_pager_stack(void *data, Evas_Object *obj, void *event_info);
391void test_ui_pager_scroll(void *data, Evas_Object *obj, void *event_info);
392void test_ui_active_view_stack(void *data, Evas_Object *obj, void *event_info); 389void test_ui_active_view_stack(void *data, Evas_Object *obj, void *event_info);
393void test_ui_active_view_plain(void *data, Evas_Object *obj, void *event_info); 390void test_ui_active_view_plain(void *data, Evas_Object *obj, void *event_info);
394void test_ui_active_view_scroll(void *data, Evas_Object *obj, void *event_info); 391void test_ui_active_view_scroll(void *data, Evas_Object *obj, void *event_info);
@@ -1119,8 +1116,6 @@ add_tests:
1119 1116
1120 //------------------------------// 1117 //------------------------------//
1121 ADD_TEST_EO(NULL, "Tab Pager", "Efl.Ui.Tab_Pager", test_ui_tab_pager); 1118 ADD_TEST_EO(NULL, "Tab Pager", "Efl.Ui.Tab_Pager", test_ui_tab_pager);
1122 ADD_TEST_EO(NULL, "Pager", "Efl.Ui.Pager", test_ui_pager);
1123 ADD_TEST_EO(NULL, "Scroll Pager", "Efl.Ui.Pager (Scroll)", test_ui_pager_scroll);
1124 ADD_TEST_EO(NULL, "Active View", "Efl.Ui.Active_View Plain", test_ui_active_view_plain); 1119 ADD_TEST_EO(NULL, "Active View", "Efl.Ui.Active_View Plain", test_ui_active_view_plain);
1125 ADD_TEST_EO(NULL, "Active View", "Efl.Ui.Active_View Scroll", test_ui_active_view_scroll); 1120 ADD_TEST_EO(NULL, "Active View", "Efl.Ui.Active_View Scroll", test_ui_active_view_scroll);
1126 ADD_TEST_EO(NULL, "Active View", "Efl.Ui.Active_View Stack", test_ui_active_view_stack); 1121 ADD_TEST_EO(NULL, "Active View", "Efl.Ui.Active_View Stack", test_ui_active_view_stack);
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index d062183d79..8db5fd9fe2 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -360,18 +360,6 @@ typedef Eo Efl_Ui_Focus_Manager;
360# include <efl_ui_dnd.eo.h> 360# include <efl_ui_dnd.eo.h>
361# include <efl_ui_dnd_container.eo.h> 361# include <efl_ui_dnd_container.eo.h>
362# include <efl_ui_relative_layout.eo.h> 362# include <efl_ui_relative_layout.eo.h>
363
364# ifndef _EFL_UI_PAGER_EO_CLASS_TYPE
365# define _EFL_UI_PAGER_EO_CLASS_TYPE
366typedef Eo Efl_Ui_Pager;
367# endif
368
369# include <efl_page_transition.eo.h>
370# include <efl_page_transition_scroll.eo.h>
371# include <efl_page_indicator.eo.h>
372# include <efl_page_indicator_icon.eo.h>
373# include <efl_ui_pager.eo.h>
374
375# include <efl_ui_tab_bar.eo.h> 363# include <efl_ui_tab_bar.eo.h>
376# include <efl_ui_tab_page.eo.h> 364# include <efl_ui_tab_page.eo.h>
377# include <efl_ui_tab_page_part_tab.eo.h> 365# include <efl_ui_tab_page_part_tab.eo.h>
diff --git a/src/lib/elementary/efl_page_indicator.c b/src/lib/elementary/efl_page_indicator.c
deleted file mode 100644
index 6b0be267b2..0000000000
--- a/src/lib/elementary/efl_page_indicator.c
+++ /dev/null
@@ -1,95 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#include <Elementary.h>
6#include "elm_priv.h"
7
8#include "efl_page_indicator.h"
9#include "efl_ui_widget_pager.h"
10
11#define MY_CLASS EFL_PAGE_INDICATOR_CLASS
12
13
14
15EOLIAN static void
16_efl_page_indicator_update(Eo *obj EINA_UNUSED,
17 Efl_Page_Indicator_Data *pd,
18 double pos EINA_UNUSED)
19{
20 pd->curr_idx = efl_ui_pager_current_page_get(pd->pager.obj);
21}
22
23EOLIAN static void
24_efl_page_indicator_pack(Eo *obj EINA_UNUSED,
25 Efl_Page_Indicator_Data *pd,
26 int index)
27{
28 pd->cnt++;
29 if ((pd->curr_idx == -1) || (pd->curr_idx >= index)) pd->curr_idx++;
30}
31
32EOLIAN static void
33_efl_page_indicator_unpack(Eo *obj EINA_UNUSED,
34 Efl_Page_Indicator_Data *pd,
35 int index)
36{
37 pd->cnt--;
38
39 if ((pd->cnt == 0) ||
40 ((index == pd->curr_idx) && (index != 0)) ||
41 (index < pd->curr_idx))
42 pd->curr_idx--;
43}
44
45EOLIAN static void
46_efl_page_indicator_unpack_all(Eo *obj EINA_UNUSED,
47 Efl_Page_Indicator_Data *pd)
48{
49 pd->cnt = 0;
50 pd->curr_idx = -1;
51}
52
53EOLIAN static void
54_efl_page_indicator_bind(Eo *obj EINA_UNUSED,
55 Efl_Page_Indicator_Data *pd,
56 Eo *pager,
57 Efl_Canvas_Group *idbox)
58{
59 if (pd->pager.obj == pager) return;
60
61 pd->pager.obj = pager;
62 pd->idbox = idbox;
63
64 if (pager)
65 {
66 pd->cnt = efl_content_count(pd->pager.obj);
67 pd->curr_idx = efl_ui_pager_current_page_get(pd->pager.obj);
68 }
69 else
70 {
71 pd->cnt = 0;
72 pd->curr_idx = -1;
73 }
74}
75
76
77EOAPI EFL_VOID_FUNC_BODYV(efl_page_indicator_update,
78 EFL_FUNC_CALL(pos), double pos)
79EOAPI EFL_VOID_FUNC_BODYV(efl_page_indicator_pack,
80 EFL_FUNC_CALL(index), int index)
81EOAPI EFL_VOID_FUNC_BODYV(efl_page_indicator_unpack,
82 EFL_FUNC_CALL(index), int index)
83EOAPI EFL_VOID_FUNC_BODY(efl_page_indicator_unpack_all)
84
85#define EFL_PAGE_INDICATOR_EXTRA_OPS \
86 EFL_OBJECT_OP_FUNC(efl_page_indicator_update, \
87 _efl_page_indicator_update), \
88 EFL_OBJECT_OP_FUNC(efl_page_indicator_pack, \
89 _efl_page_indicator_pack), \
90 EFL_OBJECT_OP_FUNC(efl_page_indicator_unpack, \
91 _efl_page_indicator_unpack), \
92 EFL_OBJECT_OP_FUNC(efl_page_indicator_unpack_all, \
93 _efl_page_indicator_unpack_all)
94
95#include "efl_page_indicator.eo.c"
diff --git a/src/lib/elementary/efl_page_indicator.eo b/src/lib/elementary/efl_page_indicator.eo
deleted file mode 100644
index be03c56433..0000000000
--- a/src/lib/elementary/efl_page_indicator.eo
+++ /dev/null
@@ -1,18 +0,0 @@
1class @beta Efl.Page.Indicator extends Efl.Object
2{
3 [[Page indicator
4
5 Page indicator is used with @Efl.Ui.Pager.
6 It is located on the top layer of pager widget and helps users to know
7 the number of pages and the current page's index without scrolling.
8 ]]
9 methods {
10 bind {
11 [[set object]]
12 params {
13 @in pager: Efl.Ui.Pager; [[pager object]]
14 @in group: Efl.Canvas.Group; [[a dummy object for layer adjustment]]
15 }
16 }
17 }
18}
diff --git a/src/lib/elementary/efl_page_indicator.h b/src/lib/elementary/efl_page_indicator.h
deleted file mode 100644
index 78dfd8c223..0000000000
--- a/src/lib/elementary/efl_page_indicator.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef EFL_PAGE_INDICATOR_H
2#define EFL_PAGE_INDICATOR_H
3
4typedef struct _Efl_Page_Indicator_Data Efl_Page_Indicator_Data;
5
6struct _Efl_Page_Indicator_Data
7{
8 struct {
9 Efl_Object *obj;
10 Efl_Object *group;
11 Evas_Coord x, y, w, h;
12 } pager;
13
14 Efl_Ui_Box *idbox;
15
16 int cnt;
17 int curr_idx;
18};
19
20#define EFL_PAGE_INDICATOR_DATA_GET(o, pd) \
21 Efl_Page_Indicator_Data *pd = \
22 efl_data_scope_get(o, EFL_PAGE_INDICATOR_CLASS)
23
24#endif
diff --git a/src/lib/elementary/efl_page_indicator_icon.eo b/src/lib/elementary/efl_page_indicator_icon.eo
deleted file mode 100644
index 1af3bdc397..0000000000
--- a/src/lib/elementary/efl_page_indicator_icon.eo
+++ /dev/null
@@ -1,12 +0,0 @@
1class @beta Efl.Page.Indicator_Icon extends Efl.Page.Indicator
2{
3 [[Icon type page indicator
4
5 This class offers icon type indicator for @Efl.Ui.Pager.
6 This type of page indicator creates the same number of icons as pages and
7 arrange them in a linear order. An icon has two states: default and selected.
8 ]]
9 implements {
10 Efl.Page.Indicator.bind;
11 }
12}
diff --git a/src/lib/elementary/efl_page_indicator_icon.h b/src/lib/elementary/efl_page_indicator_icon.h
deleted file mode 100644
index 3c125fd475..0000000000
--- a/src/lib/elementary/efl_page_indicator_icon.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef EFL_PAGE_INDICATOR_ICON_H
2#define EFL_PAGE_INDICATOR_ICON_H
3
4typedef struct _Efl_Page_Indicator_Icon_Data Efl_Page_Indicator_Icon_Data;
5
6struct _Efl_Page_Indicator_Icon_Data
7{
8 Eo *curr, *adj;
9
10 Eina_List *items;
11 Eina_Value *v;
12};
13
14
15#define EFL_PAGE_INDICATOR_ICON_DATA_GET(o, pd) \
16 Efl_Page_Indicator_Icon_Data *pd = \
17 efl_data_scope_get(o, EFL_PAGE_INDICATOR_ICON_CLASS)
18
19#endif
diff --git a/src/lib/elementary/efl_page_transition.c b/src/lib/elementary/efl_page_transition.c
deleted file mode 100644
index f6d73a2c10..0000000000
--- a/src/lib/elementary/efl_page_transition.c
+++ /dev/null
@@ -1,132 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#include <Elementary.h>
6#include "elm_priv.h"
7
8#include "efl_page_transition.h"
9#include "efl_ui_widget_pager.h"
10
11#define MY_CLASS EFL_PAGE_TRANSITION_CLASS
12
13
14EOLIAN static void
15_efl_page_transition_page_size_set(Eo *obj EINA_UNUSED,
16 Efl_Page_Transition_Data *pd,
17 Eina_Size2D sz)
18{
19 pd->page_spec.sz = sz;
20}
21
22EOLIAN static void
23_efl_page_transition_padding_size_set(Eo *obj EINA_UNUSED,
24 Efl_Page_Transition_Data *pd,
25 int padding)
26{
27 pd->page_spec.padding = padding;
28}
29
30EOLIAN static void
31_efl_page_transition_bind(Eo *obj EINA_UNUSED,
32 Efl_Page_Transition_Data *pd,
33 Eo *pager,
34 Efl_Canvas_Group *group)
35{
36 Eina_Rect group_rect;
37
38 if (pd->pager.obj == pager) return;
39
40 pd->pager.obj = pager;
41 pd->pager.group = group;
42
43 if (pager)
44 {
45 group_rect = efl_gfx_entity_geometry_get(group);
46
47 pd->pager.x = group_rect.x;
48 pd->pager.y = group_rect.y;
49 pd->pager.w = group_rect.w;
50 pd->pager.h = group_rect.h;
51
52 pd->page_spec.sz = efl_ui_pager_page_size_get(pager);
53 pd->page_spec.padding = efl_ui_pager_padding_get(pager);
54 pd->loop = efl_ui_pager_loop_mode_get(pager);
55 }
56}
57
58EOLIAN static void
59_efl_page_transition_update(Eo *obj EINA_UNUSED,
60 Efl_Page_Transition_Data *pd EINA_UNUSED,
61 double move EINA_UNUSED)
62{
63
64}
65
66EOLIAN static void
67_efl_page_transition_pack(Eo *obj EINA_UNUSED,
68 Efl_Page_Transition_Data *pd EINA_UNUSED,
69 int index EINA_UNUSED)
70{
71
72}
73
74EOLIAN static void
75_efl_page_transition_unpack_all(Eo *obj EINA_UNUSED,
76 Efl_Page_Transition_Data *pd EINA_UNUSED,
77 int index EINA_UNUSED)
78{
79
80}
81
82EOLIAN static void
83_efl_page_transition_curr_page_change(Eo *obj EINA_UNUSED,
84 Efl_Page_Transition_Data *pd EINA_UNUSED,
85 int diff EINA_UNUSED)
86{
87
88}
89
90EOLIAN static Eina_Bool
91_efl_page_transition_loop_set(Eo *obj EINA_UNUSED,
92 Efl_Page_Transition_Data *pd,
93 Efl_Ui_Pager_Loop loop)
94{
95 pd->loop = loop;
96
97 return EINA_TRUE;
98}
99
100
101EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_update,
102 EFL_FUNC_CALL(move), double move)
103EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_pack,
104 EFL_FUNC_CALL(index), int index)
105EOAPI EFL_VOID_FUNC_BODY(efl_page_transition_unpack_all)
106EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_curr_page_change,
107 EFL_FUNC_CALL(diff), int diff)
108EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_page_size_set,
109 EFL_FUNC_CALL(sz), Eina_Size2D sz)
110EOAPI EFL_VOID_FUNC_BODYV(efl_page_transition_padding_size_set,
111 EFL_FUNC_CALL(padding), int padding)
112EOAPI EFL_FUNC_BODYV(efl_page_transition_loop_set, Eina_Bool, 0,
113 EFL_FUNC_CALL(loop), Efl_Ui_Pager_Loop loop)
114
115
116#define EFL_PAGE_TRANSITION_EXTRA_OPS \
117 EFL_OBJECT_OP_FUNC(efl_page_transition_update, \
118 _efl_page_transition_update), \
119 EFL_OBJECT_OP_FUNC(efl_page_transition_pack, \
120 _efl_page_transition_pack), \
121 EFL_OBJECT_OP_FUNC(efl_page_transition_unpack_all, \
122 _efl_page_transition_unpack_all), \
123 EFL_OBJECT_OP_FUNC(efl_page_transition_curr_page_change, \
124 _efl_page_transition_curr_page_change), \
125 EFL_OBJECT_OP_FUNC(efl_page_transition_page_size_set, \
126 _efl_page_transition_page_size_set), \
127 EFL_OBJECT_OP_FUNC(efl_page_transition_padding_size_set, \
128 _efl_page_transition_padding_size_set), \
129 EFL_OBJECT_OP_FUNC(efl_page_transition_loop_set, \
130 _efl_page_transition_loop_set)
131
132#include "efl_page_transition.eo.c"
diff --git a/src/lib/elementary/efl_page_transition.eo b/src/lib/elementary/efl_page_transition.eo
deleted file mode 100644
index 5f97951b0e..0000000000
--- a/src/lib/elementary/efl_page_transition.eo
+++ /dev/null
@@ -1,17 +0,0 @@
1class @beta Efl.Page.Transition extends Efl.Object
2{
3 [[Page transition for @Efl.Ui.Pager
4
5 A page transition is essential to @Efl.Ui.Pager object and invoked whenever
6 pages are rearranged or scrolled (see @Efl.Ui.Pager).
7 ]]
8 methods {
9 bind {
10 [[set object]]
11 params {
12 @in pager: Efl.Ui.Pager; [[pager object]]
13 @in group: Efl.Canvas.Group; [[a dummy object for layer adjustment]]
14 }
15 }
16 }
17}
diff --git a/src/lib/elementary/efl_page_transition.h b/src/lib/elementary/efl_page_transition.h
deleted file mode 100644
index 38d4e6b9ab..0000000000
--- a/src/lib/elementary/efl_page_transition.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef EFL_PAGE_TRANSITION_H
2#define EFL_PAGE_TRANSITION_H
3
4
5typedef struct _Efl_Page_Transition_Data Efl_Page_Transition_Data;
6
7struct _Efl_Page_Transition_Data
8{
9 struct {
10 Efl_Object *obj;
11 Efl_Canvas_Group *group;
12 Evas_Coord x, y, w, h;
13 } pager;
14
15 struct {
16 Eina_Size2D sz;
17 Evas_Coord padding;
18 } page_spec;
19
20 Efl_Ui_Pager_Loop loop;
21};
22
23#define EFL_PAGE_TRANSITION_DATA_GET(o, pd) \
24 Efl_Page_Transition_Data *pd = \
25 efl_data_scope_get(o, EFL_PAGE_TRANSITION_CLASS)
26
27#endif
diff --git a/src/lib/elementary/efl_page_transition_scroll.c b/src/lib/elementary/efl_page_transition_scroll.c
deleted file mode 100644
index 3908710cc6..0000000000
--- a/src/lib/elementary/efl_page_transition_scroll.c
+++ /dev/null
@@ -1,688 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#include <Elementary.h>
6#include "elm_priv.h"
7
8#include "efl_page_transition_scroll.h"
9#include "efl_page_transition.h"
10#include "efl_ui_widget_pager.h"
11
12#define MY_CLASS EFL_PAGE_TRANSITION_SCROLL_CLASS
13
14
15
16static void
17_page_info_deallocate(Efl_Page_Transition_Scroll_Data *pd)
18{
19 Page_Info *pi;
20
21 EINA_LIST_FREE(pd->page_infos, pi)
22 {
23 if (pi->content)
24 efl_pack_unpack(pi->obj, pi->content);
25
26 efl_del(pi->obj);
27 free(pi);
28 }
29
30 pd->head = NULL;
31 pd->tail = NULL;
32}
33
34static void
35_page_info_allocate(Efl_Page_Transition_Scroll_Data *pd,
36 Efl_Page_Transition_Data *spd)
37{
38 Page_Info *pi, *prev = NULL;
39 int i;
40
41 for (i = 0; i < pd->page_info_num; i++)
42 {
43 pi = calloc(1, sizeof(*pi));
44 if (!pi) return;
45 if (i == 0) pd->head = pi;
46 else if (i == (pd->page_info_num - 1)) pd->tail = pi;
47 pi->id = i;
48 pi->pos = i - (pd->side_page_num + 1);
49 pi->content_num = -1;
50 pi->content = NULL;
51
52 pi->obj = efl_add(EFL_UI_BOX_CLASS, spd->pager.obj);
53 efl_canvas_group_member_add(spd->pager.group, pi->obj);
54 pd->page_infos = eina_list_append(pd->page_infos, pi);
55
56 if (prev)
57 {
58 pi->prev = prev;
59 prev->next = pi;
60 }
61 prev = pi;
62 }
63
64 pd->head->prev = pd->tail;
65 pd->tail->next = pd->head;
66}
67
68//FIXME use ecore_job
69static void
70_page_info_geometry_change(Efl_Page_Transition_Scroll_Data *pd,
71 Efl_Page_Transition_Data *spd)
72{
73 Page_Info *curr;
74 Eo *tmp;
75 int content_w, tmp_id, curr_page, cnt;
76
77 content_w = (spd->page_spec.sz.w * (pd->side_page_num * 2 + 1))
78 + (spd->page_spec.padding * pd->side_page_num * 2);
79
80 if (content_w < spd->pager.w)
81 {
82 EINA_RECTANGLE_SET(&pd->viewport,
83 spd->pager.x + ((spd->pager.w - content_w) / 2),
84 spd->pager.y,
85 content_w,
86 spd->pager.h);
87 }
88 else
89 {
90 EINA_RECTANGLE_SET(&pd->viewport,
91 spd->pager.x,
92 spd->pager.y,
93 spd->pager.w,
94 spd->pager.h);
95 }
96
97 efl_gfx_entity_geometry_set(pd->foreclip, (Eina_Rect) pd->viewport);
98
99 curr_page = efl_ui_pager_current_page_get(spd->pager.obj);
100 cnt = efl_content_count(spd->pager.obj);
101
102 curr = pd->head;
103 do
104 {
105 EINA_RECTANGLE_SET(&curr->geometry,
106 spd->pager.x + (spd->pager.w / 2)
107 + curr->pos * (spd->page_spec.sz.w + spd->page_spec.padding)
108 - (spd->page_spec.sz.w / 2),
109 spd->pager.y + (spd->pager.h / 2) - (spd->page_spec.sz.h / 2),
110 spd->page_spec.sz.w,
111 spd->page_spec.sz.h);
112
113 efl_gfx_entity_geometry_set(curr->obj, (Eina_Rect) curr->geometry);
114
115 if (!eina_rectangles_intersect(&curr->geometry, &pd->viewport))
116 {
117 if (curr->visible)
118 {
119 efl_canvas_object_clipper_set(curr->obj, pd->backclip);
120
121 efl_pack_unpack(curr->obj, curr->content);
122 efl_canvas_object_clipper_set(curr->content, pd->backclip);
123
124 curr->content_num = -1;
125 curr->content = NULL;
126 curr->visible = EINA_FALSE;
127 }
128 }
129 else
130 {
131 tmp_id = curr_page + curr->pos;
132 if (spd->loop == EFL_UI_PAGER_LOOP_ENABLED)
133 tmp_id = (tmp_id + cnt) % cnt;
134
135 if ((abs(curr->pos) < cnt) &&
136 (tmp_id >= 0) &&
137 (tmp_id < cnt))
138 {
139 if (curr->content_num != tmp_id)
140 {
141 tmp = efl_pack_content_get(spd->pager.obj, tmp_id);
142
143 efl_canvas_object_clipper_set(curr->obj, pd->foreclip);
144
145 efl_pack(curr->obj, tmp);
146 efl_canvas_object_clipper_set(tmp, pd->foreclip);
147
148 curr->content_num = tmp_id;
149 curr->content = tmp;
150 curr->visible = EINA_TRUE;
151 }
152 }
153 else if (curr->content)
154 {
155 efl_canvas_object_clipper_set(curr->obj, pd->backclip);
156
157 efl_pack_unpack(curr->obj, curr->content);
158 efl_canvas_object_clipper_set(curr->content, pd->backclip);
159
160 curr->content_num = -1;
161 curr->content = NULL;
162 curr->visible = EINA_FALSE;
163 }
164 }
165
166 curr = curr->next;
167
168 } while (curr != pd->head);
169}
170
171static void
172_resize_cb(void *data, const Efl_Event *ev)
173{
174 Efl_Page_Transition_Scroll *obj = data;
175 EFL_PAGE_TRANSITION_SCROLL_DATA_GET(obj, pd);
176 EFL_PAGE_TRANSITION_DATA_GET(obj, spd);
177
178 Eina_Size2D sz;
179
180 Efl_Ui_Pager *pager = ev->object;
181
182 sz = efl_gfx_entity_size_get(pager);
183
184 spd->pager.w = sz.w;
185 spd->pager.h = sz.h;
186
187 _page_info_geometry_change(pd, spd);
188}
189
190static void
191_move_cb(void *data, const Efl_Event *ev)
192{
193 Efl_Page_Transition_Scroll *obj = data;
194 EFL_PAGE_TRANSITION_SCROLL_DATA_GET(obj, pd);
195 EFL_PAGE_TRANSITION_DATA_GET(obj, spd);
196
197 Eina_Position2D pos;
198
199 Efl_Ui_Pager *pager = ev->object;
200
201 pos = efl_gfx_entity_position_get(pager);
202
203 spd->pager.x = pos.x;
204 spd->pager.y = pos.y;
205
206 _page_info_geometry_change(pd, spd);
207}
208
209EOLIAN static void
210_efl_page_transition_scroll_efl_page_transition_bind(Eo *obj,
211 Efl_Page_Transition_Scroll_Data *pd,
212 Eo *pager,
213 Efl_Canvas_Group *group)
214{
215 EFL_PAGE_TRANSITION_DATA_GET(obj, spd);
216
217 if (spd->pager.obj == pager) return;
218
219 if (spd->pager.obj)
220 {
221 efl_event_callback_del(spd->pager.group, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, obj);
222 efl_event_callback_del(spd->pager.group, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, obj);
223
224 _page_info_deallocate(pd);
225 efl_del(pd->foreclip);
226 efl_del(pd->backclip);
227 }
228
229 efl_page_transition_bind(efl_super(obj, MY_CLASS), pager, group);
230
231 if (spd->pager.obj)
232 {
233 int cnt, i;
234 Eo *item;
235
236 efl_event_callback_add(spd->pager.group, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, obj);
237 efl_event_callback_add(spd->pager.group, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, obj);
238
239 pd->foreclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
240 evas_object_evas_get(spd->pager.obj));
241 evas_object_static_clip_set(pd->foreclip, EINA_TRUE);
242
243 pd->backclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
244 evas_object_evas_get(spd->pager.obj));
245 evas_object_static_clip_set(pd->backclip, EINA_TRUE);
246 efl_gfx_entity_visible_set(pd->backclip, EINA_FALSE);
247
248 cnt = efl_content_count(spd->pager.obj);
249 for (i = 0; i < cnt; i++)
250 {
251 item = efl_pack_content_get(spd->pager.obj, i);
252 efl_canvas_object_clipper_set(item, pd->backclip);
253 }
254 _page_info_allocate(pd, spd);
255 _page_info_geometry_change(pd, spd);
256 }
257}
258
259EOLIAN static void
260_efl_page_transition_scroll_page_size_set(Eo *obj,
261 Efl_Page_Transition_Scroll_Data *pd,
262 Eina_Size2D sz)
263{
264 EFL_PAGE_TRANSITION_DATA_GET(obj, spd);
265
266 efl_page_transition_page_size_set(efl_super(obj, MY_CLASS), sz);
267 _page_info_geometry_change(pd, spd);
268}
269
270EOLIAN static void
271_efl_page_transition_scroll_padding_size_set(Eo *obj,
272 Efl_Page_Transition_Scroll_Data *pd,
273 int padding)
274{
275 EFL_PAGE_TRANSITION_DATA_GET(obj, spd);
276
277 efl_page_transition_padding_size_set(efl_super(obj, MY_CLASS), padding);
278 _page_info_geometry_change(pd, spd);
279}
280
281EOLIAN static void
282_efl_page_transition_scroll_update(Eo *obj,
283 Efl_Page_Transition_Scroll_Data *pd,
284 double pos)
285{
286 EFL_PAGE_TRANSITION_DATA_GET(obj, spd);
287
288 Page_Info *start, *dummy, *curr, *target;
289 Eo *tmp;
290 double t;
291 int tmp_id, curr_page, cnt;
292
293 t = pos;
294 if (t < 0) t *= (-1);
295
296 curr_page = efl_ui_pager_current_page_get(spd->pager.obj);
297 cnt = efl_content_count(spd->pager.obj);
298
299 // while pages are scrolled,
300 // 1. the geometry of each page needs to be changed
301 // 2. if a page gets out of the viewport, it needs to be hidden
302 // 3. if a page gets into the viewport, it needs to be shown
303
304 if (pos < 0) // if scrolled right, each page takes next page's position
305 {
306 start = pd->head;
307 dummy = pd->tail;
308 }
309 else // if scrolled left, each page takes prev page's position
310 {
311 start = pd->tail;
312 dummy = pd->head;
313 }
314
315 if (dummy->visible)
316 {
317 efl_canvas_object_clipper_set(dummy->obj, pd->backclip);
318 efl_pack_unpack(dummy->obj, dummy->content);
319 efl_canvas_object_clipper_set(dummy->content, pd->backclip);
320
321 dummy->content_num = -1;
322 dummy->content = NULL;
323 dummy->visible = EINA_FALSE;
324 }
325
326 curr = start;
327 do
328 {
329 if (pos < 0) target = curr->next;
330 else target = curr->prev;
331
332 EINA_RECTANGLE_SET(&curr->temp,
333 target->geometry.x * t + curr->geometry.x * (1 - t),
334 target->geometry.y,
335 target->geometry.w,
336 target->geometry.h);
337 efl_gfx_entity_geometry_set(curr->obj, (Eina_Rect) curr->temp);
338
339 if (!eina_rectangles_intersect(&curr->temp, &pd->viewport))
340 {
341 if (curr->visible)
342 {
343 efl_canvas_object_clipper_set(curr->obj, pd->backclip);
344
345 efl_pack_unpack(curr->obj, curr->content);
346 efl_canvas_object_clipper_set(curr->content, pd->backclip);
347
348 curr->content_num = -1;
349 curr->content = NULL;
350 curr->visible = EINA_FALSE;
351 }
352 }
353 else
354 {
355 tmp_id = curr_page + curr->pos;
356 if (spd->loop == EFL_UI_PAGER_LOOP_ENABLED)
357 tmp_id = (tmp_id + cnt) % cnt;
358
359 if ((abs(curr->pos) < cnt) &&
360 (tmp_id >= 0) &&
361 (tmp_id < cnt))
362 {
363 tmp = efl_pack_content_get(spd->pager.obj, tmp_id);
364
365 if (curr->content != tmp)
366 {
367 if (curr->content)
368 {
369 efl_pack_unpack(curr->obj, curr->content);
370 efl_canvas_object_clipper_set(curr->content, pd->backclip);
371 }
372
373 efl_canvas_object_clipper_set(curr->obj, pd->foreclip);
374
375 efl_pack(curr->obj, tmp);
376 efl_canvas_object_clipper_set(tmp, pd->foreclip);
377
378 curr->content_num = tmp_id;
379 curr->content = tmp;
380 curr->visible = EINA_TRUE;
381 }
382 }
383 else if (curr->content)
384 {
385 efl_canvas_object_clipper_set(curr->obj, pd->backclip);
386
387 efl_pack_unpack(curr->obj, curr->content);
388 efl_canvas_object_clipper_set(curr->content, pd->backclip);
389
390 curr->content_num = -1;
391 curr->content = NULL;
392 curr->visible = EINA_FALSE;
393 }
394 }
395
396 curr = target;
397
398 } while (target != dummy);
399}
400
401EOLIAN static void
402_efl_page_transition_scroll_pack(Eo *obj,
403 Efl_Page_Transition_Scroll_Data *pd,
404 int index)
405{
406 EFL_PAGE_TRANSITION_DATA_GET(obj, spd);
407 Eo *tmp;
408
409 tmp = efl_pack_content_get(spd->pager.obj, index);
410 efl_canvas_object_clipper_set(tmp, pd->backclip);
411
412 _efl_page_transition_scroll_update(obj, pd, 0.0);
413}
414
415EOLIAN static void
416_efl_page_transition_scroll_unpack_all(Eo *obj EINA_UNUSED,
417 Efl_Page_Transition_Scroll_Data *pd)
418{
419 Eina_List *list;
420 Page_Info *pi;
421
422 EINA_LIST_FOREACH(pd->page_infos, list, pi)
423 {
424 efl_pack_unpack(pi->obj, pi->content);
425
426 pi->content_num = -1;
427 pi->content = NULL;
428 pi->visible = EINA_FALSE;
429 }
430 return;
431}
432
433EOLIAN static void
434_efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED,
435 Efl_Page_Transition_Scroll_Data *pd,
436 int diff)
437{
438 Eina_List *list;
439 Page_Info *pi, *target = NULL;
440
441 // after the current page is changed, page infos need to be updated
442 // with a new id based on the new geometry of the boxes.
443 EINA_LIST_FOREACH(pd->page_infos, list, pi)
444 {
445 if (diff == 1)
446 {
447 pi->id = (pi->id - 1 + pd->page_info_num) % pd->page_info_num;
448 target = pi->prev;
449 }
450 else
451 {
452 pi->id = (pi->id + 1) % pd->page_info_num;
453 target = pi->next;
454 }
455 pi->pos = pi->id - (pd->side_page_num + 1);
456
457 EINA_RECTANGLE_SET(&pi->temp,
458 target->geometry.x,
459 target->geometry.y,
460 target->geometry.w,
461 target->geometry.h);
462 }
463
464 EINA_LIST_FOREACH(pd->page_infos, list, pi)
465 {
466 EINA_RECTANGLE_SET(&pi->geometry,
467 pi->temp.x,
468 pi->temp.y,
469 pi->temp.w,
470 pi->temp.h);
471 }
472
473 if (diff == 1)
474 {
475 pd->head = pd->head->next;
476 pd->tail = pd->tail->next;
477 }
478 else
479 {
480 pd->head = pd->head->prev;
481 pd->tail = pd->tail->prev;
482 }
483}
484
485EOLIAN static int
486_efl_page_transition_scroll_side_page_num_get(const Eo *obj EINA_UNUSED,
487 Efl_Page_Transition_Scroll_Data *pd)
488{
489 return pd->side_page_num;
490}
491
492static Page_Info *
493_add_item(Efl_Page_Transition_Scroll_Data *pd, Efl_Page_Transition_Data *spd)
494{
495 Page_Info *pi;
496
497 pi = calloc(1, sizeof(*pi));
498 if (!pi) return NULL;
499 pi->obj = efl_add(EFL_UI_BOX_CLASS, spd->pager.obj);
500 efl_canvas_group_member_add(spd->pager.group, pi->obj);
501 pi->content_num = -1;
502 pi->content = NULL;
503
504 pi->next = pd->head;
505 pd->head->prev = pi;
506 pi->prev = pd->tail;
507 pd->tail->next = pi;
508
509 return pi;
510}
511
512static void
513_remove_item(Page_Info *pi, Efl_Page_Transition_Scroll_Data *pd)
514{
515 efl_canvas_object_clipper_set(pi->content, pd->backclip);
516 efl_pack_unpack(pi->obj, pi->content);
517 efl_del(pi->obj);
518 pi->prev->next = pi->next;
519 pi->next->prev = pi->prev;
520 pd->page_infos = eina_list_remove(pd->page_infos, pi);
521 free(pi);
522}
523
524EOLIAN static void
525_efl_page_transition_scroll_side_page_num_set(Eo *obj,
526 Efl_Page_Transition_Scroll_Data *pd,
527 int side_page_num)
528{
529 EFL_PAGE_TRANSITION_DATA_GET(obj, spd);
530 Page_Info *pi;
531 int delta, i;
532
533 if (pd->side_page_num == side_page_num) return;
534
535 delta = side_page_num - pd->side_page_num;
536 pd->side_page_num = side_page_num;
537 pd->page_info_num = (side_page_num * 2) + 3;
538
539 if (!spd->pager.obj) return;
540
541 if (delta > 0)
542 {
543 // side_page_num is increased, so add boxes at both ends by the diff
544 for (i = 0; i < delta; i++)
545 {
546 pi = _add_item(pd, spd);
547 pd->page_infos = eina_list_prepend_relative(pd->page_infos, pi, pd->head);
548 pd->head = pi;
549 efl_gfx_stack_below(pi->obj, pi->next->obj);
550
551 pi = _add_item(pd, spd);
552 pd->page_infos = eina_list_append_relative(pd->page_infos, pi, pd->tail);
553 pd->tail = pi;
554 efl_gfx_stack_above(pi->obj, pi->prev->obj);
555 }
556 }
557 else
558 {
559 // side_page_num is decreased, so remove boxes at both ends by the diff
560 for (i = 0; i > delta; i--)
561 {
562 pi = pd->head;
563 pd->head = pi->next;
564 _remove_item(pi, pd);
565
566 pi = pd->tail;
567 pd->tail = pi->prev;
568 _remove_item(pi, pd);
569 }
570 }
571
572 pi = pd->head;
573 for (i = 0; i < pd->page_info_num; i++)
574 {
575 pi->id = i;
576 pi->pos = i - (pd->side_page_num + 1);
577 pi = pi->next;
578 }
579
580 _page_info_geometry_change(pd, spd);
581}
582
583EOLIAN static Eina_Bool
584_efl_page_transition_scroll_loop_set(Eo *obj,
585 Efl_Page_Transition_Scroll_Data *pd,
586 Efl_Ui_Pager_Loop loop)
587{
588 EFL_PAGE_TRANSITION_DATA_GET(obj, spd);
589 int tmp_id, curr_page, cnt;
590 Page_Info *curr;
591 Eo *tmp;
592
593 if (loop == efl_ui_pager_loop_mode_get(spd->pager.obj))
594 return EINA_TRUE;
595
596 if ((loop == EFL_UI_PAGER_LOOP_ENABLED) &&
597 (efl_content_count(spd->pager.obj) < (pd->page_info_num - 1)))
598 return EINA_FALSE;
599
600 efl_page_transition_loop_set(efl_super(obj, MY_CLASS), loop);
601
602 curr_page = efl_ui_pager_current_page_get(spd->pager.obj);
603 cnt = efl_content_count(spd->pager.obj);
604
605 curr = pd->head->next;
606 do
607 {
608 tmp_id = curr_page + curr->pos;
609 if ((tmp_id < 0) || (tmp_id >= cnt))
610 {
611 switch (loop)
612 {
613 case EFL_UI_PAGER_LOOP_ENABLED:
614 tmp_id = (tmp_id + cnt) % cnt;
615 tmp = efl_pack_content_get(spd->pager.obj, tmp_id);
616
617 efl_pack(curr->obj, tmp);
618 efl_canvas_object_clipper_set(tmp, pd->foreclip);
619
620 curr->content_num = tmp_id;
621 curr->content = tmp;
622 curr->visible = EINA_TRUE;
623
624 break;
625
626 case EFL_UI_PAGER_LOOP_DISABLED:
627 efl_pack_unpack(curr->obj, curr->content);
628 efl_canvas_object_clipper_set(curr->content, pd->backclip);
629
630 curr->content_num = -1;
631 curr->content = NULL;
632 curr->visible = EINA_FALSE;
633
634 break;
635 }
636 }
637
638 curr = curr->next;
639
640 } while (curr != pd->tail);
641
642 return EINA_TRUE;
643}
644
645EOLIAN static Eo *
646_efl_page_transition_scroll_efl_object_constructor(Eo *obj,
647 Efl_Page_Transition_Scroll_Data *pd)
648{
649 obj = efl_constructor(efl_super(obj, MY_CLASS));
650
651 pd->side_page_num = 1;
652 pd->page_info_num = pd->side_page_num * 2 + 3;
653
654 return obj;
655}
656
657EOLIAN static void
658_efl_page_transition_scroll_efl_object_invalidate(Eo *obj,
659 Efl_Page_Transition_Scroll_Data *pd)
660{
661 Page_Info *pi;
662
663 EINA_LIST_FREE(pd->page_infos, pi)
664 {
665 free(pi);
666 }
667
668 efl_invalidate(efl_super(obj, MY_CLASS));
669}
670
671
672#define EFL_PAGE_TRANSITION_SCROLL_EXTRA_OPS \
673 EFL_OBJECT_OP_FUNC(efl_page_transition_update, \
674 _efl_page_transition_scroll_update), \
675 EFL_OBJECT_OP_FUNC(efl_page_transition_pack, \
676 _efl_page_transition_scroll_pack), \
677 EFL_OBJECT_OP_FUNC(efl_page_transition_unpack_all, \
678 _efl_page_transition_scroll_unpack_all), \
679 EFL_OBJECT_OP_FUNC(efl_page_transition_curr_page_change, \
680 _efl_page_transition_scroll_curr_page_change), \
681 EFL_OBJECT_OP_FUNC(efl_page_transition_page_size_set, \
682 _efl_page_transition_scroll_page_size_set), \
683 EFL_OBJECT_OP_FUNC(efl_page_transition_padding_size_set, \
684 _efl_page_transition_scroll_padding_size_set), \
685 EFL_OBJECT_OP_FUNC(efl_page_transition_loop_set, \
686 _efl_page_transition_scroll_loop_set)
687
688#include "efl_page_transition_scroll.eo.c"
diff --git a/src/lib/elementary/efl_page_transition_scroll.eo b/src/lib/elementary/efl_page_transition_scroll.eo
deleted file mode 100644
index e9af63b224..0000000000
--- a/src/lib/elementary/efl_page_transition_scroll.eo
+++ /dev/null
@@ -1,22 +0,0 @@
1class @beta Efl.Page.Transition_Scroll extends Efl.Page.Transition
2{
3 [[Page transition for @Efl.Ui.Pager
4
5 With this type of transition, pages are arranged linearly and move parallel
6 to the screen by scrolling. The current page is displayed at center, and
7 previous and next pages might be displayed optionally.
8 ]]
9 methods {
10 @property side_page_num {
11 [[The number of pages displayed on each side of the current page]]
12 values {
13 side_page_num: int;
14 }
15 }
16 }
17 implements {
18 Efl.Object.constructor;
19 Efl.Object.invalidate;
20 Efl.Page.Transition.bind;
21 }
22}
diff --git a/src/lib/elementary/efl_page_transition_scroll.h b/src/lib/elementary/efl_page_transition_scroll.h
deleted file mode 100644
index adec47d3cd..0000000000
--- a/src/lib/elementary/efl_page_transition_scroll.h
+++ /dev/null
@@ -1,92 +0,0 @@
1#ifndef EFL_PAGE_TRANSITION_SCROLL_H
2#define EFL_PAGE_TRANSITION_SCROLL_H
3
4//#include "efl_ui_widget_pager.h"
5
6
7/**
8 * This is a description on how scroll transition works.
9 *
10 * Regardless of the number of pages, scroll transition maintains a fixed number
11 * of boxes which can contain pages. The boxes move along with scrolling and
12 * some of them are emptied or filled as they come in or out of screen area.
13 * When pager is scrolled left or right, each box takes the position of its
14 * previous or next box. Since the leftmost and rightmost boxes might move in
15 * reverse direction, they shouldn't be visible. This is why there are dummy
16 * boxes at both ends.
17 *
18 * Here is an example of box arrangement change by scrolling.
19 * The pager has 10 pages, numbered from 1 to 10.
20 * The current page is page5, and side_page_num equals 1.
21 *
22 * head |----- screen area ----| tail
23 * (dummy) | | (dummy)
24 * ---------- ---------- ---------- ---------- ----------
25 * | BOX1 | | BOX2 | | BOX3 | | BOX4 | | BOX5 |
26 * | | | | | | | | | |
27 * | (empty)| | page4 | | page5 | | page6 | | (empty)|
28 * | | | | | | | | | |
29 * | | | | | | | | | |
30 * | | | | | | | | | |
31 * ---------- ---------- ---------- ---------- ----------
32 * | |
33 * |----------------------|
34 *
35 * After scrolling left,
36 * 1. each box takes the position of it's previous box.
37 * 2. head and tail is changed.
38 * 3. The box moved to the end is emptied.
39 * 4. The box moved from the end is filled with content.
40 *
41 * head tail
42 * ---------- ---------- ---------- ---------- ----------
43 * | BOX2 | | BOX3 | | BOX4 | | BOX5 | | BOX1 |
44 * | | | | | | | | | |
45 * | (empty)| | page5 | | page6 | | page7 | | (empty)|
46 * |*emptied| | | | | |*filled | | |
47 * | | | | | | | | | |
48 * | | | | | | | | | |
49 * ---------- ---------- ---------- ---------- ----------
50 *
51 */
52
53
54typedef struct _Page_Info
55{
56 Evas_Map *map;
57 int id;
58 int pos;
59 int content_num;
60 Eo *obj;
61 Eo *content;
62
63 Eina_Rectangle geometry;
64 Eina_Rectangle temp;
65
66 struct _Page_Info *prev, *next;
67
68 Eina_Bool visible;
69
70} Page_Info;
71
72typedef struct _Efl_Page_Transition_Scroll_Data Efl_Page_Transition_Scroll_Data;
73
74struct _Efl_Page_Transition_Scroll_Data
75{
76 Eina_List *page_infos;
77
78 Page_Info *head, *tail;
79
80 int page_info_num;
81 int side_page_num;
82
83 Eo *foreclip;
84 Eo *backclip;
85 Eina_Rectangle viewport;
86};
87
88#define EFL_PAGE_TRANSITION_SCROLL_DATA_GET(o, pd) \
89 Efl_Page_Transition_Scroll_Data *pd = \
90 efl_data_scope_get(o, EFL_PAGE_TRANSITION_SCROLL_CLASS)
91
92#endif
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
deleted file mode 100644
index 69e89adf0a..0000000000
--- a/src/lib/elementary/efl_ui_pager.c
+++ /dev/null
@@ -1,973 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#define EFL_PACK_LAYOUT_PROTECTED
6
7#include <Elementary.h>
8#include "elm_priv.h"
9#include "efl_ui_widget_pager.h"
10#include "efl_page_transition.h"
11
12#define MY_CLASS EFL_UI_PAGER_CLASS
13
14static void _unpack(Eo *obj, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj, int index);
15
16static int
17clamp_index(Efl_Ui_Pager_Data *pd, int index)
18{
19 if (index < ((int)eina_list_count(pd->content_list)) * -1)
20 return -1;
21 else if (index > (int)eina_list_count(pd->content_list) - 1)
22 return 1;
23 return 0;
24}
25
26static int
27index_rollover(Efl_Ui_Pager_Data *pd, int index)
28{
29 int c = eina_list_count(pd->content_list);
30 if (index < c * -1)
31 return 0;
32 else if (index > c - 1)
33 return c - 1;
34 else if (index < 0)
35 return index + c;
36 return index;
37}
38
39static void
40_efl_ui_pager_update(Efl_Ui_Pager_Data *pd)
41{
42 if (pd->cnt == 0) return;
43
44 if (pd->transition)
45 efl_page_transition_update(pd->transition, pd->curr.pos);
46
47 if (pd->indicator)
48 efl_page_indicator_update(pd->indicator, pd->curr.pos);
49}
50
51static void
52_job(void *data)
53{
54 Evas_Object *obj = data;
55 EFL_UI_PAGER_DATA_GET(obj, pd);
56
57 int prev_page, page_diff;
58 double prev_pos, pos_diff;
59
60 prev_page = pd->curr.page;
61 prev_pos = pd->curr.pos;
62
63 pd->job = NULL;
64
65 pos_diff = ((double) pd->down.x - (double) pd->mouse_x) / (double) pd->w;
66 pd->curr.pos = pd->down.pos + pos_diff;
67 page_diff = (int) pd->curr.pos;
68
69 //FIXME what if (prev_pos != 0.0)
70 if ((pd->loop == EFL_UI_PAGER_LOOP_DISABLED) &&
71 (((prev_page == 0) && (pd->curr.pos < 0)) ||
72 ((prev_page == (pd->cnt - 1)) && (pd->curr.pos > 0))))
73 {
74 pd->curr.page = prev_page;
75 pd->curr.pos = prev_pos;
76 return;
77 }
78
79 pd->curr.page = (pd->down.page + page_diff + pd->cnt) % pd->cnt;
80 pd->curr.pos -= page_diff;
81
82 //FIXME what if (page_diff >= 2 || page_diff <= -2)
83 if (page_diff != 0)
84 {
85 pd->down.x = pd->mouse_x;
86 pd->down.y = pd->mouse_y;
87 pd->down.page = pd->curr.page;
88 pd->down.pos = pd->curr.pos;
89
90 efl_page_transition_curr_page_change(pd->transition, page_diff);
91 }
92
93 _efl_ui_pager_update(pd);
94
95 return;
96}
97
98static void
99_page_set_animation(void *data, const Efl_Event *event)
100{
101 Efl_Ui_Pager_Data *pd = data;
102 double p = ecore_loop_time_get() - pd->change.start_time;
103 double d, temp_pos;
104 int temp_page;
105
106 if (p >= 1.0) p = 1.0;
107 p = ecore_animator_pos_map(p, ECORE_POS_MAP_ACCELERATE, 0.0, 0.0);
108
109 d = pd->change.src + pd->change.delta * p;
110 temp_page = d;
111 temp_pos = d - temp_page;
112
113 if ((temp_page < pd->curr.page) && (fabs(pd->curr.page - d) < 1.0))
114 {
115 temp_page += 1;
116 temp_pos -= 1.0;
117 }
118
119 if (pd->curr.page != temp_page)
120 {
121 if (pd->change.delta < 0)
122 efl_page_transition_curr_page_change(pd->transition, -1);
123 else
124 efl_page_transition_curr_page_change(pd->transition, 1);
125 temp_pos = 0.0;
126 }
127
128 pd->curr.page = temp_page;
129 pd->curr.pos = temp_pos;
130
131 ERR("page %d pos %lf", pd->curr.page, pd->curr.pos);
132
133 _efl_ui_pager_update(pd);
134
135 if (EINA_DBL_EQ(p, 1.0))
136 efl_event_callback_del(event->object, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK,
137 _page_set_animation, pd);
138}
139
140static void
141_mouse_up_animation(void *data, const Efl_Event *event)
142{
143 Efl_Ui_Pager_Data *pd = data;
144 double p = ecore_loop_time_get() - pd->mouse_up_time;
145
146 if (p >= 1.0) p = 1.0;
147 p = ecore_animator_pos_map(p, ECORE_POS_MAP_ACCELERATE, 0.0, 0.0);
148
149 if (pd->curr.pos < 0.0)
150 {
151 if (pd->curr.pos > -0.5)
152 pd->curr.pos = pd->curr.pos * (1 - p);
153 else
154 pd->curr.pos = (-1) - (-1 - pd->curr.pos) * (1 - p);
155 }
156 else
157 {
158 if (pd->curr.pos < 0.5)
159 pd->curr.pos = pd->curr.pos * (1 - p);
160 else
161 pd->curr.pos = 1 - (1 - pd->curr.pos) * (1 - p);
162 }
163
164 if (EINA_DBL_EQ(pd->curr.pos, 1.0))
165 {
166 efl_page_transition_curr_page_change(pd->transition, 1);
167 pd->curr.page = (pd->curr.page + 1 + pd->cnt) % pd->cnt;
168 pd->curr.pos = 0.0;
169 }
170 else if (EINA_DBL_EQ(pd->curr.pos, -1.0))
171 {
172 efl_page_transition_curr_page_change(pd->transition, -1);
173 pd->curr.page = (pd->curr.page - 1 + pd->cnt) % pd->cnt;
174 pd->curr.pos = 0.0;
175 }
176
177 _efl_ui_pager_update(pd);
178
179 if (EINA_DBL_EQ(p, 1.0))
180 efl_event_callback_del(event->object, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK,
181 _mouse_up_animation, pd);
182}
183
184static void
185_mouse_down_cb(void *data,
186 const Efl_Event *event)
187{
188 Efl_Input_Pointer *ev = event->info;
189 Eo *obj = data;
190 EFL_UI_PAGER_DATA_GET(obj, pd);
191 Eina_Position2D pos;
192
193 if (efl_input_pointer_button_get(ev) != 1) return;
194 if (efl_input_event_flags_get(ev) & EFL_INPUT_FLAGS_PROCESSED) return;
195
196 if (pd->cnt == 0) return;
197
198 efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd);
199 efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, pd);
200
201 pd->move_started = EINA_FALSE;
202
203 pos = efl_input_pointer_position_get(ev);
204 pd->mouse_x = pos.x - pd->x;
205 pd->mouse_y = pos.y - pd->y;
206
207 pd->down.enabled = EINA_TRUE;
208 pd->down.x = pd->mouse_x;
209 pd->down.y = pd->mouse_y;
210 pd->down.page = pd->curr.page;
211 pd->down.pos = pd->curr.pos;
212}
213
214static void
215_mouse_move_cb(void *data,
216 const Efl_Event *event)
217{
218 Efl_Input_Pointer *ev = event->info;
219 Eo *obj = data;
220 EFL_UI_PAGER_DATA_GET(obj, pd);
221 Eina_Position2D pos;
222
223 if (efl_input_event_flags_get(ev) & EFL_INPUT_FLAGS_PROCESSED) return;
224 if (!pd->down.enabled) return;
225
226 pos = efl_input_pointer_position_get(ev);
227
228 if (pd->prev_block && (pd->mouse_x < (pos.x - pd->x))) return;
229 if (pd->next_block && (pd->mouse_x > (pos.x - pd->x))) return;
230
231 pd->mouse_x = pos.x - pd->x;
232 pd->mouse_y = pos.y - pd->y;
233
234 if (!pd->move_started)
235 {
236 Evas_Coord dx, dy;
237 dx = pd->mouse_x - pd->down.x;
238 dy = pd->mouse_y - pd->down.y;
239
240 if (((dx * dx) + (dy * dy)) <=
241 (_elm_config->finger_size * _elm_config->finger_size / 4))
242 return;
243
244 pd->move_started = EINA_TRUE;
245 }
246
247 ecore_job_del(pd->job);
248 pd->job = ecore_job_add(_job, obj);
249}
250
251static void
252_mouse_up_cb(void *data,
253 const Efl_Event *event)
254{
255 Efl_Input_Pointer *ev = event->info;
256 Eo *obj = data;
257 EFL_UI_PAGER_DATA_GET(obj, pd);
258
259 if (efl_input_event_flags_get(ev) & EFL_INPUT_FLAGS_PROCESSED) return;
260 if (!pd->down.enabled) return;
261
262 pd->down.enabled = EINA_FALSE;
263
264 ELM_SAFE_FREE(pd->job, ecore_job_del);
265
266 if (EINA_DBL_EQ(pd->curr.pos, 0.0)) return;
267
268 pd->mouse_up_time = ecore_loop_time_get();
269
270 efl_event_callback_add(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd);
271}
272
273//FIXME sub_object_parent_add? destruction
274static void
275_event_handler_create(Eo *obj, Efl_Ui_Pager_Data *pd)
276{
277 pd->event = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
278 evas_object_evas_get(obj));
279 evas_object_color_set(pd->event, 0, 0, 0, 0);
280 evas_object_repeat_events_set(pd->event, EINA_TRUE);
281
282 efl_content_set(efl_part(obj, "efl.event"), pd->event);
283
284 efl_event_callback_add(pd->event, EFL_EVENT_POINTER_DOWN,
285 _mouse_down_cb, obj);
286 efl_event_callback_add(pd->event, EFL_EVENT_POINTER_UP,
287 _mouse_up_cb, obj);
288 efl_event_callback_add(pd->event, EFL_EVENT_POINTER_MOVE,
289 _mouse_move_cb, obj);
290}
291
292static void
293_event_handler_del(Eo *obj, Efl_Ui_Pager_Data *pd)
294{
295 efl_content_unset(efl_part(obj, "efl.event"));
296 efl_del(pd->event);
297 pd->event = NULL;
298}
299
300static void
301_resize_cb(void *data, const Efl_Event *ev)
302{
303 Efl_Ui_Pager_Data *pd = data;
304 Eina_Size2D sz;
305
306 sz = efl_gfx_entity_size_get(ev->object);
307
308 pd->w = sz.w;
309 pd->h = sz.h;
310
311 if (pd->fill_width) pd->page_spec.sz.w = pd->w;
312 if (pd->fill_height) pd->page_spec.sz.h = pd->h;
313
314 if (pd->transition)
315 efl_page_transition_page_size_set(pd->transition, pd->page_spec.sz);
316 else
317 {
318 efl_gfx_entity_size_set(pd->foreclip, sz);
319 efl_gfx_entity_size_set(pd->page_box, pd->page_spec.sz);
320 efl_gfx_entity_position_set(pd->page_box,
321 EINA_POSITION2D(pd->x + (pd->w / 2) - (pd->page_spec.sz.w / 2),
322 pd->y + (pd->h / 2) - (pd->page_spec.sz.h / 2)));
323 }
324}
325
326static void
327_move_cb(void *data, const Efl_Event *ev)
328{
329 Efl_Ui_Pager_Data *pd = data;
330 Eina_Position2D pos;
331
332 pos = efl_gfx_entity_position_get(ev->object);
333
334 pd->x = pos.x;
335 pd->y = pos.y;
336
337 if (!pd->transition)
338 {
339 efl_gfx_entity_position_set(pd->foreclip, pos);
340 efl_gfx_entity_position_set(pd->page_box,
341 EINA_POSITION2D(pd->x + (pd->w / 2) - (pd->page_spec.sz.w / 2),
342 pd->y + (pd->h / 2) - (pd->page_spec.sz.h / 2)));
343 }
344}
345
346EOLIAN static Eo *
347_efl_ui_pager_efl_object_constructor(Eo *obj,
348 Efl_Ui_Pager_Data *pd)
349{
350 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
351
352 if (!elm_widget_theme_klass_get(obj))
353 elm_widget_theme_klass_set(obj, "pager");
354
355 obj = efl_constructor(efl_super(obj, MY_CLASS));
356
357 if (elm_widget_theme_object_set(obj, wd->resize_obj,
358 elm_widget_theme_klass_get(obj),
359 elm_widget_theme_element_get(obj),
360 elm_widget_theme_style_get(obj)) == EFL_UI_THEME_APPLY_ERROR_GENERIC)
361 CRI("Failed to set layout!");
362
363 pd->cnt = 0;
364 pd->loop = EFL_UI_PAGER_LOOP_DISABLED;
365
366 pd->curr.page = -1;
367 pd->curr.pos = 0.0;
368
369 pd->transition = NULL;
370 pd->indicator = NULL;
371
372 pd->fill_width = EINA_TRUE;
373 pd->fill_height = EINA_TRUE;
374
375 pd->page_spec.sz.w = -1;
376 pd->page_spec.sz.h = -1;
377
378 elm_widget_can_focus_set(obj, EINA_TRUE);
379
380 pd->page_root = efl_add(EFL_CANVAS_GROUP_CLASS, evas_object_evas_get(obj));
381 efl_content_set(efl_part(obj, "efl.page_root"), pd->page_root);
382
383 efl_event_callback_add(pd->page_root, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, pd);
384 efl_event_callback_add(pd->page_root, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, pd);
385
386 pd->page_box = efl_add(EFL_UI_BOX_CLASS, obj);
387 efl_ui_widget_internal_set(pd->page_box, EINA_TRUE);
388 efl_canvas_group_member_add(pd->page_root, pd->page_box);
389
390 pd->foreclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
391 evas_object_evas_get(obj));
392 efl_canvas_group_member_add(pd->page_root, pd->foreclip);
393 evas_object_static_clip_set(pd->foreclip, EINA_TRUE);
394 efl_canvas_object_clipper_set(pd->page_box, pd->foreclip);
395
396 pd->backclip = efl_add(EFL_CANVAS_RECTANGLE_CLASS,
397 evas_object_evas_get(obj));
398 efl_canvas_group_member_add(pd->page_root, pd->backclip);
399 evas_object_static_clip_set(pd->backclip, EINA_TRUE);
400 efl_gfx_entity_visible_set(pd->backclip, EINA_FALSE);
401
402 return obj;
403}
404
405EOLIAN static void
406_efl_ui_pager_efl_object_invalidate(Eo *obj,
407 Efl_Ui_Pager_Data *pd)
408{
409 efl_invalidate(efl_super(obj, MY_CLASS));
410
411 /* Since the parent of foreclip and backclip is evas, foreclip and backclip
412 * are not deleted automatically when pager is deleted.
413 * Therefore, foreclip and backclip are deleted manually here. */
414 efl_del(pd->foreclip);
415 efl_del(pd->backclip);
416}
417
418EOLIAN static int
419_efl_ui_pager_efl_container_content_count(Eo *obj EINA_UNUSED,
420 Efl_Ui_Pager_Data *pd)
421{
422 return pd->cnt;
423}
424
425static void
426_child_inv(void *data, const Efl_Event *ev)
427{
428 Efl_Ui_Pager_Data *pd = efl_data_scope_get(data, EFL_UI_PAGER_CLASS);
429 int index = eina_list_data_idx(pd->content_list, ev->object);
430
431 pd->content_list = eina_list_remove(pd->content_list, ev->object);
432
433 if (((index == pd->curr.page) && ((index != 0) || (pd->cnt == 0))) ||
434 (index < pd->curr.page))
435 pd->curr.page--;
436 pd->cnt--;
437}
438
439static Eina_Bool
440_register_child(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj)
441{
442 if (eina_list_data_find(pd->content_list, subobj))
443 {
444 ERR("Object already added!");
445 return EINA_FALSE;
446 }
447 if (!efl_ui_widget_sub_object_add(obj, subobj))
448 return EINA_FALSE;
449
450 if (!pd->transition)
451 efl_canvas_object_clipper_set(subobj, pd->backclip);
452
453 efl_event_callback_add(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
454
455 return EINA_TRUE;
456}
457
458static void
459_update_internals(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd, Efl_Gfx_Entity *subobj EINA_UNUSED, int index)
460{
461 pd->cnt++;
462
463 if (pd->curr.page >= index)
464 pd->curr.page++;
465
466 if (pd->transition)
467 efl_page_transition_pack(pd->transition, index);
468
469 if (pd->indicator)
470 efl_page_transition_pack(pd->indicator, index);
471
472 if (pd->cnt == 1)
473 efl_ui_pager_current_page_set(obj, 0);
474}
475
476EOLIAN static Eina_Bool
477_efl_ui_pager_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED,
478 Efl_Ui_Pager_Data *pd,
479 Efl_Gfx_Entity *subobj)
480{
481 if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
482 pd->content_list = eina_list_prepend(pd->content_list, subobj);
483 _update_internals(obj, pd, subobj, 0);
484 return EINA_TRUE;
485}
486
487EOLIAN static Eina_Bool
488_efl_ui_pager_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED,
489 Efl_Ui_Pager_Data *pd,
490 Efl_Gfx_Entity *subobj)
491{
492 if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
493 pd->content_list = eina_list_append(pd->content_list, subobj);
494 _update_internals(obj, pd, subobj, eina_list_count(pd->content_list) - 1);
495 return EINA_TRUE;
496}
497
498EOLIAN static Eina_Bool
499_efl_ui_pager_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED,
500 Efl_Ui_Pager_Data *pd,
501 Efl_Gfx_Entity *subobj,
502 const Efl_Gfx_Entity *existing)
503{
504 if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
505 int index = eina_list_data_idx(pd->content_list, (void *)existing);
506 if (index == -1) return EINA_FALSE;
507 pd->content_list = eina_list_prepend_relative(pd->content_list, subobj, existing);
508 _update_internals(obj, pd, subobj, index);
509 return EINA_TRUE;
510}
511
512EOLIAN static Eina_Bool
513_efl_ui_pager_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED,
514 Efl_Ui_Pager_Data *pd,
515 Efl_Gfx_Entity *subobj,
516 const Efl_Gfx_Entity *existing)
517{
518 if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
519 int index = eina_list_data_idx(pd->content_list, (void *)existing);
520 if (index == -1) return EINA_FALSE;
521 pd->content_list = eina_list_append_relative(pd->content_list, subobj, existing);
522 _update_internals(obj, pd, subobj, index + 1);
523 return EINA_TRUE;
524}
525
526EOLIAN static Eina_Bool
527_efl_ui_pager_efl_pack_linear_pack_at(Eo *obj,
528 Efl_Ui_Pager_Data *pd,
529 Efl_Gfx_Entity *subobj,
530 int index)
531{
532 if (index == pd->cnt)
533 {
534 _efl_ui_pager_efl_pack_linear_pack_end(obj, pd, subobj);
535 }
536 else
537 {
538 Efl_Gfx_Entity *existing = NULL;
539
540 if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
541 int clamp = clamp_index(pd, index);
542 int pass_index = -1;
543 if (clamp == 0)
544 {
545 existing = eina_list_nth(pd->content_list, index_rollover(pd, index));
546 pd->content_list = eina_list_prepend_relative(
547 pd->content_list, subobj, existing);
548 }
549 else if (clamp == 1)
550 {
551 pd->content_list = eina_list_append(pd->content_list, subobj);
552 pass_index = eina_list_count(pd->content_list);
553 }
554 else
555 {
556 pd->content_list = eina_list_prepend(pd->content_list, subobj);
557 pass_index = 0;
558 }
559 _update_internals(obj, pd, subobj, pass_index);
560 }
561
562 return EINA_TRUE;
563}
564
565EOLIAN static Efl_Gfx_Entity *
566_efl_ui_pager_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED,
567 Efl_Ui_Pager_Data *pd,
568 int index)
569{
570 return eina_list_nth(pd->content_list, index_rollover(pd, index));
571}
572
573EOLIAN static int
574_efl_ui_pager_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED,
575 Efl_Ui_Pager_Data *pd,
576 const Efl_Gfx_Entity *subobj)
577{
578 return eina_list_data_idx(pd->content_list, (void *)subobj);
579}
580
581EOLIAN static void
582_efl_ui_pager_current_page_set(Eo *obj,
583 Efl_Ui_Pager_Data *pd,
584 int index)
585{
586 if (index == pd->curr.page) return;
587
588 efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _mouse_up_animation, pd);
589 efl_event_callback_del(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, pd);
590
591 if ((index < 0) || (index > (pd->cnt - 1)))
592 {
593 ERR("page set fail");
594 return;
595 }
596
597 if (!pd->transition)
598 {
599 Eo *curr;
600
601 curr = eina_list_nth(pd->content_list, pd->curr.page);
602 if (curr)
603 efl_pack_unpack(pd->page_box, curr);
604 efl_canvas_object_clipper_set(curr, pd->backclip);
605
606 pd->curr.page = index;
607 curr = eina_list_nth(pd->content_list, pd->curr.page);
608 efl_pack(pd->page_box, curr);
609
610 if (pd->indicator)
611 efl_page_indicator_update(pd->indicator, pd->curr.pos);
612
613 return;
614 }
615
616 pd->change.src = pd->curr.page + pd->curr.pos;
617 pd->change.delta = index - pd->change.src;
618
619 if (pd->change.delta == 0) return;
620
621 pd->change.start_time = ecore_loop_time_get();
622 efl_event_callback_add(obj, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, pd);
623}
624
625EOLIAN static int
626_efl_ui_pager_current_page_get(const Eo *obj EINA_UNUSED,
627 Efl_Ui_Pager_Data *pd)
628{
629 return pd->curr.page;
630}
631
632EOLIAN static void
633_efl_ui_pager_transition_set(Eo *obj,
634 Efl_Ui_Pager_Data *pd,
635 Efl_Page_Transition *transition)
636{
637 if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return;
638
639 if (pd->transition == transition) return;
640
641 if (pd->transition)
642 efl_page_transition_bind(pd->transition, NULL, NULL);
643 else
644 {
645 Eo *curr;
646
647 curr = eina_list_nth(pd->content_list, pd->curr.page);
648 efl_pack_unpack(pd->page_box, curr);
649 efl_canvas_object_clipper_set(pd->page_box, pd->backclip);
650 }
651
652 pd->transition = transition;
653
654 if (pd->transition)
655 {
656 if (!pd->event) _event_handler_create(obj, pd);
657 efl_page_transition_bind(pd->transition, obj, pd->page_root);
658 }
659 else
660 {
661 Eina_List *list;
662 Eo *curr;
663
664 _event_handler_del(obj, pd);
665
666 efl_canvas_object_clipper_set(pd->page_box, pd->foreclip);
667
668 EINA_LIST_FOREACH(pd->content_list, list, curr)
669 {
670 efl_canvas_object_clipper_set(curr, pd->backclip);
671 }
672
673 curr = eina_list_nth(pd->content_list, pd->curr.page);
674 efl_pack(pd->page_box, curr);
675 }
676}
677
678EOLIAN static void
679_efl_ui_pager_indicator_set(Eo *obj EINA_UNUSED,
680 Efl_Ui_Pager_Data *pd,
681 Efl_Page_Indicator *indicator)
682{
683 if (pd->indicator == indicator) return;
684
685 if (pd->indicator)
686 {
687 efl_page_indicator_bind(pd->indicator, NULL, NULL);
688 pd->indicator = NULL;
689 }
690
691 pd->indicator = indicator;
692
693 if (!pd->indicator)
694 {
695 if (pd->idbox)
696 {
697 efl_del(pd->idbox);
698 pd->idbox = NULL;
699 }
700 return;
701 }
702
703 if (!pd->idbox)
704 {
705 pd->idbox = efl_add(EFL_UI_BOX_CLASS, obj);
706 efl_ui_widget_internal_set(pd->idbox, EINA_TRUE);
707 efl_content_set(efl_part(obj, "efl.indicator"), pd->idbox);
708 }
709
710 efl_page_indicator_bind(pd->indicator, obj, pd->idbox);
711}
712
713EOLIAN Eina_Size2D
714_efl_ui_pager_page_size_get(const Eo *obj EINA_UNUSED,
715 Efl_Ui_Pager_Data *pd)
716{
717 return pd->page_spec.sz;
718}
719
720EOLIAN static void
721_efl_ui_pager_page_size_set(Eo *obj EINA_UNUSED,
722 Efl_Ui_Pager_Data *pd,
723 Eina_Size2D sz)
724{
725 if (sz.w < -1 || sz.h < -1) return;
726
727 if (sz.w == -1)
728 {
729 pd->fill_width = EINA_TRUE;
730 pd->page_spec.sz.w = pd->w;
731 }
732 else
733 {
734 pd->fill_width = EINA_FALSE;
735 pd->page_spec.sz.w = sz.w;
736 }
737 if (sz.h == -1)
738 {
739 pd->fill_height = EINA_TRUE;
740 pd->page_spec.sz.h = pd->h;
741 }
742 else
743 {
744 pd->fill_height = EINA_FALSE;
745 pd->page_spec.sz.h = sz.h;
746 }
747
748 if (pd->transition)
749 efl_page_transition_page_size_set(pd->transition, pd->page_spec.sz);
750 else
751 {
752 efl_gfx_entity_size_set(pd->page_box, pd->page_spec.sz);
753 efl_gfx_entity_position_set(pd->page_box,
754 EINA_POSITION2D(pd->x + (pd->w / 2) - (pd->page_spec.sz.w / 2),
755 pd->y + (pd->h / 2) - (pd->page_spec.sz.h / 2)));
756 }
757}
758
759EOLIAN static int
760_efl_ui_pager_padding_get(const Eo *obj EINA_UNUSED,
761 Efl_Ui_Pager_Data *pd)
762{
763 return pd->page_spec.padding;
764}
765
766EOLIAN static void
767_efl_ui_pager_padding_set(Eo *obj EINA_UNUSED,
768 Efl_Ui_Pager_Data *pd,
769 int padding)
770{
771 pd->page_spec.padding = padding;
772
773 if (pd->transition)
774 efl_page_transition_padding_size_set(pd->transition, padding);
775}
776
777EOLIAN static void
778_efl_ui_pager_scroll_block_get(const Eo *obj EINA_UNUSED,
779 Efl_Ui_Pager_Data *pd,
780 Eina_Bool *prev,
781 Eina_Bool *next)
782{
783 if (prev) *prev = pd->prev_block;
784 if (next) *next = pd->next_block;
785}
786
787EOLIAN static void
788_efl_ui_pager_scroll_block_set(Eo *obj EINA_UNUSED,
789 Efl_Ui_Pager_Data *pd,
790 Eina_Bool prev,
791 Eina_Bool next)
792{
793 pd->prev_block = prev;
794 pd->next_block = next;
795}
796
797EOLIAN static Eina_Bool
798_efl_ui_pager_loop_mode_set(Eo *obj EINA_UNUSED,
799 Efl_Ui_Pager_Data *pd,
800 Efl_Ui_Pager_Loop loop)
801{
802 if (pd->loop == loop) return EINA_TRUE;
803
804 if (!pd->transition) return EINA_FALSE;
805
806 if (efl_page_transition_loop_set(pd->transition, loop))
807 {
808 pd->loop = loop;
809 return EINA_TRUE;
810 }
811 else return EINA_FALSE;
812}
813
814EOLIAN static Efl_Ui_Pager_Loop
815_efl_ui_pager_loop_mode_get(const Eo *obj EINA_UNUSED,
816 Efl_Ui_Pager_Data *pd)
817{
818 return pd->loop;
819}
820
821static void
822_unpack_all(Eo *obj EINA_UNUSED,
823 Efl_Ui_Pager_Data *pd,
824 Eina_Bool clear)
825{
826 Eo *subobj;
827
828 pd->cnt = 0;
829 pd->curr.page = -1;
830 pd->curr.pos = 0.0;
831
832 if (pd->transition)
833 {
834 efl_page_transition_unpack_all(pd->transition);
835 }
836 else
837 {
838 subobj = eina_list_nth(pd->content_list, pd->curr.page);
839 if (subobj)
840 efl_pack_unpack(pd->page_box, subobj);
841 pd->curr.page = -1;
842 }
843
844 if (clear)
845 {
846 EINA_LIST_FREE(pd->content_list, subobj)
847 {
848 efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
849 evas_object_del(subobj);
850 }
851 }
852 else
853 {
854 EINA_LIST_FREE(pd->content_list, subobj)
855 {
856 efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
857 efl_canvas_object_clipper_set(subobj, NULL);
858 }
859 }
860
861 if (pd->indicator)
862 {
863 efl_page_indicator_unpack_all(pd->indicator);
864 }
865}
866
867EOLIAN static Eina_Bool
868_efl_ui_pager_efl_pack_pack_clear(Eo *obj EINA_UNUSED,
869 Efl_Ui_Pager_Data *pd)
870{
871 _unpack_all(obj, pd, EINA_TRUE);
872
873 return EINA_TRUE;
874}
875
876EOLIAN static Eina_Bool
877_efl_ui_pager_efl_pack_unpack_all(Eo *obj EINA_UNUSED,
878 Efl_Ui_Pager_Data *pd)
879{
880 _unpack_all(obj, pd, EINA_FALSE);
881
882 return EINA_TRUE;
883}
884
885static void
886_unpack(Eo *obj,
887 Efl_Ui_Pager_Data *pd,
888 Efl_Gfx_Entity *subobj,
889 int index)
890{
891 int self_index = eina_list_data_idx(pd->content_list, subobj);
892 int self_curr_page = pd->curr.page;
893 pd->content_list = eina_list_remove(pd->content_list, subobj);
894 pd->cnt--;
895 _elm_widget_sub_object_redirect_to_top(obj, subobj);
896
897 if (((index == pd->curr.page) && ((index != 0) || (pd->cnt == 0))) ||
898 (index < pd->curr.page))
899 pd->curr.page--;
900
901 if (pd->transition)
902 {
903 // if the number of pages is not enough after unpacking a page,
904 // loop mode needs to be disabled
905 if (pd->loop == EFL_UI_PAGER_LOOP_ENABLED)
906 {
907 _efl_ui_pager_loop_mode_set(obj, pd, EFL_UI_PAGER_LOOP_DISABLED);
908 _efl_ui_pager_loop_mode_set(obj, pd, EFL_UI_PAGER_LOOP_ENABLED);
909 }
910 efl_page_transition_update(pd->transition, pd->curr.pos);
911 }
912 else
913 {
914 if (self_curr_page == self_index)
915 {
916 efl_pack_unpack(pd->page_box, subobj);
917 self_curr_page = pd->curr.page;
918 pd->curr.page = -1;
919 efl_ui_pager_current_page_set(obj, self_curr_page);
920 }
921 }
922
923 if (pd->indicator)
924 efl_page_indicator_unpack(pd->indicator, index);
925
926 efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
927}
928
929EOLIAN static Eina_Bool
930_efl_ui_pager_efl_pack_unpack(Eo *obj,
931 Efl_Ui_Pager_Data *pd,
932 Efl_Gfx_Entity *subobj)
933{
934 if (!subobj) return EINA_FALSE;
935
936 int index = eina_list_data_idx(pd->content_list, subobj);
937 if (index == -1)
938 {
939 ERR("You can only unpack items that have been added before");
940 return EINA_FALSE;
941 }
942
943 _unpack(obj, pd, subobj, index);
944
945 return EINA_TRUE;
946}
947
948EOLIAN static Efl_Gfx_Entity *
949_efl_ui_pager_efl_pack_linear_pack_unpack_at(Eo *obj,
950 Efl_Ui_Pager_Data *pd,
951 int index)
952{
953 Efl_Gfx_Entity *subobj = eina_list_nth(pd->content_list, index_rollover(pd, index_rollover(pd, index)));
954
955 _unpack(obj, pd, subobj, index);
956
957 return subobj;
958}
959
960EOLIAN static Eina_Bool
961_efl_ui_pager_efl_pack_pack(Eo *obj, Efl_Ui_Pager_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj)
962{
963 return efl_pack_begin(obj, subobj);
964}
965
966EOLIAN static Eina_Iterator*
967_efl_ui_pager_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Pager_Data *pd)
968{
969 return eina_list_iterator_new(pd->content_list);
970}
971
972
973#include "efl_ui_pager.eo.c"
diff --git a/src/lib/elementary/efl_ui_pager.eo b/src/lib/elementary/efl_ui_pager.eo
deleted file mode 100644
index 7389fd8e08..0000000000
--- a/src/lib/elementary/efl_ui_pager.eo
+++ /dev/null
@@ -1,109 +0,0 @@
1enum @beta Efl.Ui.Pager_Loop
2{
3 [[Efl ui pager loop mode]]
4 disabled,
5 enabled
6}
7
8class @beta Efl.Ui.Pager extends Efl.Ui.Layout_Base implements Efl.Pack_Linear
9{
10 [[Pager widget
11
12 A pager contains many pages in a linear fashion and allows users to scroll
13 through pages. Each page is numbered according to linear order and
14 one of the pages is marked as 'current page' and displayed in the middle.
15 The way each page is displayed is defined by @Efl.Page.Transition object,
16 allowing users to adopt different types of transition.
17 The most common use case of this widget is the home screen of mobile devices.
18 ]]
19 methods {
20 @property transition {
21 [[Page transition effect
22
23 Page transition is in charge of displaying pages in a specific way and
24 invoked every time page layout needs to be updated.
25 ]]
26 set {
27 [[Set a page transition effect]]
28 }
29 values {
30 transition: Efl.Page.Transition; [[transition effect]]
31 }
32 }
33 @property indicator {
34 [[Page indicator
35
36 Page indicator, located on the top layer of pager widget, helps users
37 to know the number of pages and the current page's index without scrolling.
38 ]]
39 set {
40 [[Set a page indicator]]
41 }
42 values {
43 indicator: Efl.Page.Indicator; [[indicator class]]
44 }
45 }
46 @property current_page {
47 [[One page is selected as the current page and mainly displayed.]]
48 set {
49 [[Set one page as current page]]
50 }
51 get {
52 [[Get the current page]]
53 }
54 values {
55 index: int;
56 }
57 }
58 @property scroll_block {
59 [[Pages can be scrolled back and forth by default. This property allows
60 limiting the direction of scrolling, or blocking scroll gesture at all.
61 ]]
62 values {
63 prev: bool;
64 next: bool;
65 }
66 }
67 @property loop_mode {
68 [[Pager is not scrolled after it's scrolled to the end by default.
69 This property gives the option to make a loop through pages.
70 ]]
71 set {
72 return: bool; [[$true on success, $false otherwise]]
73 }
74 get {
75 }
76 values {
77 loop: Efl.Ui.Pager_Loop;
78 }
79 }
80 @property page_size {
81 values {
82 size: Eina.Size2D;
83 }
84 }
85 @property padding {
86 values {
87 padding: int;
88 }
89 }
90 }
91 implements {
92 Efl.Object.constructor;
93 Efl.Object.invalidate;
94 Efl.Container.content_count;
95 Efl.Container.content_iterate;
96 Efl.Pack.pack_clear; //TODO
97 Efl.Pack.unpack_all; //TODO
98 Efl.Pack.unpack; //TODO
99 Efl.Pack.pack;
100 Efl.Pack_Linear.pack_begin;
101 Efl.Pack_Linear.pack_end;
102 Efl.Pack_Linear.pack_before;
103 Efl.Pack_Linear.pack_after;
104 Efl.Pack_Linear.pack_at;
105 Efl.Pack_Linear.pack_content_get;
106 Efl.Pack_Linear.pack_index_get;
107 Efl.Pack_Linear.pack_unpack_at; //TODO
108 }
109}
diff --git a/src/lib/elementary/efl_ui_tab_pager.c b/src/lib/elementary/efl_ui_tab_pager.c
index de96213219..98569154c4 100644
--- a/src/lib/elementary/efl_ui_tab_pager.c
+++ b/src/lib/elementary/efl_ui_tab_pager.c
@@ -8,7 +8,6 @@
8 8
9#include "efl_ui_tab_pager_private.h" 9#include "efl_ui_tab_pager_private.h"
10#include "efl_ui_tab_page_private.h" 10#include "efl_ui_tab_page_private.h"
11#include "efl_ui_widget_pager.h"
12 11
13#define MY_CLASS EFL_UI_TAB_PAGER_CLASS 12#define MY_CLASS EFL_UI_TAB_PAGER_CLASS
14 13
diff --git a/src/lib/elementary/efl_ui_widget_pager.h b/src/lib/elementary/efl_ui_widget_pager.h
deleted file mode 100644
index d01cc29a5f..0000000000
--- a/src/lib/elementary/efl_ui_widget_pager.h
+++ /dev/null
@@ -1,69 +0,0 @@
1#ifndef EFL_UI_WIDGET_PAGER_H
2#define EFL_UI_WIDGET_PAGER_H
3
4
5#include <Elementary.h>
6
7#include "efl_page_transition.h"
8
9typedef struct _Efl_Ui_Pager_Data
10{
11 Eina_List *page_infos;
12 Eina_List *content_list;
13
14 Efl_Ui_Box *page_box;
15 Eo *foreclip;
16 Eo *backclip;
17
18 Eo *page_root;
19 Eo *event;
20 Efl_Ui_Box *idbox;
21 Ecore_Job *job;
22 Ecore_Job *page_info_job;
23
24 Evas_Coord x, y, w, h;
25 Evas_Coord mouse_x, mouse_y;
26
27 struct {
28 Eina_Size2D sz;
29 Evas_Coord padding;
30 } page_spec;
31
32 struct {
33 Evas_Coord x, y;
34 int page;
35 double pos;
36 Eina_Bool enabled;
37 } down;
38
39 struct {
40 int page;
41 double pos;
42 } curr;
43
44 struct {
45 double src;
46 double delta;
47 double start_time;
48 Eina_Bool jump;
49 } change;
50
51 int cnt;
52 double mouse_up_time;
53
54 Efl_Ui_Pager_Loop loop;
55 Efl_Page_Transition *transition;
56 Efl_Page_Indicator *indicator;
57
58 Eina_Bool move_started : 1;
59 Eina_Bool prev_block : 1;
60 Eina_Bool next_block: 1;
61 Eina_Bool fill_width: 1;
62 Eina_Bool fill_height: 1;
63
64} Efl_Ui_Pager_Data;
65
66#define EFL_UI_PAGER_DATA_GET(o, sd) \
67 Efl_Ui_Pager_Data *sd = efl_data_scope_get(o, EFL_UI_PAGER_CLASS)
68
69#endif
diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h
index 2b2e8aa117..c8422bf5eb 100644
--- a/src/lib/elementary/elm_priv.h
+++ b/src/lib/elementary/elm_priv.h
@@ -871,19 +871,6 @@ void *_elm_icon_signal_callback_del(Evas_Object *obj,
871void _elm_widget_full_eval(Eo *obj); 871void _elm_widget_full_eval(Eo *obj);
872void _elm_widget_full_eval_children(Eo *obj, Elm_Widget_Smart_Data *pd); 872void _elm_widget_full_eval_children(Eo *obj, Elm_Widget_Smart_Data *pd);
873 873
874EOAPI void efl_page_transition_page_size_set(Eo *obj, Eina_Size2D sz);
875EOAPI void efl_page_transition_padding_size_set(Eo *obj, int padding);
876EOAPI void efl_page_transition_update(Eo *obj, double pos);
877EOAPI void efl_page_transition_pack(Eo *obj, int index);
878EOAPI void efl_page_transition_unpack_all(Eo *obj);
879EOAPI void efl_page_transition_curr_page_change(Eo *obj, int diff);
880EOAPI Eina_Bool efl_page_transition_loop_set(Eo *obj, Efl_Ui_Pager_Loop loop);
881
882EOAPI void efl_page_indicator_update(Eo *obj, double pos);
883EOAPI void efl_page_indicator_pack(Eo *obj, int index);
884EOAPI void efl_page_indicator_unpack(Eo *obj, int index);
885EOAPI void efl_page_indicator_unpack_all(Eo *obj);
886
887Eina_Bool _elm_config_accel_preference_parse(const char *pref, Eina_Stringshare **accel, int *gl_depth, int *gl_stencil, int *gl_msaa); 874Eina_Bool _elm_config_accel_preference_parse(const char *pref, Eina_Stringshare **accel, int *gl_depth, int *gl_stencil, int *gl_msaa);
888 875
889extern char *_elm_appname; 876extern char *_elm_appname;
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index cb85beba17..695817a242 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -153,17 +153,12 @@ pub_eo_files = [
153 'efl_ui_dnd.eo', 153 'efl_ui_dnd.eo',
154 'efl_ui_dnd_container.eo', 154 'efl_ui_dnd_container.eo',
155 'efl_ui_focus_manager_window_root.eo', 155 'efl_ui_focus_manager_window_root.eo',
156 'efl_ui_pager.eo',
157 'efl_ui_active_view_container.eo', 156 'efl_ui_active_view_container.eo',
158 'efl_ui_active_view_view_manager.eo', 157 'efl_ui_active_view_view_manager.eo',
159 'efl_ui_active_view_view_manager_scroll.eo', 158 'efl_ui_active_view_view_manager_scroll.eo',
160 'efl_ui_active_view_view_manager_stack.eo', 159 'efl_ui_active_view_view_manager_stack.eo',
161 'efl_ui_active_view_indicator.eo', 160 'efl_ui_active_view_indicator.eo',
162 'efl_ui_active_view_indicator_icon.eo', 161 'efl_ui_active_view_indicator_icon.eo',
163 'efl_page_transition.eo',
164 'efl_page_transition_scroll.eo',
165 'efl_page_indicator.eo',
166 'efl_page_indicator_icon.eo',
167 'efl_ui_tab_pager.eo', 162 'efl_ui_tab_pager.eo',
168 'efl_ui_tab_bar.eo', 163 'efl_ui_tab_bar.eo',
169 'efl_ui_tab_page.eo', 164 'efl_ui_tab_page.eo',
@@ -377,11 +372,6 @@ elementary_headers_unstable = [
377 'efl_ui_widget_pan.h', 372 'efl_ui_widget_pan.h',
378 'efl_ui_nstate_private.h', 373 'efl_ui_nstate_private.h',
379 'Efl_Ui.h', 374 'Efl_Ui.h',
380 'efl_ui_widget_pager.h',
381 'efl_page_transition.h',
382 'efl_page_transition_scroll.h',
383 'efl_page_indicator.h',
384 'efl_page_indicator_icon.h',
385 'efl_ui_tab_pager_private.h', 375 'efl_ui_tab_pager_private.h',
386 'efl_ui_tab_bar_private.h', 376 'efl_ui_tab_bar_private.h',
387 'efl_ui_tab_page_private.h', 377 'efl_ui_tab_page_private.h',
@@ -923,7 +913,6 @@ elementary_src = [
923 'efl_datetime_manager.c', 913 'efl_datetime_manager.c',
924 'efl_ui_dnd.c', 914 'efl_ui_dnd.c',
925 'elm_focus_legacy.c', 915 'elm_focus_legacy.c',
926 'efl_ui_pager.c',
927 'efl_ui_active_view_container.c', 916 'efl_ui_active_view_container.c',
928 'efl_ui_active_view_view_manager.c', 917 'efl_ui_active_view_view_manager.c',
929 'efl_ui_active_view_view_manager_plain.c', 918 'efl_ui_active_view_view_manager_plain.c',
@@ -931,10 +920,6 @@ elementary_src = [
931 'efl_ui_active_view_view_manager_stack.c', 920 'efl_ui_active_view_view_manager_stack.c',
932 'efl_ui_active_view_indicator.c', 921 'efl_ui_active_view_indicator.c',
933 'efl_ui_active_view_indicator_icon.c', 922 'efl_ui_active_view_indicator_icon.c',
934 'efl_page_transition.c',
935 'efl_page_transition_scroll.c',
936 'efl_page_indicator.c',
937 'efl_page_indicator_icon.c',
938 'efl_ui_focus_graph.h', 923 'efl_ui_focus_graph.h',
939 'efl_ui_focus_graph.c', 924 'efl_ui_focus_graph.c',
940 'efl_ui_tab_pager.c', 925 'efl_ui_tab_pager.c',
diff --git a/src/tests/elementary/spec/efl_test_pack_linear.c b/src/tests/elementary/spec/efl_test_pack_linear.c
index 148f8a0995..ede81ae5d4 100644
--- a/src/tests/elementary/spec/efl_test_pack_linear.c
+++ b/src/tests/elementary/spec/efl_test_pack_linear.c
@@ -9,7 +9,7 @@
9 9
10/* spec-meta-start 10/* spec-meta-start
11 {"test-interface":"Efl.Pack_Linear", 11 {"test-interface":"Efl.Pack_Linear",
12 "test-widgets": ["Efl.Ui.Box", "Efl.Ui.Grid", "Efl.Ui.Pager", "Efl.Ui.Active_View.Container"], 12 "test-widgets": ["Efl.Ui.Box", "Efl.Ui.Grid", "Efl.Ui.Active_View.Container"],
13 "custom-mapping" : { 13 "custom-mapping" : {
14 "Efl.Ui.Grid" : "EFL_UI_GRID_DEFAULT_ITEM_CLASS" 14 "Efl.Ui.Grid" : "EFL_UI_GRID_DEFAULT_ITEM_CLASS"
15 } 15 }