Add missing getters to elm_button

SVN revision: 53920
This commit is contained in:
Tiago Rezende Campos Falcao 2010-10-27 14:38:45 +00:00
parent db336b896e
commit 352893a5af
2 changed files with 55 additions and 1 deletions

View File

@ -599,8 +599,11 @@ extern "C" {
EAPI Evas_Object *elm_button_icon_get(const Evas_Object *obj);
EAPI Evas_Object *elm_button_icon_unset(Evas_Object *obj);
EAPI void elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on);
EAPI Eina_Bool elm_button_autorepeat_get(const Evas_Object *obj);
EAPI void elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t);
EAPI double elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj);
EAPI void elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t);
EAPI double elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj);
EAPI Evas_Object *elm_fileselector_button_add(Evas_Object *parent);
EAPI void elm_fileselector_button_label_set(Evas_Object *obj, const char *label);

View File

@ -467,6 +467,23 @@ elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on)
wd->repeating = EINA_FALSE;
}
/**
* Get if autorepeat event is on
*
* @param obj The button object
* @return If autorepeat is on
*
* @ingroup Button
*/
EAPI Eina_Bool
elm_button_autorepeat_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->autorepeat;
}
/**
* Set the initial timeout before the autorepeat event is generated
*
@ -490,6 +507,23 @@ elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t)
wd->ar_threshold = t;
}
/**
* Get the initial timeout before the autorepeat event is generated
*
* @param obj The button object
* @return Timeout
*
* @ingroup Button
*/
EAPI double
elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) 0.0;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return 0.0;
return wd->ar_threshold;
}
/**
* Set the interval between each generated autorepeat event
*
@ -498,7 +532,7 @@ elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t)
*
* @ingroup Button
*/
EAPI void
EAPI void
elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t)
{
ELM_CHECK_WIDTYPE(obj, widtype);
@ -509,3 +543,20 @@ elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t)
wd->ar_interval = t;
if ((wd->repeating) && (wd->timer)) ecore_timer_interval_set(wd->timer, t);
}
/**
* Get the interval between each generated autorepeat event
*
* @param obj The button object
* @return Interval
*
* @ingroup Button
*/
EAPI double
elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) 0.0;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return 0.0;
return wd->ar_interval;
}