summaryrefslogtreecommitdiff
path: root/src/lib/elm_toolbar.c
diff options
context:
space:
mode:
authorwoochan lee <wc0917.lee@samsung.com>2015-07-02 20:00:57 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-07-02 20:00:58 +0900
commit260e09ea5adaffeef40286f424a8a5ca25e9077e (patch)
tree443ac0e6634e6d1d488bd1ff3f48e836c1baeaaa /src/lib/elm_toolbar.c
parent4477973f488e75fe1c87adc5c3c275cb6ebff78c (diff)
toolbar: item object change from edje object to layout.
Summary: Its for support elm_object_item_XXXX APIs for toolbar item. Its the pre work for toolbar item content set some layout to toolbar item layout automatically. (without implement item_content_set with part name.) I abandoned for check the other side of this change. but its not has problem so i reclaim this commit and put on another commit for this. https://phab.enlightenment.org/D2777 Test Plan: To all of the action on elementary toolbar test sample. Reviewers: cedric, Hermet Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D2768
Diffstat (limited to 'src/lib/elm_toolbar.c')
-rw-r--r--src/lib/elm_toolbar.c152
1 files changed, 76 insertions, 76 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index b0079d745..5b78ed892 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -156,7 +156,7 @@ _item_unselect(Elm_Toolbar_Item_Data *item)
156 156
157 item->selected = EINA_FALSE; 157 item->selected = EINA_FALSE;
158 sd->selected_item = NULL; 158 sd->selected_item = NULL;
159 edje_object_signal_emit(VIEW(item), "elm,state,unselected", "elm"); 159 elm_layout_signal_emit(VIEW(item), "elm,state,unselected", "elm");
160 if (item->icon) 160 if (item->icon)
161 elm_widget_signal_emit(item->icon, "elm,state,unselected", "elm"); 161 elm_widget_signal_emit(item->icon, "elm,state,unselected", "elm");
162 eo_do(WIDGET(item), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(item))); 162 eo_do(WIDGET(item), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(item)));
@@ -231,7 +231,7 @@ _item_mirrored_set(Evas_Object *obj EINA_UNUSED,
231 Elm_Toolbar_Item_Data *it, 231 Elm_Toolbar_Item_Data *it,
232 Eina_Bool mirrored) 232 Eina_Bool mirrored)
233{ 233{
234 edje_object_mirrored_set(VIEW(it), mirrored); 234 elm_widget_mirrored_set(VIEW(it), mirrored);
235 if (it->o_menu) elm_widget_mirrored_set(it->o_menu, mirrored); 235 if (it->o_menu) elm_widget_mirrored_set(it->o_menu, mirrored);
236} 236}
237 237
@@ -266,13 +266,13 @@ _items_size_fit(Evas_Object *obj, Evas_Coord *bl, Evas_Coord view)
266 { 266 {
267 if (!it->separator && !it->object) 267 if (!it->separator && !it->object)
268 elm_coords_finger_size_adjust(1, &mw, 1, &mh); 268 elm_coords_finger_size_adjust(1, &mw, 1, &mh);
269 edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh); 269 edje_object_size_min_restricted_calc(elm_layout_edje_get(VIEW(it)), &mw, &mh, mw, mh);
270 } 270 }
271 else if (!more) 271 else if (!more)
272 { 272 {
273 more = EINA_TRUE; 273 more = EINA_TRUE;
274 elm_coords_finger_size_adjust(1, &mw, 1, &mh); 274 elm_coords_finger_size_adjust(1, &mw, 1, &mh);
275 edje_object_size_min_restricted_calc(sd->VIEW(more_item), &mw, &mh, mw, mh); 275 edje_object_size_min_restricted_calc(elm_layout_edje_get(sd->VIEW(more_item)), &mw, &mh, mw, mh);
276 } 276 }
277 277
278 if (mw != -1 || mh != -1) 278 if (mw != -1 || mh != -1)
@@ -624,12 +624,12 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
624 624
625 if (elm_widget_focus_highlight_enabled_get(obj)) 625 if (elm_widget_focus_highlight_enabled_get(obj))
626 { 626 {
627 edje_object_signal_emit 627 elm_layout_signal_emit
628 (VIEW(it), "elm,state,focused", "elm"); 628 (VIEW(it), "elm,state,focused", "elm");
629 } 629 }
630 edje_object_signal_emit 630 elm_layout_signal_emit
631 (VIEW(it), "elm,highlight,on", "elm"); 631 (VIEW(it), "elm,highlight,on", "elm");
632 focus_raise = edje_object_data_get(VIEW(it), "focusraise"); 632 focus_raise = elm_layout_data_get(VIEW(it), "focusraise");
633 if ((focus_raise) && (!strcmp(focus_raise, "on"))) 633 if ((focus_raise) && (!strcmp(focus_raise, "on")))
634 evas_object_raise(VIEW(it)); 634 evas_object_raise(VIEW(it));
635 eo_do(obj, eo_event_callback_call 635 eo_do(obj, eo_event_callback_call
@@ -653,10 +653,10 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
653 if (elm_widget_focus_highlight_enabled_get(obj)) 653 if (elm_widget_focus_highlight_enabled_get(obj))
654 { 654 {
655 ELM_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it); 655 ELM_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it);
656 edje_object_signal_emit 656 elm_layout_signal_emit
657 (VIEW(focus_it), "elm,state,unfocused", "elm"); 657 (VIEW(focus_it), "elm,state,unfocused", "elm");
658 } 658 }
659 edje_object_signal_emit 659 elm_layout_signal_emit
660 (VIEW(it), "elm,highlight,off", "elm"); 660 (VIEW(it), "elm,highlight,off", "elm");
661 sd->focused_item = NULL; 661 sd->focused_item = NULL;
662 eo_do(obj, eo_event_callback_call 662 eo_do(obj, eo_event_callback_call
@@ -978,7 +978,7 @@ _resizing_eval_item(Elm_Toolbar_Item_Data *it)
978 evas_object_geometry_get(obj, &x, &y, NULL, &h); 978 evas_object_geometry_get(obj, &x, &y, NULL, &h);
979 evas_object_move(sd->more, x, y + h); 979 evas_object_move(sd->more, x, y + h);
980 //calculate the size of item 980 //calculate the size of item
981 edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh); 981 edje_object_size_min_restricted_calc(elm_layout_edje_get(VIEW(it)), &mw, &mh, mw, mh);
982 if (!it->separator && !it->object) 982 if (!it->separator && !it->object)
983 elm_coords_finger_size_adjust(1, &mw, 1, &mh); 983 elm_coords_finger_size_adjust(1, &mw, 1, &mh);
984 evas_object_size_hint_min_set(VIEW(it), mw, mh); 984 evas_object_size_hint_min_set(VIEW(it), mw, mh);
@@ -1005,7 +1005,7 @@ _elm_toolbar_item_elm_widget_item_disable(Eo *eo_toolbar, Elm_Toolbar_Item_Data
1005 else 1005 else
1006 emission = "elm,state,enabled"; 1006 emission = "elm,state,enabled";
1007 1007
1008 edje_object_signal_emit(VIEW(toolbar_it), emission, "elm"); 1008 elm_layout_signal_emit(VIEW(toolbar_it), emission, "elm");
1009 if (toolbar_it->icon) 1009 if (toolbar_it->icon)
1010 elm_widget_signal_emit(toolbar_it->icon, emission, "elm"); 1010 elm_widget_signal_emit(toolbar_it->icon, emission, "elm");
1011 1011
@@ -1116,7 +1116,7 @@ _item_select(Elm_Toolbar_Item_Data *it)
1116 { 1116 {
1117 if (it->in_box != sd->bx) 1117 if (it->in_box != sd->bx)
1118 { 1118 {
1119 edje_object_signal_emit 1119 elm_layout_signal_emit
1120 (sd->VIEW(more_item), "elm,state,selected", 1120 (sd->VIEW(more_item), "elm,state,selected",
1121 "elm"); 1121 "elm");
1122 elm_widget_signal_emit 1122 elm_widget_signal_emit
@@ -1125,7 +1125,7 @@ _item_select(Elm_Toolbar_Item_Data *it)
1125 } 1125 }
1126 else 1126 else
1127 { 1127 {
1128 edje_object_signal_emit 1128 elm_layout_signal_emit
1129 (sd->VIEW(more_item), "elm,state,unselected", 1129 (sd->VIEW(more_item), "elm,state,unselected",
1130 "elm"); 1130 "elm");
1131 elm_widget_signal_emit 1131 elm_widget_signal_emit
@@ -1136,7 +1136,7 @@ _item_select(Elm_Toolbar_Item_Data *it)
1136 (sd->more, "elm,state,close", "elm"); 1136 (sd->more, "elm,state,close", "elm");
1137 } 1137 }
1138 } 1138 }
1139 edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm"); 1139 elm_layout_signal_emit(VIEW(it), "elm,state,selected", "elm");
1140 if (it->icon) 1140 if (it->icon)
1141 elm_widget_signal_emit(it->icon, "elm,state,selected", "elm"); 1141 elm_widget_signal_emit(it->icon, "elm,state,selected", "elm");
1142 _item_show(it); 1142 _item_show(it);
@@ -1183,12 +1183,12 @@ _item_del(Elm_Toolbar_Item_Data *it)
1183 1183
1184 eina_stringshare_del(it->label); 1184 eina_stringshare_del(it->label);
1185 if (it->label) 1185 if (it->label)
1186 edje_object_signal_emit(VIEW(it), "elm,state,text,hidden", "elm"); 1186 elm_layout_signal_emit(VIEW(it), "elm,state,text,hidden", "elm");
1187 eina_stringshare_del(it->icon_str); 1187 eina_stringshare_del(it->icon_str);
1188 1188
1189 if (it->icon) 1189 if (it->icon)
1190 { 1190 {
1191 edje_object_signal_emit(VIEW(it), "elm,state,icon,hidden", "elm"); 1191 elm_layout_signal_emit(VIEW(it), "elm,state,icon,hidden", "elm");
1192 evas_object_del(it->icon); 1192 evas_object_del(it->icon);
1193 } 1193 }
1194 1194
@@ -1219,20 +1219,20 @@ _item_theme_hook(Evas_Object *obj,
1219 style = elm_widget_style_get(obj); 1219 style = elm_widget_style_get(obj);
1220 1220
1221 _item_mirrored_set(obj, it, elm_widget_mirrored_get(obj)); 1221 _item_mirrored_set(obj, it, elm_widget_mirrored_get(obj));
1222 edje_object_scale_set(view, scale); 1222 edje_object_scale_set(elm_layout_edje_get(view), scale);
1223 1223
1224 if (!it->separator && !it->object) 1224 if (!it->separator && !it->object)
1225 { 1225 {
1226 elm_widget_theme_object_set(obj, view, "toolbar", "item", style); 1226 elm_layout_theme_set(view, "toolbar", "item", style);
1227 if (it->selected) 1227 if (it->selected)
1228 { 1228 {
1229 edje_object_signal_emit(view, "elm,state,selected", "elm"); 1229 elm_layout_signal_emit(view, "elm,state,selected", "elm");
1230 if (it->icon) 1230 if (it->icon)
1231 elm_widget_signal_emit(it->icon, "elm,state,selected", "elm"); 1231 elm_widget_signal_emit(it->icon, "elm,state,selected", "elm");
1232 } 1232 }
1233 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get())) 1233 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
1234 { 1234 {
1235 edje_object_signal_emit(view, "elm,state,disabled", "elm"); 1235 elm_layout_signal_emit(view, "elm,state,disabled", "elm");
1236 if (it->icon) 1236 if (it->icon)
1237 elm_widget_signal_emit(it->icon, "elm,state,disabled", "elm"); 1237 elm_widget_signal_emit(it->icon, "elm,state,disabled", "elm");
1238 } 1238 }
@@ -1243,37 +1243,37 @@ _item_theme_hook(Evas_Object *obj,
1243 ms = ((double)icon_size * scale); 1243 ms = ((double)icon_size * scale);
1244 evas_object_size_hint_min_set(it->icon, ms, ms); 1244 evas_object_size_hint_min_set(it->icon, ms, ms);
1245 evas_object_size_hint_max_set(it->icon, ms, ms); 1245 evas_object_size_hint_max_set(it->icon, ms, ms);
1246 edje_object_part_swallow(view, "elm.swallow.icon", it->icon); 1246 elm_layout_content_set(view, "elm.swallow.icon", it->icon);
1247 edje_object_signal_emit 1247 elm_layout_signal_emit
1248 (view, "elm,state,icon,visible", "elm"); 1248 (view, "elm,state,icon,visible", "elm");
1249 } 1249 }
1250 if (it->label) 1250 if (it->label)
1251 { 1251 {
1252 edje_object_part_text_escaped_set(view, "elm.text", it->label); 1252 elm_layout_text_set(view, "elm.text", it->label);
1253 edje_object_signal_emit(view, "elm,state,text,visible", "elm"); 1253 elm_layout_signal_emit(view, "elm,state,text,visible", "elm");
1254 } 1254 }
1255 } 1255 }
1256 else 1256 else
1257 { 1257 {
1258 if (!it->object) 1258 if (!it->object)
1259 { 1259 {
1260 elm_widget_theme_object_set 1260 elm_layout_theme_set
1261 (obj, view, "toolbar", "separator", style); 1261 (view, "toolbar", "separator", style);
1262 } 1262 }
1263 else 1263 else
1264 { 1264 {
1265 elm_widget_theme_object_set 1265 elm_layout_theme_set
1266 (obj, view, "toolbar", "object", style); 1266 (view, "toolbar", "object", style);
1267 edje_object_part_swallow(view, "elm.swallow.object", it->object); 1267 elm_layout_content_set(view, "elm.swallow.object", it->object);
1268 } 1268 }
1269 } 1269 }
1270 1270
1271 if (sd->vertical) 1271 if (sd->vertical)
1272 edje_object_signal_emit(view, "elm,orient,vertical", "elm"); 1272 elm_layout_signal_emit(view, "elm,orient,vertical", "elm");
1273 else 1273 else
1274 edje_object_signal_emit(view, "elm,orient,horizontal", "elm"); 1274 elm_layout_signal_emit(view, "elm,orient,horizontal", "elm");
1275 1275
1276 edje_object_message_signal_process(view); 1276 edje_object_message_signal_process(elm_layout_edje_get(view));
1277 if (!it->separator && !it->object) 1277 if (!it->separator && !it->object)
1278 elm_coords_finger_size_adjust(1, &mw, 1, &mh); 1278 elm_coords_finger_size_adjust(1, &mw, 1, &mh);
1279 if (sd->shrink_mode != ELM_TOOLBAR_SHRINK_EXPAND) 1279 if (sd->shrink_mode != ELM_TOOLBAR_SHRINK_EXPAND)
@@ -1326,13 +1326,13 @@ _inform_item_number(Evas_Object *obj)
1326 { 1326 {
1327 if (!it->separator && !it->object) 1327 if (!it->separator && !it->object)
1328 { 1328 {
1329 edje_object_signal_emit(VIEW(it), buf, "elm"); 1329 elm_layout_signal_emit(VIEW(it), buf, "elm");
1330 edje_object_message_signal_process(VIEW(it)); 1330 edje_object_message_signal_process(elm_layout_edje_get(VIEW(it)));
1331 1331
1332 mw = mh = -1; 1332 mw = mh = -1;
1333 elm_coords_finger_size_adjust(1, &mw, 1, &mh); 1333 elm_coords_finger_size_adjust(1, &mw, 1, &mh);
1334 1334
1335 edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh); 1335 edje_object_size_min_restricted_calc(elm_layout_edje_get(VIEW(it)), &mw, &mh, mw, mh);
1336 evas_object_size_hint_min_set(VIEW(it), mw, mh); 1336 evas_object_size_hint_min_set(VIEW(it), mw, mh);
1337 } 1337 }
1338 } 1338 }
@@ -1478,11 +1478,11 @@ _elm_toolbar_elm_widget_theme_apply(Eo *obj, Elm_Toolbar_Data *sd)
1478static void 1478static void
1479_elm_toolbar_item_label_update(Elm_Toolbar_Item_Data *item) 1479_elm_toolbar_item_label_update(Elm_Toolbar_Item_Data *item)
1480{ 1480{
1481 edje_object_part_text_escaped_set(VIEW(item), "elm.text", item->label); 1481 elm_layout_text_set(VIEW(item), "elm.text", item->label);
1482 if (item->label) 1482 if (item->label)
1483 edje_object_signal_emit(VIEW(item), "elm,state,text,visible", "elm"); 1483 elm_layout_signal_emit(VIEW(item), "elm,state,text,visible", "elm");
1484 else 1484 else
1485 edje_object_signal_emit(VIEW(item), "elm,state,text,hidden", "elm"); 1485 elm_layout_signal_emit(VIEW(item), "elm,state,text,hidden", "elm");
1486} 1486}
1487 1487
1488static void 1488static void
@@ -1494,9 +1494,9 @@ _elm_toolbar_item_label_set_cb(void *data,
1494 Elm_Toolbar_Item_Data *item = data; 1494 Elm_Toolbar_Item_Data *item = data;
1495 1495
1496 _elm_toolbar_item_label_update(item); 1496 _elm_toolbar_item_label_update(item);
1497 edje_object_signal_callback_del 1497 elm_layout_signal_callback_del
1498 (obj, emission, source, _elm_toolbar_item_label_set_cb); 1498 (obj, emission, source, _elm_toolbar_item_label_set_cb);
1499 edje_object_signal_emit(VIEW(item), "elm,state,label,reset", "elm"); 1499 elm_layout_signal_emit(VIEW(item), "elm,state,label,reset", "elm");
1500} 1500}
1501 1501
1502static void 1502static void
@@ -1509,13 +1509,13 @@ _item_label_set(Elm_Toolbar_Item_Data *item,
1509 if ((label) && (item->label) && (!strcmp(label, item->label))) return; 1509 if ((label) && (item->label) && (!strcmp(label, item->label))) return;
1510 1510
1511 eina_stringshare_replace(&item->label, label); 1511 eina_stringshare_replace(&item->label, label);
1512 s = edje_object_data_get(VIEW(item), "transition_animation_on"); 1512 s = elm_layout_data_get(VIEW(item), "transition_animation_on");
1513 if ((s) && (atoi(s))) 1513 if ((s) && (atoi(s)))
1514 { 1514 {
1515 edje_object_part_text_escaped_set 1515 elm_layout_text_set
1516 (VIEW(item), "elm.text_new", item->label); 1516 (VIEW(item), "elm.text_new", item->label);
1517 edje_object_signal_emit(VIEW(item), sig, "elm"); 1517 elm_layout_signal_emit(VIEW(item), sig, "elm");
1518 edje_object_signal_callback_add 1518 elm_layout_signal_callback_add
1519 (VIEW(item), "elm,state,label_set,done", "elm", 1519 (VIEW(item), "elm,state,label_set,done", "elm",
1520 _elm_toolbar_item_label_set_cb, item); 1520 _elm_toolbar_item_label_set_cb, item);
1521 } 1521 }
@@ -1542,14 +1542,14 @@ _elm_toolbar_item_elm_widget_item_part_text_set(Eo *eo_item EINA_UNUSED, Elm_Too
1542 if (label) 1542 if (label)
1543 { 1543 {
1544 snprintf(buf, sizeof(buf), "elm,state,%s,visible", part); 1544 snprintf(buf, sizeof(buf), "elm,state,%s,visible", part);
1545 edje_object_signal_emit(VIEW(item), buf, "elm"); 1545 elm_layout_signal_emit(VIEW(item), buf, "elm");
1546 } 1546 }
1547 else 1547 else
1548 { 1548 {
1549 snprintf(buf, sizeof(buf), "elm,state,%s,hidden", part); 1549 snprintf(buf, sizeof(buf), "elm,state,%s,hidden", part);
1550 edje_object_signal_emit(VIEW(item), buf, "elm"); 1550 elm_layout_signal_emit(VIEW(item), buf, "elm");
1551 } 1551 }
1552 edje_object_part_text_escaped_set(VIEW(item), part, label); 1552 elm_layout_text_set(VIEW(item), part, label);
1553 } 1553 }
1554} 1554}
1555 1555
@@ -1564,7 +1564,7 @@ _elm_toolbar_item_elm_widget_item_part_text_get(Eo *eo_it EINA_UNUSED, Elm_Toolb
1564 else 1564 else
1565 snprintf(buf, sizeof(buf), "%s", part); 1565 snprintf(buf, sizeof(buf), "%s", part);
1566 1566
1567 return edje_object_part_text_get(VIEW(it), buf); 1567 return elm_layout_text_get(VIEW(it), buf);
1568} 1568}
1569 1569
1570EOLIAN static void 1570EOLIAN static void
@@ -1610,7 +1610,7 @@ _elm_toolbar_item_elm_widget_item_part_content_unset(Eo *eo_item EINA_UNUSED, El
1610 1610
1611 if (part && strcmp(part, "object")) return NULL; 1611 if (part && strcmp(part, "object")) return NULL;
1612 1612
1613 edje_object_part_unswallow(VIEW(item), item->object); 1613 elm_layout_content_unset(VIEW(item), "elm.swallow.object");
1614 elm_widget_sub_object_del(obj, item->object); 1614 elm_widget_sub_object_del(obj, item->object);
1615 o = item->object; 1615 o = item->object;
1616 item->object = NULL; 1616 item->object = NULL;
@@ -1669,7 +1669,7 @@ _select_filter_cb(Elm_Toolbar_Item_Data *it,
1669 button = atoi(emission + sizeof("mouse,clicked,") - 1); 1669 button = atoi(emission + sizeof("mouse,clicked,") - 1);
1670 if (button == 1) return; /* regular left click event */ 1670 if (button == 1) return; /* regular left click event */
1671 snprintf(buf, sizeof(buf), "elm,action,click,%d", button); 1671 snprintf(buf, sizeof(buf), "elm,action,click,%d", button);
1672 edje_object_signal_emit(VIEW(it), buf, "elm"); 1672 elm_layout_signal_emit(VIEW(it), buf, "elm");
1673} 1673}
1674 1674
1675static void 1675static void
@@ -2015,7 +2015,7 @@ _item_reorder_start(Elm_Toolbar_Item_Data *item)
2015 evas_object_image_source_clip_set(img, EINA_FALSE); 2015 evas_object_image_source_clip_set(img, EINA_FALSE);
2016 2016
2017 evas_object_layer_set(item->proxy, 100); 2017 evas_object_layer_set(item->proxy, 100);
2018 edje_object_signal_emit(VIEW(item), "elm,state,moving", "elm"); 2018 elm_layout_signal_emit(VIEW(item), "elm,state,moving", "elm");
2019 2019
2020 evas_object_event_callback_add 2020 evas_object_event_callback_add
2021 (obj, EVAS_CALLBACK_MOUSE_MOVE, 2021 (obj, EVAS_CALLBACK_MOUSE_MOVE,
@@ -2131,7 +2131,7 @@ _mouse_in_cb(void *data,
2131{ 2131{
2132 Elm_Toolbar_Item_Data *it = data; 2132 Elm_Toolbar_Item_Data *it = data;
2133 2133
2134 edje_object_signal_emit(VIEW(it), "elm,state,highlighted", "elm"); 2134 elm_layout_signal_emit(VIEW(it), "elm,state,highlighted", "elm");
2135 if (it->icon) 2135 if (it->icon)
2136 elm_widget_signal_emit(it->icon, "elm,state,highlighted", "elm"); 2136 elm_widget_signal_emit(it->icon, "elm,state,highlighted", "elm");
2137 2137
@@ -2148,7 +2148,7 @@ _mouse_out_cb(void *data,
2148{ 2148{
2149 Elm_Toolbar_Item_Data *it = data; 2149 Elm_Toolbar_Item_Data *it = data;
2150 2150
2151 edje_object_signal_emit(VIEW(it), "elm,state,unhighlighted", "elm"); 2151 elm_layout_signal_emit(VIEW(it), "elm,state,unhighlighted", "elm");
2152 if (it->icon) 2152 if (it->icon)
2153 elm_widget_signal_emit(it->icon, "elm,state,unhighlighted", "elm"); 2153 elm_widget_signal_emit(it->icon, "elm,state,unhighlighted", "elm");
2154} 2154}
@@ -2342,7 +2342,7 @@ _item_new(Evas_Object *obj,
2342 it->object = NULL; 2342 it->object = NULL;
2343 WIDGET_ITEM_DATA_SET(EO_OBJ(it), data); 2343 WIDGET_ITEM_DATA_SET(EO_OBJ(it), data);
2344 2344
2345 VIEW(it) = edje_object_add(evas_object_evas_get(obj)); 2345 VIEW(it) = elm_layout_add(obj);
2346 evas_object_data_set(VIEW(it), "item", it); 2346 evas_object_data_set(VIEW(it), "item", it);
2347 2347
2348 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) 2348 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
@@ -2360,15 +2360,15 @@ _item_new(Evas_Object *obj,
2360 evas_object_del(icon_obj); 2360 evas_object_del(icon_obj);
2361 } 2361 }
2362 2362
2363 elm_widget_theme_object_set 2363 elm_layout_theme_set
2364 (obj, VIEW(it), "toolbar", "item", elm_widget_style_get(obj)); 2364 (VIEW(it), "toolbar", "item", elm_widget_style_get(obj));
2365 edje_object_signal_callback_add 2365 elm_layout_signal_callback_add
2366 (VIEW(it), "elm,action,click", "elm", _select_cb, it); 2366 (VIEW(it), "elm,action,click", "elm", _select_cb, it);
2367 edje_object_signal_callback_add 2367 elm_layout_signal_callback_add
2368 (VIEW(it), "mouse,clicked,*", "*", (Edje_Signal_Cb)_select_filter_cb, it); 2368 (VIEW(it), "mouse,clicked,*", "*", (Edje_Signal_Cb)_select_filter_cb, it);
2369 edje_object_signal_callback_add 2369 elm_layout_signal_callback_add
2370 (VIEW(it), "elm,mouse,in", "elm", _mouse_in_cb, it); 2370 (VIEW(it), "elm,mouse,in", "elm", _mouse_in_cb, it);
2371 edje_object_signal_callback_add 2371 elm_layout_signal_callback_add
2372 (VIEW(it), "elm,mouse,out", "elm", _mouse_out_cb, it); 2372 (VIEW(it), "elm,mouse,out", "elm", _mouse_out_cb, it);
2373 evas_object_event_callback_add 2373 evas_object_event_callback_add
2374 (VIEW(it), EVAS_CALLBACK_MOUSE_DOWN, (Evas_Object_Event_Cb)_mouse_down_cb, 2374 (VIEW(it), EVAS_CALLBACK_MOUSE_DOWN, (Evas_Object_Event_Cb)_mouse_down_cb,
@@ -2384,15 +2384,15 @@ _item_new(Evas_Object *obj,
2384 ms = ((double)sd->icon_size * elm_config_scale_get()); 2384 ms = ((double)sd->icon_size * elm_config_scale_get());
2385 evas_object_size_hint_min_set(it->icon, ms, ms); 2385 evas_object_size_hint_min_set(it->icon, ms, ms);
2386 evas_object_size_hint_max_set(it->icon, ms, ms); 2386 evas_object_size_hint_max_set(it->icon, ms, ms);
2387 edje_object_part_swallow(VIEW(it), "elm.swallow.icon", it->icon); 2387 elm_layout_content_set(VIEW(it), "elm.swallow.icon", it->icon);
2388 edje_object_signal_emit(VIEW(it), "elm,state,icon,visible", "elm"); 2388 elm_layout_signal_emit(VIEW(it), "elm,state,icon,visible", "elm");
2389 evas_object_show(it->icon); 2389 evas_object_show(it->icon);
2390 elm_widget_sub_object_add(obj, it->icon); 2390 elm_widget_sub_object_add(obj, it->icon);
2391 } 2391 }
2392 if (it->label) 2392 if (it->label)
2393 { 2393 {
2394 edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label); 2394 elm_layout_text_set(VIEW(it), "elm.text", it->label);
2395 edje_object_signal_emit(VIEW(it), "elm,state,text,visible", "elm"); 2395 elm_layout_signal_emit(VIEW(it), "elm,state,text,visible", "elm");
2396 } 2396 }
2397 2397
2398 evas_object_event_callback_add 2398 evas_object_event_callback_add
@@ -2408,15 +2408,15 @@ _elm_toolbar_item_icon_update(Elm_Toolbar_Item_Data *item)
2408{ 2408{
2409 Elm_Toolbar_Item_State *it_state; 2409 Elm_Toolbar_Item_State *it_state;
2410 Evas_Object *old_icon = 2410 Evas_Object *old_icon =
2411 edje_object_part_swallow_get(VIEW(item), "elm.swallow.icon"); 2411 elm_layout_content_get(VIEW(item), "elm.swallow.icon");
2412 Eina_List *l; 2412 Eina_List *l;
2413 2413
2414 elm_widget_sub_object_del(WIDGET(item), old_icon); 2414 elm_widget_sub_object_del(WIDGET(item), old_icon);
2415 edje_object_part_swallow(VIEW(item), "elm.swallow.icon", item->icon); 2415 elm_layout_content_set(VIEW(item), "elm.swallow.icon", item->icon);
2416 if (item->icon) 2416 if (item->icon)
2417 edje_object_signal_emit(VIEW(item), "elm,state,icon,visible", "elm"); 2417 elm_layout_signal_emit(VIEW(item), "elm,state,icon,visible", "elm");
2418 else 2418 else
2419 edje_object_signal_emit(VIEW(item), "elm,state,icon,hidden", "elm"); 2419 elm_layout_signal_emit(VIEW(item), "elm,state,icon,hidden", "elm");
2420 evas_object_hide(old_icon); 2420 evas_object_hide(old_icon);
2421 2421
2422 EINA_LIST_FOREACH(item->states, l, it_state) 2422 EINA_LIST_FOREACH(item->states, l, it_state)
@@ -2434,11 +2434,11 @@ _elm_toolbar_item_icon_set_cb(void *data,
2434{ 2434{
2435 Elm_Toolbar_Item_Data *item = data; 2435 Elm_Toolbar_Item_Data *item = data;
2436 2436
2437 edje_object_part_unswallow(VIEW(item), item->icon); 2437 elm_layout_content_unset(VIEW(item), "elm.swallow.icon");
2438 _elm_toolbar_item_icon_update(item); 2438 _elm_toolbar_item_icon_update(item);
2439 edje_object_signal_callback_del 2439 elm_layout_signal_callback_del
2440 (obj, emission, source, _elm_toolbar_item_icon_set_cb); 2440 (obj, emission, source, _elm_toolbar_item_icon_set_cb);
2441 edje_object_signal_emit(VIEW(item), "elm,state,icon,reset", "elm"); 2441 elm_layout_signal_emit(VIEW(item), "elm,state,icon,reset", "elm");
2442} 2442}
2443 2443
2444static void 2444static void
@@ -2469,20 +2469,20 @@ _elm_toolbar_item_icon_obj_set(Evas_Object *obj,
2469 evas_object_show(item->icon); 2469 evas_object_show(item->icon);
2470 elm_widget_sub_object_add(obj, item->icon); 2470 elm_widget_sub_object_add(obj, item->icon);
2471 } 2471 }
2472 s = edje_object_data_get(VIEW(item), "transition_animation_on"); 2472 s = elm_layout_data_get(VIEW(item), "transition_animation_on");
2473 if ((s) && (atoi(s))) 2473 if ((s) && (atoi(s)))
2474 { 2474 {
2475 old_icon = edje_object_part_swallow_get 2475 old_icon = elm_layout_content_get
2476 (VIEW(item), "elm.swallow.icon_new"); 2476 (VIEW(item), "elm.swallow.icon_new");
2477 if (old_icon) 2477 if (old_icon)
2478 { 2478 {
2479 elm_widget_sub_object_del(WIDGET(item), old_icon); 2479 elm_widget_sub_object_del(WIDGET(item), old_icon);
2480 evas_object_hide(old_icon); 2480 evas_object_hide(old_icon);
2481 } 2481 }
2482 edje_object_part_swallow 2482 elm_layout_content_set
2483 (VIEW(item), "elm.swallow.icon_new", item->icon); 2483 (VIEW(item), "elm.swallow.icon_new", item->icon);
2484 edje_object_signal_emit(VIEW(item), sig, "elm"); 2484 elm_layout_signal_emit(VIEW(item), sig, "elm");
2485 edje_object_signal_callback_add 2485 elm_layout_signal_callback_add
2486 (VIEW(item), "elm,state,icon_set,done", "elm", 2486 (VIEW(item), "elm,state,icon_set,done", "elm",
2487 _elm_toolbar_item_icon_set_cb, item); 2487 _elm_toolbar_item_icon_set_cb, item);
2488 } 2488 }