MateDesktopItem

## MateDesktopItem MateDesktopItem |

## Synopsis

    #include <mate-desktop-item.h>

    enum                MateDesktopItemType;
    enum                MateDesktopItemStatus;
                        MateDesktopItem;
    #define             MATE_DESKTOP_ITEM_ENCODING
    #define             MATE_DESKTOP_ITEM_VERSION
    #define             MATE_DESKTOP_ITEM_NAME
    #define             MATE_DESKTOP_ITEM_GENERIC_NAME
    #define             MATE_DESKTOP_ITEM_TYPE
    #define             MATE_DESKTOP_ITEM_FILE_PATTERN
    #define             MATE_DESKTOP_ITEM_TRY_EXEC
    #define             MATE_DESKTOP_ITEM_NO_DISPLAY
    #define             MATE_DESKTOP_ITEM_COMMENT
    #define             MATE_DESKTOP_ITEM_EXEC
    #define             MATE_DESKTOP_ITEM_ACTIONS
    #define             MATE_DESKTOP_ITEM_ICON
    #define             MATE_DESKTOP_ITEM_MINI_ICON
    #define             MATE_DESKTOP_ITEM_HIDDEN
    #define             MATE_DESKTOP_ITEM_PATH
    #define             MATE_DESKTOP_ITEM_TERMINAL
    #define             MATE_DESKTOP_ITEM_TERMINAL_OPTIONS
    #define             MATE_DESKTOP_ITEM_SWALLOW_TITLE
    #define             MATE_DESKTOP_ITEM_SWALLOW_EXEC
    #define             MATE_DESKTOP_ITEM_MIME_TYPE
    #define             MATE_DESKTOP_ITEM_PATTERNS
    #define             MATE_DESKTOP_ITEM_DEFAULT_APP
    #define             MATE_DESKTOP_ITEM_DEV
    #define             MATE_DESKTOP_ITEM_FS_TYPE
    #define             MATE_DESKTOP_ITEM_MOUNT_POINT
    #define             MATE_DESKTOP_ITEM_READ_ONLY
    #define             MATE_DESKTOP_ITEM_UNMOUNT_ICON
    #define             MATE_DESKTOP_ITEM_SORT_ORDER
    #define             MATE_DESKTOP_ITEM_URL
    #define             MATE_DESKTOP_ITEM_DOC_PATH
    #define             MATE_DESKTOP_ITEM_CATEGORIES
    #define             MATE_DESKTOP_ITEM_ONLY_SHOW_IN
    enum                MateDesktopItemLoadFlags;
    enum                MateDesktopItemLaunchFlags;
    enum                MateDesktopItemIconFlags;
    enum                MateDesktopItemError;
    #define             MATE_DESKTOP_ITEM_ERROR
    MateDesktopItem *   mate_desktop_item_new               (void);
    MateDesktopItem *   mate_desktop_item_new_from_file     (const char *file,
                                                             MateDesktopItemLoadFlags flags,
                                                             GError **error);
    MateDesktopItem *   mate_desktop_item_new_from_uri      (const char *uri,
                                                             MateDesktopItemLoadFlags flags,
                                                             GError **error);
    MateDesktopItem *   mate_desktop_item_new_from_string   (const char *uri,
                                                             const char *string,
                                                             gssize length,
                                                             MateDesktopItemLoadFlags flags,
                                                             GError **error);
    MateDesktopItem *   mate_desktop_item_new_from_basename (const char *basename,
                                                             MateDesktopItemLoadFlags flags,
                                                             GError **error);
    MateDesktopItem *   mate_desktop_item_copy              (const MateDesktopItem *item);
    gboolean            mate_desktop_item_save              (MateDesktopItem *item,
                                                             const char *under,
                                                             gboolean force,
                                                             GError **error);
    MateDesktopItem *   mate_desktop_item_ref               (MateDesktopItem *item);
    void                mate_desktop_item_unref             (MateDesktopItem *item);
    int                 mate_desktop_item_launch            (const MateDesktopItem *item,
                                                             GList *file_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             GError **error);
    int                 mate_desktop_item_launch_with_env   (const MateDesktopItem *item,
                                                             GList *file_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             char **envp,
                                                             GError **error);
    int                 mate_desktop_item_launch_on_screen  (const MateDesktopItem *item,
                                                             GList *file_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             GdkScreen *screen,
                                                             int workspace,
                                                             GError **error);
    int                 mate_desktop_item_drop_uri_list     (const MateDesktopItem *item,
                                                             const char *uri_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             GError **error);
    int                 mate_desktop_item_drop_uri_list_with_env
                                                            (const MateDesktopItem *item,
                                                             const char *uri_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             char **envp,
                                                             GError **error);
    gboolean            mate_desktop_item_exists            (const MateDesktopItem *item);
    MateDesktopItemType mate_desktop_item_get_entry_type    (const MateDesktopItem *item);
    void                mate_desktop_item_set_entry_type    (MateDesktopItem *item,
                                                             MateDesktopItemType type);
    const char *        mate_desktop_item_get_location      (const MateDesktopItem *item);
    void                mate_desktop_item_set_location      (MateDesktopItem *item,
                                                             const char *location);
    void                mate_desktop_item_set_location_file (MateDesktopItem *item,
                                                             const char *file);
    MateDesktopItemStatus mate_desktop_item_get_file_status (const MateDesktopItem *item);
    char *              mate_desktop_item_get_icon          (const MateDesktopItem *item,
                                                             GtkIconTheme *icon_theme);
    char *              mate_desktop_item_find_icon         (GtkIconTheme *icon_theme,
                                                             const char *icon,
                                                             int desired_size,
                                                             int flags);
    gboolean            mate_desktop_item_attr_exists       (const MateDesktopItem *item,
                                                             const char *attr);
    const char *        mate_desktop_item_get_string        (const MateDesktopItem *item,
                                                             const char *attr);
    void                mate_desktop_item_set_string        (MateDesktopItem *item,
                                                             const char *attr,
                                                             const char *value);
    const char *        mate_desktop_item_get_attr_locale   (const MateDesktopItem *item,
                                                             const char *attr);
    const char *        mate_desktop_item_get_localestring  (const MateDesktopItem *item,
                                                             const char *attr);
    const char *        mate_desktop_item_get_localestring_lang
                                                            (const MateDesktopItem *item,
                                                             const char *attr,
                                                             const char *language);
    GList *             mate_desktop_item_get_languages     (const MateDesktopItem *item,
                                                             const char *attr);
    void                mate_desktop_item_set_localestring  (MateDesktopItem *item,
                                                             const char *attr,
                                                             const char *value);
    void                mate_desktop_item_set_localestring_lang
                                                            (MateDesktopItem *item,
                                                             const char *attr,
                                                             const char *language,
                                                             const char *value);
    void                mate_desktop_item_clear_localestring
                                                            (MateDesktopItem *item,
                                                             const char *attr);
    char **             mate_desktop_item_get_strings       (const MateDesktopItem *item,
                                                             const char *attr);
    void                mate_desktop_item_set_strings       (MateDesktopItem *item,
                                                             const char *attr,
                                                             char **strings);
    gboolean            mate_desktop_item_get_boolean       (const MateDesktopItem *item,
                                                             const char *attr);
    void                mate_desktop_item_set_boolean       (MateDesktopItem *item,
                                                             const char *attr,
                                                             gboolean value);
    void                mate_desktop_item_set_launch_time   (MateDesktopItem *item,
                                                             guint32 timestamp);
    #define             mate_desktop_item_clear_attr        (item,
                                                             attr)
    void                mate_desktop_item_clear_section     (MateDesktopItem *item,
                                                             const char *section);

