summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-11-02 17:26:12 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-11-02 17:28:48 +0900
commit225b70465158e4886d0150ece63190823c6a92d4 (patch)
tree1e1b9d8ec67a50dd1f6b3158ee265cbfb4b54948 /src/lib/elementary
parent83493bba73aa44b91467408c3e7789c4a05733e8 (diff)
Efl.Ui.Radio: remove value{} api
Efl.Ui.Nstate already implements value{}. @fix
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_radio.c32
-rw-r--r--src/lib/elementary/efl_ui_radio.eo17
-rw-r--r--src/lib/elementary/elm_radio_legacy.h23
3 files changed, 46 insertions, 26 deletions
diff --git a/src/lib/elementary/efl_ui_radio.c b/src/lib/elementary/efl_ui_radio.c
index c2edeb7b21..89d0578066 100644
--- a/src/lib/elementary/efl_ui_radio.c
+++ b/src/lib/elementary/efl_ui_radio.c
@@ -202,13 +202,6 @@ _access_state_cb(void *data EINA_UNUSED, Evas_Object *obj)
202 return strdup(E_("State: Off")); 202 return strdup(E_("State: Off"));
203} 203}
204 204
205EAPI Evas_Object *
206elm_radio_add(Evas_Object *parent)
207{
208 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
209 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added));
210}
211
212EOLIAN static Eo * 205EOLIAN static Eo *
213_efl_ui_radio_efl_object_constructor(Eo *obj, Efl_Ui_Radio_Data *pd) 206_efl_ui_radio_efl_object_constructor(Eo *obj, Efl_Ui_Radio_Data *pd)
214{ 207{
@@ -288,7 +281,7 @@ _efl_ui_radio_state_value_get(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd)
288} 281}
289 282
290EOLIAN static void 283EOLIAN static void
291_efl_ui_radio_value_set(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd, int value) 284_efl_ui_radio_efl_ui_nstate_value_set(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd, int value)
292{ 285{
293 if (value == sd->group->value) return; 286 if (value == sd->group->value) return;
294 sd->group->value = value; 287 sd->group->value = value;
@@ -297,7 +290,7 @@ _efl_ui_radio_value_set(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd, int value)
297} 290}
298 291
299EOLIAN static int 292EOLIAN static int
300_efl_ui_radio_value_get(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd) 293_efl_ui_radio_efl_ui_nstate_value_get(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd)
301{ 294{
302 return sd->group->value; 295 return sd->group->value;
303} 296}
@@ -384,3 +377,24 @@ ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
384 ELM_LAYOUT_TEXT_ALIASES_OPS(MY_CLASS_PFX) 377 ELM_LAYOUT_TEXT_ALIASES_OPS(MY_CLASS_PFX)
385 378
386#include "efl_ui_radio.eo.c" 379#include "efl_ui_radio.eo.c"
380
381/* Legacy APIs */
382
383EAPI Evas_Object *
384elm_radio_add(Evas_Object *parent)
385{
386 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
387 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added));
388}
389
390EAPI void
391elm_radio_value_set(Evas_Object *obj, int value)
392{
393 efl_ui_nstate_value_set(obj, value);
394}
395
396EAPI int
397elm_radio_value_get(const Evas_Object *obj)
398{
399 return efl_ui_nstate_value_get(obj);
400}
diff --git a/src/lib/elementary/efl_ui_radio.eo b/src/lib/elementary/efl_ui_radio.eo
index d3a3bfd35a..ff3f5752b3 100644
--- a/src/lib/elementary/efl_ui_radio.eo
+++ b/src/lib/elementary/efl_ui_radio.eo
@@ -20,22 +20,6 @@ class Efl.Ui.Radio (Efl.Ui.Check, Elm.Interface.Atspi_Widget_Action)
20 value: int; [[The value to use if this radio object is selected]] 20 value: int; [[The value to use if this radio object is selected]]
21 } 21 }
22 } 22 }
23 @property value {
24 set {
25 [[Set the value of the radio group.
26
27 This sets the value of the radio group and will also set the
28 value if pointed to, to the value supplied, but will not call
29 any callbacks.
30 ]]
31 }
32 get {
33 [[Get the value of the radio group]]
34 }
35 values {
36 value: int; [[The value to use for the group]]
37 }
38 }
39 @property value_pointer { 23 @property value_pointer {
40 set { 24 set {
41 [[Set a convenience pointer to a integer to change when radio group 25 [[Set a convenience pointer to a integer to change when radio group
@@ -83,6 +67,7 @@ class Efl.Ui.Radio (Efl.Ui.Check, Elm.Interface.Atspi_Widget_Action)
83 Elm.Widget.widget_event; 67 Elm.Widget.widget_event;
84 Efl.Access.state_set { get; } 68 Efl.Access.state_set { get; }
85 Elm.Interface.Atspi_Widget_Action.elm_actions { get; } 69 Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
70 Efl.Ui.Nstate.value { set; get; }
86 } 71 }
87 events { 72 events {
88 changed; [[Called when radio changed]] 73 changed; [[Called when radio changed]]
diff --git a/src/lib/elementary/elm_radio_legacy.h b/src/lib/elementary/elm_radio_legacy.h
index 67aa0184b2..b9a58db7df 100644
--- a/src/lib/elementary/elm_radio_legacy.h
+++ b/src/lib/elementary/elm_radio_legacy.h
@@ -8,4 +8,25 @@
8 */ 8 */
9EAPI Evas_Object *elm_radio_add(Evas_Object *parent); 9EAPI Evas_Object *elm_radio_add(Evas_Object *parent);
10 10
11#include "efl_ui_radio.eo.legacy.h" \ No newline at end of file 11/**
12 * @brief Set the value of the radio group.
13 *
14 * This sets the value of the radio group and will also set the value if
15 * pointed to, to the value supplied, but will not call any callbacks.
16 *
17 * @param[in] value The value to use for the group
18 *
19 * @ingroup Elm_Radio
20 */
21EAPI void elm_radio_value_set(Evas_Object *obj, int value);
22
23/**
24 * @brief Get the value of the radio group
25 *
26 * @return The value to use for the group
27 *
28 * @ingroup Elm_Radio
29 */
30EAPI int elm_radio_value_get(const Efl_Ui_Radio *obj);
31
32#include "efl_ui_radio.eo.legacy.h"