.desktop file Functions

Functions that deal with freedesktop.org desktop files. More...

Functions

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.
EAPI int ecore_desktop_init ()
 Setup what ever needs to be setup to support Ecore_Desktop.
EAPI int ecore_desktop_shutdown ()
 Tear down what ever needs to be torn down to support Ecore_Desktop.
void ecore_desktop_destroy (Ecore_Desktop *desktop)
 Free whatever resources are used by an Ecore_Desktop.
char * ecore_desktop_home_get ()
 Get and massage the users home directory.

Detailed Description

Functions that deal with freedesktop.org desktop files.

This conforms with the freedesktop.org XDG Desktop Entry Specification version 0.9.4


Function Documentation

void ecore_desktop_destroy ( Ecore_Desktop *  desktop  ) 

Free whatever resources are used by an Ecore_Desktop.

There are internal resources used by each Ecore_Desktop This releases those resources.

Parameters:
desktop An Ecore_Desktop that was previously returned by ecore_desktop_get().

Ecore_Desktop* ecore_desktop_get ( const char *  file,
const char *  lang 
)

Get the contents of a .desktop file.

Use ecore_desktop_destroy() to free this structure.

Parameters:
file Full path to the .desktop file.
lang Language to use, or NULL for default.
Returns:
An Ecore_Desktop containing the files contents.

char* ecore_desktop_home_get ( void   ) 

Get and massage the users home directory.

This is an internal function that may be useful elsewhere.

Returns:
The users howe directory.

Ecore_Hash* ecore_desktop_ini_get ( const char *  file  ) 

Get the contents of a .ini style file.

The Ecore_Hash returned is a two level hash, the first level is the groups in the file, one per group, keyed by the name of that group. The value of each of those first level hashes is the second level Ecore_Hash, the contents of each group.

Parameters:
file Full path to the .ini style file.
Returns:
An Ecore_Hash of the files contents.

EAPI int ecore_desktop_init ( void   ) 

Setup what ever needs to be setup to support Ecore_Desktop.

There are internal structures that are needed for Ecore_Desktop functions to operate, this sets them up.

EAPI int ecore_desktop_shutdown ( void   ) 

Tear down what ever needs to be torn down to support Ecore_Desktop.

There are internal structures that are needed for Ecore_Desktop functions to operate, this tears them down.