## Object Hierarchy

      GBoxed
       +----MateDesktopItem

## Description

## Details

### enum MateDesktopItemType

    typedef enum {
    	MATE_DESKTOP_ITEM_TYPE_NULL = 0 /* This means its NULL, that is, not
    					   * set */,
    	MATE_DESKTOP_ITEM_TYPE_OTHER /* This means it's not one of the below
    					      strings types, and you must get the
    					      Type attribute. */,

    	/* These are the standard compliant types: */
    	MATE_DESKTOP_ITEM_TYPE_APPLICATION,
    	MATE_DESKTOP_ITEM_TYPE_LINK,
    	MATE_DESKTOP_ITEM_TYPE_FSDEVICE,
    	MATE_DESKTOP_ITEM_TYPE_MIME_TYPE,
    	MATE_DESKTOP_ITEM_TYPE_DIRECTORY,
    	MATE_DESKTOP_ITEM_TYPE_SERVICE,
    	MATE_DESKTOP_ITEM_TYPE_SERVICE_TYPE
    } MateDesktopItemType;

`MATE_DESKTOP_ITEM_TYPE_NULL` |
`MATE_DESKTOP_ITEM_TYPE_OTHER` |
`MATE_DESKTOP_ITEM_TYPE_APPLICATION` |
`MATE_DESKTOP_ITEM_TYPE_LINK` |
`MATE_DESKTOP_ITEM_TYPE_FSDEVICE` |
`MATE_DESKTOP_ITEM_TYPE_MIME_TYPE` |
`MATE_DESKTOP_ITEM_TYPE_DIRECTORY` |
`MATE_DESKTOP_ITEM_TYPE_SERVICE` |
`MATE_DESKTOP_ITEM_TYPE_SERVICE_TYPE` |

