From 71b7acde90fc826669a6afa1bea7ea6af555ad3f Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 8 Apr 2011 11:01:08 +0000 Subject: [PATCH] doxy -> h files. SVN revision: 58487 --- legacy/efreet/src/lib/Efreet.h | 11 + legacy/efreet/src/lib/Efreet_Mime.h | 60 +++++- legacy/efreet/src/lib/Efreet_Trash.h | 42 ++++ legacy/efreet/src/lib/efreet.c | 10 - legacy/efreet/src/lib/efreet_base.c | 34 --- legacy/efreet/src/lib/efreet_base.h | 40 ++++ legacy/efreet/src/lib/efreet_desktop.c | 136 ------------ legacy/efreet/src/lib/efreet_desktop.h | 197 ++++++++++++++++++ .../efreet/src/lib/efreet_desktop_command.c | 38 ---- legacy/efreet/src/lib/efreet_icon.c | 68 ------ legacy/efreet/src/lib/efreet_icon.h | 79 +++++++ legacy/efreet/src/lib/efreet_ini.c | 105 ---------- legacy/efreet/src/lib/efreet_ini.h | 121 +++++++++++ legacy/efreet/src/lib/efreet_menu.c | 137 +----------- legacy/efreet/src/lib/efreet_menu.h | 71 +++++++ legacy/efreet/src/lib/efreet_mime.c | 61 ------ legacy/efreet/src/lib/efreet_trash.c | 37 ---- legacy/efreet/src/lib/efreet_uri.c | 20 -- legacy/efreet/src/lib/efreet_uri.h | 23 ++ legacy/efreet/src/lib/efreet_utils.c | 107 ---------- legacy/efreet/src/lib/efreet_utils.h | 121 +++++++++++ 21 files changed, 764 insertions(+), 754 deletions(-) diff --git a/legacy/efreet/src/lib/Efreet.h b/legacy/efreet/src/lib/Efreet.h index 06be563701..f3e874b65e 100644 --- a/legacy/efreet/src/lib/Efreet.h +++ b/legacy/efreet/src/lib/Efreet.h @@ -79,7 +79,18 @@ extern "C" { #include "efreet_utils.h" #include "efreet_uri.h" +/** + * @return Returns > 0 if the initialization was successful, 0 otherwise + * @brief Initializes the Efreet system + */ EAPI int efreet_init(void); + +/** + * @return Returns the number of times the init function as been called + * minus the corresponding init call. + * @brief Shuts down Efreet if a balanced number of init/shutdown calls have + * been made + */ EAPI int efreet_shutdown(void); #ifdef __cplusplus diff --git a/legacy/efreet/src/lib/Efreet_Mime.h b/legacy/efreet/src/lib/Efreet_Mime.h index 9258f73e2b..254c3e5dda 100644 --- a/legacy/efreet/src/lib/Efreet_Mime.h +++ b/legacy/efreet/src/lib/Efreet_Mime.h @@ -43,19 +43,75 @@ extern "C" { #endif +/** + * @return Returns 1 on success or 0 on failure + * @brief Initializes the efreet mime settings + */ EAPI int efreet_mime_init(void); + +/** + * @return Returns no value + * @brief Cleans up the efreet mime settings system + */ EAPI int efreet_mime_shutdown(void); +/** + * @param file The file to find the mime type + * @return Returns mime type as a string + * @brief Retreive the mime type of a file + */ EAPI const char *efreet_mime_type_get(const char *file); + +/** + * @param file The file to check the mime type + * @return Returns mime type as a string + * @brief Retreive the mime type of a file using magic + */ EAPI const char *efreet_mime_magic_type_get(const char *file); + +/** + * @param file The file to check the mime type + * @return Returns mime type as a string + * @brief Retreive the mime type of a file using globs + */ EAPI const char *efreet_mime_globs_type_get(const char *file); + +/** + * @param file The file to check the mime type + * @return Returns mime type as a string + * @brief Retreive the special mime type of a file + */ EAPI const char *efreet_mime_special_type_get(const char *file); + +/** + * @param file The file to check the mime type + * @return Returns mime type as a string + * @brief Retreive the fallback mime type of a file + */ EAPI const char *efreet_mime_fallback_type_get(const char *file); -EAPI const char *efreet_mime_type_icon_get(const char *mime, const char *theme, - unsigned int size); +/** + * @param mime The name of the mime type + * @param theme The name of the theme to search icons in + * @param size The wanted size of the icon + * @return Returns mime type icon path as a string + * @brief Retreive the mime type icon for a file + */ +EAPI const char *efreet_mime_type_icon_get(const char *mime, const char *theme, + unsigned int size); + +/** + * @brief Clear mime icons mapping cache + */ EAPI void efreet_mime_type_cache_clear(void); + +/** + * @brief Flush mime icons mapping cache + * + * Flush timeout is defined at compile time by + * EFREET_MIME_ICONS_FLUSH_TIMEOUT + */ EAPI void efreet_mime_type_cache_flush(void); /** diff --git a/legacy/efreet/src/lib/Efreet_Trash.h b/legacy/efreet/src/lib/Efreet_Trash.h index 746acdc957..d6ff4019d7 100644 --- a/legacy/efreet/src/lib/Efreet_Trash.h +++ b/legacy/efreet/src/lib/Efreet_Trash.h @@ -40,13 +40,55 @@ extern "C" { * @{ */ +/** + * @return Returns 1 on success or 0 on failure + * @brief Initializes the efreet trash system + */ EAPI int efreet_trash_init(void); + +/** + * @return Returns no value + * @brief Cleans up the efreet trash system + */ EAPI int efreet_trash_shutdown(void); +/** + * @return Returns the XDG Trash local directory or NULL on errors + * return value must be freed with eina_stringshare_del. + * @brief Retrieves the XDG Trash local directory + */ EAPI const char *efreet_trash_dir_get(const char *for_file); + +/** + * @param uri The local uri to move in the trash + * @param force_delete If you set this to 1 than files on different filesystems + * will be deleted permanently + * @return Return 1 on success, 0 on failure or -1 in case the uri is not on the + * same filesystem and force_delete is not set. + * @brief This function try to move the given uri to the trash. Files on + * different filesystem can't be moved to trash. If force_delete + * is 0 than non-local files will be ignored and -1 is returned, if you set + * force_delete to 1 non-local files will be deleted without asking. + */ EAPI int efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete); + +/** + * @return Return a list of strings with filename (remember to free the list + * when you don't need anymore) + * @brief List all the files and directory currently inside the trash. + */ EAPI Eina_List *efreet_trash_ls(void); + +/** + * @return Return 1 if the trash is empty or 0 if some file are in. + * @brief Check if the trash is currently empty + */ EAPI int efreet_trash_is_empty(void); + +/** + * @return Return 1 on success or 0 on failure + * @brief Delete all the files inside the trash. + */ EAPI int efreet_trash_empty_trash(void); /** diff --git a/legacy/efreet/src/lib/efreet.c b/legacy/efreet/src/lib/efreet.c index 74fd8200d8..5c1587d638 100644 --- a/legacy/efreet/src/lib/efreet.c +++ b/legacy/efreet/src/lib/efreet.c @@ -55,10 +55,6 @@ static int efreet_parse_locale_setting(const char *env); static uid_t ruid; static uid_t rgid; -/** - * @return Returns > 0 if the initialization was successful, 0 otherwise - * @brief Initializes the Efreet system - */ EAPI int efreet_init(void) { @@ -141,12 +137,6 @@ shutdown_eina: return --_efreet_init_count; } -/** - * @return Returns the number of times the init function as been called - * minus the corresponding init call. - * @brief Shuts down Efreet if a balanced number of init/shutdown calls have - * been made - */ EAPI int efreet_shutdown(void) { diff --git a/legacy/efreet/src/lib/efreet_base.c b/legacy/efreet/src/lib/efreet_base.c index f90904167e..1ecb9f5063 100644 --- a/legacy/efreet/src/lib/efreet_base.c +++ b/legacy/efreet/src/lib/efreet_base.c @@ -116,10 +116,6 @@ efreet_home_dir_get(void) return efreet_home_dir; } -/** - * @return Returns the XDG Data Home directory - * @brief Retrieves the XDG Data Home directory - */ EAPI const char * efreet_data_home_get(void) { @@ -128,15 +124,6 @@ efreet_data_home_get(void) return xdg_data_home; } -/** - * @return Returns the Eina_List of preference ordered extra data directories - * @brief Returns the Eina_List of prefernece oredred extra data - * directories - * - * @note The returned list is static inside Efreet. If you add/remove from the - * list then the next call to efreet_data_dirs_get() will return your - * modified values. DO NOT free this list. - */ EAPI Eina_List * efreet_data_dirs_get(void) { @@ -156,10 +143,6 @@ efreet_data_dirs_get(void) return xdg_data_dirs; } -/** - * @return Returns the XDG Config Home directory - * @brief Retrieves the XDG Config Home directory - */ EAPI const char * efreet_config_home_get(void) { @@ -168,15 +151,6 @@ efreet_config_home_get(void) return xdg_config_home; } -/** - * @return Returns the Eina_List of preference ordered extra config directories - * @brief Returns the Eina_List of prefernece ordered extra config - * directories - * - * @note The returned list is static inside Efreet. If you add/remove from the - * list then the next call to efreet_config_dirs_get() will return your - * modified values. DO NOT free this list. - */ EAPI Eina_List * efreet_config_dirs_get(void) { @@ -185,10 +159,6 @@ efreet_config_dirs_get(void) return xdg_config_dirs; } -/** - * @return Returns the XDG Cache Home directory - * @brief Retrieves the XDG Cache Home directory - */ EAPI const char * efreet_cache_home_get(void) { @@ -197,10 +167,6 @@ efreet_cache_home_get(void) return xdg_cache_home; } -/** - * @return Returns the current hostname - * @brief Returns the current hostname or empty string if not found - */ EAPI const char * efreet_hostname_get(void) { diff --git a/legacy/efreet/src/lib/efreet_base.h b/legacy/efreet/src/lib/efreet_base.h index 24c1518787..5a12b45b8d 100644 --- a/legacy/efreet/src/lib/efreet_base.h +++ b/legacy/efreet/src/lib/efreet_base.h @@ -10,13 +10,53 @@ * @{ */ + +/** + * @return Returns the XDG Data Home directory + * @brief Retrieves the XDG Data Home directory + */ EAPI const char *efreet_data_home_get(void); + +/** + * @return Returns the Eina_List of preference ordered extra data directories + * @brief Returns the Eina_List of prefernece oredred extra data + * directories + * + * @note The returned list is static inside Efreet. If you add/remove from the + * list then the next call to efreet_data_dirs_get() will return your + * modified values. DO NOT free this list. + */ EAPI Eina_List *efreet_data_dirs_get(void); + +/** + * @return Returns the XDG Config Home directory + * @brief Retrieves the XDG Config Home directory + */ EAPI const char *efreet_config_home_get(void); + +/** + * @return Returns the Eina_List of preference ordered extra config directories + * @brief Returns the Eina_List of prefernece ordered extra config + * directories + * + * @note The returned list is static inside Efreet. If you add/remove from the + * list then the next call to efreet_config_dirs_get() will return your + * modified values. DO NOT free this list. + */ EAPI Eina_List *efreet_config_dirs_get(void); + +/** + * @return Returns the XDG Cache Home directory + * @brief Retrieves the XDG Cache Home directory + */ EAPI const char *efreet_cache_home_get(void); + +/** + * @return Returns the current hostname + * @brief Returns the current hostname or empty string if not found + */ EAPI const char *efreet_hostname_get(void); /** diff --git a/legacy/efreet/src/lib/efreet_desktop.c b/legacy/efreet/src/lib/efreet_desktop.c index 64ab9f66ba..a0c72961b2 100644 --- a/legacy/efreet/src/lib/efreet_desktop.c +++ b/legacy/efreet/src/lib/efreet_desktop.c @@ -163,16 +163,6 @@ efreet_desktop_shutdown(void) _efreet_desktop_log_dom = -1; } -/** - * @param file The file to get the Efreet_Desktop from - * @return Returns a reference to a cached Efreet_Desktop on success, NULL - * on failure - * @brief Gets a reference to an Efreet_Desktop structure representing the - * contents of @a file or NULL if @a file is not a valid .desktop file. - * - * By using efreet_desktop_get the Efreet_Desktop will be saved in an internal - * cache for quicker loading. - */ EAPI Efreet_Desktop * efreet_desktop_get(const char *file) { @@ -188,11 +178,6 @@ efreet_desktop_get(const char *file) return desktop; } -/** - * @param desktop The Efreet_Desktop to ref - * @return Returns the new reference count - * @brief Increases reference count on desktop - */ EAPI int efreet_desktop_ref(Efreet_Desktop *desktop) { @@ -201,11 +186,6 @@ efreet_desktop_ref(Efreet_Desktop *desktop) return desktop->ref; } -/** - * @param file The file to create the Efreet_Desktop from - * @return Returns a new empty_Efreet_Desktop on success, NULL on failure - * @brief Creates a new empty Efreet_Desktop structure or NULL on failure - */ EAPI Efreet_Desktop * efreet_desktop_empty_new(const char *file) { @@ -222,13 +202,6 @@ efreet_desktop_empty_new(const char *file) return desktop; } -/** - * @param file The file to get the Efreet_Desktop from - * @return Returns a reference to a cached Efreet_Desktop on success, NULL - * on failure - * @brief Gets a reference to an Efreet_Desktop structure representing the - * contents of @a file or NULL if @a file is not a valid .desktop file. - */ EAPI Efreet_Desktop * efreet_desktop_new(const char *file) { @@ -253,18 +226,6 @@ efreet_desktop_new(const char *file) return efreet_desktop_uncached_new(file); } -/** - * @param file The file to create the Efreet_Desktop from - * @return Returns a new Efreet_Desktop on success, NULL on failure - * @brief Creates a new Efreet_Desktop structure initialized from the - * contents of @a file or NULL on failure - * - * By using efreet_desktop_uncached_new the Efreet_Desktop structure will be - * read from disk, and not from any cache. - * - * Data in the structure is allocated with strdup, so use free and strdup to - * change values. - */ EAPI Efreet_Desktop * efreet_desktop_uncached_new(const char *file) { @@ -288,12 +249,6 @@ efreet_desktop_uncached_new(const char *file) return desktop; } -/** - * @param desktop The desktop file to save - * @return Returns 1 on success or 0 on failure - * @brief Saves any changes made to @a desktop back to the file on the - * filesystem - */ EAPI int efreet_desktop_save(Efreet_Desktop *desktop) { @@ -348,15 +303,6 @@ efreet_desktop_save(Efreet_Desktop *desktop) return ok; } -/** - * @param desktop The desktop file to save - * @param file The filename to save as - * @return Returns 1 on success or 0 on failure - * @brief Saves @a desktop to @a file - * - * Please use efreet_desktop_uncached_new() on an existing file - * before using efreet_desktop_save_as() - */ EAPI int efreet_desktop_save_as(Efreet_Desktop *desktop, const char *file) { @@ -368,11 +314,6 @@ efreet_desktop_save_as(Efreet_Desktop *desktop, const char *file) return efreet_desktop_save(desktop); } -/** - * @param desktop The Efreet_Desktop to work with - * @return Returns no value - * @brief Frees the Efreet_Desktop structure and all of it's data - */ EAPI void efreet_desktop_free(Efreet_Desktop *desktop) { @@ -420,10 +361,6 @@ efreet_desktop_free(Efreet_Desktop *desktop) } } -/** - * @param environment the environment name - * @brief sets the global desktop environment name - */ EAPI void efreet_desktop_environment_set(const char *environment) { @@ -432,22 +369,12 @@ efreet_desktop_environment_set(const char *environment) else desktop_environment = NULL; } -/** - * @return environment the environment name - * @brief sets the global desktop environment name - */ EAPI const char * efreet_desktop_environment_get(void) { return desktop_environment; } -/** - * @param desktop The desktop to work with - * @return Returns the number of categories assigned to this desktop - * @brief Retrieves the number of categories the given @a desktop belongs - * too - */ EAPI unsigned int efreet_desktop_category_count_get(Efreet_Desktop *desktop) { @@ -455,11 +382,6 @@ efreet_desktop_category_count_get(Efreet_Desktop *desktop) return eina_list_count(desktop->categories); } -/** - * @param desktop the desktop - * @param category the category name - * @brief add a category to a desktop - */ EAPI void efreet_desktop_category_add(Efreet_Desktop *desktop, const char *category) { @@ -472,12 +394,6 @@ efreet_desktop_category_add(Efreet_Desktop *desktop, const char *category) (void *)eina_stringshare_add(category)); } -/** - * @param desktop the desktop - * @param category the category name - * @brief removes a category from a desktop - * @return 1 if the desktop had his category listed, 0 otherwise - */ EAPI int efreet_desktop_category_del(Efreet_Desktop *desktop, const char *category) { @@ -497,14 +413,6 @@ efreet_desktop_category_del(Efreet_Desktop *desktop, const char *category) return 0; } -/** - * @param type The type to add to the list of matching types - * @param parse_func a function to parse out custom fields - * @param save_func a function to save data returned from @a parse_func - * @param free_func a function to free data returned from @a parse_func - * @return Returns the id of the new type - * @brief Adds the given type to the list of types in the system - */ EAPI int efreet_desktop_type_add(const char *type, Efreet_Desktop_Type_Parse_Cb parse_func, Efreet_Desktop_Type_Save_Cb save_func, @@ -529,14 +437,6 @@ efreet_desktop_type_add(const char *type, Efreet_Desktop_Type_Parse_Cb parse_fun return id; } -/** - * @brief Add an alias for an existing desktop type. - * @param from_type the type to alias (e.g. EFREE_DESKTOP_TYPE_APPLICATION) - * @param alias the alias - * @return the new type id, or -1 if @p from_type was not valid - * - * This allows applications to add non-standard types that behave exactly as standard types. - */ EAPI int efreet_desktop_type_alias(int from_type, const char *alias) { @@ -547,15 +447,6 @@ efreet_desktop_type_alias(int from_type, const char *alias) return efreet_desktop_type_add(alias, info->parse_func, info->save_func, info->free_func); } -/** - * @brief Set the value for a X- field (Non spec) in the structure - * @param desktop the desktop - * @param key the key name to set - * @param data the value to set - * @return EINA_TRUE on success - * - * The key has to start with "X-" - */ EAPI Eina_Bool efreet_desktop_x_field_set(Efreet_Desktop *desktop, const char *key, const char *data) { @@ -571,12 +462,6 @@ efreet_desktop_x_field_set(Efreet_Desktop *desktop, const char *key, const char return EINA_TRUE; } -/** - * @brief Get the value for a X- field (Non spec) in the structure - * @param desktop the desktop - * @param key the key - * @return The value referenced by the key, or NULL if the key does not exist - */ EAPI const char * efreet_desktop_x_field_get(Efreet_Desktop *desktop, const char *key) { @@ -595,12 +480,6 @@ efreet_desktop_x_field_get(Efreet_Desktop *desktop, const char *key) return eina_stringshare_add(ret); } -/** - * @brief Delete the key and value for a X- field (Non spec) in the structure - * @param desktop the desktop - * @param key the key - * @return EINA_TRUE if the key existed - */ EAPI Eina_Bool efreet_desktop_x_field_del(Efreet_Desktop *desktop, const char *key) { @@ -613,22 +492,12 @@ efreet_desktop_x_field_del(Efreet_Desktop *desktop, const char *key) return eina_hash_del_by_key(desktop->x, key); } -/** - * @brief get type specific data for custom desktop types - * @param desktop the desktop - * @return type specific data, or NULL if there is none - */ EAPI void * efreet_desktop_type_data_get(Efreet_Desktop *desktop) { return desktop->type_data; } -/** - * @param string the raw string list - * @return an Eina_List of ecore string's - * @brief Parse ';' separate list of strings according to the desktop spec - */ EAPI Eina_List * efreet_desktop_string_list_parse(const char *string) { @@ -664,11 +533,6 @@ efreet_desktop_string_list_parse(const char *string) return list; } -/** - * @param list Eina_List with strings - * @return a raw string list - * @brief Create a ';' separate list of strings according to the desktop spec - */ EAPI char * efreet_desktop_string_list_join(Eina_List *list) { diff --git a/legacy/efreet/src/lib/efreet_desktop.h b/legacy/efreet/src/lib/efreet_desktop.h index 9d84c19e33..c191febd63 100644 --- a/legacy/efreet/src/lib/efreet_desktop.h +++ b/legacy/efreet/src/lib/efreet_desktop.h @@ -11,6 +11,16 @@ * @{ */ + +/** + * @param desktop the desktop entry + * @param files an eina list of file names to execute, as either absolute paths, + * relative paths, or uris + * @param func a callback to call for each prepared command line + * @param data user data passed to the callback + * @return Returns the return value of @p func on success or NULL on failure + * @brief Get a command to use to execute a desktop entry. + */ EAPI extern int EFREET_DESKTOP_TYPE_APPLICATION; EAPI extern int EFREET_DESKTOP_TYPE_LINK; EAPI extern int EFREET_DESKTOP_TYPE_DIRECTORY; @@ -97,27 +107,125 @@ struct _Efreet_Desktop void *type_data; /**< Type specific data for custom types */ }; + +/** + * @param file The file to get the Efreet_Desktop from + * @return Returns a reference to a cached Efreet_Desktop on success, NULL + * on failure + * @brief Gets a reference to an Efreet_Desktop structure representing the + * contents of @a file or NULL if @a file is not a valid .desktop file. + * + * By using efreet_desktop_get the Efreet_Desktop will be saved in an internal + * cache for quicker loading. + */ EAPI Efreet_Desktop *efreet_desktop_get(const char *file); + +/** + * @param desktop The Efreet_Desktop to ref + * @return Returns the new reference count + * @brief Increases reference count on desktop + */ EAPI int efreet_desktop_ref(Efreet_Desktop *desktop); + +/** + * @param file The file to create the Efreet_Desktop from + * @return Returns a new empty_Efreet_Desktop on success, NULL on failure + * @brief Creates a new empty Efreet_Desktop structure or NULL on failure + */ EAPI Efreet_Desktop *efreet_desktop_empty_new(const char *file); + +/** + * @param file The file to get the Efreet_Desktop from + * @return Returns a reference to a cached Efreet_Desktop on success, NULL + * on failure + * @brief Gets a reference to an Efreet_Desktop structure representing the + * contents of @a file or NULL if @a file is not a valid .desktop file. + */ EAPI Efreet_Desktop *efreet_desktop_new(const char *file); + +/** + * @param file The file to create the Efreet_Desktop from + * @return Returns a new Efreet_Desktop on success, NULL on failure + * @brief Creates a new Efreet_Desktop structure initialized from the + * contents of @a file or NULL on failure + * + * By using efreet_desktop_uncached_new the Efreet_Desktop structure will be + * read from disk, and not from any cache. + * + * Data in the structure is allocated with strdup, so use free and strdup to + * change values. + */ EAPI Efreet_Desktop *efreet_desktop_uncached_new(const char *file); + +/** + * @param desktop The Efreet_Desktop to work with + * @return Returns no value + * @brief Frees the Efreet_Desktop structure and all of it's data + */ EAPI void efreet_desktop_free(Efreet_Desktop *desktop); + /** * @def efreet_desktop_unref(desktop) * Alias for efreet_desktop_free(desktop) */ #define efreet_desktop_unref(desktop) efreet_desktop_free((desktop)) + +/** + * @param desktop The desktop file to save + * @return Returns 1 on success or 0 on failure + * @brief Saves any changes made to @a desktop back to the file on the + * filesystem + */ EAPI int efreet_desktop_save(Efreet_Desktop *desktop); + +/** + * @param desktop The desktop file to save + * @param file The filename to save as + * @return Returns 1 on success or 0 on failure + * @brief Saves @a desktop to @a file + * + * Please use efreet_desktop_uncached_new() on an existing file + * before using efreet_desktop_save_as() + */ EAPI int efreet_desktop_save_as(Efreet_Desktop *desktop, const char *file); + +/** + * @param desktop The desktop file to work with + * @param files The files to be substituted into the exec line + * @param data The data pointer to pass + * @return Returns the Ecore_Exce for @a desktop + * @brief Parses the @a desktop exec line and returns an Ecore_Exe. + */ EAPI void efreet_desktop_exec(Efreet_Desktop *desktop, Eina_List *files, void *data); + +/** + * @param environment the environment name + * @brief sets the global desktop environment name + */ EAPI void efreet_desktop_environment_set(const char *environment); + +/** + * @return environment the environment name + * @brief sets the global desktop environment name + */ EAPI const char *efreet_desktop_environment_get(void); + +/** + * @param desktop the desktop entry + * @param files an eina list of file names to execute, as either absolute paths, + * relative paths, or uris + * @param cb_command a callback to call for each prepared command line + * @param cb_progress a callback to get progress for the downloads + * @param data user data passed to the callback + * @return Returns 1 on success or 0 on failure + * @brief Get a command to use to execute a desktop entry, and receive progress + * updates for downloading of remote URI's passed in. + */ EAPI void *efreet_desktop_command_progress_get(Efreet_Desktop *desktop, Eina_List *files, Efreet_Desktop_Command_Cb cb_command, @@ -127,28 +235,117 @@ EAPI void *efreet_desktop_command_get(Efreet_Desktop *desktop, Eina_List *files, Efreet_Desktop_Command_Cb func, void *data); + +/** + * @param desktop the desktop entry + * @param files an eina list of local files, as absolute paths, local paths, or file// uris (or NULL to get exec string with no files appended) + * @return Returns an eina list of exec strings + * @brief Get the command to use to execute a desktop entry + * + * The returned list and each of its elements must be freed. + */ EAPI Eina_List * efreet_desktop_command_local_get(Efreet_Desktop *desktop, Eina_List *files); + +/** + * @param desktop The desktop to work with + * @return Returns the number of categories assigned to this desktop + * @brief Retrieves the number of categories the given @a desktop belongs + * too + */ EAPI unsigned int efreet_desktop_category_count_get(Efreet_Desktop *desktop); + +/** + * @param desktop the desktop + * @param category the category name + * @brief add a category to a desktop + */ EAPI void efreet_desktop_category_add(Efreet_Desktop *desktop, const char *category); + +/** + * @param desktop the desktop + * @param category the category name + * @brief removes a category from a desktop + * @return 1 if the desktop had his category listed, 0 otherwise + */ EAPI int efreet_desktop_category_del(Efreet_Desktop *desktop, const char *category); + +/** + * @param type The type to add to the list of matching types + * @param parse_func a function to parse out custom fields + * @param save_func a function to save data returned from @a parse_func + * @param free_func a function to free data returned from @a parse_func + * @return Returns the id of the new type + * @brief Adds the given type to the list of types in the system + */ EAPI int efreet_desktop_type_add(const char *type, Efreet_Desktop_Type_Parse_Cb parse_func, Efreet_Desktop_Type_Save_Cb save_func, Efreet_Desktop_Type_Free_Cb free_func); + +/** + * @brief Add an alias for an existing desktop type. + * @param from_type the type to alias (e.g. EFREE_DESKTOP_TYPE_APPLICATION) + * @param alias the alias + * @return the new type id, or -1 if @p from_type was not valid + * + * This allows applications to add non-standard types that behave exactly as standard types. + */ EAPI int efreet_desktop_type_alias (int from_type, const char *alias); + +/** + * @brief get type specific data for custom desktop types + * @param desktop the desktop + * @return type specific data, or NULL if there is none + */ EAPI void *efreet_desktop_type_data_get(Efreet_Desktop *desktop); + +/** + * @param string the raw string list + * @return an Eina_List of ecore string's + * @brief Parse ';' separate list of strings according to the desktop spec + */ EAPI Eina_List *efreet_desktop_string_list_parse(const char *string); + +/** + * @param list Eina_List with strings + * @return a raw string list + * @brief Create a ';' separate list of strings according to the desktop spec + */ EAPI char *efreet_desktop_string_list_join(Eina_List *list); + +/** + * @brief Set the value for a X- field (Non spec) in the structure + * @param desktop the desktop + * @param key the key name to set + * @param data the value to set + * @return EINA_TRUE on success + * + * The key has to start with "X-" + */ EAPI Eina_Bool efreet_desktop_x_field_set(Efreet_Desktop *desktop, const char *key, const char *data); + +/** + * @brief Get the value for a X- field (Non spec) in the structure + * @param desktop the desktop + * @param key the key + * @return The value referenced by the key, or NULL if the key does not exist + */ EAPI const char * efreet_desktop_x_field_get(Efreet_Desktop *desktop, const char *key); + +/** + * @brief Delete the key and value for a X- field (Non spec) in the structure + * @param desktop the desktop + * @param key the key + * @return EINA_TRUE if the key existed + */ EAPI Eina_Bool efreet_desktop_x_field_del(Efreet_Desktop *desktop, const char *key); /** diff --git a/legacy/efreet/src/lib/efreet_desktop_command.c b/legacy/efreet/src/lib/efreet_desktop_command.c index 658132c560..2ca0853605 100644 --- a/legacy/efreet/src/lib/efreet_desktop_command.c +++ b/legacy/efreet/src/lib/efreet_desktop_command.c @@ -94,9 +94,6 @@ struct Efreet_Desktop_Command_File int pending; }; -/** - * A unique id for each tmp file created while building a command - */ static int efreet_desktop_command_file_id = 0; static void *efreet_desktop_exec_cb(void *data, Efreet_Desktop *desktop, @@ -137,28 +134,12 @@ static char *efreet_string_append_char(char *dest, int *size, int *len, char c); -/** - * @param desktop The desktop file to work with - * @param files The files to be substituted into the exec line - * @param data The data pointer to pass - * @return Returns the Ecore_Exce for @a desktop - * @brief Parses the @a desktop exec line and returns an Ecore_Exe. - */ EAPI void efreet_desktop_exec(Efreet_Desktop *desktop, Eina_List *files, void *data) { efreet_desktop_command_get(desktop, files, efreet_desktop_exec_cb, data); } -/** - * @param desktop the desktop entry - * @param files an eina list of file names to execute, as either absolute paths, - * relative paths, or uris - * @param func a callback to call for each prepared command line - * @param data user data passed to the callback - * @return Returns the return value of @p func on success or NULL on failure - * @brief Get a command to use to execute a desktop entry. - */ EAPI void * efreet_desktop_command_get(Efreet_Desktop *desktop, Eina_List *files, Efreet_Desktop_Command_Cb func, void *data) @@ -166,14 +147,6 @@ efreet_desktop_command_get(Efreet_Desktop *desktop, Eina_List *files, return efreet_desktop_command_progress_get(desktop, files, func, NULL, data); } -/** - * @param desktop the desktop entry - * @param files an eina list of local files, as absolute paths, local paths, or file// uris (or NULL to get exec string with no files appended) - * @return Returns an eina list of exec strings - * @brief Get the command to use to execute a desktop entry - * - * The returned list and each of its elements must be freed. - */ EAPI Eina_List * efreet_desktop_command_local_get(Efreet_Desktop *desktop, Eina_List *files) { @@ -213,17 +186,6 @@ efreet_desktop_command_local_get(Efreet_Desktop *desktop, Eina_List *files) return execs; } -/** - * @param desktop the desktop entry - * @param files an eina list of file names to execute, as either absolute paths, - * relative paths, or uris - * @param cb_command a callback to call for each prepared command line - * @param cb_progress a callback to get progress for the downloads - * @param data user data passed to the callback - * @return Returns 1 on success or 0 on failure - * @brief Get a command to use to execute a desktop entry, and receive progress - * updates for downloading of remote URI's passed in. - */ EAPI void * efreet_desktop_command_progress_get(Efreet_Desktop *desktop, Eina_List *files, Efreet_Desktop_Command_Cb cb_command, diff --git a/legacy/efreet/src/lib/efreet_icon.c b/legacy/efreet/src/lib/efreet_icon.c index 7c746e9b20..be0f83cf46 100644 --- a/legacy/efreet/src/lib/efreet_icon.c +++ b/legacy/efreet/src/lib/efreet_icon.c @@ -120,10 +120,6 @@ efreet_icon_shutdown(void) IF_FREE_HASH(change_monitors); } -/** - * @return Returns the deprecated user icon directory - * @brief Returns the deprecated user icon directory - */ EAPI const char * efreet_icon_deprecated_user_dir_get(void) { @@ -143,10 +139,6 @@ efreet_icon_deprecated_user_dir_get(void) return efreet_icon_deprecated_user_dir; } -/** - * @return Returns the user icon directory - * @brief Returns the user icon directory - */ EAPI const char * efreet_icon_user_dir_get(void) { @@ -166,11 +158,6 @@ efreet_icon_user_dir_get(void) return efreet_icon_user_dir; } -/** - * @param ext The extension to add to the list of checked extensions - * @return Returns no value. - * @brief Adds the given extension to the list of possible icon extensions - */ EAPI void efreet_icon_extension_add(const char *ext) { @@ -187,48 +174,24 @@ efreet_icon_extension_add(const char *ext) efreet_icon_extensions = eina_list_prepend(efreet_icon_extensions, ext); } -/** - * @return Returns a list of strings that are paths to other icon directories - * @brief Gets the list of all extra directories to look for icons. These - * directories are used to look for icons after looking in the user icon dir - * and before looking in standard system directories. The order of search is - * from first to last directory in this list. the strings in the list should - * be created with eina_stringshare_add(). - */ EAPI Eina_List ** efreet_icon_extra_list_get(void) { return &efreet_extra_icon_dirs; } -/** - * @return Returns a list of strings that are icon extensions to look for - * @brief Gets the list of all icon extensions to look for - */ EAPI Eina_List * efreet_icon_extensions_list_get(void) { return efreet_icon_extensions; } -/** - * @return Returns a list of Efreet_Icon structs for all the non-hidden icon - * themes - * @brief Retrieves all of the non-hidden icon themes available on the system. - * The returned list must be freed. Do not free the list data. - */ EAPI Eina_List * efreet_icon_theme_list_get(void) { return efreet_cache_icon_theme_list(); } -/** - * @param theme_name The theme to look for - * @return Returns the icon theme related to the given theme name or NULL if - * none exists. - * @brief Tries to get the icon theme structure for the given theme name - */ EAPI Efreet_Icon_Theme * efreet_icon_theme_find(const char *theme_name) { @@ -273,13 +236,6 @@ efreet_icon_remove_extension(const char *icon) return tmp; } -/** - * @param theme_name The icon theme to look for - * @param icon The icon to look for - * @param size; The icon size to look for - * @return Returns the path to the given icon or NULL if none found - * @brief Retrives the path to the given icon. - */ EAPI const char * efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int size) { @@ -322,17 +278,6 @@ efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int siz return value; } -/** - * @param theme_name The icon theme to look for - * @param icons List of icons to look for - * @param size; The icon size to look for - * @return Returns the path representing first found icon or - * NULL if none of the icons are found - * @brief Retrieves all of the information about the first found icon in - * the list. - * @note This function will search the given theme for all icons before falling - * back. This is useful when searching for mimetype icons. - */ EAPI const char * efreet_icon_list_find(const char *theme_name, Eina_List *icons, unsigned int size) @@ -408,14 +353,6 @@ efreet_icon_list_find(const char *theme_name, Eina_List *icons, return value; } -/** - * @param theme_name The icon theme to look for - * @param icon The icon to look for - * @param size The icon size to look for - * @return Returns the Efreet_Icon structure representing this icon or NULL - * if the icon is not found - * @brief Retrieves all of the information about the given icon. - */ EAPI Efreet_Icon * efreet_icon_find(const char *theme_name, const char *icon, unsigned int size) { @@ -477,11 +414,6 @@ efreet_icon_new(const char *path) return icon; } -/** - * @param icon The Efreet_Icon to cleanup - * @return Returns no value. - * @brief Free's the given icon and all its internal data. - */ EAPI void efreet_icon_free(Efreet_Icon *icon) { diff --git a/legacy/efreet/src/lib/efreet_icon.h b/legacy/efreet/src/lib/efreet_icon.h index 1b79dc1d42..21bd72044a 100644 --- a/legacy/efreet/src/lib/efreet_icon.h +++ b/legacy/efreet/src/lib/efreet_icon.h @@ -15,6 +15,11 @@ /** * Event id for cache update. */ + +/** + * @return Returns the user icon directory + * @brief Returns the user icon directory + */ EAPI extern int EFREET_EVENT_ICON_CACHE_UPDATE; /** @@ -140,22 +145,96 @@ struct Efreet_Icon_Point }; EAPI const char *efreet_icon_user_dir_get(void); + +/** + * @return Returns the deprecated user icon directory + * @brief Returns the deprecated user icon directory + */ EAPI const char *efreet_icon_deprecated_user_dir_get(void); + +/** + * @param ext The extension to add to the list of checked extensions + * @return Returns no value. + * @brief Adds the given extension to the list of possible icon extensions + */ EAPI void efreet_icon_extension_add(const char *ext); + +/** + * @return Returns a list of strings that are paths to other icon directories + * @brief Gets the list of all extra directories to look for icons. These + * directories are used to look for icons after looking in the user icon dir + * and before looking in standard system directories. The order of search is + * from first to last directory in this list. the strings in the list should + * be created with eina_stringshare_add(). + */ EAPI Eina_List **efreet_icon_extra_list_get(void); + +/** + * @return Returns a list of strings that are icon extensions to look for + * @brief Gets the list of all icon extensions to look for + */ EAPI Eina_List *efreet_icon_extensions_list_get(void); + +/** + * @return Returns a list of Efreet_Icon structs for all the non-hidden icon + * themes + * @brief Retrieves all of the non-hidden icon themes available on the system. + * The returned list must be freed. Do not free the list data. + */ EAPI Eina_List *efreet_icon_theme_list_get(void); + +/** + * @param theme_name The theme to look for + * @return Returns the icon theme related to the given theme name or NULL if + * none exists. + * @brief Tries to get the icon theme structure for the given theme name + */ EAPI Efreet_Icon_Theme *efreet_icon_theme_find(const char *theme_name); + +/** + * @param theme_name The icon theme to look for + * @param icon The icon to look for + * @param size The icon size to look for + * @return Returns the Efreet_Icon structure representing this icon or NULL + * if the icon is not found + * @brief Retrieves all of the information about the given icon. + */ EAPI Efreet_Icon *efreet_icon_find(const char *theme_name, const char *icon, unsigned int size); + +/** + * @param theme_name The icon theme to look for + * @param icons List of icons to look for + * @param size; The icon size to look for + * @return Returns the path representing first found icon or + * NULL if none of the icons are found + * @brief Retrieves all of the information about the first found icon in + * the list. + * @note This function will search the given theme for all icons before falling + * back. This is useful when searching for mimetype icons. + */ EAPI const char *efreet_icon_list_find(const char *theme_name, Eina_List *icons, unsigned int size); + +/** + * @param theme_name The icon theme to look for + * @param icon The icon to look for + * @param size; The icon size to look for + * @return Returns the path to the given icon or NULL if none found + * @brief Retrives the path to the given icon. + */ EAPI const char *efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int size); + +/** + * @param icon The Efreet_Icon to cleanup + * @return Returns no value. + * @brief Free's the given icon and all its internal data. + */ EAPI void efreet_icon_free(Efreet_Icon *icon); /** diff --git a/legacy/efreet/src/lib/efreet_ini.c b/legacy/efreet/src/lib/efreet_ini.c index 5f6751762a..54724ca908 100644 --- a/legacy/efreet/src/lib/efreet_ini.c +++ b/legacy/efreet/src/lib/efreet_ini.c @@ -74,13 +74,6 @@ efreet_ini_shutdown(void) _efreet_ini_log_dom = -1; } -/** - * @param file The file to parse - * @return Returns a new Efreet_Ini structure initialized with the contents - * of @a file, or NULL on memory allocation failure - * @brief Creates and initializes a new Ini structure with the contents of - * @a file, or NULL on failure - */ EAPI Efreet_Ini * efreet_ini_new(const char *file) { @@ -287,11 +280,6 @@ next_line: return data; } -/** - * @param ini The Efreet_Ini to work with - * @return Returns no value - * @brief Frees the given Efree_Ini structure. - */ EAPI void efreet_ini_free(Efreet_Ini *ini) { @@ -301,12 +289,6 @@ efreet_ini_free(Efreet_Ini *ini) FREE(ini); } -/** - * @param ini The Efreet_Ini to work with - * @param file The file to load - * @return Returns no value - * @brief Saves the given Efree_Ini structure. - */ EAPI int efreet_ini_save(Efreet_Ini *ini, const char *file) { @@ -329,12 +311,6 @@ efreet_ini_save(Efreet_Ini *ini, const char *file) return 1; } -/** - * @param ini The Efreet_Ini to work with - * @param section The section of the ini file we want to get values from - * @return Returns 1 if the section exists, otherwise 0 - * @brief Sets the current working section of the ini file to @a section - */ EAPI int efreet_ini_section_set(Efreet_Ini *ini, const char *section) { @@ -344,12 +320,6 @@ efreet_ini_section_set(Efreet_Ini *ini, const char *section) return (ini->section ? 1 : 0); } -/** - * @param ini The Efreet_Ini to work with - * @param section The section of the ini file we want to add - * @return Returns no value - * @brief Adds a new working section of the ini file to @a section - */ EAPI void efreet_ini_section_add(Efreet_Ini *ini, const char *section) { @@ -365,13 +335,6 @@ efreet_ini_section_add(Efreet_Ini *ini, const char *section) eina_hash_add(ini->data, section, hash); } -/** - * @param ini The Efree_Ini to work with - * @param key The key to lookup - * @return Returns the string associated with the given key or NULL if not - * found. - * @brief Retrieves the value for the given key or NULL if none found. - */ EAPI const char * efreet_ini_string_get(Efreet_Ini *ini, const char *key) { @@ -380,13 +343,6 @@ efreet_ini_string_get(Efreet_Ini *ini, const char *key) return eina_hash_find(ini->section, key); } -/** - * @param ini The Efree_Ini to work with - * @param key The key to use - * @param value The value to set - * @return Returns no value - * @brief Sets the value for the given key - */ EAPI void efreet_ini_string_set(Efreet_Ini *ini, const char *key, const char *value) { @@ -396,13 +352,6 @@ efreet_ini_string_set(Efreet_Ini *ini, const char *key, const char *value) eina_hash_add(ini->section, key, eina_stringshare_add(value)); } -/** - * @param ini The Efree_Ini to work with - * @param key The key to lookup - * @return Returns the integer associated with the given key or -1 if not - * found. - * @brief Retrieves the value for the given key or -1 if none found. - */ EAPI int efreet_ini_int_get(Efreet_Ini *ini, const char *key) { @@ -416,13 +365,6 @@ efreet_ini_int_get(Efreet_Ini *ini, const char *key) return -1; } -/** - * @param ini The Efree_Ini to work with - * @param key The key to use - * @param value The value to set - * @return Returns no value - * @brief Sets the value for the given key - */ EAPI void efreet_ini_int_set(Efreet_Ini *ini, const char *key, int value) { @@ -434,13 +376,6 @@ efreet_ini_int_set(Efreet_Ini *ini, const char *key, int value) efreet_ini_string_set(ini, key, str); } -/** - * @param ini The Efree_Ini to work with - * @param key The key to lookup - * @return Returns the double associated with the given key or -1 if not - * found. - * @brief Retrieves the value for the given key or -1 if none found. - */ EAPI double efreet_ini_double_get(Efreet_Ini *ini, const char *key) { @@ -454,13 +389,6 @@ efreet_ini_double_get(Efreet_Ini *ini, const char *key) return -1; } -/** - * @param ini The Efree_Ini to work with - * @param key The key to use - * @param value The value to set - * @return Returns no value - * @brief Sets the value for the given key - */ EAPI void efreet_ini_double_set(Efreet_Ini *ini, const char *key, double value) { @@ -476,12 +404,6 @@ efreet_ini_double_set(Efreet_Ini *ini, const char *key, double value) efreet_ini_string_set(ini, key, str); } -/** - * @param ini The ini struct to work with - * @param key The key to search for - * @return Returns 1 if the boolean is true, 0 otherwise - * @brief Retrieves the boolean value at key @a key from the ini @a ini - */ EAPI unsigned int efreet_ini_boolean_get(Efreet_Ini *ini, const char *key) { @@ -495,13 +417,6 @@ efreet_ini_boolean_get(Efreet_Ini *ini, const char *key) return 0; } -/** - * @param ini The ini struct to work with - * @param key The key to use - * @param value The value to set - * @return Returns no value - * @brief Sets the value for the given key - */ EAPI void efreet_ini_boolean_set(Efreet_Ini *ini, const char *key, unsigned int value) { @@ -511,13 +426,6 @@ efreet_ini_boolean_set(Efreet_Ini *ini, const char *key, unsigned int value) else efreet_ini_string_set(ini, key, "false"); } -/** - * @param ini The ini struct to work with - * @param key The key to search for - * @return Returns the utf8 encoded string associated with @a key, or NULL - * if none found - * @brief Retrieves the utf8 encoded string associated with @a key in the current locale or NULL if none found - */ EAPI const char * efreet_ini_localestring_get(Efreet_Ini *ini, const char *key) { @@ -574,13 +482,6 @@ efreet_ini_localestring_get(Efreet_Ini *ini, const char *key) return val; } -/** - * @param ini The ini struct to work with - * @param key The key to use - * @param value The value to set - * @return Returns no value - * @brief Sets the value for the given key - */ EAPI void efreet_ini_localestring_set(Efreet_Ini *ini, const char *key, const char *value) { @@ -615,12 +516,6 @@ efreet_ini_localestring_set(Efreet_Ini *ini, const char *key, const char *value) efreet_ini_string_set(ini, buf, value); } -/** - * @param ini The ini struct to work with - * @param key The key to remove - * @return Returns no value - * @brief Remove the given key from the ini struct - */ EAPI void efreet_ini_key_unset(Efreet_Ini *ini, const char *key) { diff --git a/legacy/efreet/src/lib/efreet_ini.h b/legacy/efreet/src/lib/efreet_ini.h index 4bc2be6255..f5b8a9e390 100644 --- a/legacy/efreet/src/lib/efreet_ini.h +++ b/legacy/efreet/src/lib/efreet_ini.h @@ -25,32 +25,153 @@ struct Efreet_Ini Eina_Hash *section; /**< currently selected section */ }; + +/** + * @param file The file to parse + * @return Returns a new Efreet_Ini structure initialized with the contents + * of @a file, or NULL on memory allocation failure + * @brief Creates and initializes a new Ini structure with the contents of + * @a file, or NULL on failure + */ EAPI Efreet_Ini *efreet_ini_new(const char *file); + +/** + * @param ini The Efreet_Ini to work with + * @return Returns no value + * @brief Frees the given Efree_Ini structure. + */ EAPI void efreet_ini_free(Efreet_Ini *ini); + +/** + * @param ini The Efreet_Ini to work with + * @param file The file to load + * @return Returns no value + * @brief Saves the given Efree_Ini structure. + */ EAPI int efreet_ini_save(Efreet_Ini *ini, const char *path); + +/** + * @param ini The Efreet_Ini to work with + * @param section The section of the ini file we want to get values from + * @return Returns 1 if the section exists, otherwise 0 + * @brief Sets the current working section of the ini file to @a section + */ EAPI int efreet_ini_section_set(Efreet_Ini *ini, const char *section); + +/** + * @param ini The Efreet_Ini to work with + * @param section The section of the ini file we want to add + * @return Returns no value + * @brief Adds a new working section of the ini file to @a section + */ EAPI void efreet_ini_section_add(Efreet_Ini *ini, const char *section); + +/** + * @param ini The Efree_Ini to work with + * @param key The key to lookup + * @return Returns the string associated with the given key or NULL if not + * found. + * @brief Retrieves the value for the given key or NULL if none found. + */ EAPI const char *efreet_ini_string_get(Efreet_Ini *ini, const char *key); + +/** + * @param ini The Efree_Ini to work with + * @param key The key to use + * @param value The value to set + * @return Returns no value + * @brief Sets the value for the given key + */ EAPI void efreet_ini_string_set(Efreet_Ini *ini, const char *key, const char *value); + +/** + * @param ini The ini struct to work with + * @param key The key to search for + * @return Returns the utf8 encoded string associated with @a key, or NULL + * if none found + * @brief Retrieves the utf8 encoded string associated with @a key in the current locale or NULL if none found + */ EAPI const char *efreet_ini_localestring_get(Efreet_Ini *ini, const char *key); + +/** + * @param ini The ini struct to work with + * @param key The key to use + * @param value The value to set + * @return Returns no value + * @brief Sets the value for the given key + */ EAPI void efreet_ini_localestring_set(Efreet_Ini *ini, const char *key, const char *value); + +/** + * @param ini The ini struct to work with + * @param key The key to search for + * @return Returns 1 if the boolean is true, 0 otherwise + * @brief Retrieves the boolean value at key @a key from the ini @a ini + */ EAPI unsigned int efreet_ini_boolean_get(Efreet_Ini *ini, const char *key); + +/** + * @param ini The ini struct to work with + * @param key The key to use + * @param value The value to set + * @return Returns no value + * @brief Sets the value for the given key + */ EAPI void efreet_ini_boolean_set(Efreet_Ini *ini, const char *key, unsigned int value); + +/** + * @param ini The Efree_Ini to work with + * @param key The key to lookup + * @return Returns the integer associated with the given key or -1 if not + * found. + * @brief Retrieves the value for the given key or -1 if none found. + */ EAPI int efreet_ini_int_get(Efreet_Ini *ini, const char *key); + +/** + * @param ini The Efree_Ini to work with + * @param key The key to use + * @param value The value to set + * @return Returns no value + * @brief Sets the value for the given key + */ EAPI void efreet_ini_int_set(Efreet_Ini *ini, const char *key, int value); + +/** + * @param ini The Efree_Ini to work with + * @param key The key to lookup + * @return Returns the double associated with the given key or -1 if not + * found. + * @brief Retrieves the value for the given key or -1 if none found. + */ EAPI double efreet_ini_double_get(Efreet_Ini *ini, const char *key); + +/** + * @param ini The Efree_Ini to work with + * @param key The key to use + * @param value The value to set + * @return Returns no value + * @brief Sets the value for the given key + */ EAPI void efreet_ini_double_set(Efreet_Ini *ini, const char *key, double value); + +/** + * @param ini The ini struct to work with + * @param key The key to remove + * @return Returns no value + * @brief Remove the given key from the ini struct + */ EAPI void efreet_ini_key_unset(Efreet_Ini *ini, const char *key); /** diff --git a/legacy/efreet/src/lib/efreet_menu.c b/legacy/efreet/src/lib/efreet_menu.c index 723f644ea5..9d35ea43ae 100644 --- a/legacy/efreet/src/lib/efreet_menu.c +++ b/legacy/efreet/src/lib/efreet_menu.c @@ -36,30 +36,16 @@ static int _efreet_menu_log_dom = -1; #include "efreet_private.h" #include "efreet_xml.h" -/** - * Efreet_Menu_Move - */ typedef struct Efreet_Menu_Move Efreet_Menu_Move; -/** - * Efreet_Menu_Move - * Info on a menu movement - */ struct Efreet_Menu_Move { const char *old_name; /**< The menu path to move from */ const char *new_name; /**< The menu path to move too */ }; -/** - * Efreet_Menu_Internal - */ typedef struct Efreet_Menu_Internal Efreet_Menu_Internal; -/** - * Efreet_Menu_Internal - * Contains the information about a menu - */ struct Efreet_Menu_Internal { struct @@ -108,14 +94,8 @@ struct Efreet_Menu_Internal unsigned char deleted:1; /**< The menu is deleted */ }; -/** - * Efreet_Menu_App_Dir - */ typedef struct Efreet_Menu_App_Dir Efreet_Menu_App_Dir; -/** - * Holds information on an app dir - */ struct Efreet_Menu_App_Dir { const char *path; /**< directory path */ @@ -123,9 +103,6 @@ struct Efreet_Menu_App_Dir unsigned int legacy:1; /**< is this a legacy dir */ }; -/** - * The type of operations we can perform with a filter - */ enum Efreet_Menu_Filter_Op_Type { EFREET_MENU_FILTER_OP_OR, @@ -133,34 +110,18 @@ enum Efreet_Menu_Filter_Op_Type EFREET_MENU_FILTER_OP_NOT }; -/** - * Efreet_Menu_Filter_Op_Type - */ typedef enum Efreet_Menu_Filter_Op_Type Efreet_Menu_Filter_Op_Type; -/** - * The type of filter - */ enum Efreet_Menu_Filter_Type { EFREET_MENU_FILTER_INCLUDE, EFREET_MENU_FILTER_EXCLUDE }; -/** - * Efreet_Menu_Filter_Type - */ typedef enum Efreet_Menu_Filter_Type Efreet_Menu_Filter_Type; -/** - * Efreet_Menu_Filter_Op - */ typedef struct Efreet_Menu_Filter_Op Efreet_Menu_Filter_Op; -/** - * Efreet_Menu_Filter_Op - * Contains information on a filter operation - */ struct Efreet_Menu_Filter_Op { Efreet_Menu_Filter_Op_Type type; /**< The type of operation */ @@ -172,24 +133,14 @@ struct Efreet_Menu_Filter_Op unsigned char all:1; /**< Applies to all .desktop files */ }; -/** - * Efreet_Menu_Filter - */ typedef struct Efreet_Menu_Filter Efreet_Menu_Filter; -/** - * Efreet_Menu_Filter - * Stores information on a filter - */ struct Efreet_Menu_Filter { Efreet_Menu_Filter_Type type; /**< The type of filter */ Efreet_Menu_Filter_Op *op; /**< The filter operations */ }; -/** - * The type of layout - */ enum Efreet_Menu_Layout_Type { EFREET_MENU_LAYOUT_MENUNAME, @@ -198,20 +149,10 @@ enum Efreet_Menu_Layout_Type EFREET_MENU_LAYOUT_MERGE }; -/** - * Efreet_Menu_Layout_Type - */ typedef enum Efreet_Menu_Layout_Type Efreet_Menu_Layout_Type; -/** - * Efreet_Menu_Layout - */ typedef struct Efreet_Menu_Layout Efreet_Menu_Layout; -/** - * Efreet_Menu_Layout - * Stores information on a layout - */ struct Efreet_Menu_Layout { Efreet_Menu_Layout_Type type; /**< The type of layout */ @@ -225,15 +166,8 @@ struct Efreet_Menu_Layout signed char inline_alias; /**< Whether we should use the menu name when inlining */ }; -/** - * Efreet_Menu_Desktop - */ typedef struct Efreet_Menu_Desktop Efreet_Menu_Desktop; -/** - * Efreet_Menu_Desktop - * Stores information on a desktop for the menu - */ struct Efreet_Menu_Desktop { Efreet_Desktop *desktop; /**< The desktop we refer too */ @@ -397,10 +331,6 @@ static int efreet_menu_save_indent(FILE *f, int indent); static void efreet_menu_path_set(Efreet_Menu_Internal *internal, const char *path); -/** - * @return Returns 1 on success, 0 on failure - * @brief Initializes the Efreet Menu system. - */ int efreet_menu_init(void) { @@ -534,11 +464,6 @@ efreet_menu_init(void) return 1; } -/** - * @return Returns no value - * @brief Initialize legacy kde support. This function blocks while - * the kde-config script is run. - */ EAPI int efreet_menu_kde_legacy_init(void) { @@ -578,10 +503,6 @@ efreet_menu_kde_legacy_init(void) return 1; } -/** - * @return Returns no value - * @brief Shuts down the Efreet menu system - */ void efreet_menu_shutdown(void) { @@ -603,12 +524,6 @@ efreet_menu_shutdown(void) _efreet_menu_log_dom = -1; } -/** - * @param name The internal name of the menu - * @return Returns the Efreet_Menu on success or - * NULL on failure - * @brief Creates a new menu - */ EAPI Efreet_Menu * efreet_menu_new(const char *name) { @@ -625,13 +540,6 @@ efreet_menu_new(const char *name) return menu; } -/** - * @brief Override which file is used for menu creation - * @param file The file to use for menu creation - * - * This file is only used if it exists, else the standard files will be used - * for the menu. - */ EAPI void efreet_menu_file_set(const char *file) { @@ -640,11 +548,6 @@ efreet_menu_file_set(const char *file) if (file) efreet_menu_file = eina_stringshare_add(file); } -/** - * @return Returns the Efreet_Menu_Internal representation of the default menu or - * NULL if none found - * @brief Creates the default menu representation - */ EAPI Efreet_Menu * efreet_menu_get(void) { @@ -680,12 +583,6 @@ efreet_menu_get(void) return NULL; } -/** - * @param path The path of the menu to load - * @return Returns the Efreet_Menu_Internal representation on success or NULL on - * failure - * @brief Parses the given .menu file and creates the menu representation - */ EAPI Efreet_Menu * efreet_menu_parse(const char *path) { @@ -758,12 +655,6 @@ efreet_menu_parse(const char *path) return entry; } -/** - * @param menu The menu to work with - * @param path The path where the menu should be saved - * @return Returns 1 on success, 0 on failure - * @brief Saves the menu to file - */ EAPI int efreet_menu_save(Efreet_Menu *menu, const char *path) { @@ -878,14 +769,6 @@ efreet_menu_save_indent(FILE *f, int indent) return 1; } -/** - * @param menu The menu to work with - * @param desktop The desktop to insert - * @param pos The position to place the new desktop - * @return Returns 1 on success, 0 on failure - * @brief Insert a desktop element in a menu structure. Only accepts desktop files - * in default directories. - */ EAPI int efreet_menu_desktop_insert(Efreet_Menu *menu, Efreet_Desktop *desktop, int pos) { @@ -914,13 +797,6 @@ efreet_menu_desktop_insert(Efreet_Menu *menu, Efreet_Desktop *desktop, int pos) return 1; } -/** - * @param menu The menu to work with - * @param desktop The desktop to remove - * @return Returns 1 on success, 0 on failure - * @brief Remove 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) { @@ -940,13 +816,6 @@ efreet_menu_desktop_remove(Efreet_Menu *menu, Efreet_Desktop *desktop) return 0; } -/** - * @param menu The menu to work with - * @param menu The menu to work with - * @param indent The indent level to print the menu at - * @return Returns no value - * @brief Dumps the contents of the menu to the command line - */ EAPI void efreet_menu_dump(Efreet_Menu *menu, const char *indent) { @@ -982,6 +851,7 @@ efreet_menu_dump(Efreet_Menu *menu, const char *indent) } /** + * @internal * @param user_dir The user directory to work with * @param system_dirs The system directories to work with * @param suffix The path suffix to add @@ -2598,11 +2468,6 @@ efreet_menu_entry_new(void) return entry; } -/** - * @param entry The Efreet_Menu to free - * @return Returns no value - * @brief Frees the given structure - */ EAPI void efreet_menu_free(Efreet_Menu *entry) { diff --git a/legacy/efreet/src/lib/efreet_menu.h b/legacy/efreet/src/lib/efreet_menu.h index 0376813fbc..e23f694c06 100644 --- a/legacy/efreet/src/lib/efreet_menu.h +++ b/legacy/efreet/src/lib/efreet_menu.h @@ -43,21 +43,92 @@ struct Efreet_Menu Eina_List *entries; /**< The menu items */ }; + +/** + * @return Returns no value + * @brief Initialize legacy kde support. This function blocks while + * the kde-config script is run. + */ EAPI int efreet_menu_kde_legacy_init(void); +/** + * @param name The internal name of the menu + * @return Returns the Efreet_Menu on success or + * NULL on failure + * @brief Creates a new menu + */ EAPI Efreet_Menu *efreet_menu_new(const char *name); + +/** + * @brief Override which file is used for menu creation + * @param file The file to use for menu creation + * + * This file is only used if it exists, else the standard files will be used + * for the menu. + */ EAPI void efreet_menu_file_set(const char *file); + +/** + * @return Returns the Efreet_Menu_Internal representation of the default menu or + * NULL if none found + * @brief Creates the default menu representation + */ EAPI Efreet_Menu *efreet_menu_get(void); + +/** + * @param path The path of the menu to load + * @return Returns the Efreet_Menu_Internal representation on success or NULL on + * failure + * @brief Parses the given .menu file and creates the menu representation + */ EAPI Efreet_Menu *efreet_menu_parse(const char *path); + +/** + * @param menu The menu to work with + * @param path The path where the menu should be saved + * @return Returns 1 on success, 0 on failure + * @brief Saves the menu to file + */ EAPI int efreet_menu_save(Efreet_Menu *menu, const char *path); + +/** + * @param entry The Efreet_Menu to free + * @return Returns no value + * @brief Frees the given structure + */ EAPI void efreet_menu_free(Efreet_Menu *menu); + +/** + * @param menu The menu to work with + * @param desktop The desktop to insert + * @param pos The position to place the new desktop + * @return Returns 1 on success, 0 on failure + * @brief Insert a desktop element in a menu structure. Only accepts desktop files + * in default directories. + */ EAPI int efreet_menu_desktop_insert(Efreet_Menu *menu, Efreet_Desktop *desktop, int pos); + +/** + * @param menu The menu to work with + * @param desktop The desktop to remove + * @return Returns 1 on success, 0 on failure + * @brief Remove 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); + +/** + * @param menu The menu to work with + * @param menu The menu to work with + * @param indent The indent level to print the menu at + * @return Returns no value + * @brief Dumps the contents of the menu to the command line + */ EAPI void efreet_menu_dump(Efreet_Menu *menu, const char *indent); /** diff --git a/legacy/efreet/src/lib/efreet_mime.c b/legacy/efreet/src/lib/efreet_mime.c index 472dd3d2a1..c8af80405f 100644 --- a/legacy/efreet/src/lib/efreet_mime.c +++ b/legacy/efreet/src/lib/efreet_mime.c @@ -108,10 +108,6 @@ static enum */ //#define EFREET_MIME_ICONS_DEBUG -/** - * Efreet_Mime_Glob - * @brief A parsed representation of a globs file - */ typedef struct Efreet_Mime_Glob Efreet_Mime_Glob; struct Efreet_Mime_Glob { @@ -119,10 +115,6 @@ struct Efreet_Mime_Glob const char *mime; }; -/** - * Efreet_Mime_Magic - * @brief A parsed representation of a magic file section - */ typedef struct Efreet_Mime_Magic Efreet_Mime_Magic; struct Efreet_Mime_Magic { @@ -131,10 +123,6 @@ struct Efreet_Mime_Magic Eina_List *entries; }; -/** - * Efreet_Mime_Magic_Entry - * @brief A parsed representation of a magic file entry - */ typedef struct Efreet_Mime_Magic_Entry Efreet_Mime_Magic_Entry; struct Efreet_Mime_Magic_Entry { @@ -200,10 +188,6 @@ static const char *efreet_mime_icon_entry_find(const char *mime, unsigned int size); static void efreet_mime_icons_debug(void); -/** - * @return Returns 1 on success or 0 on failure - * @brief Initializes the efreet mime settings - */ EAPI int efreet_mime_init(void) { @@ -252,10 +236,6 @@ shutdown_ecore: return --_efreet_mime_init_count; } -/** - * @return Returns no value - * @brief Cleans up the efreet mime settings system - */ EAPI int efreet_mime_shutdown(void) { @@ -289,11 +269,6 @@ efreet_mime_shutdown(void) return _efreet_mime_init_count; } -/** - * @param file The file to find the mime type - * @return Returns mime type as a string - * @brief Retreive the mime type of a file - */ EAPI const char * efreet_mime_type_get(const char *file) { @@ -320,13 +295,6 @@ efreet_mime_type_get(const char *file) return efreet_mime_fallback_check(file); } -/** - * @param mime The name of the mime type - * @param theme The name of the theme to search icons in - * @param size The wanted size of the icon - * @return Returns mime type icon path as a string - * @brief Retreive the mime type icon for a file - */ EAPI const char * efreet_mime_type_icon_get(const char *mime, const char *theme, unsigned int size) { @@ -406,9 +374,6 @@ efreet_mime_type_icon_get(const char *mime, const char *theme, unsigned int size return icon; } -/** - * @brief Clear mime icons mapping cache - */ EAPI void efreet_mime_type_cache_clear(void) { @@ -420,12 +385,6 @@ efreet_mime_type_cache_clear(void) mime_icons = eina_hash_stringshared_new(EINA_FREE_CB(efreet_mime_icon_entry_head_free)); } -/** - * @brief Flush mime icons mapping cache - * - * Flush timeout is defined at compile time by - * EFREET_MIME_ICONS_FLUSH_TIMEOUT - */ EAPI void efreet_mime_type_cache_flush(void) { @@ -433,22 +392,12 @@ efreet_mime_type_cache_flush(void) } -/** - * @param file The file to check the mime type - * @return Returns mime type as a string - * @brief Retreive the mime type of a file using magic - */ EAPI const char * efreet_mime_magic_type_get(const char *file) { return efreet_mime_magic_check_priority(file, 0, 0); } -/** - * @param file The file to check the mime type - * @return Returns mime type as a string - * @brief Retreive the mime type of a file using globs - */ EAPI const char * efreet_mime_globs_type_get(const char *file) { @@ -494,22 +443,12 @@ efreet_mime_globs_type_get(const char *file) return NULL; } -/** - * @param file The file to check the mime type - * @return Returns mime type as a string - * @brief Retreive the special mime type of a file - */ EAPI const char * efreet_mime_special_type_get(const char *file) { return efreet_mime_special_check(file); } -/** - * @param file The file to check the mime type - * @return Returns mime type as a string - * @brief Retreive the fallback mime type of a file - */ EAPI const char * efreet_mime_fallback_type_get(const char *file) { diff --git a/legacy/efreet/src/lib/efreet_trash.c b/legacy/efreet/src/lib/efreet_trash.c index b6792a486d..d03dba6c14 100644 --- a/legacy/efreet/src/lib/efreet_trash.c +++ b/legacy/efreet/src/lib/efreet_trash.c @@ -28,10 +28,6 @@ static const char *efreet_trash_dir = NULL; # define getuid() GetCurrentProcessId() #endif -/** - * @return Returns 1 on success or 0 on failure - * @brief Initializes the efreet trash system - */ EAPI int efreet_trash_init(void) { @@ -52,10 +48,6 @@ efreet_trash_init(void) return _efreet_trash_init_count; } -/** - * @return Returns no value - * @brief Cleans up the efreet trash system - */ EAPI int efreet_trash_shutdown(void) { @@ -70,11 +62,6 @@ efreet_trash_shutdown(void) return _efreet_trash_init_count; } -/** - * @return Returns the XDG Trash local directory or NULL on errors - * return value must be freed with eina_stringshare_del. - * @brief Retrieves the XDG Trash local directory - */ EAPI const char* efreet_trash_dir_get(const char *file) { @@ -168,17 +155,6 @@ efreet_trash_dir_get(const char *file) return trash_dir; } -/** - * @param uri The local uri to move in the trash - * @param force_delete If you set this to 1 than files on different filesystems - * will be deleted permanently - * @return Return 1 on success, 0 on failure or -1 in case the uri is not on the - * same filesystem and force_delete is not set. - * @brief This function try to move the given uri to the trash. Files on - * different filesystem can't be moved to trash. If force_delete - * is 0 than non-local files will be ignored and -1 is returned, if you set - * force_delete to 1 non-local files will be deleted without asking. - */ EAPI int efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete) { @@ -264,10 +240,6 @@ efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete) return 1; } -/** - * @return Return 1 if the trash is empty or 0 if some file are in. - * @brief Check if the trash is currently empty - */ EAPI int efreet_trash_is_empty(void) { @@ -279,10 +251,6 @@ efreet_trash_is_empty(void) return ecore_file_dir_is_empty(buf); } -/** - * @return Return 1 on success or 0 on failure - * @brief Delete all the files inside the trash. - */ EAPI int efreet_trash_empty_trash(void) { @@ -300,11 +268,6 @@ efreet_trash_empty_trash(void) return 1; } -/** - * @return Return a list of strings with filename (remember to free the list - * when you don't need anymore) - * @brief List all the files and directory currently inside the trash. - */ EAPI Eina_List* efreet_trash_ls(void) { diff --git a/legacy/efreet/src/lib/efreet_uri.c b/legacy/efreet/src/lib/efreet_uri.c index aafdf8bd12..24ecdd2977 100644 --- a/legacy/efreet/src/lib/efreet_uri.c +++ b/legacy/efreet/src/lib/efreet_uri.c @@ -22,13 +22,6 @@ #include "efreet_private.h" -/** - * @param full_uri a valid uri string to parse - * @return Return The corresponding Efreet_Uri structure. Or NULL on errors. - * @brief Read a single uri and return an Efreet_Uri struct. If there's no - * hostname in the uri then the hostname parameter will be NULL. All the uri - * escaped chars will be converted to normal. - */ EAPI Efreet_Uri * efreet_uri_decode(const char *full_uri) { @@ -86,15 +79,6 @@ efreet_uri_decode(const char *full_uri) return uri; } -/** - * @param uri Create an URI string from an Efreet_Uri struct - * @return The string rapresentation of uri (ex: 'file:///home/my%20name') - * @brief Get the string rapresentation of the given uri struct escaping - * illegal caracters. Remember to free the string with eina_stringshare_del() - * when you don't need it anymore. - * @note The resulting string will contain the protocol and the path but not - * the hostname, as many apps doesn't handle it. - */ EAPI const char * efreet_uri_encode(Efreet_Uri *uri) { @@ -121,10 +105,6 @@ efreet_uri_encode(Efreet_Uri *uri) return eina_stringshare_add(dest); } -/** - * @param uri The uri to free - * @brief Free the given uri structure. - */ EAPI void efreet_uri_free(Efreet_Uri *uri) { diff --git a/legacy/efreet/src/lib/efreet_uri.h b/legacy/efreet/src/lib/efreet_uri.h index 97e3a6aedf..0a428f578a 100644 --- a/legacy/efreet/src/lib/efreet_uri.h +++ b/legacy/efreet/src/lib/efreet_uri.h @@ -27,8 +27,31 @@ struct Efreet_Uri }; + +/** + * @param uri Create an URI string from an Efreet_Uri struct + * @return The string rapresentation of uri (ex: 'file:///home/my%20name') + * @brief Get the string rapresentation of the given uri struct escaping + * illegal caracters. Remember to free the string with eina_stringshare_del() + * when you don't need it anymore. + * @note The resulting string will contain the protocol and the path but not + * the hostname, as many apps doesn't handle it. + */ EAPI const char *efreet_uri_encode(Efreet_Uri *uri); + +/** + * @param full_uri a valid uri string to parse + * @return Return The corresponding Efreet_Uri structure. Or NULL on errors. + * @brief Read a single uri and return an Efreet_Uri struct. If there's no + * hostname in the uri then the hostname parameter will be NULL. All the uri + * escaped chars will be converted to normal. + */ EAPI Efreet_Uri *efreet_uri_decode(const char *val); + +/** + * @param uri The uri to free + * @brief Free the given uri structure. + */ EAPI void efreet_uri_free(Efreet_Uri *uri); diff --git a/legacy/efreet/src/lib/efreet_utils.c b/legacy/efreet/src/lib/efreet_utils.c index dae58512ad..f81efe3278 100644 --- a/legacy/efreet/src/lib/efreet_utils.c +++ b/legacy/efreet/src/lib/efreet_utils.c @@ -103,14 +103,6 @@ efreet_util_path_in_default(const char *section, const char *path) return ret; } -/** - * Returns the fdo file id for a given path. If the file isn't inside - * a default fdo path it will return NULL. - * - * @param path The path to find the file id for - * - * @return File id for path or NULL - */ EAPI const char * efreet_util_path_to_file_id(const char *path) { @@ -153,43 +145,18 @@ efreet_util_path_to_file_id(const char *path) return file_id; } -/** - * Find all desktops for a given mime type - * - * This list must be freed using EINA_LIST_FREE / efreet_desktop_free - * - * @param mime the mime type - * @return a list of desktops - */ EAPI Eina_List * efreet_util_desktop_mime_list(const char *mime) { return efreet_util_cache_list("mime_types", mime); } -/** - * Find all desktops for a given wm class - * - * This list must be freed using EINA_LIST_FREE / efreet_desktop_free - * - * @param wmname the wm name - * @param wmclass the wm class - * @return a list of desktops - */ EAPI Efreet_Desktop * efreet_util_desktop_wm_class_find(const char *wmname, const char *wmclass) { return efreet_util_cache_find("startup_wm_class", wmname, wmclass); } -/** - * Find a desktop by file id - * - * return value must be freed by efreet_desktop_free - * - * @param file_id the file id - * @return a desktop - */ EAPI Efreet_Desktop * efreet_util_desktop_file_id_find(const char *file_id) { @@ -207,14 +174,6 @@ efreet_util_desktop_file_id_find(const char *file_id) return ret; } -/** - * Find a desktop by exec - * - * return value must be freed by efreet_desktop_free - * - * @param exec the exec name - * @return a desktop - */ EAPI Efreet_Desktop * efreet_util_desktop_exec_find(const char *exec) { @@ -260,56 +219,24 @@ efreet_util_desktop_exec_find(const char *exec) return ret; } -/** - * Find a desktop by name - * - * return value must be freed by efreet_desktop_free - * - * @param name the name - * @return a desktop - */ EAPI Efreet_Desktop * efreet_util_desktop_name_find(const char *name) { return efreet_util_cache_find("name", name, NULL); } -/** - * Find a desktop by generic name - * - * return value must be freed by efreet_desktop_free - * - * @param generic_name the generic name - * @return a desktop - */ EAPI Efreet_Desktop * efreet_util_desktop_generic_name_find(const char *generic_name) { return efreet_util_cache_find("generic_name", generic_name, NULL); } -/** - * Find all desktops where name matches a glob pattern - * - * This list must be freed using EINA_LIST_FREE / efreet_desktop_free - * - * @param glob the pattern to match - * @return a list of desktops - */ EAPI Eina_List * efreet_util_desktop_name_glob_list(const char *glob) { return efreet_util_cache_glob_list("name", glob); } -/** - * Find all desktops where exec matches a glob pattern - * - * This list must be freed using EINA_LIST_FREE / efreet_desktop_free - * - * @param glob the pattern to match - * @return a list of desktops - */ EAPI Eina_List * efreet_util_desktop_exec_glob_list(const char *glob) { @@ -356,40 +283,18 @@ efreet_util_desktop_exec_glob_list(const char *glob) return ret; } -/** - * Find all desktops where generic name matches a glob pattern - * - * This list must be freed using EINA_LIST_FREE / efreet_desktop_free - * - * @param glob the pattern to match - * @return a list of desktops - */ EAPI Eina_List * efreet_util_desktop_generic_name_glob_list(const char *glob) { return efreet_util_cache_glob_list("generic_name", glob); } -/** - * Find all desktops where comment matches a glob pattern - * - * This list must be freed using EINA_LIST_FREE / efreet_desktop_free - * - * @param glob the pattern to match - * @return a list of desktops - */ EAPI Eina_List * efreet_util_desktop_comment_glob_list(const char *glob) { return efreet_util_cache_glob_list("comment", glob); } -/** - * Find all desktop categories - * This list must be freed using EINA_LIST_FREE - * - * @return an Eina_List of category names (const char *) - */ EAPI Eina_List * efreet_util_desktop_categories_list(void) { @@ -404,14 +309,6 @@ efreet_util_desktop_categories_list(void) return ret; } -/** - * Find all desktops in a given category - * - * This list must be freed using EINA_LIST_FREE / efreet_desktop_free - * - * @param category the category name - * @return a list of desktops - */ EAPI Eina_List * efreet_util_desktop_category_list(const char *category) { @@ -433,10 +330,6 @@ efreet_util_glob_match(const char *str, const char *glob) return 0; } -/** - * Returns a list of .menu files found in the various config dirs. - * @return An eina list of menu file paths (const char *). This must be freed with EINA_LIST_FREE. - */ EAPI Eina_List * efreet_util_menus_find(void) { diff --git a/legacy/efreet/src/lib/efreet_utils.h b/legacy/efreet/src/lib/efreet_utils.h index 93b03e7560..6a5e69e3c7 100644 --- a/legacy/efreet/src/lib/efreet_utils.h +++ b/legacy/efreet/src/lib/efreet_utils.h @@ -10,24 +10,145 @@ * @{ */ + +/** + * Returns the fdo file id for a given path. If the file isn't inside + * a default fdo path it will return NULL. + * + * @param path The path to find the file id for + * + * @return File id for path or NULL + */ EAPI const char *efreet_util_path_to_file_id(const char *path); + +/** + * Find all desktops for a given mime type + * + * This list must be freed using EINA_LIST_FREE / efreet_desktop_free + * + * @param mime the mime type + * @return a list of desktops + */ EAPI Eina_List *efreet_util_desktop_mime_list(const char *mime); + +/** + * Find all desktops for a given wm class + * + * This list must be freed using EINA_LIST_FREE / efreet_desktop_free + * + * @param wmname the wm name + * @param wmclass the wm class + * @return a list of desktops + */ EAPI Efreet_Desktop *efreet_util_desktop_wm_class_find(const char *wmname, const char *wmclass); + +/** + * Find a desktop by file id + * + * return value must be freed by efreet_desktop_free + * + * @param file_id the file id + * @return a desktop + */ EAPI Efreet_Desktop *efreet_util_desktop_file_id_find(const char *file_id); + +/** + * Find a desktop by exec + * + * return value must be freed by efreet_desktop_free + * + * @param exec the exec name + * @return a desktop + */ EAPI Efreet_Desktop *efreet_util_desktop_exec_find(const char *exec); + +/** + * Find a desktop by name + * + * return value must be freed by efreet_desktop_free + * + * @param name the name + * @return a desktop + */ EAPI Efreet_Desktop *efreet_util_desktop_name_find(const char *name); + +/** + * Find a desktop by generic name + * + * return value must be freed by efreet_desktop_free + * + * @param generic_name the generic name + * @return a desktop + */ EAPI Efreet_Desktop *efreet_util_desktop_generic_name_find(const char *generic_name); + +/** + * Find all desktops where name matches a glob pattern + * + * This list must be freed using EINA_LIST_FREE / efreet_desktop_free + * + * @param glob the pattern to match + * @return a list of desktops + */ EAPI Eina_List *efreet_util_desktop_name_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 + * + * @param glob the pattern to match + * @return a list of desktops + */ EAPI Eina_List *efreet_util_desktop_exec_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 + * + * @param glob the pattern to match + * @return a list of desktops + */ EAPI Eina_List *efreet_util_desktop_generic_name_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 + * + * @param glob the pattern to match + * @return a list of desktops + */ EAPI Eina_List *efreet_util_desktop_comment_glob_list(const char *glob); + +/** + * Find all desktop categories + * This list must be freed using EINA_LIST_FREE + * + * @return an Eina_List of category names (const char *) + */ EAPI Eina_List *efreet_util_desktop_categories_list(void); + +/** + * Find all desktops in a given category + * + * This list must be freed using EINA_LIST_FREE / efreet_desktop_free + * + * @param category the category name + * @return a list of desktops + */ EAPI Eina_List *efreet_util_desktop_category_list(const char *category); + +/** + * Returns a list of .menu files found in the various config dirs. + * @return An eina list of menu file paths (const char *). This must be freed with EINA_LIST_FREE. + */ EAPI Eina_List *efreet_util_menus_find(void); /**