summaryrefslogtreecommitdiff
path: root/src/lib/efreet/efreet_menu.h
diff options
context:
space:
mode:
authorSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-06-20 11:56:15 +0200
committerSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-06-20 11:56:46 +0200
commit5b3cd4cde17731a71020f48b13e2e9dab511e294 (patch)
treed0184ce8548446dd3a93eed37e010443d5c2996b /src/lib/efreet/efreet_menu.h
parent0c317eaca288a546124677247952f3962a7117fb (diff)
efreet: Add async menu parsing
Diffstat (limited to '')
-rw-r--r--src/lib/efreet/efreet_menu.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/efreet/efreet_menu.h b/src/lib/efreet/efreet_menu.h
index 19c3e10211..a9f6b301fa 100644
--- a/src/lib/efreet/efreet_menu.h
+++ b/src/lib/efreet/efreet_menu.h
@@ -44,6 +44,12 @@ struct Efreet_Menu
44 Eina_List *entries; /**< The menu items */ 44 Eina_List *entries; /**< The menu items */
45}; 45};
46 46
47/**
48 * A callback used with efreet_menu_async_get() and efreet_menu_async_parse()
49 *
50 * @since 1.8
51 */
52typedef void *(*Efreet_Menu_Cb) (Efreet_Menu *menu);
47 53
48/** 54/**
49 * @return Returns no value 55 * @return Returns no value
@@ -70,6 +76,13 @@ EAPI Efreet_Menu *efreet_menu_new(const char *name);
70EAPI void efreet_menu_file_set(const char *file); 76EAPI void efreet_menu_file_set(const char *file);
71 77
72/** 78/**
79 * Creates the Efreet_Menu representation of the default menu or
80 * NULL if none found and returns it in the callback.
81 * @param func function to call when menu is created
82 */
83EAPI void efreet_menu_async_get(Efreet_Menu_Cb func);
84
85/**
73 * @return Returns the Efreet_Menu representation of the default menu or 86 * @return Returns the Efreet_Menu representation of the default menu or
74 * NULL if none found 87 * NULL if none found
75 * @brief Creates the default menu representation 88 * @brief Creates the default menu representation
@@ -77,6 +90,14 @@ EAPI void efreet_menu_file_set(const char *file);
77EAPI Efreet_Menu *efreet_menu_get(void); 90EAPI Efreet_Menu *efreet_menu_get(void);
78 91
79/** 92/**
93 * Parses the given .menu file and creates the menu representation, and
94 * returns it in the callback
95 * @param path The path of the menu to load
96 * @param func function to call when menu is created
97 */
98EAPI void efreet_menu_async_parse(const char *path, Efreet_Menu_Cb func);
99
100/**
80 * @param path The path of the menu to load 101 * @param path The path of the menu to load
81 * @return Returns the Efreet_Menu representation on success or NULL on 102 * @return Returns the Efreet_Menu representation on success or NULL on
82 * failure 103 * failure