elm_menu, toolbar, ctxpopup : remove unnecesary interface efl_ui_item and efl_ui_menu

Summary:
Legacy menu toolbar and ctxpopup are not new efl interface widget,
but it have efl interfaces, efl_ui_item and efl_ui_menu.
if we plan to implement this two, it should be a class not a interface,
so I remove it on legacy widget.

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5939

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
SangHyeon Lee 2018-04-16 11:02:59 -07:00 committed by Cedric BAIL
parent 9dcf6f71d0
commit 9c8ebc9dfc
18 changed files with 298 additions and 455 deletions

View File

@ -71,8 +71,6 @@ efl_eolian_files = \
lib/efl/interfaces/efl_io_queue.eo \ lib/efl/interfaces/efl_io_queue.eo \
lib/efl/interfaces/efl_observer.eo \ lib/efl/interfaces/efl_observer.eo \
lib/efl/interfaces/efl_observable.eo \ lib/efl/interfaces/efl_observable.eo \
lib/efl/interfaces/efl_ui_item.eo \
lib/efl/interfaces/efl_ui_menu.eo \
lib/efl/interfaces/efl_ui_autorepeat.eo \ lib/efl/interfaces/efl_ui_autorepeat.eo \
lib/efl/interfaces/efl_ui_format.eo \ lib/efl/interfaces/efl_ui_format.eo \
lib/efl/interfaces/efl_gfx_color_class.eo \ lib/efl/interfaces/efl_gfx_color_class.eo \

View File

@ -56,10 +56,10 @@ _btn_remove_cb(void *data EINA_UNUSED, Evas_Object *obj,
static void static void
_ctxpopup_item_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info) _ctxpopup_item_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info)
{ {
printf("Item selected status: %d\n", efl_ui_item_selected_get(event_info)); printf("Item selected status: %d\n", elm_ctxpopup_item_selected_get(event_info));
printf("ctxpopup item selected: %s\n", printf("ctxpopup item selected: %s\n",
elm_object_item_text_get(efl_ui_menu_selected_item_get(obj))); elm_object_item_text_get(elm_ctxpopup_selected_item_get(obj)));
elm_ctxpopup_dismiss(obj); elm_ctxpopup_dismiss(obj);
} }
@ -105,7 +105,7 @@ _list_item_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UN
_ctxpopup_item_new(ctxpopup, "Go to home folder", "home"); _ctxpopup_item_new(ctxpopup, "Go to home folder", "home");
_ctxpopup_item_new(ctxpopup, "Save file", "file"); _ctxpopup_item_new(ctxpopup, "Save file", "file");
it = _ctxpopup_item_new(ctxpopup, "Delete file", "delete"); it = _ctxpopup_item_new(ctxpopup, "Delete file", "delete");
efl_ui_item_selected_set(it, EINA_TRUE); elm_ctxpopup_item_selected_set(it, EINA_TRUE);
it = _ctxpopup_item_new(ctxpopup, "Navigate to folder", "folder"); it = _ctxpopup_item_new(ctxpopup, "Navigate to folder", "folder");
elm_object_item_disabled_set(it, EINA_TRUE); elm_object_item_disabled_set(it, EINA_TRUE);
_ctxpopup_item_new(ctxpopup, "Edit entry", "edit"); _ctxpopup_item_new(ctxpopup, "Edit entry", "edit");

View File