### enum MateDesktopItemStatus

    typedef enum {
            MATE_DESKTOP_ITEM_UNCHANGED = 0,
            MATE_DESKTOP_ITEM_CHANGED = 1,
            MATE_DESKTOP_ITEM_DISAPPEARED = 2
    } MateDesktopItemStatus;

`MATE_DESKTOP_ITEM_UNCHANGED` |
`MATE_DESKTOP_ITEM_CHANGED` |
`MATE_DESKTOP_ITEM_DISAPPEARED` |

### MateDesktopItem

    typedef struct _MateDesktopItem MateDesktopItem;

### MATE_DESKTOP_ITEM_ENCODING

    #define MATE_DESKTOP_ITEM_ENCODING "Encoding" /* string */

### MATE_DESKTOP_ITEM_VERSION

    #define MATE_DESKTOP_ITEM_VERSION "Version"  /* numeric */

### MATE_DESKTOP_ITEM_NAME

    #define MATE_DESKTOP_ITEM_NAME		"Name" /* localestring */

### MATE_DESKTOP_ITEM_GENERIC_NAME

    #define MATE_DESKTOP_ITEM_GENERIC_NAME "GenericName" /* localestring */

### MATE_DESKTOP_ITEM_TYPE

    #define MATE_DESKTOP_ITEM_TYPE		"Type" /* string */

### MATE_DESKTOP_ITEM_FILE_PATTERN

    #define MATE_DESKTOP_ITEM_FILE_PATTERN "FilePattern" /* regexp(s) */

### MATE_DESKTOP_ITEM_TRY_EXEC

    #define MATE_DESKTOP_ITEM_TRY_EXEC "TryExec" /* string */

### MATE_DESKTOP_ITEM_NO_DISPLAY

    #define MATE_DESKTOP_ITEM_NO_DISPLAY "NoDisplay" /* boolean */

### MATE_DESKTOP_ITEM_COMMENT

    #define MATE_DESKTOP_ITEM_COMMENT "Comment" /* localestring */

### MATE_DESKTOP_ITEM_EXEC

    #define MATE_DESKTOP_ITEM_EXEC		"Exec" /* string */

### MATE_DESKTOP_ITEM_ACTIONS

    #define MATE_DESKTOP_ITEM_ACTIONS "Actions" /* strings */

### MATE_DESKTOP_ITEM_ICON

    #define MATE_DESKTOP_ITEM_ICON		"Icon" /* string */

### MATE_DESKTOP_ITEM_MINI_ICON

    #define MATE_DESKTOP_ITEM_MINI_ICON "MiniIcon" /* string */

