1 #ifndef _ELM_CLOCK_EO_LEGACY_H_ 2 #define _ELM_CLOCK_EO_LEGACY_H_ 3 4 #ifndef _ELM_CLOCK_EO_CLASS_TYPE 5 #define _ELM_CLOCK_EO_CLASS_TYPE 6 7 typedef Eo Elm_Clock; 8 9 #endif 10 11 #ifndef _ELM_CLOCK_EO_TYPES 12 #define _ELM_CLOCK_EO_TYPES 13 14 /** 15 * @brief Identifiers for which clock digits should be editable, when a clock 16 * widget is in editing mode. Values may be OR-ed together to make a mask, 17 * naturally. 18 * 19 * See also @ref elm_clock_edit_set, @ref elm_clock_edit_mode_set. 20 * 21 * @ingroup Elm_Clock 22 */ 23 typedef enum 24 { 25 ELM_CLOCK_EDIT_DEFAULT = 0, /**< Default value. Means that all digits are 26 * editable, when in editing mode. */ 27 ELM_CLOCK_EDIT_HOUR_DECIMAL = 1 /* 1 >> 0 */, /**< Decimal digit of hours 28 * value should be editable. */ 29 ELM_CLOCK_EDIT_HOUR_UNIT = 2 /* 1 >> 1 */, /**< Unit digit of hours value 30 * should be editable. */ 31 ELM_CLOCK_EDIT_MIN_DECIMAL = 4 /* 1 >> 2 */, /**< Decimal digit of minutes 32 * value should be editable. */ 33 ELM_CLOCK_EDIT_MIN_UNIT = 8 /* 1 >> 3 */, /**< Unit digit of minutes value 34 * should be editable. */ 35 ELM_CLOCK_EDIT_SEC_DECIMAL = 16 /* 1 >> 4 */, /**< Decimal digit of seconds 36 * value should be editable. */ 37 ELM_CLOCK_EDIT_SEC_UNIT = 32 /* 1 >> 5 */, /**< Unit digit of seconds value 38 * should be editable. */ 39 ELM_CLOCK_EDIT_ALL = 63 /* (1 >> 6) * 1 */ /**< All digits should be editable. 40 */ 41 } Elm_Clock_Edit_Mode; 42 43 44 #endif 45 46 /** 47 * @brief If the given clock widget must show hours in military or am/pm mode 48 * 49 * Set if the clock must show hours in military or am/pm mode. In some 50 * countries like Brazil the military mode (00-24h-format) is used, in 51 * opposition to the USA, where the am/pm mode is more commonly used. 52 * 53 * @param[in] obj The object. 54 * @param[in] am_pm @c true to put it in am/pm mode, @c false to military mode 55 * 56 * @ingroup Elm_Clock_Group 57 */ 58 EAPI void elm_clock_show_am_pm_set(Elm_Clock *obj, Eina_Bool am_pm); 59 60 /** 61 * @brief If the given clock widget must show hours in military or am/pm mode 62 * 63 * Set if the clock must show hours in military or am/pm mode. In some 64 * countries like Brazil the military mode (00-24h-format) is used, in 65 * opposition to the USA, where the am/pm mode is more commonly used. 66 * 67 * @param[in] obj The object. 68 * 69 * @return @c true to put it in am/pm mode, @c false to military mode 70 * 71 * @ingroup Elm_Clock_Group 72 */ 73 EAPI Eina_Bool elm_clock_show_am_pm_get(const Elm_Clock *obj); 74 75 /** 76 * @brief The first interval on time updates for a user mouse button hold on 77 * clock widgets' time editing. 78 * 79 * This interval value is decreased while the user holds the mouse pointer 80 * either incrementing or decrementing a given the clock digit's value. 81 * 82 * This helps the user to get to a given time distant from the current one 83 * easier/faster, as it will start to flip quicker and quicker on mouse button 84 * holds. 85 * 86 * The calculation for the next flip interval value, starting from the one set 87 * with this call, is the previous interval divided by 1.05, so it decreases a 88 * little bit. 89 * 90 * The default starting interval value for automatic flips is 0.85 seconds. 91 * 92 * @param[in] obj The object. 93 * @param[in] interval The first interval value in seconds 94 * 95 * @ingroup Elm_Clock_Group 96 */ 97 EAPI void elm_clock_first_interval_set(Elm_Clock *obj, double interval); 98 99 /** 100 * @brief The first interval on time updates for a user mouse button hold on 101 * clock widgets' time editing. 102 * 103 * This interval value is decreased while the user holds the mouse pointer 104 * either incrementing or decrementing a given the clock digit's value. 105 * 106 * This helps the user to get to a given time distant from the current one 107 * easier/faster, as it will start to flip quicker and quicker on mouse button 108 * holds. 109 * 110 * The calculation for the next flip interval value, starting from the one set 111 * with this call, is the previous interval divided by 1.05, so it decreases a 112 * little bit. 113 * 114 * The default starting interval value for automatic flips is 0.85 seconds. 115 * 116 * @param[in] obj The object. 117 * 118 * @return The first interval value in seconds 119 * 120 * @ingroup Elm_Clock_Group 121 */ 122 EAPI double elm_clock_first_interval_get(const Elm_Clock *obj); 123 124 /** 125 * @brief If the given clock widget must show time with seconds or not 126 * 127 * This function sets if the given clock must show or not elapsed seconds. By 128 * default, they are not shown. 129 * 130 * @param[in] obj The object. 131 * @param[in] seconds @c true to show seconds, @c false otherwise. 132 * 133 * @ingroup Elm_Clock_Group 134 */ 135 EAPI void elm_clock_show_seconds_set(Elm_Clock *obj, Eina_Bool seconds); 136 137 /** 138 * @brief If the given clock widget must show time with seconds or not 139 * 140 * This function sets if the given clock must show or not elapsed seconds. By 141 * default, they are not shown. 142 * 143 * @param[in] obj The object. 144 * 145 * @return @c true to show seconds, @c false otherwise. 146 * 147 * @ingroup Elm_Clock_Group 148 */ 149 EAPI Eina_Bool elm_clock_show_seconds_get(const Elm_Clock *obj); 150 151 /** 152 * @brief Whether a given clock widget is under editing mode or under (default) 153 * displaying-only mode. 154 * 155 * This function makes a clock's time to be editable or not by user 156 * interaction. When in editing mode, clocks stop ticking, until one brings 157 * them back to display mode. The @ref elm_clock_edit_mode_set function will 158 * influence which digits of the clock will be editable. 159 * 160 * @note am/pm sheets, if being shown, will always be editable under editing 161 * mode. 162 * 163 * @param[in] obj The object. 164 * @param[in] edit @c true to put it in editing, @c false to put it back to 165 * "displaying only" mode 166 * 167 * @ingroup Elm_Clock_Group 168 */ 169 EAPI void elm_clock_edit_set(Elm_Clock *obj, Eina_Bool edit); 170 171 /** 172 * @brief Whether a given clock widget is under editing mode or under (default) 173 * displaying-only mode. 174 * 175 * This function makes a clock's time to be editable or not by user 176 * interaction. When in editing mode, clocks stop ticking, until one brings 177 * them back to display mode. The @ref elm_clock_edit_mode_set function will 178 * influence which digits of the clock will be editable. 179 * 180 * @note am/pm sheets, if being shown, will always be editable under editing 181 * mode. 182 * 183 * @param[in] obj The object. 184 * 185 * @return @c true to put it in editing, @c false to put it back to "displaying 186 * only" mode 187 * 188 * @ingroup Elm_Clock_Group 189 */ 190 EAPI Eina_Bool elm_clock_edit_get(const Elm_Clock *obj); 191 192 /** 193 * @brief Whether the given clock widget should be paused or not. 194 * 195 * This function pauses or starts the clock widget. 196 * 197 * @param[in] obj The object. 198 * @param[in] paused @c true to pause clock, @c false otherwise 199 * 200 * @since 1.9 201 * 202 * @ingroup Elm_Clock_Group 203 */ 204 EAPI void elm_clock_pause_set(Elm_Clock *obj, Eina_Bool paused); 205 206 /** 207 * @brief Whether the given clock widget should be paused or not. 208 * 209 * This function pauses or starts the clock widget. 210 * 211 * @param[in] obj The object. 212 * 213 * @return @c true to pause clock, @c false otherwise 214 * 215 * @since 1.9 216 * 217 * @ingroup Elm_Clock_Group 218 */ 219 EAPI Eina_Bool elm_clock_pause_get(const Elm_Clock *obj); 220 221 /** 222 * @brief Clock widget's time 223 * 224 * Values must be set within 0-23 for hours and 0-59 for minutes and seconds, 225 * even if the clock is not in "military" mode. 226 * 227 * @warning The behavior for values set out of those ranges is undefined. 228 * 229 * @param[in] obj The object. 230 * @param[in] hrs The hours to set 231 * @param[in] min The minutes to set 232 * @param[in] sec The seconds to set 233 * 234 * @ingroup Elm_Clock_Group 235 */ 236 EAPI void elm_clock_time_set(Elm_Clock *obj, int hrs, int min, int sec); 237 238 /** 239 * @brief Clock widget's time 240 * 241 * Values must be set within 0-23 for hours and 0-59 for minutes and seconds, 242 * even if the clock is not in "military" mode. 243 * 244 * @note Use @c null pointers on the time values you're not interested in: 245 * they'll be ignored by the function. 246 * 247 * @param[in] obj The object. 248 * @param[out] hrs The hours to set 249 * @param[out] min The minutes to set 250 * @param[out] sec The seconds to set 251 * 252 * @ingroup Elm_Clock_Group 253 */ 254 EAPI void elm_clock_time_get(const Elm_Clock *obj, int *hrs, int *min, int *sec); 255 256 /** 257 * @brief Digits of the given clock widget should be editable when in editing 258 * mode. 259 * 260 * @param[in] obj The object. 261 * @param[in] digedit Bit mask indicating the digits to be editable (values in 262 * @ref Elm_Clock_Edit_Mode). 263 * 264 * @ingroup Elm_Clock_Group 265 */ 266 EAPI void elm_clock_edit_mode_set(Elm_Clock *obj, Elm_Clock_Edit_Mode digedit); 267 268 /** 269 * @brief Digits of the given clock widget should be editable when in editing 270 * mode. 271 * 272 * @param[in] obj The object. 273 * 274 * @return Bit mask indicating the digits to be editable (values in 275 * @ref Elm_Clock_Edit_Mode). 276 * 277 * @ingroup Elm_Clock_Group 278 */ 279 EAPI Elm_Clock_Edit_Mode elm_clock_edit_mode_get(const Elm_Clock *obj); 280 281 #endif 282