@ -50,8 +50,6 @@ set(PUBLIC_EO_FILES
interfaces/efl_text.eo interfaces/efl_text.eo
interfaces/efl_text_types.eot interfaces/efl_text_types.eot
interfaces/efl_types.eot interfaces/efl_types.eot
interfaces/efl_ui_item.eo
interfaces/efl_ui_menu.eo
interfaces/efl_ui_range.eo interfaces/efl_ui_range.eo
interfaces/efl_ui_autorepeat.eo interfaces/efl_ui_autorepeat.eo
interfaces/efl_vpath.eo interfaces/efl_vpath.eo

View File

@ -85,8 +85,6 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
#include "interfaces/efl_ui_direction.eo.h" #include "interfaces/efl_ui_direction.eo.h"
#include "interfaces/efl_ui_drag.eo.h" #include "interfaces/efl_ui_drag.eo.h"
#include "interfaces/efl_ui_range.eo.h" #include "interfaces/efl_ui_range.eo.h"
#include "interfaces/efl_ui_item.eo.h"
#include "interfaces/efl_ui_menu.eo.h"
#include "interfaces/efl_ui_autorepeat.eo.h" #include "interfaces/efl_ui_autorepeat.eo.h"
#include "interfaces/efl_ui_draggable.eo.h" #include "interfaces/efl_ui_draggable.eo.h"
#include "interfaces/efl_ui_clickable.eo.h" #include "interfaces/efl_ui_clickable.eo.h"

View File

@ -63,9 +63,7 @@
#include "interfaces/efl_ui_direction.eo.c" #include "interfaces/efl_ui_direction.eo.c"
#include "interfaces/efl_ui_drag.eo.c" #include "interfaces/efl_ui_drag.eo.c"
#include "interfaces/efl_ui_range.eo.c" #include "interfaces/efl_ui_range.eo.c"
#include "interfaces/efl_ui_menu.eo.c"
#include "interfaces/efl_ui_autorepeat.eo.c" #include "interfaces/efl_ui_autorepeat.eo.c"
#include "interfaces/efl_ui_item.eo.c"
#include "interfaces/efl_ui_view.eo.c" #include "interfaces/efl_ui_view.eo.c"
#include "interfaces/efl_ui_model_connect.eo.c" #include "interfaces/efl_ui_model_connect.eo.c"
#include "interfaces/efl_ui_factory.eo.c" #include "interfaces/efl_ui_factory.eo.c"

View File

@ -1211,46 +1211,6 @@ _elm_ctxpopup_horizontal_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd)
return sd->horizontal; return sd->horizontal;
} }
EAPI const Eina_List *
elm_ctxpopup_items_get(const Evas_Object *obj)
{
Eina_List *lst = NULL;
Eina_Iterator *it;
void *item_data;
it = efl_ui_menu_items_get(obj);
EINA_ITERATOR_FOREACH(it, item_data)
{
lst = eina_list_append(lst, item_data);
}
eina_iterator_free(it);
return lst;
}
EAPI Elm_Widget_Item *
elm_ctxpopup_first_item_get(const Evas_Object *obj)
{
return efl_ui_menu_first_item_get(obj);
}
EAPI Elm_Widget_Item *
elm_ctxpopup_last_item_get(const Evas_Object *obj)
{
return efl_ui_menu_last_item_get(obj);
}
EAPI Elm_Widget_Item *
elm_ctxpopup_item_prev_get(const Evas_Object *obj)
{
return efl_ui_item_prev_get(obj);
}
EAPI Elm_Widget_Item *
elm_ctxpopup_item_next_get(const Evas_Object *obj)
{
return efl_ui_item_next_get(obj);
}
static void static void
_item_select(Elm_Ctxpopup_Item_Data *item) _item_select(Elm_Ctxpopup_Item_Data *item)
{ {
@ -1408,14 +1368,14 @@ _elm_ctxpopup_class_constructor(Efl_Class *klass)
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
} }
EOLIAN static Eina_Iterator* EOLIAN static const Eina_List *
_elm_ctxpopup_efl_ui_menu_items_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) _elm_ctxpopup_items_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd)
{ {
return eina_list_iterator_new(sd->items); return sd->items;
} }
EOLIAN static Elm_Object_Item* EOLIAN static Elm_Object_Item*
_elm_ctxpopup_efl_ui_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) _elm_ctxpopup_first_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd)
{ {
if (!sd->items) return NULL; if (!sd->items) return NULL;
@ -1423,7 +1383,7 @@ _elm_ctxpopup_efl_ui_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data
} }
EOLIAN static Elm_Object_Item* EOLIAN static Elm_Object_Item*
_elm_ctxpopup_efl_ui_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) _elm_ctxpopup_last_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd)
{ {
if (!sd->items) return NULL; if (!sd->items) return NULL;
@ -1431,7 +1391,7 @@ _elm_ctxpopup_efl_ui_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *
} }
EOLIAN static Elm_Object_Item* EOLIAN static Elm_Object_Item*
_elm_ctxpopup_efl_ui_menu_selected_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd) _elm_ctxpopup_selected_item_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd)
{ {
Eina_List *l; Eina_List *l;
Elm_Object_Item *eo_item; Elm_Object_Item *eo_item;
@ -1474,7 +1434,7 @@ _elm_ctxpopup_item_prepend(Eo *obj, Elm_Ctxpopup_Data *sd, const char *label, Ev
} }
EOLIAN static Elm_Object_Item * EOLIAN static Elm_Object_Item *
_elm_ctxpopup_item_efl_ui_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item) _elm_ctxpopup_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item)
{ {
Eina_List *l; Eina_List *l;
@ -1489,7 +1449,7 @@ _elm_ctxpopup_item_efl_ui_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_It
} }
EOLIAN static Elm_Object_Item * EOLIAN static Elm_Object_Item *
_elm_ctxpopup_item_efl_ui_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item) _elm_ctxpopup_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item)
{ {
Eina_List *l; Eina_List *l;
@ -1504,7 +1464,7 @@ _elm_ctxpopup_item_efl_ui_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_It
} }
EOLIAN static void EOLIAN static void
_elm_ctxpopup_item_efl_ui_item_selected_set(Eo *eo_item EINA_UNUSED, _elm_ctxpopup_item_selected_set(Eo *eo_item EINA_UNUSED,
Elm_Ctxpopup_Item_Data *item, Elm_Ctxpopup_Item_Data *item,
Eina_Bool selected) Eina_Bool selected)
{ {
@ -1527,7 +1487,7 @@ _elm_ctxpopup_item_efl_ui_item_selected_set(Eo *eo_item EINA_UNUSED,
} }
EOLIAN static Eina_Bool EOLIAN static Eina_Bool
_elm_ctxpopup_item_efl_ui_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item) _elm_ctxpopup_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item)
{ {
return item->selected; return item->selected;
} }

View File

