summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-26 22:06:23 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-26 22:07:07 +0900
commitae48eb827f68277c9b4ea4b59785d654b9786847 (patch)
tree462c1123b47a9bf82726fb8e5c928d627b73d2c2
parentec62658686cd35a9c98dfe389d46d9723c671dc5 (diff)
toolbar: changed internal variable types to sync with other widgets.
Changed the variable type from (Elm_Toolbar_Item *) to (Elm_Object_Item *) for focused_item, last_focused_item, and prev_focused_item.
-rw-r--r--src/lib/elm_toolbar.c26
-rw-r--r--src/lib/elm_widget_toolbar.h6
2 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index a4e257f25..7607cdd9c 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -597,10 +597,10 @@ _elm_toolbar_item_focused(Elm_Toolbar_Item *it)
597 const char *focus_raise; 597 const char *focus_raise;
598 598
599 if ((!sd) || (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) || 599 if ((!sd) || (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) ||
600 (it == sd->focused_item)) 600 ((Elm_Object_Item *)it == sd->focused_item))
601 return; 601 return;
602 602
603 sd->focused_item = it; 603 sd->focused_item = (Elm_Object_Item *)it;
604 switch (_elm_config->focus_autoscroll_mode) 604 switch (_elm_config->focus_autoscroll_mode)
605 { 605 {
606 case ELM_FOCUS_AUTOSCROLL_MODE_SHOW: 606 case ELM_FOCUS_AUTOSCROLL_MODE_SHOW:
@@ -630,7 +630,7 @@ _elm_toolbar_item_focused(Elm_Toolbar_Item *it)
630} 630}
631 631
632static void 632static void
633_elm_toolbar_item_unfocused(Elm_Toolbar_Item *it) 633_elm_toolbar_item_unfocused(Elm_Object_Item *it)
634{ 634{
635 Evas_Object *obj = WIDGET(it); 635 Evas_Object *obj = WIDGET(it);
636 ELM_TOOLBAR_DATA_GET(obj, sd); 636 ELM_TOOLBAR_DATA_GET(obj, sd);
@@ -735,7 +735,7 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd)
735 if (elm_widget_focus_get(obj) && !sd->mouse_down) 735 if (elm_widget_focus_get(obj) && !sd->mouse_down)
736 { 736 {
737 if (sd->last_focused_item) 737 if (sd->last_focused_item)
738 it = (Elm_Object_Item *)sd->last_focused_item; 738 it = sd->last_focused_item;
739 /* TODO: make it optional on 1.11. Disable this until then 739 /* TODO: make it optional on 1.11. Disable this until then
740 else 740 else
741 it = (Elm_Object_Item *)ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items); 741 it = (Elm_Object_Item *)ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items);
@@ -818,7 +818,7 @@ _item_focus_set_hook(Elm_Object_Item *it, Eina_Bool focused)
818 else 818 else
819 { 819 {
820 if (it) 820 if (it)
821 _elm_toolbar_item_unfocused((Elm_Toolbar_Item *)it); 821 _elm_toolbar_item_unfocused(it);
822 } 822 }
823 823
824 _elm_widget_item_highlight_in_theme(obj, (Elm_Object_Item *)it); 824 _elm_widget_item_highlight_in_theme(obj, (Elm_Object_Item *)it);
@@ -834,7 +834,7 @@ _item_focus_get_hook(Elm_Object_Item *it)
834 ELM_TOOLBAR_CHECK(obj) EINA_FALSE; 834 ELM_TOOLBAR_CHECK(obj) EINA_FALSE;
835 ELM_TOOLBAR_DATA_GET(obj, sd); 835 ELM_TOOLBAR_DATA_GET(obj, sd);
836 836
837 if (it == (Elm_Object_Item *)sd->focused_item) 837 if (it == sd->focused_item)
838 return EINA_TRUE; 838 return EINA_TRUE;
839 return EINA_FALSE; 839 return EINA_FALSE;
840} 840}
@@ -867,7 +867,7 @@ _key_action_select(Evas_Object *obj, const char *params EINA_UNUSED)
867 ELM_TOOLBAR_DATA_GET(obj, sd); 867 ELM_TOOLBAR_DATA_GET(obj, sd);
868 868
869 if (sd->focused_item) 869 if (sd->focused_item)
870 _item_select(sd->focused_item); 870 _item_select((Elm_Toolbar_Item *)sd->focused_item);
871 871
872 return EINA_TRUE; 872 return EINA_TRUE;
873} 873}
@@ -1132,11 +1132,11 @@ _item_del(Elm_Toolbar_Item *it)
1132 evas_object_del(it->icon); 1132 evas_object_del(it->icon);
1133 } 1133 }
1134 1134
1135 if (sd->focused_item == it) 1135 if (sd->focused_item == (Elm_Object_Item *)it)
1136 sd->focused_item = NULL; 1136 sd->focused_item = NULL;
1137 if (sd->last_focused_item == it) 1137 if (sd->last_focused_item == (Elm_Object_Item *)it)
1138 sd->last_focused_item = NULL; 1138 sd->last_focused_item = NULL;
1139 if (sd->prev_focused_item == it) 1139 if (sd->prev_focused_item == (Elm_Object_Item *)it)
1140 sd->prev_focused_item = NULL; 1140 sd->prev_focused_item = NULL;
1141 1141
1142 evas_object_del(it->object); 1142 evas_object_del(it->object);
@@ -2095,7 +2095,7 @@ _mouse_up_cb(Elm_Toolbar_Item *it,
2095 sd->mouse_down = EINA_FALSE; 2095 sd->mouse_down = EINA_FALSE;
2096 ELM_SAFE_FREE(sd->long_timer, ecore_timer_del); 2096 ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
2097 if ((!elm_object_item_disabled_get((Elm_Object_Item *)it)) && 2097 if ((!elm_object_item_disabled_get((Elm_Object_Item *)it)) &&
2098 (sd->focused_item != it)) 2098 (sd->focused_item != (Elm_Object_Item *)it))
2099 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE); 2099 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE);
2100 evas_object_event_callback_del_full 2100 evas_object_event_callback_del_full
2101 (VIEW(it), EVAS_CALLBACK_MOUSE_MOVE, 2101 (VIEW(it), EVAS_CALLBACK_MOUSE_MOVE,
@@ -2921,7 +2921,7 @@ _elm_toolbar_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, Eina_B
2921} 2921}
2922 2922
2923static void 2923static void
2924_elm_toolbar_coordinates_adjust(Elm_Toolbar_Item *it, 2924_elm_toolbar_coordinates_adjust(Elm_Object_Item *it,
2925 Evas_Coord *x, 2925 Evas_Coord *x,
2926 Evas_Coord *y, 2926 Evas_Coord *y,
2927 Evas_Coord *w, 2927 Evas_Coord *w,
@@ -3829,7 +3829,7 @@ elm_toolbar_item_bring_in(Elm_Object_Item *it, Elm_Toolbar_Item_Scrollto_Type ty
3829EOLIAN static Elm_Object_Item * 3829EOLIAN static Elm_Object_Item *
3830_elm_toolbar_elm_widget_focused_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) 3830_elm_toolbar_elm_widget_focused_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
3831{ 3831{
3832 return (Elm_Object_Item *)sd->focused_item; 3832 return sd->focused_item;
3833} 3833}
3834 3834
3835EOLIAN static void 3835EOLIAN static void
diff --git a/src/lib/elm_widget_toolbar.h b/src/lib/elm_widget_toolbar.h
index 09d6a45dd..1c99e6c2c 100644
--- a/src/lib/elm_widget_toolbar.h
+++ b/src/lib/elm_widget_toolbar.h
@@ -29,9 +29,9 @@ struct _Elm_Toolbar_Data
29 Eina_Inlist *items; 29 Eina_Inlist *items;
30 Elm_Toolbar_Item *more_item; 30 Elm_Toolbar_Item *more_item;
31 Elm_Toolbar_Item *selected_item; /**< a selected item by mouse click, return key, api, and etc. */ 31 Elm_Toolbar_Item *selected_item; /**< a selected item by mouse click, return key, api, and etc. */
32 Elm_Toolbar_Item *focused_item; /**< a focused item by keypad arrow or mouse. This is set to NULL if widget looses focus. */ 32 Elm_Object_Item *focused_item; /**< a focused item by keypad arrow or mouse. This is set to NULL if widget looses focus. */
33 Elm_Toolbar_Item *prev_focused_item; /**< previous focused item by keypad arrow or mouse. */ 33 Elm_Object_Item *last_focused_item; /**< This records the last focused item when widget looses focus. This is required to set the focus on last focused item when widgets gets focus. */
34 Elm_Toolbar_Item *last_focused_item; /**< This records the last focused item when widget looses focus. This is required to set the focus on last focused item when widgets gets focus. */ 34 Elm_Object_Item *prev_focused_item; /**< a previous focused item by keypad arrow or mouse. */
35 Elm_Toolbar_Item *reorder_empty, *reorder_item; 35 Elm_Toolbar_Item *reorder_empty, *reorder_item;
36 Elm_Toolbar_Shrink_Mode shrink_mode; 36 Elm_Toolbar_Shrink_Mode shrink_mode;
37 Elm_Icon_Lookup_Order lookup_order; 37 Elm_Icon_Lookup_Order lookup_order;