### MATE_DESKTOP_ITEM_HIDDEN

    #define MATE_DESKTOP_ITEM_HIDDEN "Hidden" /* boolean */

### MATE_DESKTOP_ITEM_PATH

    #define MATE_DESKTOP_ITEM_PATH		"Path" /* string */

### MATE_DESKTOP_ITEM_TERMINAL

    #define MATE_DESKTOP_ITEM_TERMINAL "Terminal" /* boolean */

### MATE_DESKTOP_ITEM_TERMINAL_OPTIONS

    #define MATE_DESKTOP_ITEM_TERMINAL_OPTIONS "TerminalOptions" /* string */

### MATE_DESKTOP_ITEM_SWALLOW_TITLE

    #define MATE_DESKTOP_ITEM_SWALLOW_TITLE "SwallowTitle" /* string */

### MATE_DESKTOP_ITEM_SWALLOW_EXEC

    #define MATE_DESKTOP_ITEM_SWALLOW_EXEC "SwallowExec" /* string */

### MATE_DESKTOP_ITEM_MIME_TYPE

    #define MATE_DESKTOP_ITEM_MIME_TYPE "MimeType" /* regexp(s) */

### MATE_DESKTOP_ITEM_PATTERNS

    #define MATE_DESKTOP_ITEM_PATTERNS "Patterns" /* regexp(s) */

### MATE_DESKTOP_ITEM_DEFAULT_APP

    #define MATE_DESKTOP_ITEM_DEFAULT_APP "DefaultApp" /* string */

### MATE_DESKTOP_ITEM_DEV

    #define MATE_DESKTOP_ITEM_DEV		"Dev" /* string */

### MATE_DESKTOP_ITEM_FS_TYPE

    #define MATE_DESKTOP_ITEM_FS_TYPE "FSType" /* string */

### MATE_DESKTOP_ITEM_MOUNT_POINT

    #define MATE_DESKTOP_ITEM_MOUNT_POINT "MountPoint" /* string */

### MATE_DESKTOP_ITEM_READ_ONLY

    #define MATE_DESKTOP_ITEM_READ_ONLY "ReadOnly" /* boolean */

### MATE_DESKTOP_ITEM_UNMOUNT_ICON

    #define MATE_DESKTOP_ITEM_UNMOUNT_ICON "UnmountIcon" /* string */

### MATE_DESKTOP_ITEM_SORT_ORDER

    #define MATE_DESKTOP_ITEM_SORT_ORDER "SortOrder" /* strings */

### MATE_DESKTOP_ITEM_URL

    #define MATE_DESKTOP_ITEM_URL		"URL" /* string */

### MATE_DESKTOP_ITEM_DOC_PATH

    #define MATE_DESKTOP_ITEM_DOC_PATH "X-MATE-DocPath" /* string */

### MATE_DESKTOP_ITEM_CATEGORIES

    #define MATE_DESKTOP_ITEM_CATEGORIES "Categories" /* string */

### MATE_DESKTOP_ITEM_ONLY_SHOW_IN

    #define MATE_DESKTOP_ITEM_ONLY_SHOW_IN "OnlyShowIn" /* string */

### enum MateDesktopItemLoadFlags

    typedef enum {
    	/* Use the TryExec field to determine if this should be loaded */
            MATE_DESKTOP_ITEM_LOAD_ONLY_IF_EXISTS = 1<<0,
            MATE_DESKTOP_ITEM_LOAD_NO_TRANSLATIONS = 1<<1
    } MateDesktopItemLoadFlags;

`MATE_DESKTOP_ITEM_LOAD_ONLY_IF_EXISTS` |
`MATE_DESKTOP_ITEM_LOAD_NO_TRANSLATIONS` |