@ -8,82 +8,5 @@
*/ */
EAPI Evas_Object *elm_ctxpopup_add(Evas_Object *parent); EAPI Evas_Object *elm_ctxpopup_add(Evas_Object *parent);
/**
* @brief Get the internal list of items in a given ctxpopup widget.
*
* This list is not to be modified in any way and must not be freed. Use the
* list members with functions like @ref elm_object_item_text_set, @ref
* elm_object_item_text_get, @ref elm_object_item_del.
*
* @warning This list is only valid until @c obj object's internal items list
* is changed. It should be fetched again with another call to this function
* when changes happen.
*
* @return The list of items or @c null on errors.
*
* @since 1.11
*
* @ingroup Elm_Ctxpopup
*/
EAPI const Eina_List *elm_ctxpopup_items_get(const Evas_Object *obj);
/**
* @brief Get the first item in the given ctxpopup widget's list of items.
*
* See also @ref elm_obj_ctxpopup_item_append,
* @ref elm_obj_ctxpopup_last_item_get.
*
* @return The first item or @c null, if it has no items (and on errors).
*
* @since 1.11
*
* @ingroup Elm_Ctxpopup
*/
EAPI Elm_Widget_Item *elm_ctxpopup_first_item_get(const Evas_Object *obj);
/**
* @brief Get the last item in the given ctxpopup widget's list of items.
*
* See also @ref elm_obj_ctxpopup_item_prepend,
* @ref elm_obj_ctxpopup_first_item_get.
*
* @return The last item or @c null, if it has no items (and on errors).
*
* @since 1.1
*
* @ingroup Elm_Ctxpopup
*/
EAPI Elm_Widget_Item *elm_ctxpopup_last_item_get(const Evas_Object *obj);
/**
* @brief Get the item before $ it in a ctxpopup widget's internal list of
* items.
*
* See also @ref elm_ctxpopup_item_next_get.
*
* @return The item before the object in its parent's list. If there is no
* previous item for $ it or there's an error, @c null is returned.
*
* @since 1.11
*
* @ingroup Elm_Ctxpopup_Item
*/
EAPI Elm_Widget_Item *elm_ctxpopup_item_prev_get(const Evas_Object *obj);
/**
* @brief Get the item after $ it in a ctxpopup widget's internal list of
* items.
*
* See also @ref elm_ctxpopup_item_prev_get.
*
* @return The item after the object in its parent's list. If there is no
* previous item for $ it or there's an error, @c null is returned.
*
* @since 1.11
*
* @ingroup Elm_Ctxpopup_Item
*/
EAPI Elm_Widget_Item *elm_ctxpopup_item_next_get(const Evas_Object *obj);
#include "elm_ctxpopup_item.eo.legacy.h" #include "elm_ctxpopup_item.eo.legacy.h"
#include "elm_ctxpopup.eo.legacy.h" #include "elm_ctxpopup.eo.legacy.h"

View File

