
\begin{DoxyCodeInclude}

\textcolor{preprocessor}{#include <Elementary.h>}

EAPI\_MAIN \textcolor{keywordtype}{int}
elm\_main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   Evas\_Object *win, *bx, *ck;
   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} digedit;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"clock"}, \textcolor{stringliteral}{"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);

   \textcolor{comment}{/* pristine (no seconds, military time) */}
   ck = elm_clock_add(win);
   elm_box_pack_end(bx, ck);
   evas\_object\_show(ck);

   \textcolor{comment}{/* 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);

   \textcolor{comment}{/* 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);

   \textcolor{comment}{/* in edition mode, with seconds, custom time and am/pm set */}
   ck = elm_clock_add(win);
   elm_clock_edit_set(ck, EINA\_TRUE);
   elm_clock_show_seconds_set(ck, EINA\_TRUE);
   elm_clock_show_am_pm_set(ck, EINA\_TRUE);
   elm_clock_time_set(ck, 10, 11, 12);
   elm_box_pack_end(bx, ck);
   evas\_object\_show(ck);

   \textcolor{comment}{/* in edition mode, with seconds, but only some digits editable */}
   ck = elm_clock_add(win);
   elm_clock_show_seconds_set(ck, EINA\_TRUE);
   elm_clock_edit_set(ck, EINA\_TRUE);
   digedit = ELM\_CLOCK\_EDIT\_HOUR\_UNIT | ELM\_CLOCK\_EDIT\_MIN\_UNIT | ELM\_CLOCK\_EDIT\_SEC\_UNIT;
   elm_clock_edit_mode_set(ck, digedit);
   elm_box_pack_end(bx, ck);
   evas\_object\_show(ck);

   evas\_object\_show(win);

   elm_run();
   elm_shutdown();

   \textcolor{keywordflow}{return} 0;
\}
ELM_MAIN()
\end{DoxyCodeInclude}
 