[elementary] Documenting/exemplifying the following:

- elm_clock_add
 - elm_clock_digit_edit_get
 - elm_clock_digit_edit_set
 - elm_clock_edit_get
 - elm_clock_edit_set
 - elm_clock_interval_get
 - elm_clock_interval_set
 - elm_clock_show_am_pm_get
 - elm_clock_show_am_pm_set
 - elm_clock_show_seconds_get
 - elm_clock_show_seconds_set
 - elm_clock_time_get
 - elm_clock_time_set



SVN revision: 61241
This commit is contained in:
Gustavo Lima Chaves 2011-07-11 13:51:32 +00:00
parent 58553b41ec
commit 7cb0738b9e
7 changed files with 29160 additions and 178 deletions

View File

@ -18,6 +18,8 @@
* @ref transit_example_02_explained * @ref transit_example_02_explained
* *
* @ref general_functions_example_page * @ref general_functions_example_page
*
* @ref clock_example
*/ */
/** /**
@ -1093,6 +1095,56 @@
* @example box_example_02.c * @example box_example_02.c
*/ */
/**
* @page clock_example Clock widget example
*
* 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:
* @dontinclude clock_example.c
* @skip pristine
* @until evas_object_show
* As you see, the defaults for a clock are:
* - military time
* - no seconds shown
*
* For am/pm time, see the second clock:
* @dontinclude clock_example.c
* @skip am/pm
* @until evas_object_show
*
* The third one will show the seconds digits, which will flip in
* synchrony with system time. Note, besides, that the time itself is
* @b different from the system's -- it was customly set with
* elm_clock_time_set():
* @dontinclude clock_example.c
* @skip with seconds
* @until evas_object_show
*
* In both fourth and fifth ones, we turn on the <b>edition
* mode</b>. 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:
* @dontinclude clock_example.c
* @skip in edition
* @until evas_object_show
*
* The fifth, besides editable, has only the time @b units editable,
* for hours, minutes and seconds. This exemplifies
* elm_clock_digit_edit_set():
* @dontinclude clock_example.c
* @skip but only
* @until evas_object_show
*
* See the full @ref clock_example.c "example", whose window should
* look like this picture:
* @image html screenshots/clock_example.png
* @image latex screenshots/clock_example.eps
*
* @example clock_example.c
*/
/** /**
* @page bg_example_01_c bg_example_01.c * @page bg_example_01_c bg_example_01.c
* @include bg_example_01.c * @include bg_example_01.c

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -45,6 +45,7 @@ SRCS = \
general_funcs_example.c \ general_funcs_example.c \
theme_example_01.c \ theme_example_01.c \
theme_example_02.c \ theme_example_02.c \
clock_example.c \
theme_example.edc theme_example.edc
pkglib_PROGRAMS = pkglib_PROGRAMS =
@ -82,6 +83,7 @@ pkglib_PROGRAMS += \
general_funcs_example \ general_funcs_example \
theme_example_01 \ theme_example_01 \
theme_example_02 \ theme_example_02 \
clock_example \
theme_example.edj theme_example.edj
# This variable will hold the list of screenshots that will be made # This variable will hold the list of screenshots that will be made
@ -98,7 +100,8 @@ SCREENSHOTS = \
animator_example_01:animator_example_02.png:0.5 \ animator_example_01:animator_example_02.png:0.5 \
animator_example_01:animator_example_03.png:0.9 \ animator_example_01:animator_example_03.png:0.9 \
frame_example_01:frame_example_01.png:0.0 \ frame_example_01:frame_example_01.png:0.0 \
theme_example_01:theme_example_01.png:0.0 theme_example_01:theme_example_01.png:0.0 \
clock_example:clock_example.png:0.5
screenshots: all screenshots: all
@mkdir -p $(top_srcdir)/doc/img/screenshots @mkdir -p $(top_srcdir)/doc/img/screenshots

View File

@ -0,0 +1,88 @@
/**
* Simple Elementary's <b>clock widget</b> example, illustrating its
* usage and API.
*
* See stdout/stderr for output. Compile with:
*
* @verbatim
* gcc -g `pkg-config --cflags --libs elementary` clock_example.c -o clock_example
* @endverbatim
*/
#include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#else
# define __UNUSED__
#endif
static void
_on_done(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
elm_exit();
}
EAPI int
elm_main(int argc __UNUSED__, char **argv __UNUSED__)
{
Evas_Object *win, *bg, *bx, *ck;
unsigned int digedit;
win = elm_win_add(NULL, "clock", ELM_WIN_BASIC);
elm_win_title_set(win, "Clock Example");
evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
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);
/* pristine (no seconds, military time) */
ck = elm_clock_add(win);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
/* 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);
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);
/* 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_HOUR_UNIT | ELM_CLOCK_MIN_UNIT | ELM_CLOCK_SEC_UNIT;
elm_clock_digit_edit_set(ck, digedit);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
evas_object_show(win);
elm_run();
return 0;
}
ELM_MAIN()

View File

@ -2917,34 +2917,305 @@ extern "C" {
* "drag,stop" - Gengrid is not being dragged. * "drag,stop" - Gengrid is not being dragged.
*/ */
/* clock */ /**
* @defgroup Clock Clock
*
* This is a @b digital clock widget. In its default theme, it has a
* vintage "flipping numbers clock" appearance, which will animate
* sheets of individual algarisms 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
* accondingly. It may or may not show seconds.
*
* Clocks have an @b 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 @b held for some time will make the clock to flip the
* sheet, thus editing the time, continuosly and automatically for
* the user. The interval between sheet flips will keep growing 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.
*
* Smart callbacks one can register to:
* - "changed" - the clock's user changed the time
*
* Here is an example on its usage:
* @li @ref clock_example
*/
/**
* @addtogroup Clock
* @{
*/
/**
* Identifiers for which clock digits should be editable, when a
* clock widget is in edition mode. Values may be ORed together to
* make a mask, naturally.
*
* @see elm_clock_edit_set()
* @see elm_clock_digit_edit_set()
*/
typedef enum _Elm_Clock_Digedit typedef enum _Elm_Clock_Digedit
{ {
ELM_CLOCK_NONE = 0, ELM_CLOCK_NONE = 0, /**< Default value. Means that all digits are editable, when in edition mode. */
ELM_CLOCK_HOUR_DECIMAL = 1 << 0, ELM_CLOCK_HOUR_DECIMAL = 1 << 0, /**< Decimal algarism of hours value should be editable */
ELM_CLOCK_HOUR_UNIT = 1 << 1, ELM_CLOCK_HOUR_UNIT = 1 << 1, /**< Unit algarism of hours value should be editable */
ELM_CLOCK_MIN_DECIMAL = 1 << 2, ELM_CLOCK_MIN_DECIMAL = 1 << 2, /**< Decimal algarism of minutes value should be editable */
ELM_CLOCK_MIN_UNIT = 1 << 3, ELM_CLOCK_MIN_UNIT = 1 << 3, /**< Unit algarism of minutes value should be editable */
ELM_CLOCK_SEC_DECIMAL = 1 << 4, ELM_CLOCK_SEC_DECIMAL = 1 << 4, /**< Decimal algarism of seconds value should be editable */
ELM_CLOCK_SEC_UNIT = 1 << 5, ELM_CLOCK_SEC_UNIT = 1 << 5, /**< Unit algarism of seconds value should be editable */
ELM_CLOCK_ALL = (1 << 6) - 1 ELM_CLOCK_ALL = (1 << 6) - 1 /**< All digits should be editable */
} Elm_Clock_Digedit; } Elm_Clock_Digedit;
/**
* Add a new clock widget to the given parent Elementary
* (container) object
*
* @param parent The parent object
* @return a new clock widget handle or @c NULL, on errors
*
* This function inserts a new clock widget on the canvas.
*
* @ingroup Clock
*/
EAPI Evas_Object *elm_clock_add(Evas_Object *parent) EINA_ARG_NONNULL(1); EAPI Evas_Object *elm_clock_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
/**
* Set a clock widget's time, programmatically
*
* @param obj The clock widget object
* @param hrs The hours to set
* @param min The minutes to set
* @param sec The secondes to set
*
* This function updates the time that is showed by the clock
* widget.
*
* Values @b must be set within the following ranges:
* - 0 - 23, for hours
* - 0 - 59, for minutes
* - 0 - 59, for seconds,
*
* even if the clock is not in "military" mode.
*
* @warning The behavior for values set out of those ranges is @b
* indefined.
*
* @ingroup Clock
*/
EAPI void elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec) EINA_ARG_NONNULL(1); EAPI void elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec) EINA_ARG_NONNULL(1);
/**
* Get a clock widget's time values
*
* @param obj The clock object
* @param[out] hrs Pointer to the variable to get the hours value
* @param[out] min Pointer to the variable to get the minutes value
* @param[out] sec Pointer to the variable to get the seconds value
*
* This function gets the time set for @p obj, returning
* it on the variables passed as the arguments to function
*
* @note Use @c NULL pointers on the time values you're not
* interested in: they'll be ignored by the function.
*
* @ingroup Clock
*/
EAPI void elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec) EINA_ARG_NONNULL(1); EAPI void elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec) EINA_ARG_NONNULL(1);
/**
* Set whether a given clock widget is under <b>edition mode</b> or
* under (default) displaying-only mode.
*
* @param obj The clock object
* @param edit @c EINA_TRUE to put it in edition, @c EINA_FALSE to
* put it back to "displaying only" mode
*
* This function makes a clock's time to be editable or not <b>by
* user interaction</b>. When in edition mode, clocks @b stop
* ticking, until one brings them back to canonical mode. The
* elm_clock_digit_edit_set() function will influence which digits
* of the clock will be editable. By default, all of them will be
* (#ELM_CLOCK_NONE).
*
* @note am/pm sheets, if being shown, will @b always be editable
* under edition mode.
*
* @see elm_clock_edit_get()
*
* @ingroup Clock
*/
EAPI void elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit) EINA_ARG_NONNULL(1); EAPI void elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit) EINA_ARG_NONNULL(1);
/**
* Retrieve whether a given clock widget is under <b>edition
* mode</b> or under (default) displaying-only mode.
*
* @param obj The clock object
* @param edit @c EINA_TRUE, if it's in edition mode, @c EINA_FALSE
* otherwise
*
* This function retrieves whether the clock's time can be edited
* or not by user interaction.
*
* @see elm_clock_edit_set() for more details
*
* @ingroup Clock
*/
EAPI Eina_Bool elm_clock_edit_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI Eina_Bool elm_clock_edit_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Set what digits of the given clock widget should be editable
* when in edition mode.
*
* @param obj The clock object
* @param digedit Bit mask indicating the digits to be editable
* (values in #Elm_Clock_Digedit).
*
* If the @p digedit param is #ELM_CLOCK_NONE, editing will be
* disabled on @p obj (same effect as elm_clock_edit_set(), with @c
* EINA_FALSE).
*
* @see elm_clock_digit_edit_get()
*
* @ingroup Clock
*/
EAPI void elm_clock_digit_edit_set(Evas_Object *obj, Elm_Clock_Digedit digedit) EINA_ARG_NONNULL(1); EAPI void elm_clock_digit_edit_set(Evas_Object *obj, Elm_Clock_Digedit digedit) EINA_ARG_NONNULL(1);
/**
* Retrieve what digits of the given clock widget should be
* editable when in edition mode.
*
* @param obj The clock object
* @return Bit mask indicating the digits to be editable
* (values in #Elm_Clock_Digedit).
*
* @see elm_clock_digit_edit_set() for more details
*
* @ingroup Clock
*/
EAPI Elm_Clock_Digedit elm_clock_digit_edit_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI Elm_Clock_Digedit elm_clock_digit_edit_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Set if the given clock widget must show hours in military or
* am/pm mode
*
* @param obj The clock object
* @param am_pm @c EINA_TRUE to put it in am/pm mode, @c EINA_FALSE
* to military mode
*
* This function sets if the clock must show hours in military or
* am/pm mode. In some countries like Brazil the military mode
* (00-24h-format) is used, in opposition to the USA, where the
* am/pm mode is more commonly used.
*
* @see elm_clock_show_am_pm_get()
*
* @ingroup Clock
*/
EAPI void elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm) EINA_ARG_NONNULL(1); EAPI void elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm) EINA_ARG_NONNULL(1);
/**
* Get if the given clock widget shows hours in military or am/pm
* mode
*
* @param obj The clock object
* @return @c EINA_TRUE, if in am/pm mode, @c EINA_FALSE if in
* military
*
* This function gets if the clock shows hours in military or am/pm
* mode.
*
* @see elm_clock_show_am_pm_set() for more details
*
* @ingroup Clock
*/
EAPI Eina_Bool elm_clock_show_am_pm_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI Eina_Bool elm_clock_show_am_pm_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Set if the given clock widget must show time with seconds or not
*
* @param obj The clock object
* @param seconds @c EINA_TRUE to show seconds, @c EINA_FALSE otherwise
*
* This function sets if the given clock must show or not elapsed
* seconds. By default, they are @b not shown.
*
* @see elm_clock_show_seconds_get()
*
* @ingroup Clock
*/
EAPI void elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds) EINA_ARG_NONNULL(1); EAPI void elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds) EINA_ARG_NONNULL(1);
/**
* Get whether the given clock widget is showing time with seconds
* or not
*
* @param obj The clock object
* @return @c EINA_TRUE if it's showing seconds, @c EINA_FALSE otherwise
*
* This function gets whether @p obj is showing or not the elapsed
* seconds.
*
* @see elm_clock_show_seconds_set()
*
* @ingroup Clock
*/
EAPI Eina_Bool elm_clock_show_seconds_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI Eina_Bool elm_clock_show_seconds_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Set the interval on time updates for an user mouse button hold
* on clock widgets' time edition.
*
* @param obj The clock object
* @param interval The (first) interval value in seconds
*
* This interval value is @b decreased while the user holds the
* mouse pointer either incrementing or decrementing a given the
* clock digit's value.
*
* This helps the user to get to a given time distant from the
* current one easier/faster, as it will start to flip quicker and
* quicker on mouse button holds.
*
* The calculation for the next flip interval value, starting from
* the one set with this call, is the previous interval divided by
* 1.05, so it decreases a little bit.
*
* The default starting interval value for automatic flips is
* @b 0.85 seconds.
*
* @see elm_clock_interval_get()
*
* @ingroup Clock
*/
EAPI void elm_clock_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1); EAPI void elm_clock_interval_set(Evas_Object *obj, double interval) EINA_ARG_NONNULL(1);
/**
* Get the interval on time updates for an user mouse button hold
* on clock widgets' time edition.
*
* @param obj The clock object
* @return The (first) interval value, in seconds, set on it
*
* @see elm_clock_interval_set() for more details
*
* @ingroup Clock
*/
EAPI double elm_clock_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI double elm_clock_interval_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/* smart callbacks called:
* "changed" - the user changed the time /**
* @}
*/ */
/* layout */ /* layout */

