summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_toolbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_toolbar.c')
-rw-r--r--src/lib/elementary/elm_toolbar.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index e379a6f..8affc3c 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -15,6 +15,7 @@
15#include "elm_priv.h" 15#include "elm_priv.h"
16#include "elm_widget_toolbar.h" 16#include "elm_widget_toolbar.h"
17#include "els_box.h" 17#include "els_box.h"
18#include "elm_pan_eo.h"
18 19
19#define MY_CLASS ELM_TOOLBAR_CLASS 20#define MY_CLASS ELM_TOOLBAR_CLASS
20 21
@@ -179,7 +180,7 @@ _item_unselect(Elm_Toolbar_Item_Data *item)
179 elm_widget_signal_emit(item->icon, "elm,state,unselected", "elm"); 180 elm_widget_signal_emit(item->icon, "elm,state,unselected", "elm");
180 efl_event_callback_legacy_call(WIDGET(item), EFL_UI_EVENT_UNSELECTED, EO_OBJ(item)); 181 efl_event_callback_legacy_call(WIDGET(item), EFL_UI_EVENT_UNSELECTED, EO_OBJ(item));
181 if (_elm_config->atspi_mode) 182 if (_elm_config->atspi_mode)
182 efl_access_state_changed_signal_emit(EO_OBJ(item), EFL_ACCESS_STATE_SELECTED, EINA_FALSE); 183 efl_access_state_changed_signal_emit(EO_OBJ(item), EFL_ACCESS_STATE_TYPE_SELECTED, EINA_FALSE);
183} 184}
184 185
185static void 186static void
@@ -621,6 +622,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
621{ 622{
622 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it); 623 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
623 Evas_Object *obj = WIDGET(it); 624 Evas_Object *obj = WIDGET(it);
625 Evas_Object *win = elm_widget_top_get(obj);
624 ELM_TOOLBAR_DATA_GET(obj, sd); 626 ELM_TOOLBAR_DATA_GET(obj, sd);
625 const char *focus_raise; 627 const char *focus_raise;
626 628
@@ -643,7 +645,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
643 break; 645 break;
644 } 646 }
645 647
646 if (elm_widget_focus_highlight_enabled_get(obj)) 648 if (elm_win_focus_highlight_enabled_get(win))
647 { 649 {
648 elm_layout_signal_emit 650 elm_layout_signal_emit
649 (VIEW(it), "elm,state,focused", "elm"); 651 (VIEW(it), "elm,state,focused", "elm");
@@ -656,7 +658,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
656 efl_event_callback_legacy_call 658 efl_event_callback_legacy_call
657 (obj, ELM_TOOLBAR_EVENT_ITEM_FOCUSED, EO_OBJ(it)); 659 (obj, ELM_TOOLBAR_EVENT_ITEM_FOCUSED, EO_OBJ(it));
658 if (_elm_config->atspi_mode) 660 if (_elm_config->atspi_mode)
659 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_FOCUSED, EINA_TRUE); 661 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_TRUE);
660} 662}
661 663
662static void 664static void
@@ -664,6 +666,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
664{ 666{
665 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it); 667 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
666 Evas_Object *obj = WIDGET(it); 668 Evas_Object *obj = WIDGET(it);
669 Evas_Object *win = elm_widget_top_get(obj);
667 ELM_TOOLBAR_DATA_GET(obj, sd); 670 ELM_TOOLBAR_DATA_GET(obj, sd);
668 671
669 if ((!sd) || !sd->focused_item || 672 if ((!sd) || !sd->focused_item ||
@@ -671,7 +674,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
671 return; 674 return;
672 if (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) 675 if (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
673 return; 676 return;
674 if (elm_widget_focus_highlight_enabled_get(obj)) 677 if (elm_win_focus_highlight_enabled_get(win))
675 { 678 {
676 ELM_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it); 679 ELM_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it);
677 elm_layout_signal_emit 680 elm_layout_signal_emit
@@ -683,7 +686,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
683 efl_event_callback_legacy_call 686 efl_event_callback_legacy_call
684 (obj, ELM_TOOLBAR_EVENT_ITEM_UNFOCUSED, eo_it); 687 (obj, ELM_TOOLBAR_EVENT_ITEM_UNFOCUSED, eo_it);
685 if (_elm_config->atspi_mode) 688 if (_elm_config->atspi_mode)
686 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_FOCUSED, EINA_TRUE); 689 efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_FOCUSED, EINA_TRUE);
687} 690}
688 691
689/* 692/*
@@ -1093,7 +1096,7 @@ _item_select(Elm_Toolbar_Item_Data *it)
1093 } 1096 }
1094 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SELECTED, EO_OBJ(it)); 1097 efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SELECTED, EO_OBJ(it));
1095 if (_elm_config->atspi_mode) 1098 if (_elm_config->atspi_mode)
1096 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_SELECTED, EINA_TRUE); 1099 efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_TYPE_SELECTED, EINA_TRUE);
1097} 1100}
1098 1101
1099/* Send order signals when item is added/deleted. 1102/* Send order signals when item is added/deleted.
@@ -1478,18 +1481,18 @@ _elm_toolbar_highlight_in_theme(Evas_Object *obj)
1478 elm_widget_highlight_in_theme_set(obj, EINA_FALSE); 1481 elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
1479} 1482}
1480 1483
1481EOLIAN static Efl_Ui_Theme_Apply_Result 1484EOLIAN static Eina_Error
1482_elm_toolbar_efl_ui_widget_theme_apply(Eo *obj, Elm_Toolbar_Data *sd) 1485_elm_toolbar_efl_ui_widget_theme_apply(Eo *obj, Elm_Toolbar_Data *sd)
1483{ 1486{
1484 Elm_Toolbar_Item_Data *it; 1487 Elm_Toolbar_Item_Data *it;
1485 double scale = 0; 1488 double scale = 0;
1486 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_RESULT_FAIL); 1489 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
1487 1490
1488 if (sd->delete_me) return EFL_UI_THEME_APPLY_RESULT_SUCCESS; 1491 if (sd->delete_me) return EFL_UI_THEME_APPLY_ERROR_NONE;
1489 1492
1490 Efl_Ui_Theme_Apply_Result int_ret = EFL_UI_THEME_APPLY_RESULT_FAIL; 1493 Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
1491 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); 1494 int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
1492 if (!int_ret) return EFL_UI_THEME_APPLY_RESULT_FAIL; 1495 if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
1493 1496
1494 elm_widget_theme_object_set 1497 elm_widget_theme_object_set
1495 (obj, wd->resize_obj, "toolbar", "base", 1498 (obj, wd->resize_obj, "toolbar", "base",
@@ -3862,16 +3865,16 @@ _elm_toolbar_item_efl_access_object_state_set_get(const Eo *eo_it, Elm_Toolbar_I
3862 3865
3863 sel = elm_toolbar_item_selected_get(eo_it); 3866 sel = elm_toolbar_item_selected_get(eo_it);
3864 3867
3865 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_SELECTABLE); 3868 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_SELECTABLE);
3866 3869
3867 if (sel) 3870 if (sel)
3868 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_SELECTED); 3871 STATE_TYPE_SET(ret, EFL_ACCESS_STATE_TYPE_SELECTED);
3869 3872
3870 return ret; 3873 return ret;
3871} 3874}
3872 3875
3873EOLIAN static Elm_Object_Item * 3876EOLIAN static Elm_Object_Item *
3874_elm_toolbar_efl_ui_widget_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) 3877_elm_toolbar_elm_widget_item_container_focused_item_get(const Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
3875{ 3878{
3876 return sd->focused_item; 3879 return sd->focused_item;
3877} 3880}
@@ -4085,5 +4088,5 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_toolbar, Elm_Toolbar_Data)
4085#define ELM_TOOLBAR_EXTRA_OPS \ 4088#define ELM_TOOLBAR_EXTRA_OPS \
4086 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_toolbar) 4089 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_toolbar)
4087 4090
4088#include "elm_toolbar.eo.c" 4091#include "elm_toolbar_eo.c"
4089#include "elm_toolbar_item.eo.c" 4092#include "elm_toolbar_item_eo.c"