efl/src/lib/elementary/efl_ui_clock.eo

244 lines
8.3 KiB
Plaintext

import efl_types;
enum @beta Efl.Ui.Clock_Type
{
[[Identifies a clock field, The widget supports 6 fields : Year, month,
Date, Hour, Minute, AM/PM
]]
year = 0, [[Indicates Year field.]]
month = 1, [[Indicates Month field.]]
date = 2, [[Indicates Date field.]]
hour = 3, [[Indicates Hour field.]]
minute = 4, [[Indicates Minute field.]]
second = 5, [[Indicates Second field.]]
day = 6, [[Indicated Day field.]]
ampm = 7, [[Indicates AM/PM field .]]
}
class @beta Efl.Ui.Clock extends Efl.Ui.Layout_Base
{
[[Efl UI clock class]]
methods {
@property format {
[[The current clock format.
Format is a combination of allowed
Libc date format specifiers like: "%b %d, %Y %I : %M %p".
Maximum allowed format length is 64 chars.
Format can include separators for each individual clock
field except for AM/PM field.
Each separator can be a maximum of 6 UTF-8 bytes.
Space is also taken as a separator.
These specifiers can be arranged in any order and the widget
will display the fields accordingly.
Default format is taken as per the system locale settings.
]]
/* FIXME-doc
Following are the allowed set of format specifiers for each clock field.
@b %%Y : The year as a decimal number including the century.
@b %%y : The year as a decimal number without a century (range 00 to 99).
@b %%m : The month as a decimal number (range 01 to 12).
@b %%b : The abbreviated month name according to the current locale.
@b %%B : The full month name according to the current locale.
@b %%h : The abbreviated month name according to the current locale(same as %%b).
@b %%d : The day of the month as a decimal number (range 01 to 31).
@b %%e : The day of the month as a decimal number (range 1 to 31). single
digits are preceded by a blank.
@b %%I : The hour as a decimal number using a 12-hour clock (range 01 to 12).
@b %%H : The hour as a decimal number using a 24-hour clock (range 00 to 23).
@b %%k : The hour (24-hour clock) as a decimal number (range 0 to 23). single
digits are preceded by a blank.
@b %%l : The hour (12-hour clock) as a decimal number (range 1 to 12); single
digits are preceded by a blank.
@b %%M : The minute as a decimal number (range 00 to 59).
@b %%p : Either 'AM' or 'PM' according to the given time value, or the
corresponding strings for the current locale. Noon is treated as 'PM'
and midnight as 'AM'.
@b %%P : Like %p but in lower case: 'am' or 'pm' or a corresponding string for
the current locale.
@b %%c : The preferred date and time representation for the current locale.
@b %%x : The preferred date representation for the current locale without the time.
@b %%X : The preferred time representation for the current locale without the date.
@b %%r : The complete calendar time using the AM/PM format of the current locale.
@b %%R : The hour and minute in decimal numbers using the format %H:%M.
@b %%T : The time of day in decimal numbers using the format %H:%M:%S.
@b %%D : The date using the format %%m/%%d/%%y.
@b %%F : The date using the format %%Y-%%m-%%d.
*/
set {} get {}
values {
fmt: string; [[The clock format.]]
}
}
@property pause {
[[Whether the given clock widget should be paused or not.
This function pauses or starts the clock widget.
]]
set {} get {}
values {
paused: bool; [[$true to pause clock, $false otherwise]]
}
}
@property edit_mode {
[[Digits of the given clock widget should be editable when in editing mode.]]
set {} get {}
values {
value: bool; [[$true to set edit mode, $false otherwise]]
}
}
@property time_min {
[[The lower boundary of a field.
Year: years since 1900. Negative value represents year below 1900
(year value -30 represents 1870). Year default range is from 70
to 137.
Month: default value range is from 0 to 11.
Date: default value range is from 1 to 31 according to the month
value.
Hour: default value will be in terms of 24 hr format (0~23)
Minute: default value range is from 0 to 59.
Compare with @.field_limit which allows setting limits to each
individual time field.
]]
values {
mintime: Efl.Time; [[Time structure containing the minimum time value.]]
}
}
@property time_max {
[[The upper boundary of a field.
Year: years since 1900. Negative value represents year below 1900
(year value -30 represents 1870). Year default range is from 70
to 137.
Month: default value range is from 0 to 11.
Date: default value range is from 1 to 31 according to the month
value.
Hour: default value will be in terms of 24 hr format (0~23)
Minute: default value range is from 0 to 59.
Compare with @.field_limit which allows setting limits to each
individual time field.
]]
values {
maxtime: Efl.Time; [[Time structure containing the maximum time value.]]
}
}
@property time {
[[The current value of a clock object.
Year: years since 1900. Negative value represents year below 1900
(year value -30 represents 1870). Year default range is from 70
to 137.
Month: default value range is from 0 to 11.
Date: default value range is from 1 to 31 according to the month
value.
Hour: default value will be in terms of 24 hr format (0~23)
Minute: default value range is from 0 to 59.
]]
values {
curtime: Efl.Time; [[Time structure containing the time value.]]
}
}
@property field_visible {
[[Visibility of each field.
Allows, for example, hiding the year field by setting
@Efl.Ui.Clock_Type.year's visibility to $false.
Setting this API to $true in itself doesn't ensure that the field is
visible. The field's format also must be present in the overall clock
format. If a field's visibility is set to $false then it won't appear
even though its format is present. In summary, if this API is set to
true and the corresponding field's format is present in clock format,
the field is visible.
By default the field visibility is set to $true.
]]
set{} get{}
keys {
fieldtype: Efl.Ui.Clock_Type; [[Type of the field.]]
}
values {
visible: bool; [[$true field can be visible, $false otherwise.]]
}
}
@property field_limit {
[[Numerical limits of each field.
Limits can be set to individual fields, independently, except
for the AM/PM field. Any field can display the values only in between
these minimum and maximum limits unless the corresponding time
value is restricted from MinTime to MaxTime. That is, min/max
field limits always work under the limitations of mintime/maxtime.
There is no provision to set the limits of AM/PM field.
Compare with @.time_min and @.time_max which set a global limit to
the acceptable dates instead of to each individual field.
]]
set {
}
get {
}
keys {
fieldtype: Efl.Ui.Clock_Type; [[Type of the field.]]
}
values {
min: int; [[Acceptable minimum value for this field.]]
max: int; [[Acceptable maximum value for this field.]]
}
}
}
implements {
Efl.Object.constructor;
Efl.Canvas.Group.group_calculate;
Efl.Ui.Widget.theme_apply;
Efl.Ui.L10n.translation_update;
}
events {
changed: void; [[Called when clock changed]]
}
}