PRAGMA LDFLAGS `pkg-config --libs elementary`
PRAGMA OPTIONS `pkg-config --cflags elementary`
PRAGMA INCLUDE elementary-1/Elementary.h
'--- Ported from clock.c elementary widget to BaCon bigbass
'--- elclock.bac
PROTO elm_policy_set
PROTO elm_win_util_standard_add
PROTO elm_win_autodel_set
PROTO elm_box_add
PROTO evas_object_size_hint_weight_set
PROTO elm_win_resize_object_add
PROTO evas_object_showPROTO elm_clock_add
PROTO elm_clock_show_am_pm_set
PROTO elm_box_pack_end
PROTO elm_clock_show_seconds_set
PROTO elm_box_pack_end
PROTO evas_object_show
PROTO elm_run
PROTO elm_shutdown
PROTO elm_init
'--- initialize widget
elm_init(0,0)
DECLARE *win, *bx, *ck TYPE Evas_Object
DECLARE digedit TYPE unsigned int
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED)
win = elm_win_util_standard_add("clock", "Clock Example")
elm_win_autodel_set(win, EINA_TRUE)
bx = elm_box_add(win)
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND)
elm_win_resize_object_add(win, bx)
evas_object_show(bx)
'--- am/pm
ck = elm_clock_add(win)
elm_clock_show_am_pm_set(ck, EINA_TRUE)
elm_box_pack_end(bx, ck)
evas_object_show(ck)
'--- with seconds and custom time
ck = elm_clock_add(win)
elm_clock_show_seconds_set(ck, EINA_TRUE)
'--- elm_clock_time_set(ck, 10, 11, 12)
elm_box_pack_end(bx, ck)
evas_object_show(ck)
'--- in edition mode, with seconds, custom time and am/pm set
ck = elm_clock_add(win)
evas_object_show(win)
elm_run()
elm_shutdown()