## ThunarVfsMimeHandler ThunarVfsMimeHandler — Abstract base class for ThunarVfsMimeApplication and ThunarVfsMimeAction. |

## Synopsis

    #include <thunar-vfs/thunar-vfs.h>

    enum                ThunarVfsMimeHandlerFlags;
                        ThunarVfsMimeHandler;
    const gchar*        thunar_vfs_mime_handler_get_command (const ThunarVfsMimeHandler *mime_handler);
    ThunarVfsMimeHandlerFlags thunar_vfs_mime_handler_get_flags
                                                            (const ThunarVfsMimeHandler *mime_handler);
    const gchar*        thunar_vfs_mime_handler_get_name    (const ThunarVfsMimeHandler *mime_handler);
    gboolean            thunar_vfs_mime_handler_exec        (const ThunarVfsMimeHandler *mime_handler,
                                                             GdkScreen *screen,
                                                             GList *path_list,
                                                             GError **error);
    gboolean            thunar_vfs_mime_handler_exec_with_env
                                                            (const ThunarVfsMimeHandler *mime_handler,
                                                             GdkScreen *screen,
                                                             GList *path_list,
                                                             gchar **envp,
                                                             GError **error);
    const gchar*        thunar_vfs_mime_handler_lookup_icon_name
                                                            (const ThunarVfsMimeHandler *mime_handler,
                                                             GtkIconTheme *icon_theme);

## Object Hierarchy

      GObject
       +----ThunarVfsMimeHandler
             +----ThunarVfsMimeAction
             +----ThunarVfsMimeApplication

## Properties

      "command"                  gchar*                : Read / Write / Construct Only
      "flags"                    ThunarVfsMimeHandlerFlags  : Read / Write / Construct Only
      "icon"                     gchar*                : Read / Write / Construct Only
      "name"                     gchar*                : Read / Write / Construct Only

## Description

## Details

### enum ThunarVfsMimeHandlerFlags

    typedef enum /*< flags >*/
    {
      THUNAR_VFS_MIME_HANDLER_HIDDEN                  = (1 << 0L),
      THUNAR_VFS_MIME_HANDLER_REQUIRES_TERMINAL       = (1 << 1L),
      THUNAR_VFS_MIME_HANDLER_SUPPORTS_STARTUP_NOTIFY = (1 << 2L),
      THUNAR_VFS_MIME_HANDLER_SUPPORTS_MULTI          = (1 << 3L),
      THUNAR_VFS_MIME_HANDLER_SUPPORTS_URIS           = (1 << 4L),
    } ThunarVfsMimeHandlerFlags;

Various flags associated with a ThunarVfsMimeHandler.

### ThunarVfsMimeHandler

    typedef struct _ThunarVfsMimeHandler ThunarVfsMimeHandler;

The ThunarVfsMimeHandler contains private data only, and should be accessed using the functions below.

### thunar_vfs_mime_handler_get_command ()

    const gchar*        thunar_vfs_mime_handler_get_command (const ThunarVfsMimeHandler *mime_handler);

Returns the command associated with `mime_handler`.

`mime_handler` : | a ThunarVfsMimeHandler.
Returns : | the command associated with `mime_handler`.

### thunar_vfs_mime_handler_get_flags ()

    ThunarVfsMimeHandlerFlags thunar_vfs_mime_handler_get_flags
                                                            (const ThunarVfsMimeHandler *mime_handler);

Returns the ThunarVfsMimeHandlerFlags for `mime_handler`.

`mime_handler` : | a ThunarVfsMimeHandler.
Returns : | the ThunarVfsMimeHandlerFlags for `mime_handler`.

### thunar_vfs_mime_handler_get_name ()

    const gchar*        thunar_vfs_mime_handler_get_name    (const ThunarVfsMimeHandler *mime_handler);

Returns the name of `mime_handler`.

`mime_handler` : | a ThunarVfsMimeHandler.
Returns : | the name of `mime_handler`.

### thunar_vfs_mime_handler_exec ()

    gboolean            thunar_vfs_mime_handler_exec        (const ThunarVfsMimeHandler *mime_handler,
                                                             GdkScreen *screen,
                                                             GList *path_list,
                                                             GError **error);

Wrapper to `thunar_vfs_mime_handler_exec_with_env()`, which simply passes a `NULL` pointer for the environment variables.

`mime_handler` : | a ThunarVfsMimeHandler.
`screen` : | a GdkScreen or `NULL` to use the default screen.
`path_list` : | a list of ThunarVfsPaths to open.
`error` : | return location for errors or `NULL`.
Returns : | `TRUE` if the execution succeed, else `FALSE`.

### thunar_vfs_mime_handler_exec_with_env ()

    gboolean            thunar_vfs_mime_handler_exec_with_env
                                                            (const ThunarVfsMimeHandler *mime_handler,
                                                             GdkScreen *screen,
                                                             GList *path_list,
                                                             gchar **envp,
                                                             GError **error);

Executes `mime_handler` on `screen` using the given `path_list`. If `path_list` contains more than one ThunarVfsPath and `mime_handler` doesn't support opening multiple documents at once, one instance of `mime_handler` will be spawned for every ThunarVfsPath given in `path_list`.

`mime_handler` : | a ThunarVfsMimeHandler.
`screen` : | a GdkScreen or `NULL` to use the default screen.
`path_list` : | a list of ThunarVfsPaths to open.
`envp` : | child's environment or `NULL` to inherit parent's.
`error` : | return location for errors or `NULL`.
Returns : | `TRUE` if the execution succeed, else `FALSE`.

### thunar_vfs_mime_handler_lookup_icon_name ()

    const gchar*        thunar_vfs_mime_handler_lookup_icon_name
                                                            (const ThunarVfsMimeHandler *mime_handler,
                                                             GtkIconTheme *icon_theme);

Looks up the icon name for `mime_handler` in `icon_theme`. Returns `NULL` if no suitable icon is present in `icon_theme`.

The returned icon can be either a named icon in `icon_theme` or an absolute path to an icon file, or `NULL`.

`mime_handler` : | a ThunarVfsMimeHandler.
`icon_theme` : | a GtkIconTheme.
Returns : | the icon name for `mime_handler` or `NULL`.

## Property Details

### The `"command"` property

      "command"                  gchar*                : Read / Write / Construct Only

The command line for this ThunarVfsMimeHandler.

Default value: NULL

### The `"flags"` property

      "flags"                    ThunarVfsMimeHandlerFlags  : Read / Write / Construct Only

The ThunarVfsMimeHandlerFlags for this ThunarVfsMimeHandler.

### The `"icon"` property

      "icon"                     gchar*                : Read / Write / Construct Only

The icon of this ThunarVfsMimeHandler, which can be either `NULL` in which case no icon is known, an absolute path to an icon file, or a named icon.

Default value: NULL

### The `"name"` property

      "name"                     gchar*                : Read / Write / Construct Only

The name of this ThunarVfsMimeHandler.

Default value: NULL

## See Also

ThunarVfsMimeApplication and ThunarVfsMimeAction