summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2010-11-10 14:10:08 +0000
committerBruno Dilly <bdilly@profusion.mobi>2010-11-10 14:10:08 +0000
commit7db32fc0b558b0210cf189035a2ca922a03e8752 (patch)
tree043422112cf8e293fd0f3ee5f5df2975558b95f6
parent54d8cd0c9f532ecec2a5dadf610de25c7324ac96 (diff)
Add getter for elm_radio
SVN revision: 54408
-rw-r--r--src/lib/Elementary.h.in1
-rw-r--r--src/lib/elm_radio.c19
-rw-r--r--tests/test_setter_blacklist.txt1
3 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in
index a0a7c8d76..d0a28b4d9 100644
--- a/src/lib/Elementary.h.in
+++ b/src/lib/Elementary.h.in
@@ -1694,6 +1694,7 @@ extern "C" {
1694 EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj); 1694 EAPI Evas_Object *elm_radio_icon_unset(Evas_Object *obj);
1695 EAPI void elm_radio_group_add(Evas_Object *obj, Evas_Object *group); 1695 EAPI void elm_radio_group_add(Evas_Object *obj, Evas_Object *group);
1696 EAPI void elm_radio_state_value_set(Evas_Object *obj, int value); 1696 EAPI void elm_radio_state_value_set(Evas_Object *obj, int value);
1697 EAPI int elm_radio_state_value_get(const Evas_Object *obj);
1697 EAPI void elm_radio_value_set(Evas_Object *obj, int value); 1698 EAPI void elm_radio_value_set(Evas_Object *obj, int value);
1698 EAPI int elm_radio_value_get(const Evas_Object *obj); 1699 EAPI int elm_radio_value_get(const Evas_Object *obj);
1699 EAPI void elm_radio_value_pointer_set(Evas_Object *obj, int *valuep); 1700 EAPI void elm_radio_value_pointer_set(Evas_Object *obj, int *valuep);
diff --git a/src/lib/elm_radio.c b/src/lib/elm_radio.c
index e1781ed9f..acf837b24 100644
--- a/src/lib/elm_radio.c
+++ b/src/lib/elm_radio.c
@@ -486,6 +486,25 @@ elm_radio_state_value_set(Evas_Object *obj, int value)
486} 486}
487 487
488/** 488/**
489 * Get the integer value that this radio object represents
490 *
491 * This gets the value of the radio.
492 *
493 * @param obj The radio object
494 * @return The value used if this radio object is selected
495 *
496 * @ingroup Radio
497 */
498EAPI int
499elm_radio_state_value_get(const Evas_Object *obj)
500{
501 ELM_CHECK_WIDTYPE(obj, widtype) 0;
502 Widget_Data *wd = elm_widget_data_get(obj);
503 if (!wd) return 0;
504 return wd->value;
505}
506
507/**
489 * Set the value of the radio. 508 * Set the value of the radio.
490 * 509 *
491 * This sets the value of the radio group and will also set the value if 510 * This sets the value of the radio group and will also set the value if
diff --git a/tests/test_setter_blacklist.txt b/tests/test_setter_blacklist.txt
index 63f30063e..61e4501ff 100644
--- a/tests/test_setter_blacklist.txt
+++ b/tests/test_setter_blacklist.txt
@@ -15,3 +15,4 @@ elm_widget_on_change_hook_set
15elm_widget_on_show_region_hook_set 15elm_widget_on_show_region_hook_set
16elm_widget_focus_region_hook_set 16elm_widget_focus_region_hook_set
17elm_widget_on_focus_region_hook_set 17elm_widget_on_focus_region_hook_set
18elm_radio_value_pointer_set