Subject: [E-devel] [PATCH]: keyboard navigation in menus
I was using elementary on a target that only has a keyboard, and I add
to do several modification on the elm_menu to handle keyboard
navigation.
- patch 1: discard a menu from C source code
- patch 2: add accessors for menu items and add the ability to handle
selected item from C source code
SVN revision: 58084
EAPI void elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent) EINA_ARG_NONNULL(1);
EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI void elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
+ EAPI void elm_menu_close(Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI const Eina_List *elm_menu_items_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
EAPI Evas_Object *elm_menu_item_object_get(const Elm_Menu_Item *it) EINA_ARG_NONNULL(1);
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) EINA_ARG_NONNULL(1);
_sizing_eval(obj);
}
+/**
+ * Close a opened menu
+ *
+ * @param obj the menu object
+ * @return void
+ *
+ * @ingroup Menu
+ */
+EAPI void
+elm_menu_close(Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ _menu_hide(obj, wd->hv, NULL);
+}
+
/**
* Get the Evas_Object of an Elm_Menu_Item
*