| Thunar-VFS Reference Manual | ||||
|---|---|---|---|---|
#include <thunar-vfs/thunar-vfs.h>
ThunarVfsMimeApplication;
ThunarVfsMimeApplication* thunar_vfs_mime_application_new_from_desktop_id
(const gchar *desktop_id);
ThunarVfsMimeApplication* thunar_vfs_mime_application_new_from_file
(const gchar *path,
const gchar *desktop_id);
gboolean thunar_vfs_mime_application_is_usercreated
(const ThunarVfsMimeApplication *mime_application);
GList* thunar_vfs_mime_application_get_actions
(ThunarVfsMimeApplication *mime_application);
#define thunar_vfs_mime_application_get_command(mime_application)
const gchar* thunar_vfs_mime_application_get_desktop_id
(const ThunarVfsMimeApplication *mime_application);
#define thunar_vfs_mime_application_get_flags(mime_application)
#define thunar_vfs_mime_application_get_name(mime_application)
guint thunar_vfs_mime_application_hash (gconstpointer mime_application);
gboolean thunar_vfs_mime_application_equal (gconstpointer a,
gconstpointer b);
typedef struct _ThunarVfsMimeApplication ThunarVfsMimeApplication;
The ThunarVfsMimeApplication struct contains private data only, and should be accessed using the functions below.
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.
|
the id of an application's .desktop file. |
Returns : |
the ThunarVfsMimeApplication for desktop_id or NULL.
|
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().
|
the absolute path to the desktop file. |
|
the desktop-id of the file. |
Returns : |
the ThunarVfsMimeApplication for desktop_id
or NULL.
|
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.
|
a ThunarVfsMimeApplication. |
Returns : |
TRUE if mime_application is usercreated.
|
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
g_list_foreach (list, (GFunc) g_object_unref, NULL); g_list_free (list);
when no longer needed.
|
a ThunarVfsMimeApplication. |
Returns : |
the list of ThunarVfsMimeActions
for the mime_application.
|
#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.
|
a ThunarVfsMimeApplication. |
Returns : |
the command for mime_application.
|
const gchar* thunar_vfs_mime_application_get_desktop_id (const ThunarVfsMimeApplication *mime_application);
Returns the desktop-id of mime_application.
|
a ThunarVfsMimeApplication. |
Returns : |
the desktop-id of mime_application.
|
#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.
|
a ThunarVfsMimeApplication. |
Returns : |
the flags for mime_application.
|
#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.
|
a ThunarVfsMimeApplication. |
Returns : |
the name for mime_application.
|
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.
|
a ThunarVfsMimeApplication. |
Returns : |
a hash value corresponding to the key. |
gboolean thunar_vfs_mime_application_equal (gconstpointer a, gconstpointer b);
Checks whether a and b refer to the same application.
|
a ThunarVfsMimeApplication. |
|
a ThunarVfsMimeApplication. |
Returns : |
TRUE if a and b are equal.
|