aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-07-22 13:23:59 +0900
committerHermet Park <hermetpark@gmail.com>2019-07-22 13:23:59 +0900
commit05a50dc2ebca015fcb0ceb2dbac99ad028d42efa (patch)
tree1d2b21ad9162a404082824987920a8a87279e829 /src/bin/elementary
parentMerge branch 'master' into devs/hermet/lottie (diff)
parentecore wl2 - fall back to shm if dmabuf fails in buf init (diff)
downloadefl-devs/hermet/lottie.tar.gz
Merge branch 'master' into devs/hermet/lottiedevs/hermet/lottie
Diffstat (limited to 'src/bin/elementary')
-rw-r--r--src/bin/elementary/test.c6
-rw-r--r--src/bin/elementary/test_ui_scroller.c44
2 files changed, 47 insertions, 3 deletions
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 0b2904d1dd..b751d65321 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -183,7 +183,8 @@ void test_scroller6(void *data, Evas_Object *obj, void *event_info);
void test_scroller7(void *data, Evas_Object *obj, void *event_info);
void test_scroller_simple(void *data, Evas_Object *obj, void *event_info);
void test_efl_ui_scroller(void *data, Evas_Object *obj, void *event_info);
-void test_efl_ui_scroller2(void *data, Evas_Object *obj, void *event_info);
+void test_efl_ui_scroller_simple(void *data, Evas_Object *obj, void *event_info);
+void test_efl_ui_scroller_simple2(void *data, Evas_Object *obj, void *event_info);
void test_spinner(void *data, Evas_Object *obj, void *event_info);
void test_ui_spin(void *data, Evas_Object *obj, void *event_info);
void test_ui_spin_button(void *data, Evas_Object *obj, void *event_info);
@@ -1096,7 +1097,8 @@ add_tests:
ADD_TEST(NULL, "Scroller", "Scroller 7", test_scroller7);
ADD_TEST(NULL, "Scroller", "Scroller Simple", test_scroller_simple);
ADD_TEST_EO(NULL, "Scroller", "Efl.Ui.Scroller", test_efl_ui_scroller);
- ADD_TEST_EO(NULL, "Scroller", "Efl.Ui.Scroller Simple", test_efl_ui_scroller2);
+ ADD_TEST_EO(NULL, "Scroller", "Efl.Ui.Scroller Simple", test_efl_ui_scroller_simple);
+ ADD_TEST_EO(NULL, "Scroller", "Efl.Ui.Scroller Simple2", test_efl_ui_scroller_simple2);
//------------------------------//
// FIXME: add frame test
diff --git a/src/bin/elementary/test_ui_scroller.c b/src/bin/elementary/test_ui_scroller.c
index 84602735c7..f3b6152b2b 100644
--- a/src/bin/elementary/test_ui_scroller.c
+++ b/src/bin/elementary/test_ui_scroller.c
@@ -131,7 +131,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
}
void
-test_efl_ui_scroller2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+test_efl_ui_scroller_simple(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Eo *win, *sc, *bx;
int i;
@@ -165,3 +165,45 @@ test_efl_ui_scroller2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
efl_pack(bx, efl_added));
}
}
+
+void
+test_efl_ui_scroller_simple2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+ Eo *win, *sc, *tb;
+ int i;
+
+ win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
+ efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
+ efl_text_set(efl_added, "Efl Ui Scroller Simple2"),
+ efl_ui_win_autodel_set(efl_added, EINA_TRUE));
+ efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 400));
+
+ sc = efl_add(EFL_UI_SCROLLER_CLASS, win,
+ efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
+ efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_START, _scroll_start_cb, NULL),
+ efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_STOP, _scroll_stop_cb, NULL),
+ efl_content_set(win, efl_added));
+
+ tb = efl_add(EFL_UI_TABLE_CLASS, sc,
+ efl_pack_table_columns_set(efl_added, 2),
+ efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
+ efl_gfx_hint_align_set(efl_added, 0.5, 0),
+ efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
+ efl_content_set(sc, efl_added));
+
+ for (i = 0; i < 1000; i++)
+ {
+ efl_add(EFL_UI_BUTTON_CLASS, tb,
+ efl_text_set(efl_added, "Vertical"),
+ efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
+ efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
+ efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _bt_clicked, NULL),
+ efl_pack_table(tb, efl_added, 0, i, 1, 1));
+ efl_add(EFL_UI_BUTTON_CLASS, tb,
+ efl_text_set(efl_added, "Horizontal"),
+ efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
+ efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
+ efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _bt_clicked, NULL),
+ efl_pack_table(tb, efl_added, 1, i, 1, 1));
+ }
+}