Download

Support

Efreet_Menu: The FDO Desktop Menu Specification

Data Structures

struct  Efreet_Menu

Typedefs

typedef struct Efreet_Menu Efreet_Menu

Enumerations

enum  Efreet_Menu_Entry_Type { EFREET_MENU_ENTRY_MENU, EFREET_MENU_ENTRY_DESKTOP, EFREET_MENU_ENTRY_SEPARATOR, EFREET_MENU_ENTRY_HEADER }

Functions

EAPI int efreet_menu_desktop_insert (Efreet_Menu *menu, Efreet_Desktop *desktop, int pos)
 Insert a desktop element in a menu structure. Only accepts desktop files in default directories.
EAPI int efreet_menu_desktop_remove (Efreet_Menu *menu, Efreet_Desktop *desktop)
 Remove a desktop element in a menu structure. Only accepts desktop files in default directories.
EAPI void efreet_menu_dump (Efreet_Menu *menu, const char *indent)
 Dumps the contents of the menu to the command line.
EAPI void efreet_menu_file_set (const char *file)
EAPI void efreet_menu_free (Efreet_Menu *menu)
EAPI Efreet_Menuefreet_menu_get (void)
 Creates the default menu representation.
EAPI int efreet_menu_kde_legacy_init (void)
 Initialize legacy kde support. This function blocks while the kde-config script is run.
EAPI Efreet_Menuefreet_menu_new (const char *name)
 Creates a new menu.
EAPI Efreet_Menuefreet_menu_parse (const char *path)
 Parses the given .menu file and creates the menu representation.
EAPI int efreet_menu_save (Efreet_Menu *menu, const char *path)
 Saves the menu to file.

Detailed Description

functions and structures


Typedef Documentation


Enumeration Type Documentation

The type of entry

Enumerator:
EFREET_MENU_ENTRY_MENU 
EFREET_MENU_ENTRY_DESKTOP 
EFREET_MENU_ENTRY_SEPARATOR 
EFREET_MENU_ENTRY_HEADER 

Function Documentation

EAPI int efreet_menu_desktop_insert ( Efreet_Menu menu,
Efreet_Desktop desktop,
int  pos 
)

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

References desktop, efreet_desktop_ref(), EFREET_MENU_ENTRY_DESKTOP, efreet_util_path_to_file_id(), entries, icon, _Efreet_Desktop::icon, id, _Efreet_Desktop::name, name, _Efreet_Desktop::orig_path, and type.

EAPI int efreet_menu_desktop_remove ( Efreet_Menu menu,
Efreet_Desktop desktop 
)

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

References efreet_menu_free(), and entries.

EAPI 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

References efreet_menu_dump(), EFREET_MENU_ENTRY_DESKTOP, EFREET_MENU_ENTRY_HEADER, EFREET_MENU_ENTRY_MENU, EFREET_MENU_ENTRY_SEPARATOR, entries, FREE, icon, INF, name, and type.

Referenced by efreet_menu_dump().

EAPI void efreet_menu_file_set ( const char *  file  ) 

References IF_FREE.

EAPI void efreet_menu_free ( Efreet_Menu menu  ) 
EAPI Efreet_Menu* efreet_menu_get ( void   ) 

Creates the default menu representation.

Returns:
Returns the Efreet_Menu_Internal representation of the default menu or NULL if none found

References efreet_config_dirs_get(), efreet_config_home_get(), efreet_menu_parse(), and PATH_MAX.

EAPI 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

References efreet_menu_kde_legacy_dirs, ERR, IF_FREE_LIST, and PATH_MAX.

EAPI Efreet_Menu* efreet_menu_new ( const char *  name  ) 

Creates a new menu.

Parameters:
name The internal name of the menu
Returns:
Returns the Efreet_Menu on success or NULL on failure

References EFREET_MENU_ENTRY_MENU, ERR, name, and type.

EAPI Efreet_Menu* efreet_menu_parse ( const char *  path  ) 

Parses the given .menu file and creates the menu representation.

Parameters:
path,: The path of the menu to load
Returns:
Returns the Efreet_Menu_Internal representation on success or NULL on failure

References efreet_xml_del(), efreet_xml_new(), IF_FREE_HASH, Efreet_Xml::tag, and WRN.

Referenced by efreet_menu_get().

EAPI 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

Copyright © Enlightenment.org

Efreet Documentation Generated: Tue Dec 22 16:13:53 2009