aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/efreet/efreet_desktop.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/efreet/efreet_desktop.h')
-rw-r--r--src/lib/efreet/efreet_desktop.h189
1 files changed, 95 insertions, 94 deletions
diff --git a/src/lib/efreet/efreet_desktop.h b/src/lib/efreet/efreet_desktop.h
index 8f2c30a4e6..fe95124654 100644
--- a/src/lib/efreet/efreet_desktop.h
+++ b/src/lib/efreet/efreet_desktop.h
@@ -5,9 +5,11 @@
* @file efreet_desktop.h
* @brief Contains the structures and methods used to support the
* FDO desktop entry specificiation.
- * @addtogroup Efreet_Desktop Efreet_Desktop: The FDO Desktop Entry
- * Specification functions and structures
- * @ingroup Efreet
+ *
+ * @internal
+ * @defgroup Efreet_Desktop_Group Efreet_Desktop: The FDO Desktop Entry
+ * Specification functions and structures
+ * @ingroup Efreet_Group
*
* @{
*/
@@ -30,12 +32,6 @@ EAPI extern int EFREET_EVENT_DESKTOP_CACHE_UPDATE;
EAPI extern int EFREET_EVENT_DESKTOP_CACHE_BUILD;
/**
- * Efreet_Desktop_Action
- * @since 1.12
- */
-typedef struct _Efreet_Desktop_Action Efreet_Desktop_Action;
-
-/**
* Efreet_Desktop
*/
typedef struct _Efreet_Desktop Efreet_Desktop;
@@ -68,25 +64,11 @@ typedef void (*Efreet_Desktop_Type_Save_Cb) (Efreet_Desktop *desktop, Efreet_Ini
typedef void *(*Efreet_Desktop_Type_Free_Cb) (void *data);
/**
- * Efreet_Desktop_Action
- * @brief an action described in a .desktop file
- * @since 1.12
- */
-struct _Efreet_Desktop_Action
-{
- char *key; /**< Key to identify the action */
- char *name; /**< Specific name of the action */
- char *icon; /**< Icon to display */
- char *exec; /**< Program to execute */
-};
-
-/**
* Efreet_Desktop
* @brief a parsed representation of a .desktop file
*/
struct _Efreet_Desktop
{
- /* Desktop Spec 1.0 */
int type; /**< type of desktop file */
int ref; /**< reference count - internal */
@@ -122,19 +104,10 @@ struct _Efreet_Desktop
Eina_Hash *x; /**< Keep track of all user extensions, keys that begin with X- */
void *type_data; /**< Type specific data for custom types */
-
- /* Desktop Spec 1.1 */
- unsigned char dbus_activatable; /**< Activate application by dbus, not Exec. @since 1.12 */
- Eina_List *actions; /**< List of Efreet_Desktop_Actions, application actions. @since 1.12 */
- Eina_List *implements; /**< Interfaces which is file implements. @since 1.12 */
- Eina_List *keywords; /**< Keywords which describe this entry. @since 1.12 */
};
/**
- * @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.
*
@@ -145,27 +118,30 @@ struct _Efreet_Desktop
* event, if the application is to keep the reference. When the event fires
* the Efreet_Desktop struct should be invalidated and reloaded from a new
* cache file.
+ *
+ * @param[in] file The file to get the Efreet_Desktop from
+ * @return Returns a reference to a cached Efreet_Desktop on success, NULL
+ * on failure
*/
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
+ *
+ * @param[in] desktop The Efreet_Desktop to ref
+ * @return Returns the new reference count
*/
EAPI int efreet_desktop_ref(Efreet_Desktop *desktop);
/**
+ * @brief Creates a new empty Efreet_Desktop structure or NULL on failure
+ *
* @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.
*
@@ -173,12 +149,14 @@ EAPI Efreet_Desktop *efreet_desktop_empty_new(const char *file);
* event, if the application is to keep the reference. When the event fires
* the Efreet_Desktop struct should be invalidated and reloaded from a new
* cache file.
+ *
+ * @param[in] file The file to get the Efreet_Desktop from
+ * @return Returns a reference to a cached Efreet_Desktop on success, NULL
+ * on failure
*/
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
*
@@ -187,13 +165,17 @@ EAPI Efreet_Desktop *efreet_desktop_new(const char *file);
*
* Data in the structure is allocated with strdup, so use free and strdup to
* change values.
+ *
+ * @param[in] file The file to create the Efreet_Desktop from
+ * @return Returns a new Efreet_Desktop on success, NULL on failure
*/
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
+ *
+ * @param[in] desktop The Efreet_Desktop to work with
+ * @return Returns no value
*/
EAPI void efreet_desktop_free(Efreet_Desktop *desktop);
@@ -205,59 +187,65 @@ EAPI void efreet_desktop_free(Efreet_Desktop *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
+ *
+ * @param[in] desktop The desktop file to save
+ * @return Returns 1 on success or 0 on failure
*/
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()
+ *
+ * @param[in] desktop The desktop file to save
+ * @param[in] file The filename to save as
+ * @return Returns 1 on success or 0 on failure
*/
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
- * @brief Parses the @a desktop exec line and runs the command.
+ * @brief Parses the @a desktop exec line and returns an Ecore_Exe.
+ *
+ * @param[in] desktop The desktop file to work with
+ * @param[in] files The files to be substituted into the exec line
+ * @param[in] data The data pointer to pass
+ * @return Returns the Ecore_Exce for @a desktop
*/
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
+ *
+ * @param[in] environment the environment name
*/
EAPI void efreet_desktop_environment_set(const char *environment);
/**
+ * @brief sets the global desktop environment name
+ *
* @return environment the environment name
- * @brief gets the global desktop environment name
- * (e.g. "Enlightenment" or "Gnome")
*/
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_prog 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.
+ *
+ * @param[in] desktop the desktop entry
+ * @param[in] files an eina list of file names to execute, as either absolute paths,
+ * relative paths, or uris
+ * @param[in] cb_command a callback to call for each prepared command line
+ * @param[in] cb_prog a callback to get progress for the downloads
+ * @param[in] data user data passed to the callback
+ * @return Returns 1 on success or 0 on failure
*/
EAPI void *efreet_desktop_command_progress_get(Efreet_Desktop *desktop,
Eina_List *files,
@@ -265,13 +253,14 @@ EAPI void *efreet_desktop_command_progress_get(Efreet_Desktop *deskt
Efreet_Desktop_Progress_Cb cb_prog,
void *data);
/**
- * @param desktop the desktop entry
- * @param files an eina list of file names to execute, as either absolute paths,
+ * @brief Get a command to use to execute a desktop entry.
+ *
+ * @param[in] desktop the desktop entry
+ * @param[in] 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
+ * @param[in] func a callback to call for each prepared command line
+ * @param[in] 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,
@@ -279,37 +268,41 @@ EAPI void *efreet_desktop_command_get(Efreet_Desktop *desktop,
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.
+ *
+ * @param[in] desktop the desktop entry
+ * @param[in] 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
*/
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
+ *
+ * @param[in] desktop The desktop to work with
+ * @return Returns the number of categories assigned to this desktop
*/
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
+ *
+ * @param[in] desktop the desktop
+ * @param[in] category the category name
*/
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
+ *
+ * @param[in] desktop the desktop
+ * @param[in] category the category name
* @return 1 if the desktop had his category listed, 0 otherwise
*/
EAPI int efreet_desktop_category_del(Efreet_Desktop *desktop,
@@ -317,12 +310,13 @@ EAPI int efreet_desktop_category_del(Efreet_Desktop *desktop,
/**
- * @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
+ *
+ * @param[in] type The type to add to the list of matching types
+ * @param[in] parse_func a function to parse out custom fields
+ * @param[in] save_func a function to save data returned from @a parse_func
+ * @param[in] free_func a function to free data returned from @a parse_func
+ * @return Returns the id of the new type
*/
EAPI int efreet_desktop_type_add(const char *type,
Efreet_Desktop_Type_Parse_Cb parse_func,
@@ -331,8 +325,9 @@ EAPI int efreet_desktop_type_add(const char *type,
/**
* @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
+ *
+ * @param[in] from_type the type to alias (e.g. EFREE_DESKTOP_TYPE_APPLICATION)
+ * @param[in] 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.
@@ -342,32 +337,36 @@ EAPI int efreet_desktop_type_alias (int from_type,
/**
* @brief get type specific data for custom desktop types
- * @param desktop the desktop
+ *
+ * @param[in] 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
+ *
+ * @param[in] string the raw string list
+ * @return an Eina_List of ecore string's
*/
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
+ *
+ * @param[in] list Eina_List with strings
+ * @return a raw string list
*/
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
+ *
+ * @param[in] desktop the desktop
+ * @param[in] key the key name to set
+ * @param[in] data the value to set
* @return EINA_TRUE on success
*
* The key has to start with "X-"
@@ -376,16 +375,18 @@ EAPI Eina_Bool efreet_desktop_x_field_set(Efreet_Desktop *desktop, const
/**
* @brief Get the value for a X- field (Non spec) in the structure
- * @param desktop the desktop
- * @param key the key
+ *
+ * @param[in] desktop the desktop
+ * @param[in] 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
+ *
+ * @param[in] desktop the desktop
+ * @param[in] key the key
* @return EINA_TRUE if the key existed
*/
EAPI Eina_Bool efreet_desktop_x_field_del(Efreet_Desktop *desktop, const char *key);