summaryrefslogtreecommitdiff
path: root/gio/gdesktopappinfo.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-01-29 12:18:48 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-01-29 12:18:48 +0000
commit431fef861755439c2c060a81a35805cdd023c3df (patch)
tree129b4529ae52f4fa3bade96bcf088d559aec55b3 /gio/gdesktopappinfo.h
parent1b0fce2dca7264c65f4f5d0c3b693f0028c5360b (diff)
downloadglib-431fef861755439c2c060a81a35805cdd023c3df.tar.gz
Add g_file_query_default_handler utility to easily look up the GAppInfo
2008-01-29 Alexander Larsson <alexl@redhat.com> * gfile.[ch]: Add g_file_query_default_handler utility to easily look up the GAppInfo that handles a file. * gdesktopappinfo.[ch]: * giomodule.c: Set up an extension point for g_app_info_get_default_for_uri_scheme() * gvfs.c: Remove unused function svn path=/trunk/; revision=6409
Diffstat (limited to 'gio/gdesktopappinfo.h')
-rw-r--r--gio/gdesktopappinfo.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gio/gdesktopappinfo.h b/gio/gdesktopappinfo.h
index e7fed4316..d7a38e00c 100644
--- a/gio/gdesktopappinfo.h
+++ b/gio/gdesktopappinfo.h
@@ -24,6 +24,7 @@
#define __G_DESKTOP_APP_INFO_H__
#include <gio/gio.h>
+#include "giomodule-priv.h"
G_BEGIN_DECLS
@@ -42,6 +43,7 @@ struct _GDesktopAppInfoClass
GObjectClass parent_class;
};
+
GType g_desktop_app_info_get_type (void) G_GNUC_CONST;
GDesktopAppInfo *g_desktop_app_info_new_from_filename (const char *filename);
@@ -50,6 +52,29 @@ gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
void g_desktop_app_info_set_desktop_env (const char *desktop_env);
+
+#define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ())
+#define G_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookup))
+#define G_IS_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP))
+#define G_DESKTOP_APP_INFO_LOOKUP_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookupIface))
+
+#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup"
+
+typedef struct _GDesktopAppInfoLookup GDesktopAppInfoLookup;
+typedef struct _GDesktopAppInfoLookupIface GDesktopAppInfoLookupIface;
+
+struct _GDesktopAppInfoLookupIface
+{
+ GTypeInterface g_iface;
+
+ GAppInfo * (*get_default_for_uri_scheme) (GDesktopAppInfoLookup *lookup,
+ const char *uri_scheme);
+};
+
+GType g_desktop_app_info_lookup_get_type (void) G_GNUC_CONST;
+GAppInfo * g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup,
+ const char *uri_scheme);
+
G_END_DECLS