View File

@ -1,17 +1,6 @@
#include <Elementary.h> #include <Elementary.h>
#include "elm_priv.h" #include "elm_priv.h"
/**
* @defgroup Clock Clock
*
* It's a widget to show clock with animation. The update of time is
* shown in an animation like the flip of a sheet.
*
* Signals that you can add callbacks for are:
*
* "changed" - the user changed the time
*/
typedef struct _Widget_Data Widget_Data; typedef struct _Widget_Data Widget_Data;
struct _Widget_Data struct _Widget_Data
@ -524,16 +513,6 @@ _time_update(Evas_Object *obj)
wd->cur.ampm = -1; wd->cur.ampm = -1;
} }
/**
* Add a new clock to the parent
*
* @param parent The parent object
*
* This function inserts a clock widget on a given canvas to show a
* animated clock.
*
* @ingroup Clock
*/
EAPI Evas_Object * EAPI Evas_Object *
elm_clock_add(Evas_Object *parent) elm_clock_add(Evas_Object *parent)
{ {
@ -574,18 +553,6 @@ elm_clock_add(Evas_Object *parent)
return obj; return obj;
} }
/**
* Set the clock time
*
* @param obj The clock object
* @param hrs The hours to set
* @param min The minutes to set
* @param sec The secondes to set
*
* This function updates the time that is showed by the clock widget
*
* @ingroup Clock
*/
EAPI void EAPI void
elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec) elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec)
{ {
@ -599,22 +566,6 @@ elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec)
_time_update(obj); _time_update(obj);
} }
/**
* Get clock time
*
* @param obj The clock object
* @param hrs Pointer to the variable to get the hour of this clock
* object
* @param min Pointer to the variable to get the minute of this clock
* object
* @param sec Pointer to the variable to get the second of this clock
* object
*
* This function gets the time set of the clock widget and returns it
* on the variables passed as the arguments to function
*
* @ingroup Clock
*/
EAPI void EAPI void
elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec) elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec)
{ {
@ -626,19 +577,6 @@ elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec)
if (sec) *sec = wd->sec; if (sec) *sec = wd->sec;
} }
/**
* Set if the clock settings can be edited
*
* @param obj The clock object
* @param edit Bool option for edited (1 = yes, 0 = no)
*
* This function sets if the clock settings can be edited or not.
* By default or if digit_edit option was previously set to ELM_CLOCK_NONE,
* all digits are editable. To choose what digits to make editable
* use elm_clock_digit_edit_set().
*
* @ingroup Clock
*/
EAPI void EAPI void
elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit) elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit)
{ {
@ -654,16 +592,6 @@ elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit)
_time_update(obj); _time_update(obj);
} }
/**
* Get if the clock settings can be edited
*
* @param obj The clock object
* @return Bool option for edited (1 = yes, 0 = no)
*
* This function gets if the clock settings can be edited or not.
*
* @ingroup Clock
*/
EAPI Eina_Bool EAPI Eina_Bool
elm_clock_edit_get(const Evas_Object *obj) elm_clock_edit_get(const Evas_Object *obj)
{ {
@ -673,16 +601,6 @@ elm_clock_edit_get(const Evas_Object *obj)
return wd->edit; return wd->edit;
} }
/**
* Set what digits of the clock are editable
*
* @param obj The clock object
* @param digedit Bit mask indicating the digits to edit
*
* If the digedit param is ELM_CLOCK_NONE, editing will be disabled.
*
* @ingroup Clock
*/
EAPI void EAPI void
elm_clock_digit_edit_set(Evas_Object *obj, Elm_Clock_Digedit digedit) elm_clock_digit_edit_set(Evas_Object *obj, Elm_Clock_Digedit digedit)
{ {
@ -696,14 +614,6 @@ elm_clock_digit_edit_set(Evas_Object *obj, Elm_Clock_Digedit digedit)
_time_update(obj); _time_update(obj);
} }
/**
* Get what digits of the clock are editable
*
* @param obj The clock object
* @return Bit mask indicating the digits.
*
* @ingroup Clock
*/
EAPI Elm_Clock_Digedit EAPI Elm_Clock_Digedit
elm_clock_digit_edit_get(const Evas_Object *obj) elm_clock_digit_edit_get(const Evas_Object *obj)
{ {
@ -713,20 +623,6 @@ elm_clock_digit_edit_get(const Evas_Object *obj)
return wd->digedit; return wd->digedit;
} }
/**
* Set if the clock shows hours in military or am/pm mode
*
* @param obj The clock object
* @param am_pm Bool option for the hours mode
* (1 = am/pm, 0 = military)
*
* This function sets the clock to show hours in military or am/pm
* mode. Some countries like Brazil the military mode (00-24h-format)
* is used in opposition to the USA where the am/pm mode is more
* common used.
*
* @ingroup Clock
*/
EAPI void EAPI void
elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm) elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm)
{ {
@ -737,20 +633,6 @@ elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm)
_time_update(obj); _time_update(obj);
} }
/**
* Get if the clock shows hours in military or am/pm mode
*
* @param obj The clock object
* @return Bool option for the hours mode
* (1 = am/pm, 0 = military)
*
* This function gets if the clock show hours in military or am/pm
* mode. Some countries like Brazil the military mode (00-24h-format)
* is used in opposition to the USA where the am/pm mode is more
* common used.
*
* @ingroup Clock
*/
EAPI Eina_Bool EAPI Eina_Bool
elm_clock_show_am_pm_get(const Evas_Object *obj) elm_clock_show_am_pm_get(const Evas_Object *obj)
{ {
@ -760,18 +642,6 @@ elm_clock_show_am_pm_get(const Evas_Object *obj)
return wd->am_pm; return wd->am_pm;
} }
/**
* Set if the clock shows hour with the seconds
*
* @param obj The clock object
* @param seconds Bool option for the show seconds
* (1 = show seconds, 0 = not show seconds)
*
* This function sets the clock to show or not to show the elapsed
* seconds.
*
* @ingroup Clock
*/
EAPI void EAPI void
elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds) elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds)
{ {
@ -782,18 +652,6 @@ elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds)
_time_update(obj); _time_update(obj);
} }
/**
* Get if the clock shows hour with the seconds
*
* @param obj The clock object
* @return Bool option for the show seconds
* (1 = show seconds, 0 = not show seconds)
*
* This function gets if the clock show or not show the elapsed
* seconds.
*
* @ingroup Clock
*/
EAPI Eina_Bool EAPI Eina_Bool
elm_clock_show_seconds_get(const Evas_Object *obj) elm_clock_show_seconds_get(const Evas_Object *obj)
{ {
@ -803,18 +661,6 @@ elm_clock_show_seconds_get(const Evas_Object *obj)
return wd->seconds; return wd->seconds;
} }
/**
* Set the interval for the clock
*
* @param obj The clock object
* @param interval The interval value in seconds
*
* The interval value is decreased while the user increments or decrements
* the clock value. The next interval value is the previous interval / 1.05,
* so it speed up a bit. Default value is 0.85 seconds.
*
* @ingroup Clock
*/
EAPI void EAPI void
elm_clock_interval_set(Evas_Object *obj, double interval) elm_clock_interval_set(Evas_Object *obj, double interval)
{ {
@ -824,18 +670,6 @@ elm_clock_interval_set(Evas_Object *obj, double interval)
wd->first_interval = interval; wd->first_interval = interval;
} }
/**
* Get the interval of the clock
*
* @param obj The clock object
* @return The value of the first interval in seconds
*
* The interval value is decreased while the user increments or decrements
* the clock value. The next interval value is the previous interval / 1.05,
* so it speed up a bit. Default value is 0.85 seconds.
*
* @ingroup Clock
*/
EAPI double EAPI double
elm_clock_interval_get(const Evas_Object *obj) elm_clock_interval_get(const Evas_Object *obj)
{ {