summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/bin/elementary/test_bg.c98
-rw-r--r--src/bin/elementary/test_part_bg.c40
-rw-r--r--src/bin/elementary/test_ui_active_view.c4
-rw-r--r--src/bin/elementary/test_ui_box.c38
-rw-r--r--src/bin/elementary/test_ui_image.c103
-rw-r--r--src/bin/elementary/test_ui_pager.c4
-rw-r--r--src/bin/elementary/test_ui_pager_scroll.c81
-rw-r--r--src/bin/elementary/test_ui_panel.c22
-rw-r--r--src/bin/elementary/test_ui_tab_pager.c18
-rw-r--r--src/bin/elementary/test_ui_table.c16
-rw-r--r--src/bin/elementary/test_ui_textpath.c18
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c28
-rw-r--r--src/examples/elementary/radio_cxx_example_01.cc9
-rw-r--r--src/lib/elementary/Efl_Ui.h4
-rw-r--r--src/lib/elementary/Elementary.h4
-rw-r--r--src/lib/elementary/efl_ui_radio.c197
-rw-r--r--src/lib/elementary/efl_ui_radio_eo.legacy.c18
-rw-r--r--src/lib/elementary/efl_ui_radio_private.h2
-rw-r--r--src/lib/elementary/elm_check.h3
-rw-r--r--src/lib/elementary/elm_dayselector.c9
-rw-r--r--src/modules/elementary/prefs/elm_check.c7
21 files changed, 336 insertions, 387 deletions
diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index 5c74caf53e..fb8b4f5f33 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -375,9 +375,12 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
375static void 375static void
376_cb_radio_changed_scale_type(void *data, const Efl_Event *ev) 376_cb_radio_changed_scale_type(void *data, const Efl_Event *ev)
377{ 377{
378 Efl_Ui_Radio_Box *bx = efl_ui_widget_parent_get(ev->object);
378 Evas_Object *o_bg = data; 379 Evas_Object *o_bg = data;
380 int v = efl_ui_radio_group_selected_value_get(bx);
381 if (v == -1) v = 0;
379 382
380 efl_gfx_image_scale_type_set(o_bg, efl_ui_nstate_value_get(ev->object)); 383 efl_gfx_image_scale_type_set(o_bg, v);
381} 384}
382 385
383static void 386static void
@@ -402,7 +405,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
402{ 405{
403 Evas_Object *win; 406 Evas_Object *win;
404 Evas_Object *box, *hbox, *o_bg; 407 Evas_Object *box, *hbox, *o_bg;
405 Evas_Object *rd, *rdg; 408 Evas_Object *rd, *c;
406 char buf[PATH_MAX]; 409 char buf[PATH_MAX];
407 410
408 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, 411 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
@@ -427,59 +430,54 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
427 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE), 430 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
428 efl_pack(box, efl_added)); 431 efl_pack(box, efl_added));
429 432
430 hbox = efl_add(EFL_UI_BOX_CLASS, box, 433 hbox = efl_add(EFL_UI_RADIO_BOX_CLASS, box,
431 efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL), 434 efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL),
432 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0), 435 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0),
433 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE), 436 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
434 efl_pack(box, efl_added)); 437 efl_pack(box, efl_added));
435 438
436 rdg = rd = efl_add(EFL_UI_RADIO_CLASS, hbox, 439 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
437 efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FILL), 440 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_FILL);
438 efl_text_set(efl_added, "Fill"), 441 efl_text_set(rd, "Fill");
439 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0), 442 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
440 efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg), 443 efl_event_callback_add(rd, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
441 efl_pack(hbox, efl_added)); 444 efl_pack(hbox, rd);
442 445
443 rd = efl_add(EFL_UI_RADIO_CLASS, hbox, 446 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
444 efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_INSIDE), 447 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_FIT_INSIDE);
445 efl_ui_radio_group_add(efl_added, rdg), 448 efl_text_set(rd, "Fit Inside");
446 efl_text_set(efl_added, "Fit Inside"), 449 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
447 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0), 450 efl_event_callback_add(rd, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
448 efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg), 451 efl_pack(hbox, rd);
449 efl_pack(hbox, efl_added)); 452
450 453 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
451 454 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE);
452 rd = efl_add(EFL_UI_RADIO_CLASS, hbox, 455 efl_text_set(rd, "Fit Outside");
453 efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE), 456 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
454 efl_ui_radio_group_add(efl_added, rdg), 457 efl_event_callback_add(rd, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
455 efl_text_set(efl_added, "Fit Outside"), 458 efl_pack(hbox, rd);
456 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0), 459
457 efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg), 460 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
458 efl_pack(hbox, efl_added)); 461 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_NONE);
459 462 efl_text_set(rd, "None");
460 rd = efl_add(EFL_UI_RADIO_CLASS, hbox, 463 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
461 efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_NONE), 464 efl_event_callback_add(rd, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
462 efl_ui_radio_group_add(efl_added, rdg), 465 efl_pack(hbox, rd);
463 efl_text_set(efl_added, "None"), 466
464 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0), 467 rd = efl_add(EFL_UI_RADIO_CLASS, hbox);
465 efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg), 468 efl_ui_radio_state_value_set(rd, EFL_GFX_IMAGE_SCALE_TYPE_TILE);
466 efl_pack(hbox, efl_added)); 469 efl_text_set(rd, "Tile");
467 470 efl_gfx_hint_weight_set(rd, EFL_GFX_HINT_EXPAND, 0.0);
468 rd = efl_add(EFL_UI_RADIO_CLASS, hbox, 471 efl_event_callback_add(rd, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _cb_radio_changed_scale_type, o_bg);
469 efl_ui_radio_state_value_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_TILE), 472 efl_pack(hbox, rd);
470 efl_ui_radio_group_add(efl_added, rdg), 473
471 efl_text_set(efl_added, "Tile"), 474 efl_ui_radio_group_selected_value_set(hbox, EFL_GFX_IMAGE_SCALE_TYPE_FILL);
472 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0), 475
473 efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, _cb_radio_changed_scale_type, o_bg), 476 c = efl_add(EFL_UI_CHECK_CLASS, box);
474 efl_pack(hbox, efl_added)); 477 efl_text_set(c, "Bg Color");
475 478 efl_gfx_hint_weight_set(c, EFL_GFX_HINT_EXPAND, 0.0);
476 efl_ui_radio_group_value_set(rdg, EFL_GFX_IMAGE_SCALE_TYPE_FILL); 479 efl_event_callback_add(c, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _cb_check_changed_scale_type, o_bg);
477 480 efl_pack(box, c);
478 efl_add(EFL_UI_CHECK_CLASS, hbox,
479 efl_text_set(efl_added, "Bg Color"),
480 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.0),
481 efl_event_callback_add(efl_added, EFL_UI_CHECK_EVENT_CHANGED, _cb_check_changed_scale_type, o_bg),
482 efl_pack(hbox, efl_added));
483 481
484 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 200)); 482 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 200));
485} 483}
diff --git a/src/bin/elementary/test_part_bg.c b/src/bin/elementary/test_part_bg.c
index 6ab0d6ecc4..d297d2ae74 100644
--- a/src/bin/elementary/test_part_bg.c
+++ b/src/bin/elementary/test_part_bg.c
@@ -12,10 +12,10 @@ const Efl_Class *content_class[MAX_NUM_OF_CONTENT];
12static void 12static void
13_reset_cb(void *data, const Efl_Event *ev EINA_UNUSED) 13_reset_cb(void *data, const Efl_Event *ev EINA_UNUSED)
14{ 14{
15 Evas_Object *radio = data; 15 Efl_Ui_Radio_Group *radio = data;
16 Evas_Object *target; 16 Evas_Object *target;
17 17
18 radio = efl_ui_radio_selected_object_get(radio); 18 radio = efl_ui_radio_group_selected_object_get(radio);
19 target = evas_object_data_get(radio, "data"); 19 target = evas_object_data_get(radio, "data");
20 20
21 efl_gfx_color_set(efl_part(target, "background"), 0, 0, 0, 0); 21 efl_gfx_color_set(efl_part(target, "background"), 0, 0, 0, 0);
@@ -25,11 +25,11 @@ _reset_cb(void *data, const Efl_Event *ev EINA_UNUSED)
25static void 25static void
26_color_cb(void *data, const Efl_Event *ev EINA_UNUSED) 26_color_cb(void *data, const Efl_Event *ev EINA_UNUSED)
27{ 27{
28 Evas_Object *radio = data; 28 Efl_Ui_Radio_Group *radio = data;
29 Evas_Object *target; 29 Evas_Object *target;
30 static Eina_Bool i; 30 static Eina_Bool i;
31 31
32 radio = efl_ui_radio_selected_object_get(radio); 32 radio = efl_ui_radio_group_selected_object_get(radio);
33 target = evas_object_data_get(radio, "data"); 33 target = evas_object_data_get(radio, "data");
34 i ^= EINA_TRUE; 34 i ^= EINA_TRUE;
35 efl_gfx_color_set(efl_part(target, "background"), (i) ? 255 : 0, (i) ? 0 : 255, 0, 255); 35 efl_gfx_color_set(efl_part(target, "background"), (i) ? 255 : 0, (i) ? 0 : 255, 0, 255);
@@ -38,12 +38,12 @@ _color_cb(void *data, const Efl_Event *ev EINA_UNUSED)
38static void 38static void
39_scale_type_cb(void *data, const Efl_Event *ev EINA_UNUSED) 39_scale_type_cb(void *data, const Efl_Event *ev EINA_UNUSED)
40{ 40{
41 Evas_Object *radio = data; 41 Efl_Ui_Radio_Group *radio = data;
42 Evas_Object *target; 42 Evas_Object *target;
43 Efl_Gfx_Image_Scale_Type type; 43 Efl_Gfx_Image_Scale_Type type;
44 char buf[PATH_MAX]; 44 char buf[PATH_MAX];
45 45
46 radio = efl_ui_radio_selected_object_get(radio); 46 radio = efl_ui_radio_group_selected_object_get(radio);
47 target = evas_object_data_get(radio, "data"); 47 target = evas_object_data_get(radio, "data");
48 48
49 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 49 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
@@ -53,24 +53,28 @@ _scale_type_cb(void *data, const Efl_Event *ev EINA_UNUSED)
53 efl_gfx_image_scale_type_set(efl_part(target, "background"), type); 53 efl_gfx_image_scale_type_set(efl_part(target, "background"), type);
54} 54}
55 55
56static Evas_Object * 56static Efl_Ui_Radio_Group *
57_create_box_contents(Evas_Object *box) 57_create_box_contents(Evas_Object *box)
58{ 58{
59 Evas_Object *hbox; 59 Evas_Object *hbox;
60 Evas_Object *radio_group, *radio; 60 Evas_Object *radio_group, *radio;
61 Evas_Object *content; 61 Evas_Object *content;
62 Efl_Ui_Radio_Group *group;
62 char buf[PATH_MAX]; 63 char buf[PATH_MAX];
63 unsigned int i; 64 unsigned int i;
64 65
66 group = efl_new(EFL_UI_RADIO_GROUP_IMPL_CLASS, NULL);
67
65 hbox = efl_add(EFL_UI_BOX_CLASS, box, 68 hbox = efl_add(EFL_UI_BOX_CLASS, box,
66 efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL), 69 efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL),
67 efl_gfx_hint_weight_set(efl_added, 1, 1), 70 efl_gfx_hint_weight_set(efl_added, 1, 1),
68 efl_pack_end(box, efl_added)); 71 efl_pack_end(box, efl_added));
69 72
70 radio_group = radio = efl_add(EFL_UI_RADIO_CLASS, hbox, 73 radio_group = radio = efl_add(EFL_UI_RADIO_CLASS, hbox);
71 efl_pack_end(hbox, efl_added), 74 efl_gfx_hint_weight_set(radio, 0, 0);
72 efl_gfx_hint_weight_set(efl_added, 0, 0), 75 efl_ui_radio_state_value_set(radio, 0);
73 efl_ui_radio_state_value_set(efl_added, 0)); 76 efl_ui_radio_group_register(group, radio);
77 efl_pack_end(hbox, radio);
74 78
75 content = efl_add(EFL_UI_BOX_CLASS, hbox, 79 content = efl_add(EFL_UI_BOX_CLASS, hbox,
76 efl_pack_end(hbox, efl_added)); 80 efl_pack_end(hbox, efl_added));
@@ -89,11 +93,11 @@ _create_box_contents(Evas_Object *box)
89 efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL), 93 efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL),
90 efl_pack_end(box, efl_added)); 94 efl_pack_end(box, efl_added));
91 95
92 radio = efl_add(EFL_UI_RADIO_CLASS, hbox, 96 radio = efl_add(EFL_UI_RADIO_CLASS, hbox);
93 efl_ui_radio_group_add(efl_added, radio_group), 97 efl_ui_radio_state_value_set(radio, i + 1);
94 efl_pack_end(hbox, efl_added), 98 efl_gfx_hint_weight_set(radio, 0, 0);
95 efl_ui_radio_state_value_set(efl_added, i + 1), 99 efl_ui_radio_group_register(group, radio);
96 efl_gfx_hint_weight_set(efl_added, 0, 0)); 100 efl_pack_end(hbox, radio);
97 101
98 content = efl_add(content_class[i], hbox, 102 content = efl_add(content_class[i], hbox,
99 efl_pack_end(hbox, efl_added)); 103 efl_pack_end(hbox, efl_added));
@@ -110,7 +114,7 @@ _create_box_contents(Evas_Object *box)
110 evas_object_data_set(radio, "data", content); 114 evas_object_data_set(radio, "data", content);
111 } 115 }
112 116
113 efl_ui_radio_group_value_set(radio_group, 0); 117 efl_ui_radio_group_selected_value_set(group, 0);
114 118
115 return radio_group; 119 return radio_group;
116} 120}
@@ -121,7 +125,7 @@ test_part_background(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
121 Evas_Object *win; 125 Evas_Object *win;
122 Evas_Object *scr; 126 Evas_Object *scr;
123 Evas_Object *vbox, *hbox; 127 Evas_Object *vbox, *hbox;
124 Evas_Object *radio_group; 128 Efl_Ui_Radio_Group *radio_group;
125 Evas_Object *reset_btn, *color_btn, *scale_btn; 129 Evas_Object *reset_btn, *color_btn, *scale_btn;
126 130
127 content_class[0] = EFL_UI_CALENDAR_CLASS; 131 content_class[0] = EFL_UI_CALENDAR_CLASS;
diff --git a/src/bin/elementary/test_ui_active_view.c b/src/bin/elementary/test_ui_active_view.c
index 86e81e8015..38a79ea831 100644
--- a/src/bin/elementary/test_ui_active_view.c
+++ b/src/bin/elementary/test_ui_active_view.c
@@ -399,7 +399,7 @@ active_view_size(void *data,
399 size_params->active_view = params->active_view; 399 size_params->active_view = params->active_view;
400 size_params->params = params; 400 size_params->params = params;
401 401
402 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_CHANGED, width_check_cb, 402 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, width_check_cb,
403 size_params); 403 size_params);
404 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params); 404 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params);
405 405
@@ -440,7 +440,7 @@ active_view_size(void *data,
440 size_params->active_view = params->active_view; 440 size_params->active_view = params->active_view;
441 size_params->params = params; 441 size_params->params = params;
442 442
443 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_CHANGED, height_check_cb, 443 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, height_check_cb,
444 size_params); 444 size_params);
445 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params); 445 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params);
446 446
diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c
index 4c37b8789e..01414b9fb0 100644
--- a/src/bin/elementary/test_ui_box.c
+++ b/src/bin/elementary/test_ui_box.c
@@ -20,9 +20,9 @@ typedef enum {
20} Weight_Mode; 20} Weight_Mode;
21 21
22static void 22static void
23weights_cb(void *data, const Efl_Event *event) 23weights_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
24{ 24{
25 Weight_Mode mode = elm_radio_state_value_get(event->object); 25 Weight_Mode mode = elm_radio_state_value_get(obj);
26 26
27 switch (mode) 27 switch (mode)
28 { 28 {
@@ -138,9 +138,9 @@ alignv_btn_slider_cb(void *data, const Efl_Event *event)
138} 138}
139 139
140static void 140static void
141flow_check_cb(void *data, const Efl_Event *event) 141flow_check_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
142{ 142{
143 Eina_Bool chk = elm_check_selected_get(event->object); 143 Eina_Bool chk = elm_check_selected_get(obj);
144 Eina_List *list = NULL; 144 Eina_List *list = NULL;
145 Eina_Iterator *it; 145 Eina_Iterator *it;
146 Eo *box, *win, *sobj, *parent; 146 Eo *box, *win, *sobj, *parent;
@@ -167,17 +167,17 @@ flow_check_cb(void *data, const Efl_Event *event)
167} 167}
168 168
169static void 169static void
170horiz_check_cb(void *data, const Efl_Event *event) 170horiz_check_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
171{ 171{
172 Eina_Bool chk = elm_check_selected_get(event->object); 172 Eina_Bool chk = elm_check_selected_get(obj);
173 Eo *box = efl_key_wref_get(data, "box"); 173 Eo *box = efl_key_wref_get(data, "box");
174 efl_ui_layout_orientation_set(box, chk ? EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL : EFL_UI_LAYOUT_ORIENTATION_VERTICAL); 174 efl_ui_layout_orientation_set(box, chk ? EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL : EFL_UI_LAYOUT_ORIENTATION_VERTICAL);
175} 175}
176 176
177static void 177static void
178homo_check_cb(void *data, const Efl_Event *event) 178homo_check_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
179{ 179{
180 Eina_Bool chk = elm_check_selected_get(event->object); 180 Eina_Bool chk = elm_check_selected_get(obj);
181 Eo *box = efl_key_wref_get(data, "box"); 181 Eo *box = efl_key_wref_get(data, "box");
182 efl_ui_box_homogeneous_set(box, chk); 182 efl_ui_box_homogeneous_set(box, chk);
183} 183}
@@ -210,12 +210,12 @@ _custom_layout_update(Eo *pack, const void *data EINA_UNUSED)
210} 210}
211 211
212static void 212static void
213custom_check_cb(void *data, const Efl_Event *event) 213custom_check_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
214{ 214{
215 EFL_OPS_DEFINE(custom_layout_ops, 215 EFL_OPS_DEFINE(custom_layout_ops,
216 EFL_OBJECT_OP_FUNC(efl_pack_layout_update, _custom_layout_update)); 216 EFL_OBJECT_OP_FUNC(efl_pack_layout_update, _custom_layout_update));
217 217
218 Eina_Bool chk = elm_check_selected_get(event->object); 218 Eina_Bool chk = elm_check_selected_get(obj);
219 Eo *box, *win = data; 219 Eo *box, *win = data;
220 220
221 box = efl_key_wref_get(win, "box"); 221 box = efl_key_wref_get(win, "box");
@@ -268,7 +268,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
268 268
269 chk = o = elm_radio_add(win); 269 chk = o = elm_radio_add(win);
270 elm_object_text_set(o, "No weight"); 270 elm_object_text_set(o, "No weight");
271 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win); 271 evas_object_smart_callback_add(o, "changed", weights_cb, win);
272 efl_gfx_hint_align_set(o, 0, 0.5); 272 efl_gfx_hint_align_set(o, 0, 0.5);
273 elm_radio_state_value_set(o, NONE); 273 elm_radio_state_value_set(o, NONE);
274 efl_pack(bx, o); 274 efl_pack(bx, o);
@@ -276,7 +276,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
276 276
277 o = elm_radio_add(win); 277 o = elm_radio_add(win);
278 elm_object_text_set(o, "No weight + box fill"); 278 elm_object_text_set(o, "No weight + box fill");
279 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win); 279 evas_object_smart_callback_add(o, "changed", weights_cb, win);
280 efl_gfx_hint_align_set(o, 0, 0.5); 280 efl_gfx_hint_align_set(o, 0, 0.5);
281 elm_radio_state_value_set(o, NONE_BUT_FILL); 281 elm_radio_state_value_set(o, NONE_BUT_FILL);
282 elm_radio_group_add(o, chk); 282 elm_radio_group_add(o, chk);
@@ -285,7 +285,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
285 285
286 o = elm_radio_add(win); 286 o = elm_radio_add(win);
287 elm_object_text_set(o, "Equal weights"); 287 elm_object_text_set(o, "Equal weights");
288 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win); 288 evas_object_smart_callback_add(o, "changed", weights_cb, win);
289 efl_gfx_hint_align_set(o, 0, 0.5); 289 efl_gfx_hint_align_set(o, 0, 0.5);
290 elm_radio_state_value_set(o, EQUAL); 290 elm_radio_state_value_set(o, EQUAL);
291 elm_radio_group_add(o, chk); 291 elm_radio_group_add(o, chk);
@@ -294,7 +294,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
294 294
295 o = elm_radio_add(win); 295 o = elm_radio_add(win);
296 elm_object_text_set(o, "One weight only"); 296 elm_object_text_set(o, "One weight only");
297 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win); 297 evas_object_smart_callback_add(o, "changed", weights_cb, win);
298 efl_gfx_hint_align_set(o, 0, 0.5); 298 efl_gfx_hint_align_set(o, 0, 0.5);
299 elm_radio_state_value_set(o, ONE); 299 elm_radio_state_value_set(o, ONE);
300 elm_radio_group_add(o, chk); 300 elm_radio_group_add(o, chk);
@@ -303,7 +303,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
303 303
304 o = elm_radio_add(win); 304 o = elm_radio_add(win);
305 elm_object_text_set(o, "Two weights"); 305 elm_object_text_set(o, "Two weights");
306 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, win); 306 evas_object_smart_callback_add(o, "changed", weights_cb, win);
307 efl_gfx_hint_align_set(o, 0, 0.5); 307 efl_gfx_hint_align_set(o, 0, 0.5);
308 elm_radio_state_value_set(o, TWO); 308 elm_radio_state_value_set(o, TWO);
309 elm_radio_group_add(o, chk); 309 elm_radio_group_add(o, chk);
@@ -329,7 +329,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
329 o = elm_check_add(win); 329 o = elm_check_add(win);
330 elm_check_selected_set(o, 0); 330 elm_check_selected_set(o, 0);
331 elm_object_text_set(o, "Flow"); 331 elm_object_text_set(o, "Flow");
332 efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, flow_check_cb, win); 332 evas_object_smart_callback_add(o, "changed", flow_check_cb, win);
333 efl_gfx_hint_align_set(o, 0, 0); 333 efl_gfx_hint_align_set(o, 0, 0);
334 efl_pack(bx, o); 334 efl_pack(bx, o);
335 efl_gfx_entity_visible_set(o, 1); 335 efl_gfx_entity_visible_set(o, 1);
@@ -337,7 +337,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
337 o = elm_check_add(win); 337 o = elm_check_add(win);
338 elm_check_selected_set(o, 1); 338 elm_check_selected_set(o, 1);
339 elm_object_text_set(o, "Horizontal"); 339 elm_object_text_set(o, "Horizontal");
340 efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, horiz_check_cb, win); 340 evas_object_smart_callback_add(o, "changed", horiz_check_cb, win);
341 efl_gfx_hint_align_set(o, 0, 0); 341 efl_gfx_hint_align_set(o, 0, 0);
342 efl_pack(bx, o); 342 efl_pack(bx, o);
343 efl_gfx_entity_visible_set(o, 1); 343 efl_gfx_entity_visible_set(o, 1);
@@ -345,7 +345,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
345 o = elm_check_add(win); 345 o = elm_check_add(win);
346 elm_check_selected_set(o, 0); 346 elm_check_selected_set(o, 0);
347 elm_object_text_set(o, "Homogenous"); 347 elm_object_text_set(o, "Homogenous");
348 efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, homo_check_cb, win); 348 evas_object_smart_callback_add(o, "changed", homo_check_cb, win);
349 efl_gfx_hint_align_set(o, 0, 0); 349 efl_gfx_hint_align_set(o, 0, 0);
350 efl_pack(bx, o); 350 efl_pack(bx, o);
351 efl_gfx_entity_visible_set(o, 1); 351 efl_gfx_entity_visible_set(o, 1);
@@ -353,7 +353,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
353 o = elm_check_add(win); 353 o = elm_check_add(win);
354 elm_check_selected_set(o, 0); 354 elm_check_selected_set(o, 0);
355 elm_object_text_set(o, "Custom layout"); 355 elm_object_text_set(o, "Custom layout");
356 efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, custom_check_cb, win); 356 evas_object_smart_callback_add(o, "changed", custom_check_cb, win);
357 efl_gfx_hint_align_set(o, 0, 0); 357 efl_gfx_hint_align_set(o, 0, 0);
358 efl_gfx_hint_weight_set(o, 0, 1); 358 efl_gfx_hint_weight_set(o, 0, 1);
359 efl_pack(bx, o); 359 efl_pack(bx, o);
diff --git a/src/bin/elementary/test_ui_image.c b/src/bin/elementary/test_ui_image.c
index 38d732f864..8491a7f4cd 100644
--- a/src/bin/elementary/test_ui_image.c
+++ b/src/bin/elementary/test_ui_image.c
@@ -50,8 +50,9 @@ my_im_ch(void *data, const Efl_Event *ev EINA_UNUSED)
50{ 50{
51 Eo *win = data; 51 Eo *win = data;
52 Eo *im = efl_key_data_get(win, "im"); 52 Eo *im = efl_key_data_get(win, "im");
53 Eo *rdg = efl_key_data_get(win, "rdg"); 53
54 Efl_Gfx_Image_Orientation v = efl_ui_radio_state_value_get(efl_ui_radio_selected_object_get(rdg)); 54 Efl_Gfx_Image_Orientation v = efl_ui_radio_group_selected_value_get(ev->object);
55 if (((int)v) == -1) v = 0;
55 56
56 efl_gfx_image_orientation_set(im, v); 57 efl_gfx_image_orientation_set(im, v);
57 fprintf(stderr, "Set %i and got %i\n", 58 fprintf(stderr, "Set %i and got %i\n",
@@ -61,17 +62,18 @@ my_im_ch(void *data, const Efl_Event *ev EINA_UNUSED)
61void 62void
62test_ui_image(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED) 63test_ui_image(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
63{ 64{
64 Eo *win, *box, *im, *rd, *rdg = NULL; 65 Eo *win, *box, *im, *rd;
65 int i; 66 int i;
66 67
67 win = win_add("image test", "Image Test"); 68 win = win_add("image test", "Image Test");
68 69
69 box = efl_add(EFL_UI_BOX_CLASS, win); 70 box = efl_add(EFL_UI_RADIO_BOX_CLASS, win);
70 efl_gfx_hint_weight_set(box, 1.0, 1.0); 71 efl_gfx_hint_weight_set(box, 1.0, 1.0);
71 efl_content_set(win, box); 72 efl_content_set(win, box);
73 efl_key_data_set(win, "rdg", box);
72 74
73 im = img_add(win, "/images/logo.png"); 75 im = img_add(win, "/images/logo.png");
74 efl_pack(box, im); 76 efl_content_set(win, im);
75 77
76 for (i = 0; images_orient[i].name; ++i) 78 for (i = 0; images_orient[i].name; ++i)
77 { 79 {
@@ -81,19 +83,10 @@ test_ui_image(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EIN
81 efl_ui_radio_state_value_set(rd, images_orient[i].orient); 83 efl_ui_radio_state_value_set(rd, images_orient[i].orient);
82 efl_text_set(rd, images_orient[i].name); 84 efl_text_set(rd, images_orient[i].name);
83 efl_pack(box, rd); 85 efl_pack(box, rd);
84 efl_event_callback_add(rd, EFL_UI_RADIO_EVENT_CHANGED, my_im_ch, win);
85 if (!rdg)
86 {
87 rdg = rd;
88 efl_key_data_set(win, "rdg", rdg);
89 }
90 else
91 {
92 efl_ui_radio_group_add(rd, rdg);
93 }
94 } 86 }
95 87
96 efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 480)); 88 efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 480));
89 efl_event_callback_add(box, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, my_im_ch, win);
97} 90}
98 91
99 92
@@ -130,8 +123,8 @@ my_im_scale_ch(void *data, const Efl_Event *ev EINA_UNUSED)
130{ 123{
131 Eo *win = data; 124 Eo *win = data;
132 Eo *im = efl_key_data_get(win, "im"); 125 Eo *im = efl_key_data_get(win, "im");
133 Eo *rdg = efl_key_data_get(win, "rdg"); 126 int v = efl_ui_radio_group_selected_value_get(ev->object);
134 int v = efl_ui_radio_state_value_get(efl_ui_radio_selected_object_get(rdg)); 127 if (v == -1) v = 0;
135 128
136 efl_gfx_image_scale_type_set(im, images_scale_type[v].scale_type); 129 efl_gfx_image_scale_type_set(im, images_scale_type[v].scale_type);
137 fprintf(stderr, "Set %d[%s] and got %d\n", 130 fprintf(stderr, "Set %d[%s] and got %d\n",
@@ -141,14 +134,15 @@ my_im_scale_ch(void *data, const Efl_Event *ev EINA_UNUSED)
141void 134void
142test_ui_image_scale_type(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED) 135test_ui_image_scale_type(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
143{ 136{
144 Eo *win, *box, *im, *rd, *rdg = NULL; 137 Eo *win, *box, *im, *rd;
145 int i; 138 int i;
146 139
147 win = win_add("image test scale type", "Image Test Scale Type"); 140 win = win_add("image test scale type", "Image Test Scale Type");
148 141
149 box = efl_add(EFL_UI_BOX_CLASS, win); 142 box = efl_add(EFL_UI_RADIO_BOX_CLASS, win);
150 efl_gfx_hint_weight_set(box, 1.0, 1.0); 143 efl_gfx_hint_weight_set(box, 1.0, 1.0);
151 efl_content_set(win, box); 144 efl_content_set(win, box);
145 efl_key_data_set(win, "rdg", box);
152 146
153 im = efl_add(EFL_UI_IMAGE_CLASS, win); 147 im = efl_add(EFL_UI_IMAGE_CLASS, win);
154 char buf[PATH_MAX]; 148 char buf[PATH_MAX];
@@ -156,7 +150,7 @@ test_ui_image_scale_type(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *eve
156 elm_image_file_set(im, buf, NULL); 150 elm_image_file_set(im, buf, NULL);
157 efl_gfx_hint_weight_set(im, 1.0, 1.0); 151 efl_gfx_hint_weight_set(im, 1.0, 1.0);
158 efl_gfx_hint_fill_set(im, EINA_TRUE, EINA_TRUE); 152 efl_gfx_hint_fill_set(im, EINA_TRUE, EINA_TRUE);
159 efl_pack(box, im); 153 efl_content_set(win, im);
160 154
161 efl_key_data_set(win, "im", im); 155 efl_key_data_set(win, "im", im);
162 156
@@ -168,18 +162,8 @@ test_ui_image_scale_type(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *eve
168 efl_ui_radio_state_value_set(rd, i); 162 efl_ui_radio_state_value_set(rd, i);
169 efl_text_set(rd, images_scale_type[i].name); 163 efl_text_set(rd, images_scale_type[i].name);
170 efl_pack(box, rd); 164 efl_pack(box, rd);
171 efl_event_callback_add(rd, EFL_UI_RADIO_EVENT_CHANGED, my_im_scale_ch, win);
172 if (!rdg)
173 {
174 rdg = rd;
175 efl_key_data_set(win, "rdg", rdg);
176 }
177 else
178 {
179 efl_ui_radio_group_add(rd, rdg);
180 }
181 } 165 }
182 166 efl_event_callback_add(box, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, my_im_scale_ch, win);
183 efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 480)); 167 efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 480));
184} 168}
185 169
@@ -307,7 +291,7 @@ _url_activate_cb(void *data, Eo *obj, void *event_info EINA_UNUSED)
307void 291void
308test_remote_ui_image(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED) 292test_remote_ui_image(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
309{ 293{
310 Eo *win, *box, *im, *rd, *rdg = NULL, *box2, *o; 294 Eo *win, *box, *im, *rd, *box2, *o;
311 int i; 295 int i;
312 296
313 win = win_add("image test", "Image Test"); 297 win = win_add("image test", "Image Test");
@@ -332,6 +316,12 @@ test_remote_ui_image(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_i
332 evas_object_smart_callback_add(im, "download,done", _download_done_cb, win); 316 evas_object_smart_callback_add(im, "download,done", _download_done_cb, win);
333 evas_object_smart_callback_add(im, "download,error", _download_error_cb, win); 317 evas_object_smart_callback_add(im, "download,error", _download_error_cb, win);
334 318
319 box2 = efl_add(EFL_UI_RADIO_BOX_CLASS, win);
320 efl_gfx_hint_weight_set(box2, 1.0, 1.0);
321 efl_content_set(win, box2);
322 efl_key_data_set(win, "rdg", box2);
323 efl_pack(box, box2);
324
335 for (i = 0; images_orient[i].name; ++i) 325 for (i = 0; images_orient[i].name; ++i)
336 { 326 {
337 rd = efl_add(EFL_UI_RADIO_CLASS, win); 327 rd = efl_add(EFL_UI_RADIO_CLASS, win);
@@ -339,23 +329,15 @@ test_remote_ui_image(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_i
339 efl_gfx_hint_weight_set(rd, 1.0, 0.0); 329 efl_gfx_hint_weight_set(rd, 1.0, 0.0);
340 efl_ui_radio_state_value_set(rd, images_orient[i].orient); 330 efl_ui_radio_state_value_set(rd, images_orient[i].orient);
341 efl_text_set(rd, images_orient[i].name); 331 efl_text_set(rd, images_orient[i].name);
342 efl_pack(box, rd); 332 efl_pack(box2, rd);
343 efl_event_callback_add(rd, EFL_UI_RADIO_EVENT_CHANGED, my_im_ch, win);
344 if (!rdg)
345 {
346 rdg = rd;
347 efl_key_data_set(win, "rdg", rdg);
348 }
349 else
350 {
351 efl_ui_radio_group_add(rd, rdg);
352 }
353 } 333 }
334 efl_event_callback_add(box2, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, my_im_ch, win);
354 335
355 box2 = o = efl_add(EFL_UI_BOX_CLASS, box); 336 box2 = o = efl_add(EFL_UI_BOX_CLASS, box);
356 efl_ui_layout_orientation_set(o, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL); 337 efl_ui_layout_orientation_set(o, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
357 efl_gfx_hint_weight_set(o, 1.0, 0); 338 efl_gfx_hint_weight_set(o, 1.0, 0);
358 efl_gfx_hint_fill_set(o, EINA_TRUE, EINA_TRUE); 339 efl_gfx_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
340 efl_pack(box, box2);
359 341
360 o = efl_add(EFL_UI_TEXT_CLASS, box2, 342 o = efl_add(EFL_UI_TEXT_CLASS, box2,
361 efl_text_interactive_editable_set(efl_added, EINA_FALSE) 343 efl_text_interactive_editable_set(efl_added, EINA_FALSE)
@@ -374,7 +356,6 @@ test_remote_ui_image(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_i
374 evas_object_show(o); 356 evas_object_show(o);
375 efl_pack(box2, o); 357 efl_pack(box2, o);
376 358
377 efl_pack(box, box2);
378 359
379 // set file now 360 // set file now
380 _url_activate_cb(win, o, NULL); 361 _url_activate_cb(win, o, NULL);
@@ -567,19 +548,17 @@ test_load_ui_image(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_inf
567 ); 548 );
568 efl_pack(hbox, label); 549 efl_pack(hbox, label);
569 550
570 chk1 = efl_add(EFL_UI_CHECK_CLASS, hbox, 551 chk1 = efl_add(EFL_UI_CHECK_CLASS, hbox);
571 efl_text_set(efl_added, "Async file open"), 552 efl_text_set(chk1, "Async file open");
572 efl_gfx_hint_weight_set(efl_added, 0.0, 0.0), 553 efl_gfx_hint_weight_set(chk1, 0.0, 0.0);
573 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE) 554 efl_gfx_hint_fill_set(chk1, EINA_TRUE, EINA_FALSE);
574 );
575 efl_pack(hbox, chk1); 555 efl_pack(hbox, chk1);
576 efl_key_data_set(win, "chk1", chk1); 556 efl_key_data_set(win, "chk1", chk1);
577 557
578 chk2 = efl_add(EFL_UI_CHECK_CLASS, hbox, 558 chk2 = efl_add(EFL_UI_CHECK_CLASS, hbox);
579 efl_text_set(efl_added, "Disable preload"), 559 efl_text_set(chk2, "Disable preload");
580 efl_gfx_hint_weight_set(efl_added, 0.0, 0.0), 560 efl_gfx_hint_weight_set(chk2, 0.0, 0.0);
581 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE) 561 efl_gfx_hint_fill_set(chk2, EINA_TRUE, EINA_FALSE);
582 );
583 efl_pack(hbox, chk2); 562 efl_pack(hbox, chk2);
584 efl_key_data_set(win, "chk2", chk2); 563 efl_key_data_set(win, "chk2", chk2);
585 } 564 }
@@ -614,7 +593,8 @@ _cb_prescale_radio_changed(void *data, const Efl_Event *ev)
614{ 593{
615 Eo *o_bg = data; 594 Eo *o_bg = data;
616 int size; 595 int size;
617 size = efl_ui_radio_state_value_get(efl_ui_radio_selected_object_get(ev->object)); 596 size = efl_ui_radio_group_selected_value_get(ev->object);
597 if (size == -1) size = 0;
618 //FIXME 598 //FIXME
619 elm_image_prescale_set(o_bg, size); 599 elm_image_prescale_set(o_bg, size);
620} 600}
@@ -624,7 +604,7 @@ test_ui_image_prescale(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_
624{ 604{
625 Eo *win, *im; 605 Eo *win, *im;
626 Eo *box, *hbox; 606 Eo *box, *hbox;
627 Eo *rd, *rdg; 607 Eo *rd;
628 608
629 win = win_add("image-prescale", "Image Prescale Test"); 609 win = win_add("image-prescale", "Image Prescale Test");
630 610
@@ -634,7 +614,7 @@ test_ui_image_prescale(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_
634 im = img_add(win, "/images/plant_01.jpg"); 614 im = img_add(win, "/images/plant_01.jpg");
635 efl_pack(box, im); 615 efl_pack(box, im);
636 616
637 hbox = efl_add(EFL_UI_BOX_CLASS, win); 617 hbox = efl_add(EFL_UI_RADIO_BOX_CLASS, win);
638 efl_ui_layout_orientation_set(hbox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL); 618 efl_ui_layout_orientation_set(hbox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
639 efl_gfx_hint_weight_set(hbox, 1.0, 1.0); 619 efl_gfx_hint_weight_set(hbox, 1.0, 1.0);
640 efl_gfx_hint_fill_set(hbox, EINA_TRUE, EINA_TRUE); 620 efl_gfx_hint_fill_set(hbox, EINA_TRUE, EINA_TRUE);
@@ -643,27 +623,22 @@ test_ui_image_prescale(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_
643 efl_ui_radio_state_value_set(rd, 50); 623 efl_ui_radio_state_value_set(rd, 50);
644 efl_text_set(rd, "50"); 624 efl_text_set(rd, "50");
645 efl_gfx_hint_weight_set(rd, 1.0, 1.0); 625 efl_gfx_hint_weight_set(rd, 1.0, 1.0);
646 efl_event_callback_add(rd, EFL_UI_RADIO_EVENT_CHANGED, _cb_prescale_radio_changed, im);
647 efl_pack(hbox, rd); 626 efl_pack(hbox, rd);
648 rdg = rd;
649 627
650 rd = efl_add(EFL_UI_RADIO_CLASS, win); 628 rd = efl_add(EFL_UI_RADIO_CLASS, win);
651 efl_ui_radio_state_value_set(rd, 100); 629 efl_ui_radio_state_value_set(rd, 100);
652 efl_ui_radio_group_add(rd, rdg);
653 efl_text_set(rd, "100"); 630 efl_text_set(rd, "100");
654 efl_gfx_hint_weight_set(rd, 1.0, 1.0); 631 efl_gfx_hint_weight_set(rd, 1.0, 1.0);
655 efl_event_callback_add(rd, EFL_UI_RADIO_EVENT_CHANGED, _cb_prescale_radio_changed, im);
656 efl_pack(hbox, rd); 632 efl_pack(hbox, rd);
657 633
658 rd = efl_add(EFL_UI_RADIO_CLASS, win); 634 rd = efl_add(EFL_UI_RADIO_CLASS, win);
659 efl_ui_radio_state_value_set(rd, 200); 635 efl_ui_radio_state_value_set(rd, 200);
660 efl_ui_radio_group_add(rd, rdg);
661 efl_text_set(rd, "200"); 636 efl_text_set(rd, "200");
662 efl_gfx_hint_weight_set(rd, 1.0, 1.0); 637 efl_gfx_hint_weight_set(rd, 1.0, 1.0);
663 efl_event_callback_add(rd, EFL_UI_RADIO_EVENT_CHANGED, _cb_prescale_radio_changed, im);
664 efl_pack(hbox, rd); 638 efl_pack(hbox, rd);
639 efl_event_callback_add(hbox, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, _cb_prescale_radio_changed, im);
665 640
666 elm_radio_value_set(rdg, 200); 641 efl_ui_radio_group_selected_object_set(hbox, rd);
667 642
668 efl_pack(box, hbox); 643 efl_pack(box, hbox);
669 644
diff --git a/src/bin/elementary/test_ui_pager.c b/src/bin/elementary/test_ui_pager.c
index 5fba212e53..6fcf48f763 100644
--- a/src/bin/elementary/test_ui_pager.c
+++ b/src/bin/elementary/test_ui_pager.c
@@ -375,7 +375,7 @@ static void page_size_cb(void *data,
375 size_params->pager = params->pager; 375 size_params->pager = params->pager;
376 size_params->params = params; 376 size_params->params = params;
377 377
378 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_CHANGED, width_check_cb, 378 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, width_check_cb,
379 size_params); 379 size_params);
380 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params); 380 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params);
381 381
@@ -416,7 +416,7 @@ static void page_size_cb(void *data,
416 size_params->pager = params->pager; 416 size_params->pager = params->pager;
417 size_params->params = params; 417 size_params->params = params;
418 418
419 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_CHANGED, height_check_cb, 419 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, height_check_cb,
420 size_params); 420 size_params);
421 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params); 421 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params);
422 422
diff --git a/src/bin/elementary/test_ui_pager_scroll.c b/src/bin/elementary/test_ui_pager_scroll.c
index 9d1857ec9e..6e6c7d1f49 100644
--- a/src/bin/elementary/test_ui_pager_scroll.c
+++ b/src/bin/elementary/test_ui_pager_scroll.c
@@ -359,7 +359,7 @@ static void next_block_check_cb(void *data, const Efl_Event *ev)
359static void loop_radio_cb(void *data, const Efl_Event *ev) 359static void loop_radio_cb(void *data, const Efl_Event *ev)
360{ 360{
361 Eo *pager = data; 361 Eo *pager = data;
362 int state = efl_ui_radio_group_value_get(ev->object); 362 int state = efl_ui_radio_group_selected_value_get(efl_ui_widget_parent_get(ev->object));
363 363
364 efl_ui_pager_loop_mode_set(pager, state); 364 efl_ui_pager_loop_mode_set(pager, state);
365} 365}
@@ -409,8 +409,8 @@ static void page_size_cb(void *data,
409 inbox = efl_add(EFL_UI_BOX_CLASS, fr, 409 inbox = efl_add(EFL_UI_BOX_CLASS, fr,
410 efl_content_set(fr, efl_added)); 410 efl_content_set(fr, efl_added));
411 411
412 ck = elm_check_add(inbox); 412 ck = efl_add(EFL_UI_CHECK_CLASS, inbox);
413 elm_object_text_set(ck, "Fill"); 413 efl_text_set(ck, "Fill");
414 efl_pack_end(inbox, ck); 414 efl_pack_end(inbox, ck);
415 efl_gfx_entity_visible_set(ck, 1); 415 efl_gfx_entity_visible_set(ck, 1);
416 416
@@ -429,7 +429,7 @@ static void page_size_cb(void *data,
429 size_params->pager = params->pager; 429 size_params->pager = params->pager;
430 size_params->params = params; 430 size_params->params = params;
431 431
432 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_CHANGED, width_check_cb, 432 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, width_check_cb,
433 size_params); 433 size_params);
434 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params); 434 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params);
435 435
@@ -450,8 +450,8 @@ static void page_size_cb(void *data,
450 inbox = efl_add(EFL_UI_BOX_CLASS, fr, 450 inbox = efl_add(EFL_UI_BOX_CLASS, fr,
451 efl_content_set(fr, efl_added)); 451 efl_content_set(fr, efl_added));
452 452
453 ck = elm_check_add(inbox); 453 ck = efl_add(EFL_UI_CHECK_CLASS, inbox);
454 elm_object_text_set(ck, "Fill"); 454 efl_text_set(ck, "Fill");
455 efl_pack_end(inbox, ck); 455 efl_pack_end(inbox, ck);
456 efl_gfx_entity_visible_set(ck, 1); 456 efl_gfx_entity_visible_set(ck, 1);
457 457
@@ -470,7 +470,7 @@ static void page_size_cb(void *data,
470 size_params->pager = params->pager; 470 size_params->pager = params->pager;
471 size_params->params = params; 471 size_params->params = params;
472 472
473 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_CHANGED, height_check_cb, 473 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, height_check_cb,
474 size_params); 474 size_params);
475 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params); 475 efl_event_callback_add(ck, EFL_EVENT_DEL, check_del_cb, size_params);
476 476
@@ -778,7 +778,7 @@ static void scroll_block_cb(void *data,
778 Params *params = (Params *)data; 778 Params *params = (Params *)data;
779 Evas_Object *navi = params->navi; 779 Evas_Object *navi = params->navi;
780 Eo *pager = params->pager; 780 Eo *pager = params->pager;
781 Eo *btn, *box; 781 Eo *btn, *box, *c;
782 Eina_Bool prev, next; 782 Eina_Bool prev, next;
783 783
784 btn = efl_add(EFL_UI_BUTTON_CLASS, navi, 784 btn = efl_add(EFL_UI_BUTTON_CLASS, navi,
@@ -793,21 +793,21 @@ static void scroll_block_cb(void *data,
793 793
794 efl_ui_pager_scroll_block_get(pager, &prev, &next); 794 efl_ui_pager_scroll_block_get(pager, &prev, &next);
795 795
796 efl_add(EFL_UI_CHECK_CLASS, box, 796 c = efl_add(EFL_UI_CHECK_CLASS, box);
797 efl_ui_widget_style_set(efl_added, "toggle"), 797 efl_ui_widget_style_set(c, "toggle");
798 efl_text_set(efl_added, "Prev Block"), 798 efl_text_set(c, "Prev Block");
799 efl_ui_check_selected_set(efl_added, prev), 799 efl_ui_check_selected_set(c, prev);
800 efl_event_callback_add(efl_added, EFL_UI_CHECK_EVENT_CHANGED, 800 efl_event_callback_add(c, EFL_UI_CHECK_EVENT_SELECTED_CHANGED,
801 prev_block_check_cb, pager), 801 prev_block_check_cb, pager);
802 efl_pack_end(box, efl_added)); 802 efl_pack_end(box, c);
803 803
804 efl_add(EFL_UI_CHECK_CLASS, box, 804 c = efl_add(EFL_UI_CHECK_CLASS, box);
805 efl_ui_widget_style_set(efl_added, "toggle"), 805 efl_ui_widget_style_set(c, "toggle");
806 efl_text_set(efl_added, "Next Block"), 806 efl_text_set(c, "Next Block");
807 efl_ui_check_selected_set(efl_added, next), 807 efl_ui_check_selected_set(c, next);
808 efl_event_callback_add(efl_added, EFL_UI_CHECK_EVENT_CHANGED, 808 efl_event_callback_add(c, EFL_UI_CHECK_EVENT_SELECTED_CHANGED,
809 next_block_check_cb, pager), 809 next_block_check_cb, pager);
810 efl_pack_end(box, efl_added)); 810 efl_pack_end(box, c);
811} 811}
812 812
813static void loop_cb(void *data EINA_UNUSED, 813static void loop_cb(void *data EINA_UNUSED,
@@ -825,31 +825,30 @@ static void loop_cb(void *data EINA_UNUSED,
825 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, 825 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
826 back_btn_cb, navi)); 826 back_btn_cb, navi));
827 827
828 box = efl_add(EFL_UI_BOX_CLASS, navi, 828 box = efl_add(EFL_UI_RADIO_BOX_CLASS, navi,
829 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE), 829 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
830 elm_naviframe_item_push(navi, "Loop", btn, NULL, 830 elm_naviframe_item_push(navi, "Loop", btn, NULL,
831 efl_added, NULL)); 831 efl_added, NULL));
832 832
833 rd = efl_add(EFL_UI_RADIO_CLASS, box, 833 rd = efl_add(EFL_UI_RADIO_CLASS, box);
834 efl_ui_radio_state_value_set(efl_added, EFL_UI_PAGER_LOOP_DISABLED), 834 efl_ui_radio_state_value_set(rd, EFL_UI_PAGER_LOOP_DISABLED);
835 efl_text_set(efl_added, "Disabled"), 835 efl_text_set(rd, "Disabled");
836 efl_gfx_hint_weight_set(efl_added, 1, 0), 836 efl_gfx_hint_weight_set(rd, 1, 0);
837 efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, 837 efl_event_callback_add(rd, EFL_UI_CHECK_EVENT_SELECTED_CHANGED,
838 loop_radio_cb, pager), 838 loop_radio_cb, pager);
839 efl_pack(box, efl_added)); 839 efl_pack(box, rd);
840 840
841 rd = efl_add(EFL_UI_RADIO_CLASS, box, 841 rd = efl_add(EFL_UI_RADIO_CLASS, box);
842 efl_ui_radio_state_value_set(efl_added, EFL_UI_PAGER_LOOP_ENABLED), 842 efl_ui_radio_state_value_set(rd, EFL_UI_PAGER_LOOP_ENABLED);
843 efl_ui_radio_group_add(efl_added, rd), 843 efl_text_set(rd, "Enabled");
844 efl_text_set(efl_added, "Enabled"), 844 efl_gfx_hint_weight_set(rd, 1, 0);
845 efl_gfx_hint_weight_set(efl_added, 1, 0), 845 efl_event_callback_add(rd, EFL_UI_CHECK_EVENT_SELECTED_CHANGED,
846 efl_event_callback_add(efl_added, EFL_UI_RADIO_EVENT_CHANGED, 846 loop_radio_cb, pager);
847 loop_radio_cb, pager), 847 efl_pack(box, rd);
848 efl_pack(box, efl_added));
849 848
850 loop = efl_ui_pager_loop_mode_get(pager); 849 loop = efl_ui_pager_loop_mode_get(pager);
851 850
852 efl_ui_radio_group_value_set(rd, loop); 851 efl_ui_radio_group_selected_value_set(efl_ui_radio_box_group_get(box), loop);
853 852
854 if (loop == EFL_UI_PAGER_LOOP_DISABLED) 853 if (loop == EFL_UI_PAGER_LOOP_DISABLED)
855 { 854 {
diff --git a/src/bin/elementary/test_ui_panel.c b/src/bin/elementary/test_ui_panel.c
index f8bbd0bd78..91adb22301 100644
--- a/src/bin/elementary/test_ui_panel.c
+++ b/src/bin/elementary/test_ui_panel.c
@@ -111,17 +111,17 @@ test_ui_panel2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
111 box = efl_add(EFL_UI_BOX_CLASS, win, 111 box = efl_add(EFL_UI_BOX_CLASS, win,
112 efl_content_set(win, efl_added)); 112 efl_content_set(win, efl_added));
113 113
114 efl_add(EFL_UI_CHECK_CLASS, box, 114 check = efl_add(EFL_UI_CHECK_CLASS, box);
115 efl_ui_check_selected_set(efl_added, elm_config_scroll_thumbscroll_enabled_get()), 115 efl_ui_check_selected_set(check, elm_config_scroll_thumbscroll_enabled_get());
116 efl_text_set(efl_added, "Enable thumb scroll (temporarily"), 116 efl_text_set(check, "Enable thumb scroll (temporarily");
117 efl_event_callback_add(efl_added, EFL_UI_NSTATE_EVENT_CHANGED, _check_changed, NULL), 117 efl_event_callback_add(check, EFL_UI_NSTATE_EVENT_CHANGED, _check_changed, NULL);
118 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0), 118 efl_gfx_hint_weight_set(check, EVAS_HINT_EXPAND, 0);
119 efl_pack(box, efl_added)); 119 efl_pack(box, check);
120 120
121 check = efl_add(EFL_UI_CHECK_CLASS, box, 121 check = efl_add(EFL_UI_CHECK_CLASS, box);
122 efl_text_set(efl_added, "Reset content on toggle"), 122 efl_text_set(check, "Reset content on toggle");
123 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0), 123 efl_gfx_hint_weight_set(check, EVAS_HINT_EXPAND, 0);
124 efl_pack(box, efl_added)); 124 efl_pack(box, check);
125 125
126 btn = efl_add(EFL_UI_BUTTON_CLASS, box, 126 btn = efl_add(EFL_UI_BUTTON_CLASS, box,
127 efl_text_set(efl_added, "toggle"), 127 efl_text_set(efl_added, "toggle"),
diff --git a/src/bin/elementary/test_ui_tab_pager.c b/src/bin/elementary/test_ui_tab_pager.c
index ae579a47de..bd316229c2 100644
--- a/src/bin/elementary/test_ui_tab_pager.c
+++ b/src/bin/elementary/test_ui_tab_pager.c
@@ -532,15 +532,15 @@ _tab_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
532 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE), 532 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
533 elm_naviframe_item_push(navi, "Tab", btn, NULL, efl_added, NULL)); 533 elm_naviframe_item_push(navi, "Tab", btn, NULL, efl_added, NULL));
534 534
535 label_check = efl_add(EFL_UI_CHECK_CLASS, box, 535 label_check = efl_add(EFL_UI_CHECK_CLASS, box);
536 efl_text_set(efl_added, "Tab Label + Page"), 536 efl_text_set(label_check, "Tab Label + Page");
537 efl_ui_check_selected_set(efl_added, EINA_FALSE), 537 efl_ui_check_selected_set(label_check, EINA_FALSE);
538 efl_pack_end(box, efl_added)); 538 efl_pack_end(box, label_check);
539 539
540 icon_check = efl_add(EFL_UI_CHECK_CLASS, box, 540 icon_check = efl_add(EFL_UI_CHECK_CLASS, box);
541 efl_text_set(efl_added, "Tab Icon"), 541 efl_text_set(icon_check, "Tab Icon");
542 efl_ui_check_selected_set(efl_added, EINA_FALSE), 542 efl_ui_check_selected_set(icon_check, EINA_FALSE);
543 efl_pack_end(box, efl_added)); 543 efl_pack_end(box, icon_check);
544 544
545 tcd->tab_pager = tab_pager; 545 tcd->tab_pager = tab_pager;
546 tcd->label_check = label_check; 546 tcd->label_check = label_check;
diff --git a/src/bin/elementary/test_ui_table.c b/src/bin/elementary/test_ui_table.c
index bcaf01559e..34991f6634 100644
--- a/src/bin/elementary/test_ui_table.c
+++ b/src/bin/elementary/test_ui_table.c
@@ -20,12 +20,12 @@ typedef enum {
20} Weight_Mode; 20} Weight_Mode;
21 21
22static void 22static void
23weights_cb(void *data, const Efl_Event *event) 23weights_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
24{ 24{
25 EFL_OPS_DEFINE(custom_layout_ops, 25 EFL_OPS_DEFINE(custom_layout_ops,
26 EFL_OBJECT_OP_FUNC(efl_pack_layout_update, _custom_layout_update)); 26 EFL_OBJECT_OP_FUNC(efl_pack_layout_update, _custom_layout_update));
27 27
28 Weight_Mode mode = elm_radio_state_value_get(event->object); 28 Weight_Mode mode = elm_radio_state_value_get(obj);
29 Eo *table = data; 29 Eo *table = data;
30 30
31 if (mode != CUSTOM) 31 if (mode != CUSTOM)
@@ -232,7 +232,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
232 232
233 chk = o = elm_radio_add(win); 233 chk = o = elm_radio_add(win);
234 elm_object_text_set(o, "No weight"); 234 elm_object_text_set(o, "No weight");
235 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table); 235 evas_object_smart_callback_add(o, "changed", weights_cb, table);
236 efl_gfx_hint_align_set(o, 0, 0.5); 236 efl_gfx_hint_align_set(o, 0, 0.5);
237 elm_radio_state_value_set(o, NONE); 237 elm_radio_state_value_set(o, NONE);
238 efl_pack(bx, o); 238 efl_pack(bx, o);
@@ -240,7 +240,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
240 240
241 o = elm_radio_add(win); 241 o = elm_radio_add(win);
242 elm_object_text_set(o, "No weight + table fill"); 242 elm_object_text_set(o, "No weight + table fill");
243 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table); 243 evas_object_smart_callback_add(o, "changed", weights_cb, table);
244 efl_gfx_hint_align_set(o, 0, 0.5); 244 efl_gfx_hint_align_set(o, 0, 0.5);
245 elm_radio_state_value_set(o, NONE_BUT_FILL); 245 elm_radio_state_value_set(o, NONE_BUT_FILL);
246 elm_radio_group_add(o, chk); 246 elm_radio_group_add(o, chk);
@@ -249,7 +249,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
249 249
250 o = elm_radio_add(win); 250 o = elm_radio_add(win);
251 elm_object_text_set(o, "Equal weights"); 251 elm_object_text_set(o, "Equal weights");
252 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table); 252 evas_object_smart_callback_add(o, "changed", weights_cb, table);
253 efl_gfx_hint_align_set(o, 0, 0.5); 253 efl_gfx_hint_align_set(o, 0, 0.5);
254 elm_radio_state_value_set(o, EQUAL); 254 elm_radio_state_value_set(o, EQUAL);
255 elm_radio_group_add(o, chk); 255 elm_radio_group_add(o, chk);
@@ -258,7 +258,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
258 258
259 o = elm_radio_add(win); 259 o = elm_radio_add(win);
260 elm_object_text_set(o, "One weight only"); 260 elm_object_text_set(o, "One weight only");
261 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table); 261 evas_object_smart_callback_add(o, "changed", weights_cb, table);
262 efl_gfx_hint_align_set(o, 0, 0.5); 262 efl_gfx_hint_align_set(o, 0, 0.5);
263 elm_radio_state_value_set(o, ONE); 263 elm_radio_state_value_set(o, ONE);
264 elm_radio_group_add(o, chk); 264 elm_radio_group_add(o, chk);
@@ -267,7 +267,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
267 267
268 o = elm_radio_add(win); 268 o = elm_radio_add(win);
269 elm_object_text_set(o, "Two weights"); 269 elm_object_text_set(o, "Two weights");
270 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table); 270 evas_object_smart_callback_add(o, "changed", weights_cb, table);
271 efl_gfx_hint_align_set(o, 0, 0.5); 271 efl_gfx_hint_align_set(o, 0, 0.5);
272 elm_radio_state_value_set(o, TWO); 272 elm_radio_state_value_set(o, TWO);
273 elm_radio_group_add(o, chk); 273 elm_radio_group_add(o, chk);
@@ -276,7 +276,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
276 276
277 o = elm_radio_add(win); 277 o = elm_radio_add(win);
278 elm_object_text_set(o, "Custom layout"); 278 elm_object_text_set(o, "Custom layout");
279 efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table); 279 evas_object_smart_callback_add(o, "changed", weights_cb, table);
280 efl_gfx_hint_align_set(o, 0, 0.5); 280 efl_gfx_hint_align_set(o, 0, 0.5);
281 elm_radio_state_value_set(o, CUSTOM); 281 elm_radio_state_value_set(o, CUSTOM);
282 elm_radio_group_add(o, chk); 282 elm_radio_group_add(o, chk);
diff --git a/src/bin/elementary/test_ui_textpath.c b/src/bin/elementary/test_ui_textpath.c
index 0042f2b6a2..e4756996f3 100644
--- a/src/bin/elementary/test_ui_textpath.c
+++ b/src/bin/elementary/test_ui_textpath.c
@@ -120,23 +120,23 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
120 efl_gfx_entity_visible_set(hbox, EINA_TRUE); 120 efl_gfx_entity_visible_set(hbox, EINA_TRUE);
121 elm_box_pack_end(box, hbox); 121 elm_box_pack_end(box, hbox);
122 122
123 chk = elm_check_add(win); 123 chk = efl_add(EFL_UI_CHECK_CLASS, win);
124 elm_object_text_set(chk, "Ellipsis"); 124 efl_text_set(chk, "Ellipsis");
125 elm_check_state_set(chk, efl_ui_textpath_ellipsis_get(txtpath)); 125 elm_check_state_set(chk, efl_ui_textpath_ellipsis_get(txtpath));
126 efl_event_callback_add(chk, EFL_UI_CHECK_EVENT_CHANGED, _ellipsis_changed_cb, txtpath); 126 efl_event_callback_add(chk, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _ellipsis_changed_cb, txtpath);
127 elm_box_pack_end(hbox, chk); 127 elm_box_pack_end(hbox, chk);
128 efl_gfx_entity_visible_set(chk, EINA_TRUE); 128 efl_gfx_entity_visible_set(chk, EINA_TRUE);
129 129
130 chk = elm_check_add(win); 130 chk = efl_add(EFL_UI_CHECK_CLASS, win);
131 elm_object_text_set(chk, "Clockwise"); 131 efl_text_set(chk, "Clockwise");
132 efl_event_callback_add(chk, EFL_UI_CHECK_EVENT_CHANGED, _direction_changed_cb, txtpath); 132 efl_event_callback_add(chk, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _direction_changed_cb, txtpath);
133 elm_box_pack_end(hbox, chk); 133 elm_box_pack_end(hbox, chk);
134 efl_gfx_entity_visible_set(chk, EINA_TRUE); 134 efl_gfx_entity_visible_set(chk, EINA_TRUE);
135 dir_chk = chk; 135 dir_chk = chk;
136 136
137 chk = elm_check_add(win); 137 chk = efl_add(EFL_UI_CHECK_CLASS, win);
138 elm_object_text_set(chk, "Short text"); 138 efl_text_set(chk, "Short text");
139 efl_event_callback_add(chk, EFL_UI_CHECK_EVENT_CHANGED, _short_text_changed_cb, txtpath); 139 efl_event_callback_add(chk, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _short_text_changed_cb, txtpath);
140 elm_box_pack_end(hbox, chk); 140 elm_box_pack_end(hbox, chk);
141 efl_gfx_entity_visible_set(chk, EINA_TRUE); 141 efl_gfx_entity_visible_set(chk, EINA_TRUE);
142 142
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index 135b8a2d3c..7c3b1e55b9 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -70,13 +70,13 @@ static void
70_select_radio_changed(void *data, const Efl_Event *ev) 70_select_radio_changed(void *data, const Efl_Event *ev)
71{ 71{
72 Eo *list = data; 72 Eo *list = data;
73 efl_ui_select_mode_set(list, efl_ui_radio_state_value_get(ev->object)); 73 efl_ui_select_mode_set(list, efl_ui_radio_group_selected_value_get(ev->object));
74} 74}
75 75
76static void 76static void
77_anim_radio_changed(void *data EINA_UNUSED, const Efl_Event *ev) 77_anim_radio_changed(void *data, const Efl_Event *ev EINA_UNUSED)
78{ 78{
79 priv_d.anim = efl_ui_radio_state_value_get(ev->object); 79 priv_d.anim = efl_ui_radio_group_selected_value_get(data);
80} 80}
81 81
82static void 82static void
@@ -102,7 +102,7 @@ elm_main(int argc EINA_UNUSED, char **argv)
102 Eo *win, *list; 102 Eo *win, *list;
103 Eo *wbox, *ibox, *bbox, *rbox; 103 Eo *wbox, *ibox, *bbox, *rbox;
104 Eo *item, *check, *txt; 104 Eo *item, *check, *txt;
105 Eo *radio, *select_radio, *anim_radio; 105 Eo *radio;
106 Eo *slider, *scrl_btn; 106 Eo *slider, *scrl_btn;
107 int i; 107 int i;
108 char buf[256]; 108 char buf[256];
@@ -229,34 +229,28 @@ elm_main(int argc EINA_UNUSED, char **argv)
229 efl_text_set(txt, "Select Mode"); 229 efl_text_set(txt, "Select Mode");
230 efl_pack_end(wbox, txt); 230 efl_pack_end(wbox, txt);
231 231
232 bbox = efl_add(EFL_UI_BOX_CLASS, wbox); 232 bbox = efl_add(EFL_UI_RADIO_BOX_CLASS, wbox);
233 efl_ui_layout_orientation_set(bbox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL); 233 efl_ui_layout_orientation_set(bbox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
234 efl_gfx_hint_weight_set(bbox, EFL_GFX_HINT_EXPAND, 0.05); 234 efl_gfx_hint_weight_set(bbox, EFL_GFX_HINT_EXPAND, 0.05);
235 235
236 select_radio = radio = efl_add(EFL_UI_RADIO_CLASS, wbox); 236 radio = efl_add(EFL_UI_RADIO_CLASS, wbox);
237 efl_text_set(radio, "SINGLE"); 237 efl_text_set(radio, "SINGLE");
238 efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_SINGLE); 238 efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_SINGLE);
239 efl_event_callback_add(radio, EFL_UI_RADIO_EVENT_CHANGED, _select_radio_changed, list);
240 efl_pack_end(bbox, radio); 239 efl_pack_end(bbox, radio);
241 radio = efl_add(EFL_UI_RADIO_CLASS, wbox); 240 radio = efl_add(EFL_UI_RADIO_CLASS, wbox);
242 efl_text_set(radio, "SINGLE_ALWAYS"); 241 efl_text_set(radio, "SINGLE_ALWAYS");
243 efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_SINGLE_ALWAYS); 242 efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_SINGLE_ALWAYS);
244 efl_ui_radio_group_add(radio, select_radio);
245 efl_event_callback_add(radio, EFL_UI_RADIO_EVENT_CHANGED, _select_radio_changed, list);
246 efl_pack_end(bbox, radio); 243 efl_pack_end(bbox, radio);
247 radio = efl_add(EFL_UI_RADIO_CLASS, wbox); 244 radio = efl_add(EFL_UI_RADIO_CLASS, wbox);
248 efl_text_set(radio, "MULTI"); 245 efl_text_set(radio, "MULTI");
249 efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_MULTI); 246 efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_MULTI);
250 efl_ui_radio_group_add(radio, select_radio);
251 efl_event_callback_add(radio, EFL_UI_RADIO_EVENT_CHANGED, _select_radio_changed, list);
252 efl_pack_end(bbox, radio); 247 efl_pack_end(bbox, radio);
253 radio = efl_add(EFL_UI_RADIO_CLASS, wbox); 248 radio = efl_add(EFL_UI_RADIO_CLASS, wbox);
254 efl_text_set(radio, "NONE"); 249 efl_text_set(radio, "NONE");
255 efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_NONE); 250 efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_NONE);
256 efl_ui_radio_group_add(radio, select_radio);
257 efl_event_callback_add(radio, EFL_UI_RADIO_EVENT_CHANGED, _select_radio_changed, list);
258 efl_pack_end(bbox, radio); 251 efl_pack_end(bbox, radio);
259 efl_pack_end(wbox, bbox); 252 efl_pack_end(wbox, bbox);
253 efl_event_callback_add(bbox, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, _select_radio_changed, list);
260 254
261 /* scroll mode */ 255 /* scroll mode */
262 txt = efl_add(EFL_UI_TEXT_CLASS, wbox); 256 txt = efl_add(EFL_UI_TEXT_CLASS, wbox);
@@ -278,23 +272,21 @@ elm_main(int argc EINA_UNUSED, char **argv)
278 efl_ui_layout_orientation_set(bbox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL); 272 efl_ui_layout_orientation_set(bbox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
279 efl_gfx_hint_weight_set(bbox, EFL_GFX_HINT_EXPAND, 0.05); 273 efl_gfx_hint_weight_set(bbox, EFL_GFX_HINT_EXPAND, 0.05);
280 274
281 rbox = efl_add(EFL_UI_BOX_CLASS, bbox); 275 rbox = efl_add(EFL_UI_RADIO_BOX_CLASS, bbox);
282 efl_ui_layout_orientation_set(rbox, EFL_UI_LAYOUT_ORIENTATION_VERTICAL); 276 efl_ui_layout_orientation_set(rbox, EFL_UI_LAYOUT_ORIENTATION_VERTICAL);
283 277
284 anim_radio = radio = efl_add(EFL_UI_RADIO_CLASS, rbox); 278 radio = efl_add(EFL_UI_RADIO_CLASS, rbox);
285 efl_gfx_hint_align_set(radio, 0.5, 0.5); 279 efl_gfx_hint_align_set(radio, 0.5, 0.5);
286 efl_text_set(radio, "ANIMATION OFF"); 280 efl_text_set(radio, "ANIMATION OFF");
287 efl_ui_radio_state_value_set(radio, 0); 281 efl_ui_radio_state_value_set(radio, 0);
288 efl_event_callback_add(radio, EFL_UI_RADIO_EVENT_CHANGED, _anim_radio_changed, NULL);
289 efl_pack_end(rbox, radio); 282 efl_pack_end(rbox, radio);
290 radio = efl_add(EFL_UI_RADIO_CLASS, rbox); 283 radio = efl_add(EFL_UI_RADIO_CLASS, rbox);
291 efl_gfx_hint_align_set(radio, 0.5, 0.5); 284 efl_gfx_hint_align_set(radio, 0.5, 0.5);
292 efl_text_set(radio, "ANIMATION ON"); 285 efl_text_set(radio, "ANIMATION ON");
293 efl_ui_radio_state_value_set(radio, 1); 286 efl_ui_radio_state_value_set(radio, 1);
294 efl_ui_radio_group_add(radio, anim_radio);
295 efl_event_callback_add(radio, EFL_UI_RADIO_EVENT_CHANGED, _anim_radio_changed, NULL);
296 efl_pack_end(rbox, radio); 287 efl_pack_end(rbox, radio);
297 efl_pack_end(bbox, rbox); 288 efl_pack_end(bbox, rbox);
289 efl_event_callback_add(rbox, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, _anim_radio_changed, rbox);
298 290
299 rbox = efl_add(EFL_UI_BOX_CLASS, bbox); 291 rbox = efl_add(EFL_UI_BOX_CLASS, bbox);
300 efl_ui_layout_orientation_set(rbox, EFL_UI_LAYOUT_ORIENTATION_VERTICAL); 292 efl_ui_layout_orientation_set(rbox, EFL_UI_LAYOUT_ORIENTATION_VERTICAL);
diff --git a/src/examples/elementary/radio_cxx_example_01.cc b/src/examples/elementary/radio_cxx_example_01.cc
index c6d5146655..1b6c659e14 100644
--- a/src/examples/elementary/radio_cxx_example_01.cc
+++ b/src/examples/elementary/radio_cxx_example_01.cc
@@ -16,7 +16,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
16 win.text_set("Radio Example"); 16 win.text_set("Radio Example");
17 win.autohide_set(true); 17 win.autohide_set(true);
18 18
19 efl::ui::Box bx(instantiate, win); 19 efl::ui::Radio_Box bx(instantiate, win);
20 bx.orientation_set(EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL); 20 bx.orientation_set(EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
21 win.content_set(bx); 21 win.content_set(bx);
22 22
@@ -30,15 +30,14 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
30 radio.content_set(ic); 30 radio.content_set(ic);
31 bx.pack_end(radio); 31 bx.pack_end(radio);
32 32
33 auto cb_val = std::bind([] (efl::ui::Radio &obj) 33 auto cb_val = std::bind([bx] (efl::ui::Radio &obj EINA_UNUSED)
34 { std::cout << "val is now: " << obj.group_value_get() << std::endl; }, 34 { std::cout << "val is now: " << bx.selected_value_get() << std::endl; },
35 std::placeholders::_1); 35 std::placeholders::_1);
36 efl::eolian::event_add(efl::ui::Nstate::changed_event, radio, cb_val); 36 efl::eolian::event_add(efl::ui::Nstate::changed_event, radio, cb_val);
37 37
38 efl::ui::Radio radio2(instantiate, win); 38 efl::ui::Radio radio2(instantiate, win);
39 radio2.text_set("Radio 2"); 39 radio2.text_set("Radio 2");
40 radio2.state_value_set(2); 40 radio2.state_value_set(2);
41 radio2.group_add(group);
42 41
43 efl::ui::Image ic2(instantiate, win); 42 efl::ui::Image ic2(instantiate, win);
44 ic2.icon_set("file"); 43 ic2.icon_set("file");
@@ -49,14 +48,12 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
49 efl::ui::Radio radio3(instantiate, win); 48 efl::ui::Radio radio3(instantiate, win);
50 radio3.text_set("Radio 3"); 49 radio3.text_set("Radio 3");
51 radio3.state_value_set(3); 50 radio3.state_value_set(3);
52 radio3.group_add(group);
53 bx.pack_end(radio3); 51 bx.pack_end(radio3);
54 efl::eolian::event_add(efl::ui::Nstate::changed_event, radio3, cb_val); 52 efl::eolian::event_add(efl::ui::Nstate::changed_event, radio3, cb_val);
55 53
56 efl::ui::Radio radio4(instantiate, win); 54 efl::ui::Radio radio4(instantiate, win);
57 radio4.text_set("Radio 4"); 55 radio4.text_set("Radio 4");
58 radio4.state_value_set(4); 56 radio4.state_value_set(4);
59 radio4.group_add(group);
60 bx.pack_end(radio4); 57 bx.pack_end(radio4);
61 efl::eolian::event_add(efl::ui::Nstate::changed_event, radio4, cb_val); 58 efl::eolian::event_add(efl::ui::Nstate::changed_event, radio4, cb_val);
62} 59}
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index c364595260..6509423f05 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -4,10 +4,6 @@
4#include <Efl_Config.h> 4#include <Efl_Config.h>
5#include <Elementary_Options.h> 5#include <Elementary_Options.h>
6 6
7/* FIXME: wtf? */
8#ifndef EFL_UI_RADIO_EVENT_CHANGED
9# define EFL_UI_RADIO_EVENT_CHANGED EFL_UI_NSTATE_EVENT_CHANGED
10#endif
11/* Standard headers for standard system calls etc. */ 7/* Standard headers for standard system calls etc. */
12#include <stdio.h> 8#include <stdio.h>
13#include <stdlib.h> 9#include <stdlib.h>
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 8db5fd9fe2..2a2d986ab3 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -147,10 +147,6 @@ EAPI extern Elm_Version *elm_version;
147#include <elm_focus.h> 147#include <elm_focus.h>
148 148
149#include <Efl.h> 149#include <Efl.h>
150/* FIXME: wtf? */
151#ifndef EFL_UI_RADIO_EVENT_CHANGED
152# define EFL_UI_RADIO_EVENT_CHANGED EFL_UI_NSTATE_EVENT_CHANGED
153#endif
154# include <efl_ui.eot.h> 150# include <efl_ui.eot.h>
155//define focus manager earlier since focus object and manager is circular 151//define focus manager earlier since focus object and manager is circular
156typedef Eo Efl_Ui_Focus_Manager; 152typedef Eo Efl_Ui_Focus_Manager;
diff --git a/src/lib/elementary/efl_ui_radio.c b/src/lib/elementary/efl_ui_radio.c
index 7653fe0cba..c38c9fadc7 100644
--- a/src/lib/elementary/efl_ui_radio.c
+++ b/src/lib/elementary/efl_ui_radio.c
@@ -123,21 +123,27 @@ _activate(Evas_Object *obj)
123{ 123{
124 ELM_RADIO_DATA_GET(obj, sd); 124 ELM_RADIO_DATA_GET(obj, sd);
125 125
126 if (sd->group->value == sd->value) return; 126 if (elm_widget_is_legacy(obj))
127
128 if ((!_elm_config->access_mode) ||
129 (_elm_access_2nd_click_timeout(obj)))
130 { 127 {
131 sd->group->value = sd->value; 128 //in legacy, group is handeled by the widget
132 if (sd->group->valuep) *(sd->group->valuep) = sd->group->value; 129 if (sd->group->value == sd->value) return;
133 130
134 _state_set_all(sd, EINA_TRUE); 131 if ((!_elm_config->access_mode) ||
132 (_elm_access_2nd_click_timeout(obj)))
133 {
134 sd->group->value = sd->value;
135 if (sd->group->valuep) *(sd->group->valuep) = sd->group->value;
135 136
136 if (_elm_config->access_mode) 137 _state_set_all(sd, EINA_TRUE);
137 _elm_access_say(E_("State: On"));
138 efl_event_callback_legacy_call
139 (obj, EFL_UI_RADIO_EVENT_CHANGED, NULL);
140 138
139 if (_elm_config->access_mode)
140 _elm_access_say(E_("State: On"));
141 }
142 }
143 else
144 {
145 //in new API, we just toggle the state of the widget, rest will be automatically handled
146 efl_ui_check_selected_set(obj, !efl_ui_check_selected_get(obj));
141 } 147 }
142} 148}
143 149
@@ -220,8 +226,11 @@ _efl_ui_radio_efl_object_constructor(Eo *obj, Efl_Ui_Radio_Data *pd)
220 elm_layout_signal_callback_add 226 elm_layout_signal_callback_add
221 (obj, "efl,action,radio,toggle", "*", _radio_on_cb, obj); 227 (obj, "efl,action,radio,toggle", "*", _radio_on_cb, obj);
222 228
223 pd->group = calloc(1, sizeof(Group)); 229 if (elm_widget_is_legacy(obj))
224 pd->group->radios = eina_list_append(pd->group->radios, obj); 230 {
231 pd->group = calloc(1, sizeof(Group));
232 pd->group->radios = eina_list_append(pd->group->radios, obj);
233 }
225 234
226 elm_layout_sizing_eval(obj); 235 elm_layout_sizing_eval(obj);
227 236
@@ -239,43 +248,24 @@ _efl_ui_radio_efl_object_constructor(Eo *obj, Efl_Ui_Radio_Data *pd)
239EOLIAN static void 248EOLIAN static void
240_efl_ui_radio_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *pd) 249_efl_ui_radio_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *pd)
241{ 250{
242 pd->group->radios = eina_list_remove(pd->group->radios, obj); 251 if (elm_widget_is_legacy(obj))
243 if (!pd->group->radios) free(pd->group);
244
245 efl_destructor(efl_super(obj, MY_CLASS));
246}
247
248EOLIAN static void
249_efl_ui_radio_group_add(Eo *obj, Efl_Ui_Radio_Data *sd, Evas_Object *group)
250{
251 ELM_RADIO_DATA_GET(group, sdg);
252
253 if (!sdg)
254 {
255 if (eina_list_count(sd->group->radios) == 1) return;
256 sd->group->radios = eina_list_remove(sd->group->radios, obj);
257 sd->group = calloc(1, sizeof(Group));
258 sd->group->radios = eina_list_append(sd->group->radios, obj);
259 }
260 else if (sd->group == sdg->group)
261 return;
262 else
263 { 252 {
264 sd->group->radios = eina_list_remove(sd->group->radios, obj); 253 pd->group->radios = eina_list_remove(pd->group->radios, obj);
265 if (!sd->group->radios) free(sd->group); 254 if (!pd->group->radios) free(pd->group);
266 sd->group = sdg->group;
267 sd->group->radios = eina_list_append(sd->group->radios, obj);
268 } 255 }
269 if (sd->value == sd->group->value) efl_ui_check_selected_set(obj, EINA_TRUE); 256
270 else efl_ui_check_selected_set(obj, EINA_FALSE); 257 efl_destructor(efl_super(obj, MY_CLASS));
271} 258}
272 259
273EOLIAN static void 260EOLIAN static void
274_efl_ui_radio_state_value_set(Eo *obj, Efl_Ui_Radio_Data *sd, int value) 261_efl_ui_radio_state_value_set(Eo *obj, Efl_Ui_Radio_Data *sd, int value)
275{ 262{
276 sd->value = value; 263 sd->value = value;
277 if (sd->value == sd->group->value) efl_ui_check_selected_set(obj, EINA_TRUE); 264 if (elm_widget_is_legacy(obj))
278 else efl_ui_check_selected_set(obj, EINA_FALSE); 265 {
266 if (sd->value == sd->group->value) efl_ui_check_selected_set(obj, EINA_TRUE);
267 else efl_ui_check_selected_set(obj, EINA_FALSE);
268 }
279} 269}
280 270
281EOLIAN static int 271EOLIAN static int
@@ -284,52 +274,6 @@ _efl_ui_radio_state_value_get(const Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd)
284 return sd->value; 274 return sd->value;
285} 275}
286 276
287EOLIAN static void
288_efl_ui_radio_group_value_set(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd, int value)
289{
290 if (value == sd->group->value) return;
291 sd->group->value = value;
292 if (sd->group->valuep) *(sd->group->valuep) = sd->group->value;
293 _state_set_all(sd, EINA_FALSE);
294}
295
296EOLIAN static int
297_efl_ui_radio_group_value_get(const Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd)
298{
299 return sd->group->value;
300}
301
302EOLIAN static void
303_efl_ui_radio_value_pointer_set(Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd, int *valuep)
304{
305 if (valuep)
306 {
307 sd->group->valuep = valuep;
308 if (*(sd->group->valuep) != sd->group->value)
309 {
310 sd->group->value = *(sd->group->valuep);
311 _state_set_all(sd, EINA_FALSE);
312 }
313 }
314 else sd->group->valuep = NULL;
315}
316
317EOLIAN static Evas_Object*
318_efl_ui_radio_selected_object_get(const Eo *obj EINA_UNUSED, Efl_Ui_Radio_Data *sd)
319{
320 Eina_List *l;
321 Evas_Object *child;
322
323 EINA_LIST_FOREACH(sd->group->radios, l, child)
324 {
325 ELM_RADIO_DATA_GET(child, sdc);
326
327 if (sdc->value == sd->group->value) return child;
328 }
329
330 return NULL;
331}
332
333EOLIAN static Eina_Bool 277EOLIAN static Eina_Bool
334_efl_ui_radio_efl_ui_widget_on_access_activate(Eo *obj, Efl_Ui_Radio_Data *_pd EINA_UNUSED, Efl_Ui_Activate act) 278_efl_ui_radio_efl_ui_widget_on_access_activate(Eo *obj, Efl_Ui_Radio_Data *_pd EINA_UNUSED, Efl_Ui_Activate act)
335{ 279{
@@ -486,13 +430,86 @@ elm_radio_add(Evas_Object *parent)
486EAPI void 430EAPI void
487elm_radio_value_set(Evas_Object *obj, int value) 431elm_radio_value_set(Evas_Object *obj, int value)
488{ 432{
489 efl_ui_radio_group_value_set(obj, value); 433 EINA_SAFETY_ON_FALSE_RETURN(elm_widget_is_legacy(obj));
434 ELM_RADIO_DATA_GET(obj, sd);
435
436 if (value == sd->group->value) return;
437 sd->group->value = value;
438 if (sd->group->valuep) *(sd->group->valuep) = sd->group->value;
439 _state_set_all(sd, EINA_FALSE);
490} 440}
491 441
492EAPI int 442EAPI int
493elm_radio_value_get(const Evas_Object *obj) 443elm_radio_value_get(const Evas_Object *obj)
494{ 444{
495 return efl_ui_radio_group_value_get(obj); 445 EINA_SAFETY_ON_FALSE_RETURN_VAL(elm_widget_is_legacy(obj), 0);
446 ELM_RADIO_DATA_GET(obj, sd);
447 return sd->group->value;
448}
449
450EAPI void
451elm_radio_value_pointer_set(Efl_Ui_Radio *obj, int *valuep)
452{
453 EINA_SAFETY_ON_FALSE_RETURN(elm_widget_is_legacy(obj));
454 ELM_RADIO_DATA_GET(obj, sd);
455
456 if (valuep)
457 {
458 sd->group->valuep = valuep;
459 if (*(sd->group->valuep) != sd->group->value)
460 {
461 sd->group->value = *(sd->group->valuep);
462 _state_set_all(sd, EINA_FALSE);
463 }
464 }
465 else sd->group->valuep = NULL;
466}
467
468EAPI Efl_Canvas_Object *
469elm_radio_selected_object_get(const Efl_Ui_Radio *obj)
470{
471 EINA_SAFETY_ON_FALSE_RETURN_VAL(elm_widget_is_legacy(obj), NULL);
472 ELM_RADIO_DATA_GET(obj, sd);
473
474 Eina_List *l;
475 Evas_Object *child;
476
477 EINA_LIST_FOREACH(sd->group->radios, l, child)
478 {
479 ELM_RADIO_DATA_GET(child, sdc);
480
481 if (sdc->value == sd->group->value) return child;
482 }
483
484 return NULL;
485}
486
487EAPI void
488elm_radio_group_add(Efl_Ui_Radio *obj, Efl_Ui_Radio *group)
489{
490 EINA_SAFETY_ON_FALSE_RETURN(elm_widget_is_legacy(obj));
491 EINA_SAFETY_ON_FALSE_RETURN(elm_widget_is_legacy(group));
492 ELM_RADIO_DATA_GET(group, sdg);
493 ELM_RADIO_DATA_GET(obj, sd);
494
495 if (!sdg)
496 {
497 if (eina_list_count(sd->group->radios) == 1) return;
498 sd->group->radios = eina_list_remove(sd->group->radios, obj);
499 sd->group = calloc(1, sizeof(Group));
500 sd->group->radios = eina_list_append(sd->group->radios, obj);
501 }
502 else if (sd->group == sdg->group)
503 return;
504 else
505 {
506 sd->group->radios = eina_list_remove(sd->group->radios, obj);
507 if (!sd->group->radios) free(sd->group);
508 sd->group = sdg->group;
509 sd->group->radios = eina_list_append(sd->group->radios, obj);
510 }
511 if (sd->value == sd->group->value) efl_ui_check_selected_set(obj, EINA_TRUE);
512 else efl_ui_check_selected_set(obj, EINA_FALSE);
496} 513}
497 514
498#include "efl_ui_radio_legacy_eo.c" 515#include "efl_ui_radio_legacy_eo.c"
diff --git a/src/lib/elementary/efl_ui_radio_eo.legacy.c b/src/lib/elementary/efl_ui_radio_eo.legacy.c
index 69b23653ed..8e9a4dd06f 100644
--- a/src/lib/elementary/efl_ui_radio_eo.legacy.c
+++ b/src/lib/elementary/efl_ui_radio_eo.legacy.c
@@ -10,21 +10,3 @@ elm_radio_state_value_get(const Efl_Ui_Radio *obj)
10{ 10{
11 return efl_ui_radio_state_value_get(obj); 11 return efl_ui_radio_state_value_get(obj);
12} 12}
13
14EAPI void
15elm_radio_value_pointer_set(Efl_Ui_Radio *obj, int *valuep)
16{
17 efl_ui_radio_value_pointer_set(obj, valuep);
18}
19
20EAPI Efl_Canvas_Object *
21elm_radio_selected_object_get(const Efl_Ui_Radio *obj)
22{
23 return efl_ui_radio_selected_object_get(obj);
24}
25
26EAPI void
27elm_radio_group_add(Efl_Ui_Radio *obj, Efl_Ui_Radio *group)
28{
29 efl_ui_radio_group_add(obj, group);
30}
diff --git a/src/lib/elementary/efl_ui_radio_private.h b/src/lib/elementary/efl_ui_radio_private.h
index a59ea0c48d..f60c28ec24 100644
--- a/src/lib/elementary/efl_ui_radio_private.h
+++ b/src/lib/elementary/efl_ui_radio_private.h
@@ -37,8 +37,6 @@ struct _Efl_Ui_Radio_Data
37{ 37{
38 int value; 38 int value;
39 Group *group; 39 Group *group;
40
41 Eina_Bool state : 1;
42}; 40};
43 41
44/** 42/**
diff --git a/src/lib/elementary/elm_check.h b/src/lib/elementary/elm_check.h
index 492494a2f8..9cddb69c15 100644
--- a/src/lib/elementary/elm_check.h
+++ b/src/lib/elementary/elm_check.h
@@ -58,9 +58,6 @@
58 * 58 *
59 * @{ 59 * @{
60 */ 60 */
61
62#define EFL_UI_CHECK_EVENT_CHANGED EFL_UI_NSTATE_EVENT_CHANGED
63
64#ifndef EFL_NOLEGACY_API_SUPPORT 61#ifndef EFL_NOLEGACY_API_SUPPORT
65#include "elm_check_legacy.h" 62#include "elm_check_legacy.h"
66#endif 63#endif
diff --git a/src/lib/elementary/elm_dayselector.c b/src/lib/elementary/elm_dayselector.c
index 781ee0c868..d01495219c 100644
--- a/src/lib/elementary/elm_dayselector.c
+++ b/src/lib/elementary/elm_dayselector.c
@@ -204,11 +204,11 @@ _item_signal_emit_cb(void *data,
204} 204}
205 205
206static void 206static void
207_item_clicked_cb(void *data, const Efl_Event *event EINA_UNUSED) 207_item_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
208{ 208{
209 Elm_Dayselector_Item_Data *it = data; 209 Elm_Dayselector_Item_Data *it = data;
210 210
211 efl_event_callback_legacy_call(WIDGET(it), EFL_UI_CHECK_EVENT_CHANGED, (void *)it->day); 211 evas_object_smart_callback_call(WIDGET(it), "changed", event_info);
212} 212}
213 213
214static Elm_Dayselector_Item_Data * 214static Elm_Dayselector_Item_Data *
@@ -295,8 +295,7 @@ _elm_dayselector_content_set(Eo *obj, Elm_Dayselector_Data *sd, const char *item
295 snprintf(buf, sizeof(buf), "day%d,visible", _item_location_get(sd, it)); 295 snprintf(buf, sizeof(buf), "day%d,visible", _item_location_get(sd, it));
296 elm_layout_signal_emit(obj, buf, "elm"); 296 elm_layout_signal_emit(obj, buf, "elm");
297 297
298 efl_event_callback_add 298 evas_object_smart_callback_add(VIEW(it), "changed", _item_clicked_cb, it);
299 (VIEW(it), EFL_UI_CHECK_EVENT_CHANGED, _item_clicked_cb, it);
300 evas_object_event_callback_add 299 evas_object_event_callback_add
301 (VIEW(it), EVAS_CALLBACK_DEL, _item_del_cb, obj); 300 (VIEW(it), EVAS_CALLBACK_DEL, _item_del_cb, obj);
302 301
@@ -342,7 +341,7 @@ _elm_dayselector_content_unset(Eo *obj, Elm_Dayselector_Data *sd, const char *it
342 if (!content) return NULL; 341 if (!content) return NULL;
343 342
344 sd->items = eina_list_remove(sd->items, it); 343 sd->items = eina_list_remove(sd->items, it);
345 efl_event_callback_del(content, EFL_UI_CHECK_EVENT_CHANGED, _item_clicked_cb, it); 344 evas_object_smart_callback_del_full(content, "changed", _item_clicked_cb, it);
346 evas_object_event_callback_del(content, EVAS_CALLBACK_DEL, _item_del_cb); 345 evas_object_event_callback_del(content, EVAS_CALLBACK_DEL, _item_del_cb);
347 346
348 elm_object_signal_callback_del 347 elm_object_signal_callback_del
diff --git a/src/modules/elementary/prefs/elm_check.c b/src/modules/elementary/prefs/elm_check.c
index c191d7dc03..997bb459c8 100644
--- a/src/modules/elementary/prefs/elm_check.c
+++ b/src/modules/elementary/prefs/elm_check.c
@@ -7,11 +7,11 @@ static Elm_Prefs_Item_Type supported_types[] =
7}; 7};
8 8
9static void 9static void
10_item_changed_cb(void *data, const Efl_Event *event) 10_item_changed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
11{ 11{
12 Elm_Prefs_Item_Changed_Cb prefs_it_changed_cb = data; 12 Elm_Prefs_Item_Changed_Cb prefs_it_changed_cb = data;
13 13
14 prefs_it_changed_cb(event->object); 14 prefs_it_changed_cb(obj);
15} 15}
16 16
17static Evas_Object * 17static Evas_Object *
@@ -23,8 +23,7 @@ elm_prefs_check_add(const Elm_Prefs_Item_Iface *iface EINA_UNUSED,
23{ 23{
24 Evas_Object *obj = elm_check_add(prefs); 24 Evas_Object *obj = elm_check_add(prefs);
25 25
26 efl_event_callback_add 26 evas_object_smart_callback_add(obj, "changed", _item_changed_cb, cb);
27 (obj, EFL_UI_CHECK_EVENT_CHANGED, _item_changed_cb, cb);
28 elm_check_state_set(obj, spec.b.def); 27 elm_check_state_set(obj, spec.b.def);
29 28
30 return obj; 29 return obj;