Add getter for elm_radio

SVN revision: 54408
This commit is contained in:
Bruno Dilly 2010-11-10 14:10:08 +00:00
parent 0ddded2f0e
commit c1b147b3c7
3 changed files with 21 additions and 0 deletions

View File

@ -1694,6 +1694,7 @@ extern "C" {
EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj);
EAPI void elm_radio_group_add(Evas_Object *obj, Evas_Object *group);
EAPI void elm_radio_state_value_set(Evas_Object *obj, int value);
EAPI int elm_radio_state_value_get(const Evas_Object *obj);
EAPI void elm_radio_value_set(Evas_Object *obj, int value);
EAPI int elm_radio_value_get(const Evas_Object *obj);
EAPI void elm_radio_value_pointer_set(Evas_Object *obj, int *valuep);

View File

@ -485,6 +485,25 @@ elm_radio_state_value_set(Evas_Object *obj, int value)
else _state_set(obj, 0);
}
/**
* Get the integer value that this radio object represents
*
* This gets the value of the radio.
*
* @param obj The radio object
* @return The value used if this radio object is selected
*
* @ingroup Radio
*/
EAPI int
elm_radio_state_value_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) 0;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return 0;
return wd->value;
}
/**
* Set the value of the radio.
*

View File

@ -15,3 +15,4 @@ elm_widget_on_change_hook_set
elm_widget_on_show_region_hook_set
elm_widget_focus_region_hook_set
elm_widget_on_focus_region_hook_set
elm_radio_value_pointer_set