lib/efreet_utils.c File Reference
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
#include <fnmatch.h>
#include <limits.h>
#include <Eet.h>
#include <Ecore_File.h>
#include "Efreet.h"
#include "efreet_private.h"
#include "efreet_cache_private.h"
Include dependency graph for efreet_utils.c:

Defines

#define EFREET_MODULE_LOG_DOM   _efreet_utils_log_dom

Functions

void * alloca (size_t)
EAPI const char * efreet_desktop_util_cache_file (void)
EAPI void efreet_hash_free (Eina_Hash *hash, Eina_Free_Cb free_cb)
void efreet_util_desktop_cache_reload (void)
EAPI Eina_List * efreet_util_desktop_categories_list (void)
EAPI Eina_List * efreet_util_desktop_category_list (const char *category)
EAPI Eina_List * efreet_util_desktop_comment_glob_list (const char *glob)
EAPI Efreet_Desktopefreet_util_desktop_exec_find (const char *exec)
EAPI Eina_List * efreet_util_desktop_exec_glob_list (const char *glob)
EAPI Efreet_Desktopefreet_util_desktop_file_id_find (const char *file_id)
EAPI Efreet_Desktopefreet_util_desktop_generic_name_find (const char *generic_name)
EAPI Eina_List * efreet_util_desktop_generic_name_glob_list (const char *glob)
EAPI Eina_List * efreet_util_desktop_mime_list (const char *mime)
EAPI Efreet_Desktopefreet_util_desktop_name_find (const char *name)
EAPI Eina_List * efreet_util_desktop_name_glob_list (const char *glob)
EAPI Efreet_Desktopefreet_util_desktop_wm_class_find (const char *wmname, const char *wmclass)
int efreet_util_init (void)
EAPI Eina_List * efreet_util_menus_find (void)
EAPI const char * efreet_util_path_to_file_id (const char *path)
int efreet_util_shutdown (void)

Define Documentation

#define EFREET_MODULE_LOG_DOM   _efreet_utils_log_dom

Function Documentation

void* alloca ( size_t  )
EAPI 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 efreet_cache_check(), efreet_desktop_util_cache_file(), and EFREET_DESKTOP_UTILS_CACHE_MAJOR.

EAPI 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
EAPI 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
EAPI 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 efreet_cache_check(), efreet_desktop_get(), efreet_desktop_util_cache_file(), and EFREET_DESKTOP_UTILS_CACHE_MAJOR.

EAPI 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 efreet_cache_check(), efreet_desktop_get(), efreet_desktop_util_cache_file(), and EFREET_DESKTOP_UTILS_CACHE_MAJOR.

EAPI 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
EAPI 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
EAPI 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
EAPI 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
EAPI 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
EAPI 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
EAPI 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
EAPI 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(), and efreet_config_home_get().

EAPI const char* efreet_util_path_to_file_id ( const char *  path)

References alloca().

Referenced by efreet_menu_desktop_insert().