forked from enlightenment/efl
Change enabled_get/set to disabled_get/set.
Signed-off-by: Sanjeev BA <eflelev8@gmail.com> SVN revision: 68540
This commit is contained in:
parent
0759538f5e
commit
e0efa2e5ad
|
@ -70,7 +70,7 @@ set_api_state(api_data *api)
|
|||
time_t sec_per_day = (60*60*24);
|
||||
time_t sec_per_year = sec_per_day * 365;
|
||||
time_t the_time = (sec_per_year * 41) + (sec_per_day * 10); /* Set date to JAN 01, 2011 */
|
||||
elm_calendar_day_selection_enabled_set(cal, EINA_FALSE);
|
||||
elm_calendar_day_selection_disabled_set(cal, EINA_TRUE);
|
||||
elm_calendar_selected_time_set(cal, gmtime(&the_time));
|
||||
}
|
||||
break;
|
||||
|
@ -81,7 +81,7 @@ set_api_state(api_data *api)
|
|||
time_t sec_per_year = sec_per_day * 365;
|
||||
time_t the_time = (sec_per_year * 41) + (sec_per_day * 40); /* Set date to FEB 01, 2011 */
|
||||
elm_calendar_marks_clear(cal);
|
||||
elm_calendar_day_selection_enabled_set(cal, EINA_FALSE);
|
||||
elm_calendar_day_selection_disabled_set(cal, EINA_TRUE);
|
||||
elm_calendar_selected_time_set(cal, gmtime(&the_time));
|
||||
}
|
||||
break;
|
||||
|
@ -179,7 +179,7 @@ _print_cal_info(Evas_Object *cal, Evas_Object *en)
|
|||
|
||||
interval = elm_calendar_interval_get(cal);
|
||||
elm_calendar_min_max_year_get(cal, &year_min, &year_max);
|
||||
sel_enabled = elm_calendar_day_selection_enabled_get(cal);
|
||||
sel_enabled = !elm_calendar_day_selection_disabled_get(cal);
|
||||
wds = elm_calendar_weekdays_names_get(cal);
|
||||
|
||||
snprintf(info, sizeof(info),
|
||||
|
@ -252,7 +252,7 @@ test_calendar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
|
|||
cal2 = elm_calendar_add(win);
|
||||
evas_object_size_hint_weight_set(cal2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(cal2, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_calendar_day_selection_enabled_set(cal2, EINA_FALSE);
|
||||
elm_calendar_day_selection_disabled_set(cal2, EINA_TRUE);
|
||||
evas_object_show(cal2);
|
||||
elm_box_pack_end(bxh, cal2);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ external_calendar_state_set(void *data __UNUSED__, Evas_Object *obj,
|
|||
elm_calendar_min_max_year_set(obj, min, p->year_max);
|
||||
}
|
||||
if (p->sel_exists)
|
||||
elm_calendar_day_selection_enabled_set(obj, p->sel_enable);
|
||||
elm_calendar_day_selection_disabled_set(obj, !p->sel_enable);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -63,7 +63,7 @@ external_calendar_param_set(void *data __UNUSED__, Evas_Object *obj,
|
|||
{
|
||||
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
|
||||
{
|
||||
elm_calendar_day_selection_enabled_set(obj,param->i );
|
||||
elm_calendar_day_selection_disabled_set(obj,!param->i );
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ external_calendar_param_get(void *data __UNUSED__, const Evas_Object *obj,
|
|||
{
|
||||
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
|
||||
{
|
||||
param->i = elm_calendar_day_selection_enabled_get(obj);
|
||||
param->i = !elm_calendar_day_selection_disabled_get(obj);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ _print_cal_info_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __U
|
|||
|
||||
interval = elm_calendar_interval_get(obj);
|
||||
elm_calendar_min_max_year_get(obj, &year_min, &year_max);
|
||||
sel_enabled = elm_calendar_day_selection_enabled_get(obj);
|
||||
sel_enabled = !elm_calendar_day_selection_disabled_get(obj);
|
||||
wds = elm_calendar_weekdays_names_get(obj);
|
||||
|
||||
printf("Day: %i, Mon: %i, Year %i, WeekDay: %i<br>\n"
|
||||
|
|
|
@ -868,26 +868,38 @@ elm_calendar_min_max_year_get(const Evas_Object *obj, int *min, int *max)
|
|||
if (max) *max = wd->year_max + 1900;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EINA_DEPRECATED EAPI void
|
||||
elm_calendar_day_selection_enabled_set(Evas_Object *obj, Eina_Bool enabled)
|
||||
{
|
||||
elm_calendar_day_selection_disabled_set(obj, !enabled);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_calendar_day_selection_disabled_set(Evas_Object *obj, Eina_Bool disabled)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
wd->selection_enabled = enabled;
|
||||
if (enabled)
|
||||
wd->selection_enabled = (!disabled);
|
||||
if (!disabled)
|
||||
_select(wd, wd->selected_it);
|
||||
else
|
||||
_unselect(wd, wd->selected_it);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EINA_DEPRECATED EAPI Eina_Bool
|
||||
elm_calendar_day_selection_enabled_get(const Evas_Object *obj)
|
||||
{
|
||||
return (!elm_calendar_day_selection_disabled_get(obj));
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_calendar_day_selection_disabled_get(const Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return EINA_FALSE;
|
||||
return wd->selection_enabled;
|
||||
return (!wd->selection_enabled);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
/**
|
||||
* @defgroup Calendar Calendar
|
||||
*
|
||||
* This is a Calendar widget.
|
||||
* XXX: add more documentation.
|
||||
* This is a Calendar widget. Calender widget helps applications to flexibly
|
||||
* display a calender with day of the week, day, year and month. Applications will be
|
||||
* able to choose a specific date that will be reported in the smart_callbacks for
|
||||
* the calendar widget. The APIs of calendar widget let the applications perform
|
||||
* other functions like,
|
||||
* placing marks on specific dates
|
||||
* Setting the bounds for the calendar (minimum and maximum years)
|
||||
* Setting the day names of the week. ( for ex. Thu. or Thursday)
|
||||
* Setting the year and month format.
|
||||
*
|
||||
* Signals that you can add callbacks for are:
|
||||
* - @c "changed" - XXX: add docs
|
||||
* - @c "changed" - emitted when the date in the calendar is changed.
|
||||
*
|
||||
* Supported elm_object common APIs.
|
||||
* @li elm_object_signal_emit
|
||||
|
@ -155,8 +162,8 @@ EAPI void elm_calendar_min_max_year_get(const Evas_Object *obj,
|
|||
* Enable or disable day selection
|
||||
*
|
||||
* @param obj The calendar object.
|
||||
* @param enabled @c EINA_TRUE to enable selection or @c EINA_FALSE to
|
||||
* disable it.
|
||||
* @param disabled @c EINA_TRUE to disable selection or @c EINA_FALSE to
|
||||
* enable it.
|
||||
*
|
||||
* Enabled by default. If disabled, the user still can select months,
|
||||
* but not days. Selected days are highlighted on calendar.
|
||||
|
@ -165,32 +172,28 @@ EAPI void elm_calendar_min_max_year_get(const Evas_Object *obj,
|
|||
* When a day is selected, or month is changed, smart callbacks for
|
||||
* signal "changed" will be called.
|
||||
*
|
||||
* @see elm_calendar_day_selection_enable_get()
|
||||
* @see elm_calendar_day_selection_disabled_get()
|
||||
*
|
||||
* @ref calendar_example_04
|
||||
*
|
||||
* @ingroup Calendar
|
||||
*/
|
||||
// XXX: use disabled_set. it's enabled by default.
|
||||
// EAPI void elm_calendar_day_selection_disabled_set(Evas_Object *obj, Eina_Bool disabled);
|
||||
EAPI void elm_calendar_day_selection_enabled_set(Evas_Object *obj, Eina_Bool enabled);
|
||||
EAPI void elm_calendar_day_selection_disabled_set(Evas_Object *obj, Eina_Bool disabled);
|
||||
|
||||
/**
|
||||
* Get a value whether day selection is enabled or not.
|
||||
*
|
||||
* @see elm_calendar_day_selection_enable_set() for details.
|
||||
* Get a value whether day selection is disabled or not.
|
||||
*
|
||||
* @param obj The calendar object.
|
||||
* @return EINA_TRUE means day selection is enabled. EINA_FALSE indicates
|
||||
* it's disabled. If @p obj is NULL, EINA_FALSE is returned.
|
||||
* @return EINA_TRUE means day selection is disabled. EINA_FALSE indicates
|
||||
* it's enabled. If @p obj is NULL, EINA_FALSE is returned.
|
||||
*
|
||||
* @see elm_calendar_day_selection_disabled_set() for details.
|
||||
*
|
||||
* @ref calendar_example_05
|
||||
*
|
||||
* @ingroup Calendar
|
||||
*/
|
||||
// XXX: use disabled_get. it's enabled by default.
|
||||
// EAPI Eina_Bool elm_calendar_day_selection_disabled_get(const Evas_Object *obj);
|
||||
EAPI Eina_Bool elm_calendar_day_selection_enabled_get(const Evas_Object *obj);
|
||||
EAPI Eina_Bool elm_calendar_day_selection_disabled_get(const Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* Set selected date to be highlighted on calendar.
|
||||
|
|
|
@ -4331,6 +4331,28 @@ EINA_DEPRECATED EAPI void elm_bubble_corner_set(Evas_Object *obj, const char *co
|
|||
*/
|
||||
EINA_DEPRECATED EAPI const char *elm_bubble_corner_get(const Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* Enable or disable day selection
|
||||
*
|
||||
* @param obj The calendar object.
|
||||
* @param enabled @c EINA_TRUE to enable selection or @c EINA_FALSE to
|
||||
* disable it.
|
||||
*
|
||||
* @deprecated Use elm_calendar_day_selection_disabled_set()
|
||||
*/
|
||||
EINA_DEPRECATED EAPI void elm_calendar_day_selection_enabled_set(Evas_Object *obj, Eina_Bool enabled);
|
||||
|
||||
/**
|
||||
* Get a value whether day selection is enabled or not.
|
||||
*
|
||||
* @param obj The calendar object.
|
||||
* @return EINA_TRUE means day selection is enabled. EINA_FALSE indicates
|
||||
* it's disabled. If @p obj is NULL, EINA_FALSE is returned.
|
||||
*
|
||||
* @deprecated elm_calendar_day_selection_disabled_get()
|
||||
*/
|
||||
EINA_DEPRECATED EAPI Eina_Bool elm_calendar_day_selection_enabled_get(const Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue