Ecore_Desktop.h File Reference

The file that provides the freedesktop.org desktop, icon, and menu functions. More...


Functions

char * ecore_desktop_paths_file_find (Ecore_List *paths, const char *file, int sub, int(*func)(void *data, const char *path), void *data)
 Search for a file in fdo compatible locations.
Ecore_Hash * ecore_desktop_paths_to_hash (const char *paths)
 Split a list of paths into an Ecore_Hash.
Ecore_List * ecore_desktop_paths_to_list (const char *paths)
 Split a list of paths into an Ecore_Hash.
EAPI int ecore_desktop_init (void)
 Setup what ever needs to be setup to support Ecore_Desktop.
EAPI int ecore_desktop_shutdown (void)
 Tear down what ever needs to be torn down to support Ecore_Desktop.
Ecore_Hash * ecore_desktop_ini_get (const char *file)
 Get the contents of a .ini style file.
Ecore_Desktop * ecore_desktop_get (const char *file, const char *lang)
 Get the contents of a .desktop file.
void ecore_desktop_destroy (Ecore_Desktop *desktop)
 Free whatever resources are used by an Ecore_Desktop.
EAPI int ecore_desktop_icon_init (void)
 Setup what ever needs to be setup to support ecore_desktop_icon.
EAPI int ecore_desktop_icon_shutdown (void)
 Tear down what ever needs to be torn down to support ecore_desktop_ycon.
EAPI char * ecore_desktop_icon_find (const char *icon, const char *icon_size, const char *icon_theme)
 Find the path to an icon.
void ecore_desktop_icon_theme_destroy (Ecore_Desktop_Icon_Theme *icon_theme)
 Free whatever resources are used by an Ecore_Desktop_Icon_Theme.
Ecore_Desktop_Tree * ecore_desktop_menu_get (char *file)
 Decode a freedesktop.org menu XML jungle.
char * ecore_desktop_home_get (void)
 Get and massage the users home directory.


Detailed Description

The file that provides the freedesktop.org desktop, icon, and menu functions.

This header provides the Ecore_Desktop freedesktop.org desktop, icon, and menu handling functions, as well as ancillary functions for searching freedesktop.org specific paths. Other freedesktop.org specifications make use of similar files, paths, and icons, implementors can use / extend this code to suit.

Ecore_Desktop is not for every freedesktop.org specification, just those that are associated with .desktop files.

For path searching details, see Ecore_Desktop_Paths_Group.

For desktop file details, see .desktop file Functions.

For icon theme details, see icon theme Functions.

For menu file details, see menu Functions.


Function Documentation

char* ecore_desktop_paths_file_find ( Ecore_List *  paths,
const char *  file,
int  sub,
int(*)(void *data, const char *path)  func,
void *  data 
)

Search for a file in fdo compatible locations.

This will search through all the diretories of a particular type, looking for the file. It will recurse into subdirectories. If func is NULL, then only the first file found will be returned. If func is defined, then each file found will be passed to func, until func returns 1.

The returned string will have to be freed eventually.

Parameters:
type The type of directories to search.
file The file to search for.
sub Levels of sub directories to search, -1 = all, 0 = none.
func A function to call for each file found.
data A pointer to pass on to func.

Ecore_Hash* ecore_desktop_paths_to_hash ( const char *  paths  ) 

Split a list of paths into an Ecore_Hash.

The list of paths can use any one of ;:, to seperate the paths. You can also escape the :;, with \.

Parameters:
paths A list of paths.

Ecore_List* ecore_desktop_paths_to_list ( const char *  paths  ) 

Split a list of paths into an Ecore_Hash.

The list of paths can use any one of ;:, to seperate the paths. You can also escape the :;, with \.

Parameters:
paths A list of paths.