This code places five Elementary clock widgets on a window, each of them exemplifying a part of the widget's API.
The first of them is the pristine clock:
For am/pm time, see the second clock:
The third one will show the seconds digits, which will flip in synchrony with system time. Note, besides, that the time itself is different from the system's – it was customly set with elm_clock_time_set():
In both fourth and fifth ones, we turn on the edition mode. See how you can change each of the sheets on it, and be sure to try holding the mouse pressed over one of the sheet arrows. The forth one also starts with a custom time set:
The fifth, besides editable, has only the time units editable, for hours, minutes and seconds. This exemplifies elm_clock_edit_mode_set():
See the full example, whose window should look like this picture:
See the full source code for this example.