1import efl_types; 2 3enum @beta Efl.Ui.Clock_Type 4{ 5 [[Identifies a clock field, The widget supports 6 fields : Year, month, 6 Date, Hour, Minute, AM/PM 7 ]] 8 9 year = 0, [[Indicates Year field.]] 10 month = 1, [[Indicates Month field.]] 11 date = 2, [[Indicates Date field.]] 12 hour = 3, [[Indicates Hour field.]] 13 minute = 4, [[Indicates Minute field.]] 14 second = 5, [[Indicates Second field.]] 15 day = 6, [[Indicated Day field.]] 16 ampm = 7, [[Indicates AM/PM field .]] 17} 18 19class @beta Efl.Ui.Clock extends Efl.Ui.Layout_Base 20{ 21 [[Efl UI clock class]] 22 methods { 23 @property format { 24 [[The current clock format. 25 Format is a combination of allowed 26 Libc date format specifiers like: "%b %d, %Y %I : %M %p". 27 28 Maximum allowed format length is 64 chars. 29 30 Format can include separators for each individual clock 31 field except for AM/PM field. 32 33 Each separator can be a maximum of 6 UTF-8 bytes. 34 Space is also taken as a separator. 35 36 These specifiers can be arranged in any order and the widget 37 will display the fields accordingly. 38 39 Default format is taken as per the system locale settings. 40 ]] 41 /* FIXME-doc 42 Following are the allowed set of format specifiers for each clock field. 43 44 @b %%Y : The year as a decimal number including the century. 45 46 @b %%y : The year as a decimal number without a century (range 00 to 99). 47 48 @b %%m : The month as a decimal number (range 01 to 12). 49 50 @b %%b : The abbreviated month name according to the current locale. 51 52 @b %%B : The full month name according to the current locale. 53 54 @b %%h : The abbreviated month name according to the current locale(same as %%b). 55 56 @b %%d : The day of the month as a decimal number (range 01 to 31). 57 58 @b %%e : The day of the month as a decimal number (range 1 to 31). single 59 digits are preceded by a blank. 60 61 @b %%I : The hour as a decimal number using a 12-hour clock (range 01 to 12). 62 63 @b %%H : The hour as a decimal number using a 24-hour clock (range 00 to 23). 64 65 @b %%k : The hour (24-hour clock) as a decimal number (range 0 to 23). single 66 digits are preceded by a blank. 67 68 @b %%l : The hour (12-hour clock) as a decimal number (range 1 to 12); single 69 digits are preceded by a blank. 70 71 @b %%M : The minute as a decimal number (range 00 to 59). 72 73 @b %%p : Either 'AM' or 'PM' according to the given time value, or the 74 corresponding strings for the current locale. Noon is treated as 'PM' 75 and midnight as 'AM'. 76 77 @b %%P : Like %p but in lower case: 'am' or 'pm' or a corresponding string for 78 the current locale. 79 80 @b %%c : The preferred date and time representation for the current locale. 81 82 @b %%x : The preferred date representation for the current locale without the time. 83 84 @b %%X : The preferred time representation for the current locale without the date. 85 86 @b %%r : The complete calendar time using the AM/PM format of the current locale. 87 88 @b %%R : The hour and minute in decimal numbers using the format %H:%M. 89 90 @b %%T : The time of day in decimal numbers using the format %H:%M:%S. 91 92 @b %%D : The date using the format %%m/%%d/%%y. 93 94 @b %%F : The date using the format %%Y-%%m-%%d. 95 */ 96 set {} get {} 97 values { 98 fmt: string; [[The clock format.]] 99 } 100 } 101 @property pause { 102 [[Whether the given clock widget should be paused or not. 103 104 This function pauses or starts the clock widget. 105 ]] 106 set {} get {} 107 values { 108 paused: bool; [[$true to pause clock, $false otherwise]] 109 } 110 } 111 @property edit_mode { 112 [[Digits of the given clock widget should be editable when in editing mode.]] 113 set {} get {} 114 values { 115 value: bool; [[$true to set edit mode, $false otherwise]] 116 } 117 } 118 @property time_min { 119 [[The lower boundary of a field. 120 121 Year: years since 1900. Negative value represents year below 1900 122 (year value -30 represents 1870). Year default range is from 70 123 to 137. 124 125 Month: default value range is from 0 to 11. 126 127 Date: default value range is from 1 to 31 according to the month 128 value. 129 130 Hour: default value will be in terms of 24 hr format (0~23) 131 132 Minute: default value range is from 0 to 59. 133 134 Compare with @.field_limit which allows setting limits to each 135 individual time field. 136 ]] 137 values { 138 mintime: Efl.Time; [[Time structure containing the minimum time value.]] 139 } 140 } 141 @property time_max { 142 [[The upper boundary of a field. 143 144 Year: years since 1900. Negative value represents year below 1900 145 (year value -30 represents 1870). Year default range is from 70 146 to 137. 147 148 Month: default value range is from 0 to 11. 149 150 Date: default value range is from 1 to 31 according to the month 151 value. 152 153 Hour: default value will be in terms of 24 hr format (0~23) 154 155 Minute: default value range is from 0 to 59. 156 157 Compare with @.field_limit which allows setting limits to each 158 individual time field. 159 ]] 160 values { 161 maxtime: Efl.Time; [[Time structure containing the maximum time value.]] 162 } 163 } 164 @property time { 165 [[The current value of a clock object. 166 167 Year: years since 1900. Negative value represents year below 1900 168 (year value -30 represents 1870). Year default range is from 70 169 to 137. 170 171 Month: default value range is from 0 to 11. 172 173 Date: default value range is from 1 to 31 according to the month 174 value. 175 176 Hour: default value will be in terms of 24 hr format (0~23) 177 178 Minute: default value range is from 0 to 59. 179 ]] 180 values { 181 curtime: Efl.Time; [[Time structure containing the time value.]] 182 } 183 } 184 @property field_visible { 185 [[Visibility of each field. 186 187 Allows, for example, hiding the year field by setting 188 @Efl.Ui.Clock_Type.year's visibility to $false. 189 190 Setting this API to $true in itself doesn't ensure that the field is 191 visible. The field's format also must be present in the overall clock 192 format. If a field's visibility is set to $false then it won't appear 193 even though its format is present. In summary, if this API is set to 194 true and the corresponding field's format is present in clock format, 195 the field is visible. 196 197 By default the field visibility is set to $true. 198 ]] 199 set{} get{} 200 keys { 201 fieldtype: Efl.Ui.Clock_Type; [[Type of the field.]] 202 } 203 values { 204 visible: bool; [[$true field can be visible, $false otherwise.]] 205 } 206 } 207 @property field_limit { 208 [[Numerical limits of each field. 209 210 Limits can be set to individual fields, independently, except 211 for the AM/PM field. Any field can display the values only in between 212 these minimum and maximum limits unless the corresponding time 213 value is restricted from MinTime to MaxTime. That is, min/max 214 field limits always work under the limitations of mintime/maxtime. 215 216 There is no provision to set the limits of AM/PM field. 217 218 Compare with @.time_min and @.time_max which set a global limit to 219 the acceptable dates instead of to each individual field. 220 ]] 221 set { 222 } 223 get { 224 } 225 keys { 226 fieldtype: Efl.Ui.Clock_Type; [[Type of the field.]] 227 } 228 values { 229 min: int; [[Acceptable minimum value for this field.]] 230 max: int; [[Acceptable maximum value for this field.]] 231 } 232 } 233 } 234 implements { 235 Efl.Object.constructor; 236 Efl.Canvas.Group.group_calculate; 237 Efl.Ui.Widget.theme_apply; 238 Efl.Ui.L10n.translation_update; 239 } 240 events { 241 changed: void; [[Called when clock changed]] 242 } 243} 244