Functions
Efreet utilities for FDO

Functions

const char * efreet_util_path_to_file_id (const char *path)
 Returns the fdo file id for a given path. More...
 
Eina_Listefreet_util_desktop_mime_list (const char *mime)
 Find all desktops for a given mime type. More...
 
Efreet_Desktopefreet_util_desktop_wm_class_find (const char *wmname, const char *wmclass)
 Find all desktops for a given wm class. More...
 
Efreet_Desktopefreet_util_desktop_file_id_find (const char *file_id)
 Find a desktop by file id. More...
 
Efreet_Desktopefreet_util_desktop_exec_find (const char *exec)
 Find a desktop by exec. More...
 
Efreet_Desktopefreet_util_desktop_name_find (const char *name)
 Find a desktop by name. More...
 
Efreet_Desktopefreet_util_desktop_generic_name_find (const char *generic_name)
 Find a desktop by generic name. More...
 
Eina_Listefreet_util_desktop_name_glob_list (const char *glob)
 Find all desktops where name matches a glob pattern. More...
 
Eina_Listefreet_util_desktop_exec_glob_list (const char *glob)
 Find all desktops where exec matches a glob pattern. More...
 
Eina_Listefreet_util_desktop_generic_name_glob_list (const char *glob)
 Find all desktops where generic name matches a glob pattern. More...
 
Eina_Listefreet_util_desktop_comment_glob_list (const char *glob)
 Find all desktops where comment matches a glob pattern. More...
 
Eina_Listefreet_util_desktop_categories_list (void)
 Find all desktop categories This list must be freed using EINA_LIST_FREE. More...
 
Eina_Listefreet_util_desktop_category_list (const char *category)
 Find all desktops in a given category. More...
 
Eina_Listefreet_util_menus_find (void)
 Returns a list of .menu files found in the various config dirs. More...
 
Eina_Listefreet_util_desktop_environments_list (void)
 Find all known desktop environments This list must be freed using EINA_LIST_FREE. More...
 

Detailed Description

Function Documentation

◆ efreet_util_path_to_file_id()

const char* efreet_util_path_to_file_id ( const char *  path)

Returns the fdo file id for a given path.

If the file isn't inside a default fdo path it will return NULL.

Parameters
pathThe path to find the file id for
Returns
File id for path or NULL

References alloca(), eina_hash_find(), eina_hash_set(), eina_lock_release(), eina_lock_take(), EINA_SAFETY_ON_NULL_RETURN_VAL, eina_stringshare_add(), and eina_stringshare_del().

Referenced by efreet_menu_desktop_insert().

◆ efreet_util_desktop_mime_list()

Eina_List* efreet_util_desktop_mime_list ( const char *  mime)

Find all desktops for a given mime type.

This list must be freed using EINA_LIST_FREE / efreet_desktop_free

Parameters
mimethe mime type
Returns
a list of desktops

References EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ efreet_util_desktop_wm_class_find()

Efreet_Desktop* efreet_util_desktop_wm_class_find ( const char *  wmname,
const char *  wmclass 
)

Find all desktops for a given wm class.

This list must be freed using EINA_LIST_FREE / efreet_desktop_free

Parameters
wmnamethe wm name
wmclassthe wm class
Returns
a list of desktops

References EINA_SAFETY_ON_TRUE_RETURN_VAL.

◆ efreet_util_desktop_file_id_find()

Efreet_Desktop* efreet_util_desktop_file_id_find ( const char *  file_id)

Find a desktop by file id.

return value must be freed by efreet_desktop_free

Parameters
file_idthe file id
Returns
a desktop

References efreet_desktop_get(), eina_hash_find(), and EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ efreet_util_desktop_exec_find()

Efreet_Desktop* efreet_util_desktop_exec_find ( const char *  exec)

Find a desktop by exec.

return value must be freed by efreet_desktop_free

Parameters
execthe exec name
Returns
a desktop

References ecore_file_app_exe_get(), ecore_file_file_get(), efreet_desktop_get(), eina_hash_find(), EINA_SAFETY_ON_NULL_RETURN_VAL, and _Efreet_Desktop::exec.

◆ efreet_util_desktop_name_find()

Efreet_Desktop* efreet_util_desktop_name_find ( const char *  name)

Find a desktop by name.

return value must be freed by efreet_desktop_free

Parameters
namethe name
Returns
a desktop

References EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ efreet_util_desktop_generic_name_find()

Efreet_Desktop* efreet_util_desktop_generic_name_find ( const char *  generic_name)

Find a desktop by generic name.

return value must be freed by efreet_desktop_free

Parameters
generic_namethe generic name
Returns
a desktop

References EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ efreet_util_desktop_name_glob_list()

Eina_List* efreet_util_desktop_name_glob_list ( const char *  glob)

Find all desktops where name matches a glob pattern.

This list must be freed using EINA_LIST_FREE / efreet_desktop_free

Parameters
globthe pattern to match
Returns
a list of desktops

References EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ efreet_util_desktop_exec_glob_list()

Eina_List* efreet_util_desktop_exec_glob_list ( const char *  glob)

Find all desktops where exec matches a glob pattern.

This list must be freed using EINA_LIST_FREE / efreet_desktop_free

Parameters
globthe pattern to match
Returns
a list of desktops

References ecore_file_app_exe_get(), efreet_desktop_get(), eina_hash_find(), eina_list_append(), and EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ efreet_util_desktop_generic_name_glob_list()

Eina_List* efreet_util_desktop_generic_name_glob_list ( const char *  glob)

Find all desktops where generic name matches a glob pattern.

This list must be freed using EINA_LIST_FREE / efreet_desktop_free

Parameters
globthe pattern to match
Returns
a list of desktops

References EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ efreet_util_desktop_comment_glob_list()

Eina_List* efreet_util_desktop_comment_glob_list ( const char *  glob)

Find all desktops where comment matches a glob pattern.

This list must be freed using EINA_LIST_FREE / efreet_desktop_free

Parameters
globthe pattern to match
Returns
a list of desktops

References EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ efreet_util_desktop_categories_list()

Eina_List* efreet_util_desktop_categories_list ( void  )

Find all desktop categories This list must be freed using EINA_LIST_FREE.

Returns
an Eina_List of category names (const char *)

References eina_list_append().

◆ efreet_util_desktop_category_list()

Eina_List* efreet_util_desktop_category_list ( const char *  category)

Find all desktops in a given category.

This list must be freed using EINA_LIST_FREE / efreet_desktop_free

Parameters
categorythe category name
Returns
a list of desktops

References EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ efreet_util_menus_find()

Eina_List* efreet_util_menus_find ( void  )

Returns a list of .menu files found in the various config dirs.

Returns
An eina list of menu file paths (const char *). This must be freed with EINA_LIST_FREE.

References efreet_config_dirs_get(), efreet_config_home_get(), and EINA_LIST_FOREACH.

◆ efreet_util_desktop_environments_list()

Eina_List* efreet_util_desktop_environments_list ( void  )

Find all known desktop environments This list must be freed using EINA_LIST_FREE.

Since
1.12
Returns
an Eina_List of desktop environments names (const char *)

References eina_list_append().