@ -8,14 +8,44 @@ enum Elm.Ctxpopup.Direction
unknown [[Ctxpopup does not determine it's direction yet.]] unknown [[Ctxpopup does not determine it's direction yet.]]
} }
class Elm.Ctxpopup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Access.Widget.Action, class Elm.Ctxpopup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Access.Widget.Action, Efl.Ui.Legacy)
Efl.Ui.Menu, Efl.Ui.Legacy)
{ {
[[Elementary context popup class]] [[Elementary context popup class]]
legacy_prefix: elm_ctxpopup; legacy_prefix: elm_ctxpopup;
eo_prefix: elm_obj_ctxpopup; eo_prefix: elm_obj_ctxpopup;
event_prefix: elm_ctxpopup; event_prefix: elm_ctxpopup;
methods { methods {
@property selected_item {
get {
[[Get the selected item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The selected item or $null.]]
}
}
@property first_item {
get {
[[Get the first item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The first item or $null.]]
}
}
@property last_item {
get {
[[Get the last item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The last item or $null.]]
}
}
@property items {
get {
[[Returns a list of the widget item.]]
return: const(list<Elm.Widget.Item>); [[const list to widget items]]
}
}
@property horizontal { @property horizontal {
set { set {
[[Change the ctxpopup's orientation to horizontal or vertical.]] [[Change the ctxpopup's orientation to horizontal or vertical.]]
@ -208,10 +238,6 @@ class Elm.Ctxpopup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Access.Widget.Action,
Efl.Ui.Widget.theme_apply; Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.widget_event; Efl.Ui.Widget.widget_event;
Efl.Ui.Widget.focused_item { get; } Efl.Ui.Widget.focused_item { get; }
Efl.Ui.Menu.selected_item { get; }
Efl.Ui.Menu.first_item { get; }
Efl.Ui.Menu.last_item { get; }
Efl.Ui.Menu.items { get; }
Efl.Access.Widget.Action.elm_actions { get; } Efl.Access.Widget.Action.elm_actions { get; }
Efl.Access.state_set { get; } Efl.Access.state_set { get; }
Efl.Part.part; Efl.Part.part;

View File

@ -1,10 +1,58 @@
class Elm.Ctxpopup.Item(Elm.Widget.Item, Efl.Ui.Item, Efl.Access.Widget.Action, class Elm.Ctxpopup.Item(Elm.Widget.Item, Efl.Access.Widget.Action,
Efl.Ui.Legacy) Efl.Ui.Legacy)
{ {
[[Elementary context popup item class]] [[Elementary context popup item class]]
legacy_prefix: elm_ctxpopup_item; legacy_prefix: elm_ctxpopup_item;
eo_prefix: elm_obj_ctxpopup_item; eo_prefix: elm_obj_ctxpopup_item;
methods { methods {
@property prev {
get {
[[Get the item before this one in the widget's list of items.
See also @.next.
]]
}
values {
item: Elm.Widget.Item; [[The item before the object in its parent's
list. If there is no previous item or in case
of error, $null is returned.]]
}
}
@property next {
get {
[[Get the item after this one in the widget's list of items.
See also @.prev.
]]
}
values {
item: Elm.Widget.Item; [[The item after the object in its parent's
list. If there is no next item or in case
of error, $null is returned.]]
}
}
@property selected {
[[Indicates whether this item is currently selected.]]
get {
[[Get the selected state of this item.]]
}
set {
[[Set the selected state of $item.
This sets the selected state of the given item $it.
$true for selected, $false for not selected.
If a new item is selected the previously selected will
be unselected. Previously selected item can be retrieved
with @Elm.Ctxpopup.selected_item.get.
Selected items will be highlighted.
]]
}
values {
selected: bool; [[The selection state.]]
}
}
init { init {
[[Init context popup item]] [[Init context popup item]]
params { params {
@ -23,9 +71,6 @@ class Elm.Ctxpopup.Item(Elm.Widget.Item, Efl.Ui.Item, Efl.Access.Widget.Action,
Elm.Widget.Item.part_content { get; set; } Elm.Widget.Item.part_content { get; set; }
Elm.Widget.Item.part_content_unset; Elm.Widget.Item.part_content_unset;
Elm.Widget.Item.item_focus { get; set; } Elm.Widget.Item.item_focus { get; set; }
Efl.Ui.Item.selected { get; set; }
Efl.Ui.Item.prev { get; }
Efl.Ui.Item.next { get; }
Efl.Access.Widget.Action.elm_actions { get; } Efl.Access.Widget.Action.elm_actions { get; }
} }
} }

View File

@ -334,7 +334,7 @@ _root_layout_build(Elm_DBus_Menu *dbus_menu, Eina_List *property_list,
char *property; char *property;
Eldbus_Message_Iter *layout, *array, *pair, *variant; Eldbus_Message_Iter *layout, *array, *pair, *variant;
Eina_List *l; Eina_List *l;
Eina_Iterator *it = NULL; const Eina_List *it;
Elm_Object_Item *obj_item; Elm_Object_Item *obj_item;
layout = eldbus_message_iter_container_new(iter, 'r', NULL); layout = eldbus_message_iter_container_new(iter, 'r', NULL);
@ -360,8 +360,8 @@ _root_layout_build(Elm_DBus_Menu *dbus_menu, Eina_List *property_list,
if (recursion_depth > 0) if (recursion_depth > 0)
{ {
it = efl_ui_menu_items_get(dbus_menu->menu); it = elm_menu_items_get(dbus_menu->menu);
EINA_ITERATOR_FOREACH (it, obj_item) EINA_LIST_FOREACH (it, l, obj_item)
{ {
variant = eldbus_message_iter_container_new(array, 'v', variant = eldbus_message_iter_container_new(array, 'v',
"(ia{sv}av)"); "(ia{sv}av)");
@ -370,7 +370,6 @@ _root_layout_build(Elm_DBus_Menu *dbus_menu, Eina_List *property_list,
recursion_depth - 1, variant); recursion_depth - 1, variant);
eldbus_message_iter_container_close(array, variant); eldbus_message_iter_container_close(array, variant);
} }
eina_iterator_free(it);
} }
eldbus_message_iter_container_close(layout, array); eldbus_message_iter_container_close(layout, array);
@ -423,7 +422,8 @@ _elm_dbus_menu_add(Eo *menu)
{ {
Elm_DBus_Menu *dbus_menu; Elm_DBus_Menu *dbus_menu;
Elm_Object_Item *obj_item; Elm_Object_Item *obj_item;
Eina_Iterator *it = NULL; const Eina_List *it;
Eina_List *l;
ELM_MENU_CHECK(menu) NULL; ELM_MENU_CHECK(menu) NULL;
@ -443,8 +443,8 @@ _elm_dbus_menu_add(Eo *menu)
dbus_menu->menu = menu; dbus_menu->menu = menu;
it = efl_ui_menu_items_get(menu); it = elm_menu_items_get(menu);
EINA_ITERATOR_FOREACH(it, obj_item) EINA_LIST_FOREACH(it, l, obj_item)
{ {
ELM_MENU_ITEM_DATA_GET(obj_item, item); ELM_MENU_ITEM_DATA_GET(obj_item, item);
if (!_menu_add_recursive(dbus_menu, item)) if (!_menu_add_recursive(dbus_menu, item))
@ -453,7 +453,6 @@ _elm_dbus_menu_add(Eo *menu)
goto error_hash; goto error_hash;
} }
} }
eina_iterator_free(it);
return dbus_menu; return dbus_menu;

View File

@ -916,64 +916,6 @@ elm_menu_parent_get(const Evas_Object *obj)
return efl_ui_widget_parent_get(obj); return efl_ui_widget_parent_get(obj);
} }
EAPI Elm_Widget_Item *
elm_menu_selected_item_get(const Evas_Object *obj)
{
return efl_ui_menu_selected_item_get(obj);
}
EAPI const Eina_List *
elm_menu_items_get(const Evas_Object *obj)
{
Eina_List *lst = NULL;
Eina_Iterator *it;
void *item_data;
it = efl_ui_menu_items_get(obj);
EINA_ITERATOR_FOREACH(it, item_data)
{
lst = eina_list_append(lst, item_data);
}
eina_iterator_free(it);
return lst;
}
EAPI Elm_Widget_Item *
elm_menu_first_item_get(const Evas_Object *obj)
{
return efl_ui_menu_first_item_get(obj);
}
EAPI Elm_Widget_Item *
elm_menu_last_item_get(const Evas_Object *obj)
{
return efl_ui_menu_last_item_get(obj);
}
EAPI void
elm_menu_item_selected_set(Evas_Object *obj, Eina_Bool selected)
{
efl_ui_item_selected_set(obj, selected);
}
EAPI Eina_Bool
elm_menu_item_selected_get(const Evas_Object *obj)
{
return efl_ui_item_selected_get(obj);
}
EAPI Elm_Widget_Item *
elm_menu_item_prev_get(const Evas_Object *obj)
{
return efl_ui_item_prev_get(obj);
}
EAPI Elm_Widget_Item *
elm_menu_item_next_get(const Evas_Object *obj)
{
return efl_ui_item_next_get(obj);
}
EOLIAN static Evas_Object* EOLIAN static Evas_Object*
_elm_menu_efl_ui_widget_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) _elm_menu_efl_ui_widget_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd)
{ {
@ -1265,14 +1207,14 @@ _elm_menu_item_subitems_clear(Eo *eo_item EINA_UNUSED, Elm_Menu_Item_Data *it)
efl_del(sub_it); efl_del(sub_it);
} }
EOLIAN static Eina_Iterator* EOLIAN static const Eina_List *
_elm_menu_efl_ui_menu_items_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) _elm_menu_items_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd)
{ {
return eina_list_iterator_new(sd->items); return sd->items;
} }
EOLIAN static void EOLIAN static void
_elm_menu_item_efl_ui_item_selected_set(Eo *eo_item EINA_UNUSED, _elm_menu_item_selected_set(Eo *eo_item EINA_UNUSED,
Elm_Menu_Item_Data *item, Elm_Menu_Item_Data *item,
Eina_Bool selected) Eina_Bool selected)
{ {
@ -1292,13 +1234,13 @@ _elm_menu_item_efl_ui_item_selected_set(Eo *eo_item EINA_UNUSED,
} }
EOLIAN static Eina_Bool EOLIAN static Eina_Bool
_elm_menu_item_efl_ui_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Menu_Item_Data *item) _elm_menu_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Menu_Item_Data *item)
{ {
return item->selected; return item->selected;
} }
EOLIAN static Elm_Object_Item * EOLIAN static Elm_Object_Item *
_elm_menu_item_efl_ui_item_prev_get(Eo *eo_item, Elm_Menu_Item_Data *item) _elm_menu_item_prev_get(Eo *eo_item, Elm_Menu_Item_Data *item)
{ {
if (item->parent) if (item->parent)
{ {
@ -1322,7 +1264,7 @@ _elm_menu_item_efl_ui_item_prev_get(Eo *eo_item, Elm_Menu_Item_Data *item)
} }
EOLIAN static Elm_Object_Item * EOLIAN static Elm_Object_Item *
_elm_menu_item_efl_ui_item_next_get(Eo *eo_item, Elm_Menu_Item_Data *item) _elm_menu_item_next_get(Eo *eo_item, Elm_Menu_Item_Data *item)
{ {
if (item->parent) if (item->parent)
{ {
@ -1346,20 +1288,20 @@ _elm_menu_item_efl_ui_item_next_get(Eo *eo_item, Elm_Menu_Item_Data *item)
} }
EOLIAN static Elm_Object_Item* EOLIAN static Elm_Object_Item*
_elm_menu_efl_ui_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) _elm_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd)
{ {
return (sd->items ? sd->items->data : NULL); return (sd->items ? sd->items->data : NULL);
} }
EOLIAN static Elm_Object_Item* EOLIAN static Elm_Object_Item*
_elm_menu_efl_ui_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) _elm_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd)
{ {
Eina_List *l = eina_list_last(sd->items); Eina_List *l = eina_list_last(sd->items);
return (l ? l->data : NULL); return (l ? l->data : NULL);
} }
EOLIAN static Elm_Object_Item* EOLIAN static Elm_Object_Item*
_elm_menu_efl_ui_menu_selected_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) _elm_menu_selected_item_get(Eo *obj EINA_UNUSED, Elm_Menu_Data *sd)
{ {
Eina_List *l; Eina_List *l;
Elm_Object_Item *eo_item; Elm_Object_Item *eo_item;

View File

@ -1,4 +1,4 @@
class Elm.Menu (Efl.Ui.Widget, Efl.Ui.Clickable, Efl.Ui.Menu, class Elm.Menu (Efl.Ui.Widget, Efl.Ui.Clickable,
Efl.Access.Selection, Efl.Ui.Focus.Manager, Efl.Ui.Legacy) Efl.Access.Selection, Efl.Ui.Focus.Manager, Efl.Ui.Legacy)
{ {
[[Elementary menu class]] [[Elementary menu class]]
@ -6,6 +6,36 @@ class Elm.Menu (Efl.Ui.Widget, Efl.Ui.Clickable, Efl.Ui.Menu,
eo_prefix: elm_obj_menu; eo_prefix: elm_obj_menu;
event_prefix: elm_menu; event_prefix: elm_menu;
methods { methods {
@property selected_item {
get {
[[Get the selected item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The selected item or $null.]]
}
}
@property first_item {
get {
[[Get the first item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The first item or $null.]]
}
}
@property last_item {
get {
[[Get the last item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The last item or $null.]]
}
}
@property items {
get {
[[Returns a list of the widget item.]]
return: const(list<Elm.Widget.Item>); [[const list to widget items]]
}
}
relative_move { relative_move {
[[Move the menu to a new position [[Move the menu to a new position
@ -65,10 +95,6 @@ class Elm.Menu (Efl.Ui.Widget, Efl.Ui.Clickable, Efl.Ui.Menu,
Efl.Access.access_children { get; } Efl.Access.access_children { get; }
Efl.Access.Selection.selected_children_count { get; } Efl.Access.Selection.selected_children_count { get; }
Efl.Access.Selection.selected_child { get; } Efl.Access.Selection.selected_child { get; }
Efl.Ui.Menu.selected_item { get; }
Efl.Ui.Menu.first_item { get; }
Efl.Ui.Menu.last_item { get; }
Efl.Ui.Menu.items { get; }
Efl.Object.provider_find; Efl.Object.provider_find;
} }
events { events {

View File

@ -1,30 +1,77 @@
class Elm.Menu.Item(Elm.Widget.Item, Efl.Access.Selection, class Elm.Menu.Item(Elm.Widget.Item, Efl.Access.Selection, Efl.Ui.Legacy)
Efl.Ui.Item, Efl.Ui.Legacy)
{ {
[[Elementary menu item class]] [[Elementary menu item class]]
legacy_prefix: elm_menu_item; legacy_prefix: elm_menu_item;
eo_prefix: elm_obj_menu_item; eo_prefix: elm_obj_menu_item;
methods { methods {
@property icon_name { @property icon_name {
get { get {
[[Get the string representation from the icon of a menu item [[Get the string representation from the icon of a menu item
Once this icon is set, any previously set icon will be deleted. Once this icon is set, any previously set icon will be deleted.
To hide icon set it to "". To hide icon set it to "".
]] ]]
} }
set { set {
[[Set the icon of a menu item to the standard icon with the [[Set the icon of a menu item to the standard icon with the
given name. given name.
Once this icon is set, any previously set icon will be deleted. Once this icon is set, any previously set icon will be deleted.
To hide icon set it to "". To hide icon set it to "".
]] ]]
} }
values { values {
icon: string; [[The name of icon object.]] icon: string; [[The name of icon object.]]
} }
} }
@property prev {
get {
[[Get the item before this one in the widget's list of items.
See also @.next.
]]
}
values {
item: Elm.Widget.Item; [[The item before the object in its parent's
list. If there is no previous item or in case
of error, $null is returned.]]
}
}
@property next {
get {
[[Get the item after this one in the widget's list of items.
See also @.prev.
]]
}
values {
item: Elm.Widget.Item; [[The item after the object in its parent's
list. If there is no next item or in case
of error, $null is returned.]]
}
}
@property selected {
[[Indicates whether this item is currently selected.]]
get {
[[Get the selected state of this item.]]
}
set {
[[Set the selected state of $item.
This sets the selected state of the given item $it.
$true for selected, $false for not selected.
If a new item is selected the previously selected will
be unselected. Previously selected item can be retrieved
with @Elm.Menu.selected_item.get.
Selected items will be highlighted.
]]
}
values {
selected: bool; [[The selection state.]]
}
}
index_get @const { index_get @const {
[[Get the item index]] [[Get the item index]]
return: uint; [[Item index]] return: uint; [[Item index]]
@ -70,8 +117,5 @@ class Elm.Menu.Item(Elm.Widget.Item, Efl.Access.Selection,
Efl.Access.state_set { get; } Efl.Access.state_set { get; }
Efl.Access.Selection.selected_children_count { get; } Efl.Access.Selection.selected_children_count { get; }
Efl.Access.Selection.selected_child { get; } Efl.Access.Selection.selected_child { get; }
Efl.Ui.Item.selected { get; set; }
Efl.Ui.Item.prev { get; }
Efl.Ui.Item.next { get; }
} }
} }

View File

@ -30,62 +30,5 @@ EAPI void elm_menu_parent_set(Evas_Object *obj, Evas_Obj
*/ */
EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj); EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj);
/**
* @brief Get the selected item in the menu.
*
* @return The selected item or @c null.
*
* @ingroup Elm_Menu
*/
EAPI Elm_Widget_Item *elm_menu_selected_item_get(const Evas_Object *obj);
/** Returns a list of the item's items.
*
* @ingroup Elm_Menu
*/
EAPI const Eina_List *elm_menu_items_get(const Evas_Object *obj);
/** Get the first item in the menu.
*
* @ingroup Elm_Menu
*/
EAPI Elm_Widget_Item *elm_menu_first_item_get(const Evas_Object *obj);
/** Get the last item in the menu.
*
* @ingroup Elm_Menu
*/
EAPI Elm_Widget_Item *elm_menu_last_item_get(const Evas_Object *obj);
/**
* @brief Set the selected state of @c item.
*
* @param[in] selected The selection state.
*
* @ingroup Elm_Menu_Item
*/
EAPI void elm_menu_item_selected_set(Evas_Object *obj, Eina_Bool selected);
/**
* @brief Get the selected state of @c item.
*
* @return The selection state.
*
* @ingroup Elm_Menu_Item
*/
EAPI Eina_Bool elm_menu_item_selected_get(const Evas_Object *obj);
/** Get the previous item in the menu.
*
* @ingroup Elm_Menu_Item
*/
EAPI Elm_Widget_Item *elm_menu_item_prev_get(const Evas_Object *obj);
/** Get the next item in the menu.
*
* @ingroup Elm_Menu_Item
*/
EAPI Elm_Widget_Item *elm_menu_item_next_get(const Evas_Object *obj);
#include "elm_menu_item.eo.legacy.h" #include "elm_menu_item.eo.legacy.h"
#include "elm_menu.eo.legacy.h" #include "elm_menu.eo.legacy.h"

View File

@ -3102,7 +3102,7 @@ _elm_toolbar_item_insert_after(Eo *obj, Elm_Toolbar_Data *sd, Elm_Object_Item *e
} }
EOLIAN static Elm_Object_Item* EOLIAN static Elm_Object_Item*
_elm_toolbar_efl_ui_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) _elm_toolbar_first_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
{ {
if (!sd->items) return NULL; if (!sd->items) return NULL;
Elm_Toolbar_Item_Data *it = ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items); Elm_Toolbar_Item_Data *it = ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items);
@ -3111,7 +3111,7 @@ _elm_toolbar_efl_ui_menu_first_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *s
} }
EOLIAN static Elm_Object_Item* EOLIAN static Elm_Object_Item*
_elm_toolbar_efl_ui_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) _elm_toolbar_last_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
{ {
if (!sd->items) return NULL; if (!sd->items) return NULL;
@ -3121,13 +3121,13 @@ _elm_toolbar_efl_ui_menu_last_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd
} }
EOLIAN static Eina_Iterator* EOLIAN static Eina_Iterator*
_elm_toolbar_efl_ui_menu_items_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) _elm_toolbar_items_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
{ {
return eina_inlist_iterator_new(sd->items); return eina_inlist_iterator_new(sd->items);
} }
EOLIAN static Elm_Object_Item * EOLIAN static Elm_Object_Item *
_elm_toolbar_item_efl_ui_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *it) _elm_toolbar_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *it)
{ {
ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it, NULL); ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it, NULL);
@ -3138,7 +3138,7 @@ _elm_toolbar_item_efl_ui_item_next_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item
} }
EOLIAN static Elm_Object_Item * EOLIAN static Elm_Object_Item *
_elm_toolbar_item_efl_ui_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *it) _elm_toolbar_item_prev_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *it)
{ {
ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it, NULL); ELM_TOOLBAR_ITEM_CHECK_OR_RETURN(it, NULL);
@ -3176,7 +3176,7 @@ _elm_toolbar_item_find_by_label(const Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd,
} }
EOLIAN static void EOLIAN static void
_elm_toolbar_item_efl_ui_item_selected_set(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item, Eina_Bool selected) _elm_toolbar_item_selected_set(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item, Eina_Bool selected)
{ {
if (item->selected == selected) return; if (item->selected == selected) return;
if (selected) _item_select(item); if (selected) _item_select(item);
@ -3184,13 +3184,13 @@ _elm_toolbar_item_efl_ui_item_selected_set(Eo *eo_item EINA_UNUSED, Elm_Toolbar_
} }
EOLIAN static Eina_Bool EOLIAN static Eina_Bool
_elm_toolbar_item_efl_ui_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item) _elm_toolbar_item_selected_get(Eo *eo_item EINA_UNUSED, Elm_Toolbar_Item_Data *item)
{ {
return item->selected; return item->selected;
} }
EOLIAN static Elm_Object_Item* EOLIAN static Elm_Object_Item*
_elm_toolbar_efl_ui_menu_selected_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) _elm_toolbar_selected_item_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
{ {
return sd->selected_item; return sd->selected_item;
} }
@ -3429,48 +3429,6 @@ elm_toolbar_transverse_expanded_get(const Evas_Object *obj)
return sd->transverse_expanded; return sd->transverse_expanded;
} }
EAPI Elm_Widget_Item *
elm_toolbar_selected_item_get(const Evas_Object *obj)
{
return efl_ui_menu_selected_item_get(obj);
}
EAPI Elm_Widget_Item *
elm_toolbar_first_item_get(const Evas_Object *obj)
{
return efl_ui_menu_first_item_get(obj);
}
EAPI Elm_Widget_Item *
elm_toolbar_last_item_get(const Evas_Object *obj)
{
return efl_ui_menu_last_item_get(obj);
}
EAPI void
elm_toolbar_item_selected_set(Evas_Object *obj, Eina_Bool selected)
{
efl_ui_item_selected_set(obj, selected);
}
EAPI Eina_Bool
elm_toolbar_item_selected_get(const Evas_Object *obj)
{
return efl_ui_item_selected_get(obj);
}
EAPI Elm_Widget_Item *
elm_toolbar_item_prev_get(const Evas_Object *obj)
{
return efl_ui_item_prev_get(obj);
}
EAPI Elm_Widget_Item *
elm_toolbar_item_next_get(const Evas_Object *obj)
{
return efl_ui_item_next_get(obj);
}
EOLIAN static void EOLIAN static void
_elm_toolbar_homogeneous_set(Eo *obj, Elm_Toolbar_Data *sd, Eina_Bool homogeneous) _elm_toolbar_homogeneous_set(Eo *obj, Elm_Toolbar_Data *sd, Eina_Bool homogeneous)
{ {
@ -3891,7 +3849,7 @@ _elm_toolbar_item_efl_access_state_set_get(Eo *eo_it, Elm_Toolbar_Item_Data *ite
ret = efl_access_state_set_get(efl_super(eo_it, ELM_TOOLBAR_ITEM_CLASS)); ret = efl_access_state_set_get(efl_super(eo_it, ELM_TOOLBAR_ITEM_CLASS));
sel = efl_ui_item_selected_get(eo_it); sel = elm_toolbar_item_selected_get(eo_it);
STATE_TYPE_SET(ret, EFL_ACCESS_STATE_SELECTABLE); STATE_TYPE_SET(ret, EFL_ACCESS_STATE_SELECTABLE);

View File

@ -25,13 +25,43 @@ enum Elm.Toolbar.Shrink_Mode
class Elm.Toolbar (Efl.Ui.Widget, Efl.Ui.Focus.Composition, Elm.Interface_Scrollable, Efl.Ui.Direction, class Elm.Toolbar (Efl.Ui.Widget, Efl.Ui.Focus.Composition, Elm.Interface_Scrollable, Efl.Ui.Direction,
Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Access, Efl.Access.Widget.Action, Efl.Access.Selection, Efl.Access,
Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Menu, Efl.Ui.Legacy) Efl.Ui.Clickable, Efl.Ui.Selectable, Efl.Ui.Legacy)
{ {
[[Elementary toolbar class]] [[Elementary toolbar class]]
legacy_prefix: elm_toolbar; legacy_prefix: elm_toolbar;
eo_prefix: elm_obj_toolbar; eo_prefix: elm_obj_toolbar;
event_prefix: elm_toolbar; event_prefix: elm_toolbar;
methods { methods {
@property selected_item {
get {
[[Get the selected item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The selected item or $null.]]
}
}
@property first_item {
get {
[[Get the first item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The first item or $null.]]
}
}
@property last_item {
get {
[[Get the last item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The last item or $null.]]
}
}
@property items {
get {
[[Returns a list of the widget item.]]
return: iterator<Elm.Widget.Item> @owned @warn_unused; [[iterator to widget items]]
}
}
@property homogeneous { @property homogeneous {
[[Control homogeneous mode. [[Control homogeneous mode.
@ -340,10 +370,6 @@ class Elm.Toolbar (Efl.Ui.Widget, Efl.Ui.Focus.Composition, Elm.Interface_Scroll
Efl.Access.Selection.is_child_selected; Efl.Access.Selection.is_child_selected;
Efl.Access.Selection.all_children_select; Efl.Access.Selection.all_children_select;
Efl.Access.Selection.access_selection_clear; Efl.Access.Selection.access_selection_clear;
Efl.Ui.Menu.selected_item { get; }
Efl.Ui.Menu.first_item { get; }
Efl.Ui.Menu.last_item { get; }
Efl.Ui.Menu.items { get; }
Efl.Ui.Focus.Composition.prepare; Efl.Ui.Focus.Composition.prepare;
} }
events { events {

View File

@ -23,12 +23,60 @@ struct Elm.Toolbar.Item.State
data: const(void_ptr); [[Item data]] data: const(void_ptr); [[Item data]]
} }
class Elm.Toolbar.Item(Elm.Widget.Item, Efl.Ui.Item, Efl.Ui.Focus.Object, Efl.Ui.Legacy) class Elm.Toolbar.Item(Elm.Widget.Item, Efl.Ui.Focus.Object, Efl.Ui.Legacy)
{ {
[[Elementary toolbar item class]] [[Elementary toolbar item class]]
legacy_prefix: elm_toolbar_item; legacy_prefix: elm_toolbar_item;
eo_prefix: elm_obj_toolbar_item; eo_prefix: elm_obj_toolbar_item;
methods { methods {
@property prev {
get {
[[Get the item before this one in the widget's list of items.
See also @.next.
]]
}
values {
item: Elm.Widget.Item; [[The item before the object in its parent's
list. If there is no previous item or in case
of error, $null is returned.]]
}
}
@property next {
get {
[[Get the item after this one in the widget's list of items.
See also @.prev.
]]
}
values {
item: Elm.Widget.Item; [[The item after the object in its parent's
list. If there is no next item or in case
of error, $null is returned.]]
}
}
@property selected {
[[Indicates whether this item is currently selected.]]
get {
[[Get the selected state of this item.]]
}
set {
[[Set the selected state of $item.
This sets the selected state of the given item $it.
$true for selected, $false for not selected.
If a new item is selected the previously selected will
be unselected. Previously selected item can be retrieved
with @Elm.Toolbar.selected_item.get.
Selected items will be highlighted.
]]
}
values {
selected: bool; [[The selection state.]]
}
}
@property priority { @property priority {
get { get {
[[Get the priority of a toolbar item.]] [[Get the priority of a toolbar item.]]
@ -276,8 +324,5 @@ class Elm.Toolbar.Item(Elm.Widget.Item, Efl.Ui.Item, Efl.Ui.Focus.Object, Efl.Ui
Efl.Ui.Focus.Object.focus { set; } Efl.Ui.Focus.Object.focus { set; }
Efl.Access.i18n_name { get; } Efl.Access.i18n_name { get; }
Efl.Access.state_set { get; } Efl.Access.state_set { get; }
Efl.Ui.Item.selected { get; set; }
Efl.Ui.Item.prev { get; }
Efl.Ui.Item.next { get; }
} }
} }

View File

@ -109,91 +109,5 @@ EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
*/ */
EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj); EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj);
/**
* @brief Get the selected item.
*
* The selected item can be unselected with function
* elm_toolbar_item_selected_set().
*
* The selected item always will be highlighted on toolbar.
*
* @return The selected toolbar item.
*
* @ingroup Elm_Toolbar
*/
EAPI Elm_Widget_Item *elm_toolbar_selected_item_get(const Evas_Object *obj);
/**
* @brief Get the first item in the given toolbar widget's list of items.
*
* See: @ref elm_obj_toolbar_item_append and @ref elm_obj_toolbar_last_item_get
*
* @return The first item or @c NULL, if it has no items (and on errors)
*
* @ingroup Elm_Toolbar
*/
EAPI Elm_Widget_Item *elm_toolbar_first_item_get(const Evas_Object *obj);
/**
* @brief Get the last item in the given toolbar widget's list of items.
*
* See: @ref elm_obj_toolbar_item_prepend and
* @ref elm_obj_toolbar_first_item_get
*
* @return The last item or @c NULL, if it has no items (and on errors)
*
* @ingroup Elm_Toolbar
*/
EAPI Elm_Widget_Item *elm_toolbar_last_item_get(const Evas_Object *obj);
/**
* @brief Get the item before @c item in toolbar.
*
* @note If it is the first item, @c null will be returned.
*
* @return The item before @c item, or @c null if none or on failure.
*
* @ingroup Elm_Toolbar_Item
*/
EAPI Elm_Widget_Item *elm_toolbar_item_prev_get(const Evas_Object *obj);
/**
* @brief Get the item after @c item in toolbar.
*
* @note If it is the last item, @c null will be returned.
*
* @return The item after @c item, or @c null if none or on failure.
*
* @ingroup Elm_Toolbar_Item
*/
EAPI Elm_Widget_Item *elm_toolbar_item_next_get(const Evas_Object *obj);
/**
* @brief Set the selected state of an item.
*
* This sets the selected state of the given item @c it. @c true for selected,
* @c false for not selected.
*
* If a new item is selected the previously selected will be unselected.
* Previously selected item can be get with function
* @ref efl_ui_menu_selected_item_get.
*
* Selected items will be highlighted.
*
* @param[in] selected The selected state.
*
* @ingroup Elm_Toolbar_Item
*/
EAPI void elm_toolbar_item_selected_set(Evas_Object *obj, Eina_Bool selected);
/**
* @brief Get whether the @c item is selected or not.
*
* @return The selected state.
*
* @ingroup Elm_Toolbar_Item
*/
EAPI Eina_Bool elm_toolbar_item_selected_get(const Evas_Object *obj);
#include "elm_toolbar_item.eo.legacy.h" #include "elm_toolbar_item.eo.legacy.h"
#include "elm_toolbar.eo.legacy.h" #include "elm_toolbar.eo.legacy.h"