This is a digital clock widget. In its default theme, it has a vintage "flipping numbers clock" appearance, which will animate sheets of individual algorisms individually as time goes by.
A newly created clock will fetch system's time (already considering local time adjustments) to start with, and will tick accordingly. It may or may not show seconds.
Clocks have an edition mode. When in it, the sheets will display extra arrow indications on the top and bottom and the user may click on them to raise or lower the time values. After it's told to exit edition mode, it will keep ticking with that new time set (it keeps the difference from local time).
Also, when under edition mode, user clicks on the cited arrows which are held for some time will make the clock to flip the sheet, thus editing the time, continuously and automatically for the user. The interval between sheet flips will keep reducing in time, so that it helps the user to reach a time which is distant from the one set.
The time display is, by default, in military mode (24h), but an am/pm indicator may be optionally shown, too, when it will switch to 12h.
This widget inherits from the Layout one, so that all the functions acting on it also work for clock objects.
This widget emits the following signals, besides the ones sent from Layout:
"changed"
- the clock's user changed the time
"focused"
- When the clock ehas received focus. (since 1.8)
"unfocused"
- When the clock has lost focus. (since 1.8)
"language,changed"
- the program's language changed (since 1.9)
Supported elm_object common APIs.
Here is an example on its usage:
bool elm_clock::edit_get |
( |
| ) |
const |
|
inline |
Retrieve whether a given clock widget is under editing mode or under (default) displaying-only mode.
- Returns
EINA_TRUE
, if it's in edition mode, EINA_FALSE
otherwise
This function retrieves whether the clock's time can be edited or not by user interaction.
- See also
- elm_clock_edit_set() for more details
- Parameters
-
edit | EINA_TRUE to put it in edition, EINA_FALSE to put it back to "displaying only" mode |
Elm_Clock_Edit_Mode elm_clock::edit_mode_get |
( |
| ) |
const |
|
inline |
Retrieve what digits of the given clock widget should be editable when in edition mode.
- Returns
- Bit mask indicating the digits to be editable (values in #Elm_Clock_Edit_Mode).
- See also
- elm_clock_edit_mode_set() for more details
- Parameters
-
digedit | Bit mask indicating the digits to be editable (values in #Elm_Clock_Edit_Mode). |
void elm_clock::edit_mode_set |
( |
Elm_Clock_Edit_Mode |
digedit_ | ) |
const |
|
inline |
Retrieve what digits of the given clock widget should be editable when in edition mode.
- Returns
- Bit mask indicating the digits to be editable (values in #Elm_Clock_Edit_Mode).
- See also
- elm_clock_edit_mode_set() for more details
- Parameters
-
digedit | Bit mask indicating the digits to be editable (values in #Elm_Clock_Edit_Mode). |
void elm_clock::edit_set |
( |
bool |
edit_ | ) |
const |
|
inline |
Retrieve whether a given clock widget is under editing mode or under (default) displaying-only mode.
- Returns
EINA_TRUE
, if it's in edition mode, EINA_FALSE
otherwise
This function retrieves whether the clock's time can be edited or not by user interaction.
- See also
- elm_clock_edit_set() for more details
- Parameters
-
edit | EINA_TRUE to put it in edition, EINA_FALSE to put it back to "displaying only" mode |
Evas_Object* elm_clock_add |
( |
Evas_Object * |
parent | ) |
|
Add a new clock widget to the given parent Elementary (container) object.
- Parameters
-
- Returns
- a new clock widget handle or
NULL
, on errors
This function inserts a new clock widget on the canvas.
double elm_clock::first_interval_get |
( |
| ) |
const |
|
inline |
Get the first interval on time updates for a user mouse button hold on clock widgets' time edition.
- Returns
- The first interval value, in seconds, set on it
- See also
- elm_clock_first_interval_set() for more details
- Parameters
-
interval | The first interval value in seconds |
void elm_clock::first_interval_set |
( |
double |
interval_ | ) |
const |
|
inline |
Get the first interval on time updates for a user mouse button hold on clock widgets' time edition.
- Returns
- The first interval value, in seconds, set on it
- See also
- elm_clock_first_interval_set() for more details
- Parameters
-
interval | The first interval value in seconds |
bool elm_clock::pause_get |
( |
| ) |
const |
|
inline |
Get whether the given clock widget is paused.
- Returns
EINA_TRUE
if it's paused EINA_FALSE
otherwise
This function gets whether the clock is paused or not.
- See also
- elm_clock_pause_set()
- Since
- 1.9
- Parameters
-
paused | EINA_TRUE to pause clock, EINA_FALSE otherwise |
void elm_clock::pause_set |
( |
bool |
paused_ | ) |
const |
|
inline |
Get whether the given clock widget is paused.
- Returns
EINA_TRUE
if it's paused EINA_FALSE
otherwise
This function gets whether the clock is paused or not.
- See also
- elm_clock_pause_set()
- Since
- 1.9
- Parameters
-
paused | EINA_TRUE to pause clock, EINA_FALSE otherwise |
bool elm_clock::show_am_pm_get |
( |
| ) |
const |
|
inline |
Get if the given clock widget shows hours in military or am/pm mode.
- Returns
EINA_TRUE
, if in am/pm mode, EINA_FALSE
if in military
This function gets if the clock shows hours in military or am/pm mode.
- See also
- elm_clock_show_am_pm_set() for more details
- Parameters
-
am_pm | EINA_TRUE to put it in am/pm mode, EINA_FALSE to military mode |
void elm_clock::show_am_pm_set |
( |
bool |
am_pm_ | ) |
const |
|
inline |
Get if the given clock widget shows hours in military or am/pm mode.
- Returns
EINA_TRUE
, if in am/pm mode, EINA_FALSE
if in military
This function gets if the clock shows hours in military or am/pm mode.
- See also
- elm_clock_show_am_pm_set() for more details
- Parameters
-
am_pm | EINA_TRUE to put it in am/pm mode, EINA_FALSE to military mode |
bool elm_clock::show_seconds_get |
( |
| ) |
const |
|
inline |
Get whether the given clock widget is showing time with seconds or not.
- Returns
EINA_TRUE
if it's showing seconds, EINA_FALSE
otherwise
This function gets whether obj
is showing or not the elapsed seconds.
- See also
- elm_clock_show_seconds_set()
- Parameters
-
seconds | EINA_TRUE to show seconds, EINA_FALSE otherwise |
void elm_clock::show_seconds_set |
( |
bool |
seconds_ | ) |
const |
|
inline |
Get whether the given clock widget is showing time with seconds or not.
- Returns
EINA_TRUE
if it's showing seconds, EINA_FALSE
otherwise
This function gets whether obj
is showing or not the elapsed seconds.
- See also
- elm_clock_show_seconds_set()
- Parameters
-
seconds | EINA_TRUE to show seconds, EINA_FALSE otherwise |
void elm_clock::time_get |
( |
int * |
hrs_, |
|
|
int * |
min_, |
|
|
int * |
sec_ |
|
) |
| const |
|
inline |
Get a clock widget's time values.
This function gets the time set for obj
, returning it on the variables passed as the arguments to function
- Note
- Use
NULL
pointers on the time values you're not interested in: they'll be ignored by the function.
- Parameters
-
hrs | The hours to set |
min | The minutes to set |
sec | The seconds to set |
void elm_clock::time_set |
( |
int |
hrs_, |
|
|
int |
min_, |
|
|
int |
sec_ |
|
) |
| const |
|
inline |
Get a clock widget's time values.
This function gets the time set for obj
, returning it on the variables passed as the arguments to function
- Note
- Use
NULL
pointers on the time values you're not interested in: they'll be ignored by the function.
- Parameters
-
hrs | The hours to set |
min | The minutes to set |
sec | The seconds to set |