From 22ea003fdd161ae7235830f5819fec31a10abcfe Mon Sep 17 00:00:00 2001 From: "Jonas M. Gastal" Date: Fri, 29 Jul 2011 21:40:54 +0000 Subject: [PATCH] Elementary: elm_menu documentation. SVN revision: 61910 --- legacy/elementary/doc/Makefile.am | 4 +- legacy/elementary/doc/examples.dox | 56 ++++ legacy/elementary/doc/index.doxy | 3 + legacy/elementary/doc/widgets/Makefile.am | 4 +- .../doc/widgets/widget_preview_menu.c | 11 + legacy/elementary/src/examples/Makefile.am | 9 +- .../elementary/src/examples/menu_example_01.c | 74 +++++ .../elementary/src/lib/.elm_menu.c.kate-swp | Bin 0 -> 36402 bytes legacy/elementary/src/lib/Elementary.h.in | 297 +++++++++++++++++- legacy/elementary/src/lib/elm_menu.c | 297 ------------------ 10 files changed, 449 insertions(+), 306 deletions(-) create mode 100644 legacy/elementary/doc/widgets/widget_preview_menu.c create mode 100644 legacy/elementary/src/examples/menu_example_01.c create mode 100644 legacy/elementary/src/lib/.elm_menu.c.kate-swp diff --git a/legacy/elementary/doc/Makefile.am b/legacy/elementary/doc/Makefile.am index c3900792a3..9b36777028 100644 --- a/legacy/elementary/doc/Makefile.am +++ b/legacy/elementary/doc/Makefile.am @@ -74,7 +74,9 @@ WGT_PREVIEW = \ inwin:preview-02.png:widget_preview_inwin3:200:160 \ scroller:preview-00.png:widget_preview_scroller:100:30 \ table::preview-00.png:widget_preview_table:100:100 \ - win:preview-00.png:widget_preview_win:200:200 + win:preview-00.png:widget_preview_win:200:200 \ + table:preview-00.png:widget_preview_table:100:100 \ + menu:preview-00.png:widget_preview_menu:100:100 widget-build: @$(MAKE) -C widgets diff --git a/legacy/elementary/doc/examples.dox b/legacy/elementary/doc/examples.dox index 9dc4d90e07..6b43bc29bd 100644 --- a/legacy/elementary/doc/examples.dox +++ b/legacy/elementary/doc/examples.dox @@ -5281,6 +5281,62 @@ * @example table_example_02.c */ +/** + * @page tutorial_menu Menu Example + * @dontinclude menu_example_01.c + * + * This example shows how to create a menu with regular items, object items, + * submenus and how to delete items from a menu. The full source for this + * example is @ref menu_example_01.c "menu_example_01.c". + * + * We'll start looking at the menu creation and how to create a very simple + * item: + * @skip menu_add + * @until item_add + * + * For our next item we are going to add an icon: + * @until item_add + * + * Now we are going to add more items, but these icons are going to have a + * parent, which will put them in a sub-menu. First just another item with an + * icon: + * @until item_add + * + * Next we are going to add a button to our menu(any elm widget can be added to + * a menu): + * @until item_add + * + * We are also going to have the button delete the first item of our + * sub-menu when clicked: + * @until smart_callback + * @dontinclude menu_example_01.c + * @skip static + * @until } + * + * We now add a separator and three more regular items: + * @until item_add + * @until item_add + * @until item_add + * + * We now add another item, however this time it won't go the sub-menu and it'll + * be disabled: + * @until disabled_set + * + * To make sure that our menu is shown whenever the window is clicked(and where + * clicked) we use the following callback: + * @dontinclude menu_example_01.c + * @skip static + * @skipline static + * @until } + * + * Our example will look like this: + * + * @image html screenshots/menu_example_01.png + * @image latex screenshots/menu_example_01.eps width=\textwidth + * + * @example menu_example_01.c + */ + /** * @page bg_example_01_c bg_example_01.c * @include bg_example_01.c diff --git a/legacy/elementary/doc/index.doxy b/legacy/elementary/doc/index.doxy index 4717433e6f..d687906ceb 100644 --- a/legacy/elementary/doc/index.doxy +++ b/legacy/elementary/doc/index.doxy @@ -138,6 +138,9 @@ * @li @ref Map * @li @ref Mapbuf * @li @ref Menu + * + * @image html img/widget/menu/preview-00.png + * @image latex img/widget/menu/preview-00.eps * @li @ref Notify * * @image html img/widget/notify/preview-00.png diff --git a/legacy/elementary/doc/widgets/Makefile.am b/legacy/elementary/doc/widgets/Makefile.am index c95ae27505..ea1f6f9268 100644 --- a/legacy/elementary/doc/widgets/Makefile.am +++ b/legacy/elementary/doc/widgets/Makefile.am @@ -90,7 +90,8 @@ widget_preview_inwin2 \ widget_preview_inwin3 \ widget_preview_scroller \ widget_preview_table \ -widget_preview_win +widget_preview_win \ +widget_preview_menu LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_EMAP_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@ @@ -162,5 +163,6 @@ EXTRA_DIST = \ widget_preview_scroller.c \ widget_preview_table.c \ widget_preview_win.c \ + widget_preview_menu.c \ widget_preview_tmpl_foot.c \ widget_preview_tmpl_head.c diff --git a/legacy/elementary/doc/widgets/widget_preview_menu.c b/legacy/elementary/doc/widgets/widget_preview_menu.c new file mode 100644 index 0000000000..345dd26450 --- /dev/null +++ b/legacy/elementary/doc/widgets/widget_preview_menu.c @@ -0,0 +1,11 @@ +#include "widget_preview_tmpl_head.c" + +Evas_Object *o = elm_menu_add(win); +evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); +elm_win_resize_object_add(win, o); +evas_object_show(o); + +elm_menu_item_add(o, NULL, "file", "item", NULL, NULL); +elm_menu_item_add(o, NULL, NULL, "item", NULL, NULL); + +#include "widget_preview_tmpl_foot.c" diff --git a/legacy/elementary/src/examples/Makefile.am b/legacy/elementary/src/examples/Makefile.am index bd49ab248b..ee7b2e27d1 100644 --- a/legacy/elementary/src/examples/Makefile.am +++ b/legacy/elementary/src/examples/Makefile.am @@ -103,7 +103,8 @@ SRCS = \ inwin_example.c \ scroller_example_01.c \ table_example_01.c \ - table_example_02.c + table_example_02.c \ + menu_example_01.c pkglib_PROGRAMS = @@ -196,7 +197,8 @@ pkglib_PROGRAMS += \ inwin_example \ scroller_example_01 \ table_example_01 \ - table_example_02 + table_example_02 \ + menu_example_01 # This variable will hold the list of screenshots that will be made # by "make screenshots". Each item in the list is of the form: @@ -266,7 +268,8 @@ SCREENSHOTS = \ inwin_example:inwin_example.png:0.0 \ inwin_example:inwin_example_a.png:0.2 \ table_example_01:table_example_01.png:0.0 \ - table_example_02:table_example_02.png:0.0 + table_example_02:table_example_02.png:0.0 \ + menu_example_01:menu_example_01.png:0.5 HTML_SS_DIR=$(top_builddir)/doc/html/screenshots LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots diff --git a/legacy/elementary/src/examples/menu_example_01.c b/legacy/elementary/src/examples/menu_example_01.c new file mode 100644 index 0000000000..7396dc0b7b --- /dev/null +++ b/legacy/elementary/src/examples/menu_example_01.c @@ -0,0 +1,74 @@ +//Compile with: +//gcc -g `pkg-config --cflags --libs elementary` menu_example_01.c -o menu_example_01 + +#include +#ifdef HAVE_CONFIG_H +# include "elementary_config.h" +#endif + +static void +_del_it(void *data, Evas_Object *obj, void *event_info) +{ + Eina_List *l; + Elm_Menu_Item *it = elm_menu_first_item_get(data); + it = elm_menu_item_next_get(it); + l = elm_menu_item_subitems_get(it); + elm_menu_item_del(eina_list_data_get(l)); +} + +static void +_show(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Down *ev = event_info; + elm_menu_move(data, ev->canvas.x, ev->canvas.y); + evas_object_show(data); +} + +EAPI int +elm_main(int argc, char **argv) +{ + Evas_Object *win, *bg, *menu, *button, *rect; + Elm_Menu_Item *item; + + win = elm_win_add(NULL, "menu", ELM_WIN_BASIC); + elm_win_title_set(win, "Menu"); + elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + + bg = elm_bg_add(win); + elm_win_resize_object_add(win, bg); + evas_object_show(bg); + + rect = evas_object_rectangle_add(evas_object_evas_get(win)); + elm_win_resize_object_add(win, rect); + evas_object_color_set(rect, 0, 0, 0, 0); + evas_object_show(rect); + + menu = elm_menu_add(win); + elm_menu_item_add(menu, NULL, NULL, "first item", NULL, NULL); + item = elm_menu_item_add(menu, NULL, "mail-reply-all", "second item", NULL, NULL); + + elm_menu_item_add(menu, item, "object-rotate-left", "menu 1", NULL, NULL); + button = elm_button_add(win); + elm_object_text_set(button, "button - delete items"); + elm_menu_item_add_object(menu, item, button, NULL, NULL); + evas_object_smart_callback_add(button, "clicked", _del_it, menu); + elm_menu_item_separator_add(menu, item); + elm_menu_item_add(menu, item, NULL, "third item", NULL, NULL); + elm_menu_item_add(menu, item, NULL, "fourth item", NULL, NULL); + elm_menu_item_add(menu, item, "window-new", "sub menu", NULL, NULL); + + item = elm_menu_item_add(menu, NULL, NULL, "third item", NULL, NULL); + elm_menu_item_disabled_set(item, EINA_TRUE); + + evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN, _show, menu); + evas_object_show(menu); + + evas_object_resize(win, 250, 350); + evas_object_show(win); + + elm_run(); + + return 0; +} +ELM_MAIN() diff --git a/legacy/elementary/src/lib/.elm_menu.c.kate-swp b/legacy/elementary/src/lib/.elm_menu.c.kate-swp new file mode 100644 index 0000000000000000000000000000000000000000..df8eac2e5452fe308764be2283246bd68ff75004 GIT binary patch literal 36402 zcmeI5`IB8$wa0JnRT0t0q)XWAc|>NddJ>WV&clE3*5|vw`<&CA8`5w1@!qP`IqSRkT4(L= zUVA*JcWSlT?0;`fw43K_Zf$IyHaya9E^nUS9vdGX?KF>CvGSa^)oP9Zs>N?jd3$66Cy%o{ny+f!Cq zGL5&wiLRWXwFFO|wz@q*lqbJ4-j%c8JF(>Kryz+l-D3J@IhQ#@7H2|DpwiH)>ZGF3fC|7=Cyen&uII(2y zdmxE5-D3LtIhR>O7HdCnf-1UyY`8ttJUca$R%%qV)WgS{qnkVJF(EV#v{cbQw7OkJ zl*>OdenL=j-grCO`S5siXtFafL4Pta+Fa)zq0(@9Mzo`5tD`Vq!Go}K0tNW74bFz! z)b`bf6pbGV4KmI~<0sZQXG5St&js@+ADyEhr1F^4FK!<((SVp>#*!~XWr=vaGqB%-qTeOde@^P#2u9RNu#4?hKl&0ZlyxD4w49DPIMrDjb)c?4m6Ae*1VO6_}D0e4~?|J+tr^fG1Rym>)ma99> zHN&0O+B3qJrCpq1$U*N2%D34D>J)I1p``9IvM1_vi|Na4B1a>#s2g#@ z;yq9|KG|QghtguqZm_mJMwG`L;|G^vr5=uu%8igb2V-Q^nX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0X*sF!T9!C-e@&Nq_mJ{Z(uB4#J5o#NECp&^PJg>n`)vI|v6NdI#b34#II4wABq`&wpQC zC#(MCJby~Kk{R9Z{?NF5`Pn-NC*B3~x757u&?4cwV6w@C?0U2BIWwXLh8v7`+Z8GQ zeyW%=>vQBZXVxvIFSLm~H$m21?;uPejG%knyhZ znLqI^&O}Im2b$t@9-72wpH1ZWL{@yxcS7$Vobu=b2wRc~E1LZwAcK$QtksbtNNNpk)C3b2O)z0xQxlX-6Rf=? z{_*P_gws0+hd5xMtNwZi;czHU{GCegAe?mQOz$9^n9=a(^7R8~FY)UggcD@MM`rcK zu(BwTQtKUr6J+qG(!GOl91;A1U;S$RfgcyBxicpr++l$~I-Gj!OCQJ` #include "elm_priv.h" -/** - * @defgroup Menu Menu - * - * A menu is a list of items displayed above the window. Each item can - * have a sub-menu. The menu object can be used to display a menu on right - * click, in a toolbar, anywhere. - * - * Signals that you can add callbacks for are: - * - * "clicked" - the user clicked the empty space in the menu to dismiss. - * event_info is NULL. - */ - typedef struct _Widget_Data Widget_Data; struct _Elm_Menu_Item @@ -443,14 +430,6 @@ _item_submenu_obj_create(Elm_Menu_Item *item) evas_object_event_callback_add(item->submenu.bx, EVAS_CALLBACK_RESIZE, _menu_resize, item->base.widget); } -/** - * Add a new menu to the parent - * - * @param parent The parent object. - * @return The new object or NULL if it cannot be created. - * - * @ingroup Menu - */ EAPI Evas_Object * elm_menu_add(Evas_Object *parent) { @@ -499,14 +478,6 @@ elm_menu_add(Evas_Object *parent) return obj; } -/** - * Set the parent - * - * @param obj The menu object. - * @param parent The new parent. - * - * @ingroup Menu - */ EAPI void elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent) { @@ -545,14 +516,6 @@ elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent) _sizing_eval(obj); } -/** - * Get the parent - * - * @param obj The menu object. - * @return The parent. - * - * @ingroup Menu - */ EAPI Evas_Object * elm_menu_parent_get(const Evas_Object *obj) { @@ -562,15 +525,6 @@ elm_menu_parent_get(const Evas_Object *obj) return wd->parent; } -/** - * Move the menu to a new position - * - * @param obj The menu object. - * @param x The new position. - * @param y The new position. - * - * @ingroup Menu - */ EAPI void elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { @@ -582,14 +536,6 @@ elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) _sizing_eval(obj); } -/** - * Close a opened menu - * - * @param obj the menu object - * @return void - * - * @ingroup Menu - */ EAPI void elm_menu_close(Evas_Object *obj) { @@ -598,14 +544,6 @@ elm_menu_close(Evas_Object *obj) _menu_hide(obj, wd->hv, NULL); } -/** - * Get the Evas_Object of an Elm_Menu_Item - * - * @param item The menu item object. - * @return The edje object containing the swallowed content - * - * @ingroup Menu - */ EAPI Evas_Object * elm_menu_item_object_get(const Elm_Menu_Item *item) { @@ -663,19 +601,6 @@ _elm_menu_item_add_helper(Evas_Object *obj, Elm_Menu_Item *parent, Elm_Menu_Item _sizing_eval(obj); } -/** - * Add an item at the end - * - * @param obj The menu object. - * @param parent The parent menu item (optional) - * @param icon A icon display on the item. The icon will be destryed by the menu. - * @param label The label of the item. - * @param func Function called when the user select the item. - * @param data Data sent by the callback. - * @return Returns the new item. - * - * @ingroup Menu - */ EAPI Elm_Menu_Item * elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) { @@ -710,18 +635,6 @@ elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, const char *icon, con return subitem; } -/** - * Add an object swallowed in an item at the end - * - * @param obj The menu object. - * @param parent The parent menu item (optional) - * @param subobj The object to swallow - * @param func Function called when the user select the item. - * @param data Data sent by the callback. - * @return Returns the new item. - * - * @ingroup Menu - */ EAPI Elm_Menu_Item * elm_menu_item_add_object(Evas_Object *obj, Elm_Menu_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data) { @@ -750,16 +663,6 @@ elm_menu_item_add_object(Evas_Object *obj, Elm_Menu_Item *parent, Evas_Object *s return subitem; } -/** - * Get the position of a menu item - * - * This function returns the index position of a menu item in a menu. - * For a sub-menu, this number is relative to the first item in the sub-menu. - * @param item The menu item - * @return The item's index - * @note Index values begin with 0 - * @ingroup Menu - */ EAPI unsigned int elm_menu_item_index_get(const Elm_Menu_Item *item) { @@ -767,14 +670,6 @@ elm_menu_item_index_get(const Elm_Menu_Item *item) return item->idx; } -/** - * Set the label of a menu item - * - * @param item The menu item object. - * @param label The label to set for @p item - * - * @ingroup Menu - */ EAPI void elm_menu_item_label_set(Elm_Menu_Item *item, const char *label) { @@ -791,14 +686,6 @@ elm_menu_item_label_set(Elm_Menu_Item *item, const char *label) _sizing_eval(item->base.widget); } -/** - * Get the label of a menu item - * - * @param item The menu item object. - * @return The label of @p item - * - * @ingroup Menu - */ EAPI const char * elm_menu_item_label_get(const Elm_Menu_Item *item) { @@ -806,16 +693,6 @@ elm_menu_item_label_get(const Elm_Menu_Item *item) return item->label; } -/** - * Set the content of a menu item to an icon - * - * Once this content object is set, any previously set object will be deleted. - * - * @param item The menu item object. - * @param icon The icon object to set for the content of @p item - * - * @ingroup Menu - */ EAPI void elm_menu_item_object_icon_name_set(Elm_Menu_Item *item, const char *icon) { @@ -842,14 +719,6 @@ elm_menu_item_icon_set(Elm_Menu_Item *item, const char *icon) elm_menu_item_object_icon_name_set(item, icon); } -/** - * Set the disabled state of @p item. - * - * @param item The menu item object. - * @param disabled The enabled/disabled state of the item - * - * @ingroup Menu - */ EAPI void elm_menu_item_disabled_set(Elm_Menu_Item *item, Eina_Bool disabled) { @@ -866,14 +735,6 @@ elm_menu_item_disabled_set(Elm_Menu_Item *item, Eina_Bool disabled) edje_object_message_signal_process(item->base.view); } -/** - * Get the disabled state of @p item. - * - * @param item The menu item object. - * @return The enabled/disabled state of the item - * - * @ingroup Menu - */ EAPI Eina_Bool elm_menu_item_disabled_get(const Elm_Menu_Item *item) { @@ -881,16 +742,6 @@ elm_menu_item_disabled_get(const Elm_Menu_Item *item) return item->disabled; } -/** - * Add a separator item to menu @p obj under @p parent. - * - * @param obj The menu object - * @param parent The item to add the separator under - * - * @return The created item or NULL on failure - * - * @ingroup Menu - */ EAPI Elm_Menu_Item * elm_menu_item_separator_add(Evas_Object *obj, Elm_Menu_Item *parent) { @@ -925,17 +776,6 @@ elm_menu_item_separator_add(Evas_Object *obj, Elm_Menu_Item *parent) return subitem; } -/** - * Set the content object of a menu item - * - * Use this function to change the object swallowed by a menu item, - * deleting any previously swallowed object. - * @param item The menu item object - * @param The content object or NULL - * @return EINA_TRUE on success, else EINA_FALSE - * - * @ingroup Menu - */ EAPI Eina_Bool elm_menu_item_object_content_set(Elm_Menu_Item *item, Evas_Object *obj) { @@ -954,17 +794,6 @@ elm_menu_item_object_content_set(Elm_Menu_Item *item, Evas_Object *obj) return EINA_TRUE; } -/** - * Get the content object of a menu item - * - * @param item The menu item object - * @return The content object or NULL - * @note If @p item was added with elm_menu_item_add_object, this - * function will return the object passed, else it will return the - * icon object. - * - * @ingroup Menu - */ EAPI Evas_Object * elm_menu_item_object_content_get(const Elm_Menu_Item *item) { @@ -978,14 +807,6 @@ elm_menu_item_object_icon_get(const Elm_Menu_Item *item) return elm_menu_item_object_content_get(item); } -/** - * Get the string representation from the icon of a menu item - * - * @param item The menu item object. - * @return The string representation of @p item's icon or NULL - * - * @ingroup Menu - */ EAPI const char * elm_menu_item_object_icon_name_get(const Elm_Menu_Item *item) { @@ -999,14 +820,6 @@ elm_menu_item_icon_get(const Elm_Menu_Item *item) return elm_menu_item_object_icon_name_get(item); } -/** - * Returns whether @p item is a separator. - * - * @param item The item to check - * @return If true, @p item is a separator - * - * @ingroup Menu - */ EAPI Eina_Bool elm_menu_item_is_separator(Elm_Menu_Item *item) { @@ -1014,13 +827,6 @@ elm_menu_item_is_separator(Elm_Menu_Item *item) return item->separator; } -/** - * Deletes an item from the menu. - * - * @param item The item to delete. - * - * @ingroup Menu - */ EAPI void elm_menu_item_del(Elm_Menu_Item *item) { @@ -1046,14 +852,6 @@ elm_menu_item_del(Elm_Menu_Item *item) elm_widget_item_del(item); } -/** - * Set the function called when a menu item is freed. - * - * @param item The item to set the callback on - * @param func The function called - * - * @ingroup Menu - */ EAPI void elm_menu_item_del_cb_set(Elm_Menu_Item *item, Evas_Smart_Cb func) { @@ -1061,14 +859,6 @@ elm_menu_item_del_cb_set(Elm_Menu_Item *item, Evas_Smart_Cb func) elm_widget_item_del_cb_set(item, func); } -/** - * Returns the data associated with menu item @p item. - * - * @param item The item - * @return The data associated with @p item - * - * @ingroup Menu - */ EAPI void * elm_menu_item_data_get(const Elm_Menu_Item *item) { @@ -1076,14 +866,6 @@ elm_menu_item_data_get(const Elm_Menu_Item *item) return elm_widget_item_data_get(item); } -/** - * Sets the data to be associated with menu item @p item. - * - * @param item The item - * @param data The data to be associated with @p item - * - * @ingroup Menu - */ EAPI void elm_menu_item_data_set(Elm_Menu_Item *item, const void *data) { @@ -1091,14 +873,6 @@ elm_menu_item_data_set(Elm_Menu_Item *item, const void *data) elm_widget_item_data_set(item, data); } -/** - * Returns a list of @p item's subitems. - * - * @param item The item - * @return An Eina_List* of @p item's subitems - * - * @ingroup Menu - */ EAPI const Eina_List * elm_menu_item_subitems_get(const Elm_Menu_Item *item) { @@ -1106,14 +880,6 @@ elm_menu_item_subitems_get(const Elm_Menu_Item *item) return item->submenu.items; } -/** - * Returns a list of @p item's items. - * - * @param obj The menu object - * @return An Eina_List* of @p item's items - * - * @ingroup Menu - */ EAPI const Eina_List * elm_menu_items_get(const Evas_Object * obj) { @@ -1122,14 +888,6 @@ elm_menu_items_get(const Evas_Object * obj) return wd->items; } -/** - * Set the selected state of @p item. - * - * @param item The menu item object. - * @param selected The selected/unselected state of the item - * - * @ingroup Menu - */ EAPI void elm_menu_item_selected_set(Elm_Menu_Item *item, Eina_Bool selected) { @@ -1149,14 +907,6 @@ elm_menu_item_selected_set(Elm_Menu_Item *item, Eina_Bool selected) edje_object_message_signal_process(item->base.view); } -/** - * Get the selected state of @p item. - * - * @param item The menu item object. - * @return The selected/unselected state of the item - * - * @ingroup Menu - */ EAPI Eina_Bool elm_menu_item_selected_get(const Elm_Menu_Item *item) { @@ -1164,14 +914,6 @@ elm_menu_item_selected_get(const Elm_Menu_Item *item) return item->selected; } -/** - * Get the previous item in the menu. - * - * @param item The menu item object. - * @return The item before it, or NULL if none - * - * @ingroup Menu - */ EAPI Elm_Menu_Item * elm_menu_item_prev_get(const Elm_Menu_Item *it) { @@ -1195,14 +937,6 @@ elm_menu_item_prev_get(const Elm_Menu_Item *it) return NULL; } -/** - * Get the next item in the menu. - * - * @param item The menu item object. - * @return The item after it, or NULL if none - * - * @ingroup Menu - */ EAPI Elm_Menu_Item * elm_menu_item_next_get(const Elm_Menu_Item *it) { @@ -1226,13 +960,6 @@ elm_menu_item_next_get(const Elm_Menu_Item *it) return NULL; } -/** - * @brief Return a menu item's owner menu - * - * Use this function to get the menu object owning an item. - * @param item The menu item - * @return The menu object owning @p item, or NULL on failure - */ EAPI Evas_Object * elm_menu_item_menu_get(const Elm_Menu_Item *item) { @@ -1240,14 +967,6 @@ elm_menu_item_menu_get(const Elm_Menu_Item *item) return item->base.widget; } -/** - * Get the first item in the menu - * - * @param obj The menu object - * @return The first item, or NULL if none - * - * @ingroup Menu - */ EAPI Elm_Menu_Item * elm_menu_first_item_get(const Evas_Object * obj) { @@ -1258,14 +977,6 @@ elm_menu_first_item_get(const Evas_Object * obj) return NULL; } -/** - * Get the last item in the menu - * - * @param obj The menu object - * @return The last item, or NULL if none - * - * @ingroup Menu - */ EAPI Elm_Menu_Item * elm_menu_last_item_get(const Evas_Object * obj) { @@ -1277,14 +988,6 @@ elm_menu_last_item_get(const Evas_Object * obj) return NULL; } -/** - * Get the selected item in the menu - * - * @param obj The menu object - * @return The selected item, or NULL if none - * - * @ingroup Menu - */ EAPI Elm_Menu_Item * elm_menu_selected_item_get(const Evas_Object * obj) {