summaryrefslogtreecommitdiff
path: root/src/lib/efreet
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2014-09-18 09:23:00 +0200
committerSebastian Dransfeld <sd@tango.flipp.net>2014-09-18 10:48:50 +0200
commit54d5653e1bf1a6e7521dd18209b53e609725d607 (patch)
tree25d3a39b295fb8378072fabb3472ac55f6a85e92 /src/lib/efreet
parent5bc2efcf872fa6061c38fced0861aebec7ca496d (diff)
efreet: Store known desktop environments
Diffstat (limited to 'src/lib/efreet')
-rw-r--r--src/lib/efreet/efreet_utils.c14
-rw-r--r--src/lib/efreet/efreet_utils.h10
2 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/efreet/efreet_utils.c b/src/lib/efreet/efreet_utils.c
index a0bc37c8d8..2f59272f00 100644
--- a/src/lib/efreet/efreet_utils.c
+++ b/src/lib/efreet/efreet_utils.c
@@ -318,6 +318,20 @@ efreet_util_desktop_category_list(const char *category)
318 return efreet_util_cache_list("categories", category); 318 return efreet_util_cache_list("categories", category);
319} 319}
320 320
321EAPI Eina_List *
322efreet_util_desktop_environments_list(void)
323{
324 Efreet_Cache_Array_String *array;
325 Eina_List *ret = NULL;
326 unsigned int i;
327
328 array = efreet_cache_util_names("environments_list");
329 if (!array) return NULL;
330 for (i = 0; i < array->array_count; i++)
331 ret = eina_list_append(ret, array->array[i]);
332 return ret;
333}
334
321static int 335static int
322efreet_util_glob_match(const char *str, const char *glob) 336efreet_util_glob_match(const char *str, const char *glob)
323{ 337{
diff --git a/src/lib/efreet/efreet_utils.h b/src/lib/efreet/efreet_utils.h
index 4075abcfa0..aef0511eea 100644
--- a/src/lib/efreet/efreet_utils.h
+++ b/src/lib/efreet/efreet_utils.h
@@ -153,6 +153,16 @@ EAPI Eina_List *efreet_util_desktop_category_list(const char *category);
153EAPI Eina_List *efreet_util_menus_find(void); 153EAPI Eina_List *efreet_util_menus_find(void);
154 154
155/** 155/**
156 * Find all known desktop environments
157 * This list must be freed using EINA_LIST_FREE
158 * @since 1.12
159 *
160 * @return an Eina_List of desktop environments names (const char *)
161 */
162EAPI Eina_List *efreet_util_desktop_environments_list(void);
163
164
165/**
156 * @} 166 * @}
157 */ 167 */
158#endif 168#endif