efl/src/lib/elementary/elm_clock.eo

178 lines
5.7 KiB
Plaintext
Raw Normal View History

enum Elm.Clock.Edit_Mode
{
[[Identifiers for which clock digits should be editable, when a
clock widget is in editing mode. Values may be OR-ed together to
make a mask, naturally.
See also @Elm.Clock.edit.set, @Elm.Clock.edit_mode.set.
]]
legacy: elm_clock_edit;
default = 0, [[Default value. Means that all digits are editable, when in editing mode.]]
hour_decimal = 1 << 0, [[Decimal digit of hours value should be editable.]]
hour_unit = 1 << 1, [[Unit digit of hours value should be editable.]]
min_decimal = 1 << 2, [[Decimal digit of minutes value should be editable.]]
min_unit = 1 << 3, [[Unit digit of minutes value should be editable.]]
sec_decimal = 1 << 4, [[Decimal digit of seconds value should be editable.]]
sec_unit = 1 << 5, [[Unit digit of seconds value should be editable.]]
all = (1 << 6) - 1 [[All digits should be editable.]]
}
class Elm.Clock (Elm.Layout)
2014-03-20 02:11:48 -07:00
{
[[Digital clock widget
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.
]]
legacy_prefix: elm_clock;
2014-03-20 02:11:48 -07:00
eo_prefix: elm_obj_clock;
event_prefix: elm_clock;
2015-05-07 09:32:53 -07:00
methods {
@property show_am_pm {
[[If the given clock widget must show hours in military or am/pm mode
2014-03-20 02:11:48 -07:00
Set 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.
]]
set {
2014-03-20 02:11:48 -07:00
}
get {
}
values {
am_pm: bool; [[$true to put it in am/pm mode, $false to military mode]]
2014-03-20 02:11:48 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property first_interval {
[[The first interval on time updates for a user mouse button hold
on clock widgets' time editing.
2014-03-20 02:11:48 -07:00
This interval value is decreased while the user holds the
mouse pointer either incrementing or decrementing a given the
clock digit's value.
2014-03-20 02:11:48 -07:00
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.
2014-03-20 02:11:48 -07:00
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.
2014-03-20 02:11:48 -07:00
The default starting interval value for automatic flips is
0.85 seconds.
]]
set {
2014-03-20 02:11:48 -07:00
}
get {
}
values {
interval: double; [[The first interval value in seconds]]
2014-03-20 02:11:48 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property show_seconds {
[[If the given clock widget must show time with seconds or not
2014-03-20 02:11:48 -07:00
This function sets if the given clock must show or not elapsed
seconds. By default, they are not shown.
]]
set {
2014-03-20 02:11:48 -07:00
}
get {
}
values {
seconds: bool; [[$true to show seconds, $false otherwise.]]
2014-03-20 02:11:48 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property edit {
[[Whether a given clock widget is under editing mode or
under (default) displaying-only mode.
This function makes a clock's time to be editable or not by
user interaction. When in editing mode, clocks stop
ticking, until one brings them back to display mode. The
@.edit_mode.set function will influence which digits
of the clock will be editable.
Note: am/pm sheets, if being shown, will always be editable
under editing mode.
]]
2014-03-20 02:11:48 -07:00
set {
}
get {
}
values {
edit: bool; [[$true to put it in editing, $false to
put it back to "displaying only" mode]]
2014-03-20 02:11:48 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property pause {
[[Whether the given clock widget should be paused or not.
2014-03-20 02:11:48 -07:00
This function pauses or starts the clock widget.
2014-03-20 02:11:48 -07:00
@since 1.9
]]
set {
2014-03-20 02:11:48 -07:00
}
get {
}
values {
paused: bool; [[$true to pause clock, $false otherwise]]
2014-03-20 02:11:48 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property time {
[[Clock widget's time
2014-03-20 02:11:48 -07:00
Values must be set within 0-23 for hours and
0-59 for minutes and seconds, even if the clock
is not in "military" mode.
]]
set {
[[Warning: The behavior for values set out of those ranges is
undefined.
]]
2014-03-20 02:11:48 -07:00
}
get {
[[Note: Use $null pointers on the time values you're not
interested in: they'll be ignored by the function.
]]
2014-03-20 02:11:48 -07:00
}
values {
hrs: int; [[The hours to set]]
min: int; [[The minutes to set]]
sec: int; [[The seconds to set]]
2014-03-20 02:11:48 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property edit_mode {
[[Digits of the given clock widget should be editable when in editing mode.]]
2014-03-20 02:11:48 -07:00
set {
}
get {
}
values {
digedit: Elm.Clock.Edit_Mode; [[Bit mask indicating the digits to be editable
(values in @Elm.Clock.Edit_Mode).]]
2014-03-20 02:11:48 -07:00
}
}
}
implements {
class.constructor;
Eo.Base.constructor;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Elm.Widget.focus_next_manager_is;
Elm.Widget.focus_direction_manager_is;
Elm.Widget.access;
Elm.Widget.focus_next;
Elm.Widget.theme_apply;
2014-03-20 02:11:48 -07:00
}
events {
changed; [[The clock's user changed the time]]
2014-03-20 02:11:48 -07:00
}
}