summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_ui_timepicker.c
diff options
context:
space:
mode:
authorWoochan Lee <wc0917.lee@samsung.com>2018-04-25 16:43:53 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2018-04-25 16:48:21 +0900
commitef2e6afd1f7c890297900937fa1f12f0f4f76980 (patch)
treede05efce05d3712a76c47b6f7555df3ee51145c0 /src/bin/elementary/test_ui_timepicker.c
parent3d6c72438d4d311aabeec5ba90c659ae54f5c6fc (diff)
Intrudoce Efl Ui Date, Time interface and picker.
Summary: Create datepicker, timepicker with one manager class(efl_datetime). Test Plan: datepicker, timepicker sample. Reviewers: herb, Jaehyun_Cho, woohyun, SanghyeonLee Reviewed By: Jaehyun_Cho Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5871
Diffstat (limited to 'src/bin/elementary/test_ui_timepicker.c')
-rw-r--r--src/bin/elementary/test_ui_timepicker.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/bin/elementary/test_ui_timepicker.c b/src/bin/elementary/test_ui_timepicker.c
new file mode 100644
index 0000000000..cb88ef508b
--- /dev/null
+++ b/src/bin/elementary/test_ui_timepicker.c
@@ -0,0 +1,36 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4#include <Elementary.h>
5
6static void
7_time_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev)
8{
9 int hour, min;
10
11 efl_ui_timepicker_time_get(ev->object, &hour, &min);
12 printf("Current time is %d %d\n", hour, min);
13}
14
15
16void
17test_ui_timepicker(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
18{
19 Eo *win, *bx;
20
21 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
22 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
23 efl_text_set(efl_added, "Efl.Ui.Timepicker"),
24 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
25
26 bx = efl_add(EFL_UI_BOX_CLASS, win,
27 efl_content_set(win, efl_added),
28 efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
29
30 efl_add(EFL_UI_TIMEPICKER_CLASS, bx,
31 efl_ui_timepicker_time_set(efl_added, 11, 35),
32 efl_event_callback_add(efl_added, EFL_UI_TIMEPICKER_EVENT_CHANGED,_time_changed_cb, NULL),
33 efl_pack(bx, efl_added));
34
35 efl_gfx_entity_size_set(win, EINA_SIZE2D(150, 170));
36}