### enum MateDesktopItemLaunchFlags

    typedef enum {
    	/* Never launch more instances even if the app can only
    	 * handle one file and we have passed many */
            MATE_DESKTOP_ITEM_LAUNCH_ONLY_ONE = 1<<0,
    	/* Use current directory instead of home directory */
            MATE_DESKTOP_ITEM_LAUNCH_USE_CURRENT_DIR = 1<<1,
    	/* Append the list of URIs to the command if no Exec
    	 * parameter is specified, instead of launching the
    	 * app without parameters. */
    	MATE_DESKTOP_ITEM_LAUNCH_APPEND_URIS = 1<<2,
    	/* Same as above but instead append local paths */
    	MATE_DESKTOP_ITEM_LAUNCH_APPEND_PATHS = 1<<3,
    	/* Don't automatically reap child process.  */
    	MATE_DESKTOP_ITEM_LAUNCH_DO_NOT_REAP_CHILD = 1<<4
    } MateDesktopItemLaunchFlags;

`MATE_DESKTOP_ITEM_LAUNCH_ONLY_ONE` |
`MATE_DESKTOP_ITEM_LAUNCH_USE_CURRENT_DIR` |
`MATE_DESKTOP_ITEM_LAUNCH_APPEND_URIS` |
`MATE_DESKTOP_ITEM_LAUNCH_APPEND_PATHS` |
`MATE_DESKTOP_ITEM_LAUNCH_DO_NOT_REAP_CHILD` |

### enum MateDesktopItemIconFlags

    typedef enum {
    	/* Don't check the kde directories */
            MATE_DESKTOP_ITEM_ICON_NO_KDE = 1<<0
    } MateDesktopItemIconFlags;

`MATE_DESKTOP_ITEM_ICON_NO_KDE` |

### enum MateDesktopItemError

    typedef enum {
    	MATE_DESKTOP_ITEM_ERROR_NO_FILENAME /* No filename set or given on save */,
    	MATE_DESKTOP_ITEM_ERROR_UNKNOWN_ENCODING /* Unknown encoding of the file */,
    	MATE_DESKTOP_ITEM_ERROR_CANNOT_OPEN /* Cannot open file */,
    	MATE_DESKTOP_ITEM_ERROR_NO_EXEC_STRING /* Cannot launch due to no execute string */,
    	MATE_DESKTOP_ITEM_ERROR_BAD_EXEC_STRING /* Cannot launch due to bad execute string */,
    	MATE_DESKTOP_ITEM_ERROR_NO_URL /* No URL on a url entry*/,
    	MATE_DESKTOP_ITEM_ERROR_NOT_LAUNCHABLE /* Not a launchable type of item */,
    	MATE_DESKTOP_ITEM_ERROR_INVALID_TYPE /* Not of type application/x-mate-app-info */
    } MateDesktopItemError;

`MATE_DESKTOP_ITEM_ERROR_NO_FILENAME` |
`MATE_DESKTOP_ITEM_ERROR_UNKNOWN_ENCODING` |
`MATE_DESKTOP_ITEM_ERROR_CANNOT_OPEN` |
`MATE_DESKTOP_ITEM_ERROR_NO_EXEC_STRING` |
`MATE_DESKTOP_ITEM_ERROR_BAD_EXEC_STRING` |
`MATE_DESKTOP_ITEM_ERROR_NO_URL` |
`MATE_DESKTOP_ITEM_ERROR_NOT_LAUNCHABLE` |
`MATE_DESKTOP_ITEM_ERROR_INVALID_TYPE` |

### MATE_DESKTOP_ITEM_ERROR

    #define MATE_DESKTOP_ITEM_ERROR mate_desktop_item_error_quark ()

### mate_desktop_item_new ()

    MateDesktopItem *   mate_desktop_item_new               (void);

Creates a MateDesktopItem object. The reference count on the returned value is set to '1'.

Returns : | The new MateDesktopItem

### mate_desktop_item_new_from_file ()

    MateDesktopItem *   mate_desktop_item_new_from_file     (const char *file,
                                                             MateDesktopItemLoadFlags flags,
                                                             GError **error);

This function loads 'file' and turns it into a MateDesktopItem.

`file` : | The filename or directory path to load the MateDesktopItem from
`flags` : | Flags to influence the loading process
Returns : | The newly loaded item.

