aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/elementary/src/bin/test_clock.c')
-rw-r--r--legacy/elementary/src/bin/test_clock.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_clock.c b/legacy/elementary/src/bin/test_clock.c
new file mode 100644
index 0000000000..b1870511d7
--- /dev/null
+++ b/legacy/elementary/src/bin/test_clock.c
@@ -0,0 +1,51 @@
+#include <Elementary.h>
+
+void
+test_clock(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win, *bg, *bx, *ck;
+
+ win = elm_win_add(NULL, "clock", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Clock");
+ elm_win_autodel_set(win, 1);
+
+ bg = elm_bg_add(win);
+ elm_win_resize_object_add(win, bg);
+ evas_object_size_hint_weight_set(bg, 1.0, 1.0);
+ evas_object_show(bg);
+
+ bx = elm_box_add(win);
+ evas_object_size_hint_weight_set(bx, 1.0, 1.0);
+ elm_win_resize_object_add(win, bx);
+ evas_object_show(bx);
+
+ ck = elm_clock_add(win);
+ elm_box_pack_end(bx, ck);
+ evas_object_show(ck);
+
+ ck = elm_clock_add(win);
+ elm_clock_show_am_pm_set(ck, 1);
+ elm_box_pack_end(bx, ck);
+ evas_object_show(ck);
+
+ ck = elm_clock_add(win);
+ elm_clock_show_seconds_set(ck, 1);
+ elm_box_pack_end(bx, ck);
+ evas_object_show(ck);
+
+ ck = elm_clock_add(win);
+ elm_clock_show_seconds_set(ck, 1);
+ elm_clock_show_am_pm_set(ck, 1);
+ elm_box_pack_end(bx, ck);
+ evas_object_show(ck);
+
+ ck = elm_clock_add(win);
+ elm_clock_edit_set(ck, 1);
+ elm_clock_show_seconds_set(ck, 1);
+ elm_clock_show_am_pm_set(ck, 1);
+ elm_clock_time_set(ck, 10, 11, 12);
+ elm_box_pack_end(bx, ck);
+ evas_object_show(ck);
+
+ evas_object_show(win);
+}