functions and structures
More...
|
enum | Efreet_Menu_Entry_Type {
EFREET_MENU_ENTRY_MENU,
EFREET_MENU_ENTRY_DESKTOP,
EFREET_MENU_ENTRY_SEPARATOR,
EFREET_MENU_ENTRY_HEADER
} |
| The type of entry.
|
|
functions and structures
◆ Efreet_Menu_Cb
typedef void(* Efreet_Menu_Cb) (void *data, Efreet_Menu *menu) |
◆ efreet_menu_kde_legacy_init()
int efreet_menu_kde_legacy_init |
( |
void |
| ) |
|
Initialize legacy kde support. This function blocks while the kde-config script is run.
- Returns
- Returns no value
◆ efreet_menu_new()
Creates a new menu.
- Parameters
-
name | The internal name of the menu |
- Returns
- Returns the Efreet_Menu on success or NULL on failure
◆ efreet_menu_file_set()
void efreet_menu_file_set |
( |
const char * |
file | ) |
|
Override which file is used for menu creation.
- Parameters
-
file | The file to use for menu creation |
This file is only used if it exists, else the standard files will be used for the menu.
References EAPI, and eina_stringshare_add().
◆ efreet_menu_async_get()
Creates the Efreet_Menu representation of the default menu or NULL if none found and returns it in the callback.
- Parameters
-
func | function to call when menu is created |
data | user data to return in callback |
- Since
- 1.8
◆ efreet_menu_get()
Creates the default menu representation.
- Returns
- Returns the Efreet_Menu representation of the default menu or NULL if none found
◆ efreet_menu_async_parse()
void efreet_menu_async_parse |
( |
const char * |
path, |
|
|
Efreet_Menu_Cb |
func, |
|
|
const void * |
data |
|
) |
| |
Parses the given .menu file and creates the menu representation, and returns it in the callback.
- Parameters
-
path | The path of the menu to load |
func | function to call when menu is created |
data | user data to return in callback |
- Since
- 1.8
References EAPI, ecore_thread_run(), and eina_stringshare_add().
◆ efreet_menu_parse()
Parses the given .menu file and creates the menu representation.
- Parameters
-
path | The path of the menu to load |
- Returns
- Returns the Efreet_Menu representation on success or NULL on failure
◆ efreet_menu_save()
int efreet_menu_save |
( |
Efreet_Menu * |
menu, |
|
|
const char * |
path |
|
) |
| |
Saves the menu to file.
- Parameters
-
menu | The menu to work with |
path | The path where the menu should be saved |
- Returns
- Returns 1 on success, 0 on failure
◆ efreet_menu_free()
Frees the given structure.
- Parameters
-
- Returns
- Returns no value
References desktop, efreet_desktop_free(), efreet_menu_free(), EINA_COMPARE_CB, eina_hash_direct_add(), eina_hash_find(), eina_hash_free(), eina_hash_string_superfast_new(), eina_list_append(), eina_list_count(), eina_list_data_get(), EINA_LIST_FOREACH, EINA_LIST_FOREACH_SAFE, eina_list_free(), EINA_LIST_FREE, eina_list_last(), eina_list_merge(), eina_list_next(), eina_list_prepend(), eina_list_remove(), eina_list_remove_list(), eina_list_search_unsorted(), eina_list_sort(), entries, icon, id, and name.
Referenced by efreet_menu_free().
◆ efreet_menu_desktop_insert()
Insert a desktop element in a menu structure. Only accepts desktop files in default directories.
- Parameters
-
menu | The menu to work with |
desktop | The desktop to insert |
pos | The position to place the new desktop |
- Returns
- Returns 1 on success, 0 on failure
◆ efreet_menu_desktop_remove()
Remove a desktop element in a menu structure. Only accepts desktop files in default directories.
- Parameters
-
menu | The menu to work with |
desktop | The desktop to remove |
- Returns
- Returns 1 on success, 0 on failure
◆ efreet_menu_dump()
void efreet_menu_dump |
( |
Efreet_Menu * |
menu, |
|
|
const char * |
indent |
|
) |
| |
Dumps the contents of the menu to the command line.
- Parameters
-
menu | The menu to work with |
menu | The menu to work with |
indent | The indent level to print the menu at |
- Returns
- Returns no value