### mate_desktop_item_new_from_uri ()

    MateDesktopItem *   mate_desktop_item_new_from_uri      (const char *uri,
                                                             MateDesktopItemLoadFlags flags,
                                                             GError **error);

This function loads 'uri' and turns it into a MateDesktopItem.

`uri` : | URI to load the MateDesktopItem from
`flags` : | Flags to influence the loading process
Returns : | The newly loaded item.

### mate_desktop_item_new_from_string ()

    MateDesktopItem *   mate_desktop_item_new_from_string   (const char *uri,
                                                             const char *string,
                                                             gssize length,
                                                             MateDesktopItemLoadFlags flags,
                                                             GError **error);

This function turns the contents of the string into a MateDesktopItem.

`string` : | string to load the MateDesktopItem from
`length` : | length of string, or -1 to use strlen
`flags` : | Flags to influence the loading process
`error` : | place to put errors
Returns : | The newly loaded item.

### mate_desktop_item_new_from_basename ()

    MateDesktopItem *   mate_desktop_item_new_from_basename (const char *basename,
                                                             MateDesktopItemLoadFlags flags,
                                                             GError **error);

This function loads 'basename' from a system data directory and returns its MateDesktopItem.

`basename` : | The basename of the MateDesktopItem to load.
`flags` : | Flags to influence the loading process
Returns : | The newly loaded item.

### mate_desktop_item_copy ()

    MateDesktopItem *   mate_desktop_item_copy              (const MateDesktopItem *item);

Creates a copy of a MateDesktopItem. The new copy has a refcount of 1. Note: Section stack is NOT copied.

`item` : | The item to be copied
Returns : | The new copy

### mate_desktop_item_save ()

    gboolean            mate_desktop_item_save              (MateDesktopItem *item,
                                                             const char *under,
                                                             gboolean force,
                                                             GError **error);

Writes the specified item to disk. If the 'under' is NULL, the original location is used. It sets the location of this entry to point to the new location.

`item` : | A desktop item
`under` : | A new uri (location) for this MateDesktopItem
`force` : | Save even if it wasn't modified
`error` : | GError return
Returns : | boolean. `TRUE` if the file was saved, `FALSE` otherwise

### mate_desktop_item_ref ()

    MateDesktopItem *   mate_desktop_item_ref               (MateDesktopItem *item);

Increases the reference count of the specified item.

`item` : | A desktop item
Returns : | the newly referenced `item`

### mate_desktop_item_unref ()

    void                mate_desktop_item_unref             (MateDesktopItem *item);

Decreases the reference count of the specified item, and destroys the item if there are no more references left.

`item` : | A desktop item

### mate_desktop_item_launch ()

    int                 mate_desktop_item_launch            (const MateDesktopItem *item,
                                                             GList *file_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             GError **error);

This function runs the program listed in the specified 'item', optionally appending additional arguments to its command line. It uses g_shell_parse_argv to parse the the exec string into a vector which is then passed to g_spawn_async for execution. This can return all the errors from MateURL, g_shell_parse_argv and g_spawn_async, in addition to it's own. The files are only added if the entry defines one of the standard % strings in it's Exec field.

`item` : | A desktop item
`file_list` : | Files/URIs to launch this item with, can be `NULL`
`flags` : | FIXME
`error` : | FIXME
Returns : | The the pid of the process spawned. If more then one process was spawned the last pid is returned. On error -1 is returned and `error` is set.

### mate_desktop_item_launch_with_env ()

    int                 mate_desktop_item_launch_with_env   (const MateDesktopItem *item,
                                                             GList *file_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             char **envp,
                                                             GError **error);

See mate_desktop_item_launch for a full description. This function additionally passes an environment vector for the child process which is to be launched.

`item` : | A desktop item
`file_list` : | Files/URIs to launch this item with, can be `NULL`
`flags` : | FIXME
`envp` : | child's environment, or `NULL` to inherit parent's
`error` : | FIXME
Returns : | The the pid of the process spawned. If more then one process was spawned the last pid is returned. On error -1 is returned and `error` is set.

