ThunarVfsMimeApplication

ThunarVfsMimeApplication — Registered Applications for MIME types.

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── ThunarVfsMimeHandler
        ╰── ThunarVfsMimeApplication

Includes

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

Description

Functions

thunar_vfs_mime_application_new_from_desktop_id ()

ThunarVfsMimeApplication *
thunar_vfs_mime_application_new_from_desktop_id
                               (const gchar *desktop_id);

Generates a ThunarVfsMimeApplication instance for the application referenced by desktop_id . Returns NULL if desktop_id is not valid.

The caller is responsible to free the returned instance using g_object_unref() when no longer needed.

Parameters

desktop_id

the id of an application's .desktop file.

 

Returns

the ThunarVfsMimeApplication for desktop_id or NULL.


thunar_vfs_mime_application_new_from_file ()

ThunarVfsMimeApplication *
thunar_vfs_mime_application_new_from_file
                               (const gchar *path,
                                const gchar *desktop_id);

Generates a new ThunarVfsMimeApplication for the application described by path and desktop_id .

The caller is responsible to free the returned instance using g_object_unref() when no longer needed.

You should really seldomly use this function and always prefer thunar_vfs_mime_application_new_from_desktop_id().

Parameters

path

the absolute path to the desktop file.

 

desktop_id

the desktop-id of the file.

 

Returns

the ThunarVfsMimeApplication for desktop_id or NULL.


thunar_vfs_mime_application_is_usercreated ()

gboolean
thunar_vfs_mime_application_is_usercreated
                               (const ThunarVfsMimeApplication *mime_application);

Returns TRUE if the mime_application was created by the user using a file manager, i.e. through the "Open With" dialog in Thunar.

Parameters

mime_application

a ThunarVfsMimeApplication.

 

Returns

TRUE if mime_application is usercreated.


thunar_vfs_mime_application_get_actions ()

GList *
thunar_vfs_mime_application_get_actions
                               (ThunarVfsMimeApplication *mime_application);

Returns the list of ThunarVfsMimeActions available for the mime_application . The ThunarVfsMimeActions are an implementation of the desktop actions mentioned in the desktop entry specification.

The caller is responsible to free the returned list using

1
2
g_list_foreach (list, (GFunc) g_object_unref, NULL);
g_list_free (list);

when no longer needed.

Parameters

mime_application

a ThunarVfsMimeApplication.

 

Returns

the list of ThunarVfsMimeActions for the mime_application .


thunar_vfs_mime_application_get_command()

#define thunar_vfs_mime_application_get_command(mime_application) (thunar_vfs_mime_handler_get_command (THUNAR_VFS_MIME_HANDLER ((mime_application))))

Returns the command for mime_application .

Parameters

mime_application

a ThunarVfsMimeApplication.

 

Returns

the command for mime_application .


thunar_vfs_mime_application_get_desktop_id ()

const gchar *
thunar_vfs_mime_application_get_desktop_id
                               (const ThunarVfsMimeApplication *mime_application);

Returns the desktop-id of mime_application .

Parameters

mime_application

a ThunarVfsMimeApplication.

 

Returns

the desktop-id of mime_application .


thunar_vfs_mime_application_get_flags()

#define thunar_vfs_mime_application_get_flags(mime_application) (thunar_vfs_mime_handler_get_flags (THUNAR_VFS_MIME_HANDLER ((mime_application))))

Returns the ThunarVfsMimeHandlerFlags for mime_handler .

Parameters

mime_application

a ThunarVfsMimeApplication.

 

Returns

the flags for mime_application .


thunar_vfs_mime_application_get_mime_types ()

const gchar * const          *
thunar_vfs_mime_application_get_mime_types
                               (const ThunarVfsMimeApplication *mime_application);

Returns the list of MIME-types supported by application or NULL if the mime_application doesn't support any MIME-types at all.

The returned NULL-terminated string array is owned by mime_application and must not be free by the caller.

Parameters

mime_application

a ThunarVfsMimeApplication.

 

Returns

the list of supported MIME-types for mime_application .


thunar_vfs_mime_application_get_name()

#define thunar_vfs_mime_application_get_name(mime_application) (thunar_vfs_mime_handler_get_name (THUNAR_VFS_MIME_HANDLER ((mime_application))))

Returns the name for mime_application .

Parameters

mime_application

a ThunarVfsMimeApplication.

 

Returns

the name for mime_application .


thunar_vfs_mime_application_hash ()

guint
thunar_vfs_mime_application_hash (gconstpointer mime_application);

Converts mime_application to a hash value. It can be passed to g_hash_table_new() as the hash_func parameter, when using ThunarVfsMimeApplications as keys in a GHashTable.

Parameters

mime_application

a ThunarVfsMimeApplication.

 

Returns

a hash value corresponding to the key.


thunar_vfs_mime_application_equal ()

gboolean
thunar_vfs_mime_application_equal (gconstpointer a,
                                   gconstpointer b);

Checks whether a and b refer to the same application.

Returns

TRUE if a and b are equal.

Types and Values

ThunarVfsMimeApplication

typedef struct _ThunarVfsMimeApplication ThunarVfsMimeApplication;

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

See Also

ThunarVfsMimeHandler and ThunarVfsMimeAction