forked from enlightenment/efl
efl_ui_clock: changed property name from value to time
This commit is contained in:
parent
944c4dee1b
commit
c1094da0f4
|
@ -32,7 +32,7 @@ _bt_clicked(void *data EINA_UNUSED, const Efl_Event *ev)
|
|||
efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_AMPM, EINA_TRUE);
|
||||
efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_SECOND, EINA_TRUE);
|
||||
efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_DAY, EINA_TRUE);
|
||||
efl_ui_clock_value_set(dt1, new_time);
|
||||
efl_ui_clock_time_set(dt1, new_time);
|
||||
|
||||
elm_object_disabled_set(dt1, EINA_TRUE);
|
||||
elm_object_disabled_set(ev->object, EINA_TRUE);
|
||||
|
|
|
@ -1043,13 +1043,13 @@ _efl_ui_clock_field_limit_set(Eo *obj, Efl_Ui_Clock_Data *sd, Efl_Ui_Clock_Type
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Time
|
||||
_efl_ui_clock_value_get(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *sd)
|
||||
_efl_ui_clock_time_get(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *sd)
|
||||
{
|
||||
return sd->curr_time;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_clock_value_set(Eo *obj, Efl_Ui_Clock_Data *sd, Efl_Time newtime)
|
||||
_efl_ui_clock_time_set(Eo *obj, Efl_Ui_Clock_Data *sd, Efl_Time newtime)
|
||||
{
|
||||
if (_date_cmp(&sd->curr_time, &newtime)) return;
|
||||
sd->curr_time = newtime;
|
||||
|
@ -1064,13 +1064,13 @@ _efl_ui_clock_value_set(Eo *obj, Efl_Ui_Clock_Data *sd, Efl_Time newtime)
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Time
|
||||
_efl_ui_clock_value_min_get(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *sd)
|
||||
_efl_ui_clock_time_min_get(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *sd)
|
||||
{
|
||||
return sd->min_limit;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_clock_value_min_set(Eo *obj, Efl_Ui_Clock_Data *sd, Efl_Time mintime)
|
||||
_efl_ui_clock_time_min_set(Eo *obj, Efl_Ui_Clock_Data *sd, Efl_Time mintime)
|
||||
{
|
||||
struct tm old_time;
|
||||
|
||||
|
@ -1089,13 +1089,13 @@ _efl_ui_clock_value_min_set(Eo *obj, Efl_Ui_Clock_Data *sd, Efl_Time mintime)
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Time
|
||||
_efl_ui_clock_value_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *sd)
|
||||
_efl_ui_clock_time_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *sd)
|
||||
{
|
||||
return sd->max_limit;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_clock_value_max_set(Eo *obj, Efl_Ui_Clock_Data *sd, Efl_Time maxtime)
|
||||
_efl_ui_clock_time_max_set(Eo *obj, Efl_Ui_Clock_Data *sd, Efl_Time maxtime)
|
||||
{
|
||||
struct tm old_time;
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ class Efl.Ui.Clock (Efl.Ui.Layout)
|
|||
value: bool; [[$true to set edit mode, $false otherwise]]
|
||||
}
|
||||
}
|
||||
@property value_min {
|
||||
@property time_min {
|
||||
[[The lower boundary of a field.
|
||||
|
||||
Year: years since 1900. Negative value represents year below 1900
|
||||
|
@ -135,7 +135,7 @@ class Efl.Ui.Clock (Efl.Ui.Layout)
|
|||
mintime: Efl.Time; [[Time structure containing the minimum time value.]]
|
||||
}
|
||||
}
|
||||
@property value_max {
|
||||
@property time_max {
|
||||
[[The upper boundary of a field.
|
||||
|
||||
Year: years since 1900. Negative value represents year below 1900
|
||||
|
@ -155,7 +155,7 @@ class Efl.Ui.Clock (Efl.Ui.Layout)
|
|||
maxtime: Efl.Time; [[Time structure containing the maximum time value.]]
|
||||
}
|
||||
}
|
||||
@property value {
|
||||
@property time {
|
||||
[[The current value of a clock object.
|
||||
|
||||
Year: years since 1900. Negative value represents year below 1900
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
*
|
||||
* __________ __________
|
||||
* | | | |
|
||||
* | Clock |<<<----------efl_ui_clock_value_set()---| |
|
||||
* | Clock |<<<----------efl_ui_clock_time_set()----| |
|
||||
* | widget | | Module |
|
||||
* | base |----display_field_value()------------>>>| |
|
||||
* |__________| |__________|
|
||||
|
|
|
@ -82,28 +82,28 @@ elm_datetime_field_limit_get(const Evas_Object *obj, Elm_Datetime_Field_Type fie
|
|||
EAPI Eina_Bool
|
||||
elm_datetime_value_min_set(Evas_Object *obj, const Efl_Time *mintime)
|
||||
{
|
||||
if (mintime) efl_ui_clock_value_min_set(obj, *mintime);
|
||||
if (mintime) efl_ui_clock_time_min_set(obj, *mintime);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_datetime_value_min_get(const Evas_Object *obj, Efl_Time *mintime)
|
||||
{
|
||||
if (mintime) *mintime = efl_ui_clock_value_min_get(obj);
|
||||
if (mintime) *mintime = efl_ui_clock_time_min_get(obj);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_datetime_value_set(Evas_Object *obj, const Efl_Time *newtime)
|
||||
{
|
||||
if (newtime) efl_ui_clock_value_set(obj, *newtime);
|
||||
if (newtime) efl_ui_clock_time_set(obj, *newtime);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_datetime_value_get(const Evas_Object *obj, Efl_Time *currtime)
|
||||
{
|
||||
if (currtime) *currtime = efl_ui_clock_value_get(obj);
|
||||
if (currtime) *currtime = efl_ui_clock_time_get(obj);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -121,13 +121,13 @@ EAPI Eina_Bool elm_datetime_field_visible_get(const Evas_Object *obj, Elm_Dateti
|
|||
EAPI Eina_Bool
|
||||
elm_datetime_value_max_set(Evas_Object *obj, const Efl_Time *maxtime)
|
||||
{
|
||||
if (maxtime) efl_ui_clock_value_max_set(obj, *maxtime);
|
||||
if (maxtime) efl_ui_clock_time_max_set(obj, *maxtime);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_datetime_value_max_get(const Evas_Object *obj, Efl_Time *maxtime)
|
||||
{
|
||||
if (maxtime) *maxtime = efl_ui_clock_value_max_get(obj);
|
||||
if (maxtime) *maxtime = efl_ui_clock_time_max_get(obj);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -97,13 +97,13 @@ _diskselector_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
|||
disk_data = (DiskItem_Data *)elm_object_item_data_get(event->info);
|
||||
if (!disk_data || !(disk_data->ctx_mod)) return;
|
||||
|
||||
curr_time = efl_ui_clock_value_get(disk_data->ctx_mod->mod_data.base);
|
||||
curr_time = efl_ui_clock_time_get(disk_data->ctx_mod->mod_data.base);
|
||||
fmt = disk_data->ctx_mod->mod_data.field_format_get(disk_data->ctx_mod->mod_data.base, disk_data->sel_field_type);
|
||||
if ((disk_data->sel_field_type == EFL_UI_CLOCK_TYPE_HOUR) && ((!strncmp(fmt, "%I", FIELD_FORMAT_LEN)) ||
|
||||
(!strncmp(fmt, "%l", FIELD_FORMAT_LEN))) && (curr_time.tm_hour >= 12))
|
||||
disk_data->sel_field_value += 12;
|
||||
_field_value_set(&curr_time, disk_data->sel_field_type, disk_data->sel_field_value);
|
||||
efl_ui_clock_value_set(disk_data->ctx_mod->mod_data.base, curr_time);
|
||||
efl_ui_clock_time_set(disk_data->ctx_mod->mod_data.base, curr_time);
|
||||
evas_object_hide(disk_data->ctx_mod->ctxpopup);
|
||||
}
|
||||
|
||||
|
@ -116,10 +116,10 @@ _ampm_clicked_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
ctx_mod = (Ctxpopup_Module_Data *)data;
|
||||
if (!ctx_mod) return;
|
||||
|
||||
curr_time = efl_ui_clock_value_get(ctx_mod->mod_data.base);
|
||||
curr_time = efl_ui_clock_time_get(ctx_mod->mod_data.base);
|
||||
if (curr_time.tm_hour >= 12) curr_time.tm_hour -= 12;
|
||||
else curr_time.tm_hour += 12;
|
||||
efl_ui_clock_value_set(ctx_mod->mod_data.base, curr_time);
|
||||
efl_ui_clock_time_set(ctx_mod->mod_data.base, curr_time);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -169,7 +169,7 @@ _field_clicked_cb(void *data, const Efl_Event *event)
|
|||
|
||||
field_type = (Efl_Ui_Clock_Type )evas_object_data_get(event->object, "_field_type");
|
||||
fmt = ctx_mod->mod_data.field_format_get(ctx_mod->mod_data.base, field_type);
|
||||
time1 = efl_ui_clock_value_get(ctx_mod->mod_data.base);
|
||||
time1 = efl_ui_clock_time_get(ctx_mod->mod_data.base);
|
||||
val = _field_value_get(&time1, field_type);
|
||||
ctx_mod->mod_data.field_limit_get(ctx_mod->mod_data.base, field_type, &min, &max);
|
||||
|
||||
|
@ -283,7 +283,7 @@ field_value_display(Efl_Ui_Clock_Module_Data *module_data, Evas_Object *obj)
|
|||
ctx_mod = (Ctxpopup_Module_Data *)module_data;
|
||||
if (!ctx_mod || !obj) return;
|
||||
|
||||
tim = efl_ui_clock_value_get(ctx_mod->mod_data.base);
|
||||
tim = efl_ui_clock_time_get(ctx_mod->mod_data.base);
|
||||
field_type = (Efl_Ui_Clock_Type )evas_object_data_get(obj, "_field_type");
|
||||
fmt = ctx_mod->mod_data.field_format_get(ctx_mod->mod_data.base, field_type);
|
||||
buf[0] = 0;
|
||||
|
|
Loading…
Reference in New Issue