### mate_desktop_item_launch_on_screen ()

    int                 mate_desktop_item_launch_on_screen  (const MateDesktopItem *item,
                                                             GList *file_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             GdkScreen *screen,
                                                             int workspace,
                                                             GError **error);

See mate_desktop_item_launch for a full description. This function additionally attempts to launch the application on a given screen and workspace.

`item` : | A desktop item
`file_list` : | Files/URIs to launch this item with, can be `NULL`
`flags` : | FIXME
`screen` : | the `GdkScreen` on which the application should be launched
`workspace` : | the workspace on which the app should be launched (-1 for current)
`error` : | FIXME
Returns : | The the pid of the process spawned. If more then one process was spawned the last pid is returned. On error -1 is returned and `error` is set.

### mate_desktop_item_drop_uri_list ()

    int                 mate_desktop_item_drop_uri_list     (const MateDesktopItem *item,
                                                             const char *uri_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             GError **error);

A list of files or urls dropped onto an icon, the proper (Url or File) exec is run you can pass directly string that you got as the text/uri-list. This just parses the list and calls

`item` : | A desktop item
`uri_list` : | text as gotten from a text/uri-list
`flags` : | FIXME
`error` : | FIXME
Returns : | The value returned by #`mate_execute_async()` upon execution of the specified item or -1 on error. If multiple instances are run, the return of the last one is returned.

### mate_desktop_item_drop_uri_list_with_env ()

    int                 mate_desktop_item_drop_uri_list_with_env
                                                            (const MateDesktopItem *item,
                                                             const char *uri_list,
                                                             MateDesktopItemLaunchFlags flags,
                                                             char **envp,
                                                             GError **error);

See mate_desktop_item_drop_uri_list for a full description. This function additionally passes an environment vector for the child process which is to be launched.

`item` : | A desktop item
`uri_list` : | text as gotten from a text/uri-list
`flags` : | FIXME
`envp` : | child's environment
`error` : | FIXME
Returns : | The value returned by #`mate_execute_async()` upon execution of the specified item or -1 on error. If multiple instances are run, the return of the last one is returned.

### mate_desktop_item_exists ()

    gboolean            mate_desktop_item_exists            (const MateDesktopItem *item);

Attempt to figure out if the program that can be executed by this item actually exists. First it tries the TryExec attribute to see if that contains a program that is in the path. Then if there is no such attribute, it tries the first word of the Exec attribute.

`item` : | A desktop item
Returns : | A boolean, `TRUE` if it exists, `FALSE` otherwise.

### mate_desktop_item_get_entry_type ()

    MateDesktopItemType mate_desktop_item_get_entry_type    (const MateDesktopItem *item);

Gets the type attribute (the 'Type' field) of the item. This should usually be 'Application' for an application, but it can be 'Directory' for a directory description. There are other types available as well. The type usually indicates how the desktop item should be handeled and how the 'Exec' field should be handeled.

`item` : | A desktop item
Returns : | The type of the specified 'item'. The returned memory remains owned by the MateDesktopItem and should not be freed.

### mate_desktop_item_set_entry_type ()

    void                mate_desktop_item_set_entry_type    (MateDesktopItem *item,
                                                             MateDesktopItemType type);

### mate_desktop_item_get_location ()

    const char *        mate_desktop_item_get_location      (const MateDesktopItem *item);

`item` : | A desktop item
Returns : | The file location associated with 'item'.

### mate_desktop_item_set_location ()

    void                mate_desktop_item_set_location      (MateDesktopItem *item,
                                                             const char *location);

Set's the 'location' uri of this item.

`item` : | A desktop item
`location` : | A uri string specifying the file location of this particular item.

### mate_desktop_item_set_location_file ()

    void                mate_desktop_item_set_location_file (MateDesktopItem *item,
                                                             const char *file);

Set's the 'location' uri of this item to the given `file`.

`item` : | A desktop item
`file` : | A local filename specifying the file location of this particular item.

### mate_desktop_item_get_file_status ()

    MateDesktopItemStatus mate_desktop_item_get_file_status (const MateDesktopItem *item);

This function checks the modification time of the on-disk file to see if it is more recent than the in-memory data.

`item` : | A desktop item
Returns : | An enum value that specifies whether the item has changed since being loaded.

### mate_desktop_item_get_icon ()

    char *              mate_desktop_item_get_icon          (const MateDesktopItem *item,
                                                             GtkIconTheme *icon_theme);

This function goes and looks for the icon file. If the icon is not set as an absolute filename, this will look for it in the standard places. If it can't find the icon, it will return `NULL`

`item` : | A desktop item
`icon_theme` : | a GtkIconTheme
Returns : | A newly allocated string

### mate_desktop_item_find_icon ()

    char *              mate_desktop_item_find_icon         (GtkIconTheme *icon_theme,
                                                             const char *icon,
                                                             int desired_size,
                                                             int flags);

This function goes and looks for the icon file. If the icon is not an absolute filename, this will look for it in the standard places. If it can't find the icon, it will return `NULL`

`icon_theme` : | a GtkIconTheme
`icon` : | icon name, something you'd get out of the Icon key
`desired_size` : | FIXME
`flags` : | FIXME
Returns : | A newly allocated string

### mate_desktop_item_attr_exists ()

    gboolean            mate_desktop_item_attr_exists       (const MateDesktopItem *item,
                                                             const char *attr);

### mate_desktop_item_get_string ()

    const char *        mate_desktop_item_get_string        (const MateDesktopItem *item,
                                                             const char *attr);

### mate_desktop_item_set_string ()

    void                mate_desktop_item_set_string        (MateDesktopItem *item,
                                                             const char *attr,
                                                             const char *value);

### mate_desktop_item_get_attr_locale ()

    const char *        mate_desktop_item_get_attr_locale   (const MateDesktopItem *item,
                                                             const char *attr);

### mate_desktop_item_get_localestring ()

    const char *        mate_desktop_item_get_localestring  (const MateDesktopItem *item,
                                                             const char *attr);

### mate_desktop_item_get_localestring_lang ()

    const char *        mate_desktop_item_get_localestring_lang
                                                            (const MateDesktopItem *item,
                                                             const char *attr,
                                                             const char *language);

### mate_desktop_item_get_languages ()

    GList *             mate_desktop_item_get_languages     (const MateDesktopItem *item,
                                                             const char *attr);

### mate_desktop_item_set_localestring ()

    void                mate_desktop_item_set_localestring  (MateDesktopItem *item,
                                                             const char *attr,
                                                             const char *value);

### mate_desktop_item_set_localestring_lang ()

    void                mate_desktop_item_set_localestring_lang
                                                            (MateDesktopItem *item,
                                                             const char *attr,
                                                             const char *language,
                                                             const char *value);

### mate_desktop_item_clear_localestring ()

    void                mate_desktop_item_clear_localestring
                                                            (MateDesktopItem *item,
                                                             const char *attr);

### mate_desktop_item_get_strings ()

    char **             mate_desktop_item_get_strings       (const MateDesktopItem *item,
                                                             const char *attr);

### mate_desktop_item_set_strings ()

    void                mate_desktop_item_set_strings       (MateDesktopItem *item,
                                                             const char *attr,
                                                             char **strings);

### mate_desktop_item_get_boolean ()

    gboolean            mate_desktop_item_get_boolean       (const MateDesktopItem *item,
                                                             const char *attr);

### mate_desktop_item_set_boolean ()

    void                mate_desktop_item_set_boolean       (MateDesktopItem *item,
                                                             const char *attr,
                                                             gboolean value);

### mate_desktop_item_set_launch_time ()

    void                mate_desktop_item_set_launch_time   (MateDesktopItem *item,
                                                             guint32 timestamp);

### mate_desktop_item_clear_attr()

    #define             mate_desktop_item_clear_attr(item,attr)

### mate_desktop_item_clear_section ()

    void                mate_desktop_item_clear_section     (MateDesktopItem *item,
                                                             const char *section);