diff options
author | Jonathon Jongsma <jjongsma@src.gnome.org> | 2008-02-02 04:49:05 +0000 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@src.gnome.org> | 2008-02-02 04:49:05 +0000 |
commit | 7993a32073106bb748681bbccced8ae136d9cc0d (patch) | |
tree | a98b9cda0e4ae5001c9275da181e330cd513b0a9 /gio/src | |
parent | 80ec355e79cfbc58971838d801d3e41b23e5185a (diff) | |
download | glibmm-7993a32073106bb748681bbccced8ae136d9cc0d.tar.gz |
Add Gio::AppInfo vfuncs
* gio/src/Makefile.am:
* gio/src/appinfo.hg:
* gio/src/gio_vfuncs.defs:
* tools/m4/convert_gio.m4:
* tools/m4/convert_glib.m4: Add Gio::AppInfo vfuncs
svn path=/trunk/; revision=555
Diffstat (limited to 'gio/src')
-rw-r--r-- | gio/src/Makefile.am | 2 | ||||
-rw-r--r-- | gio/src/appinfo.hg | 21 | ||||
-rw-r--r-- | gio/src/gio_vfuncs.defs | 116 |
3 files changed, 137 insertions, 2 deletions
diff --git a/gio/src/Makefile.am b/gio/src/Makefile.am index a27b91fe..2f653cd5 100644 --- a/gio/src/Makefile.am +++ b/gio/src/Makefile.am @@ -5,7 +5,7 @@ sublib_name = giomm sublib_namespace = Gio sublib_parentdir = giomm files_defs = gio.defs gio_methods.defs gio_signals.defs gio_enums.defs \ - gio_docs.xml gio_docs_override.xml + gio_docs.xml gio_docs_override.xml gio_vfuncs.defs include $(top_srcdir)/build_shared/Makefile_gensrc.am_fragment diff --git a/gio/src/appinfo.hg b/gio/src/appinfo.hg index f0046140..464285db 100644 --- a/gio/src/appinfo.hg +++ b/gio/src/appinfo.hg @@ -139,7 +139,26 @@ public: static Glib::RefPtr<AppInfo> get_default_for_uri_scheme(const std::string& uri_scheme); - //TODO: vfuncs? +protected: + _WRAP_VFUNC(Glib::RefPtr<AppInfo> dup(), "dup") + _WRAP_VFUNC(bool equal(const Glib::RefPtr<AppInfo>& appinfo2), "equal") + _WRAP_VFUNC(std::string get_id() const, "get_id") + _WRAP_VFUNC(std::string get_name() const, "get_name") + _WRAP_VFUNC(std::string get_description() const, "get_description") + _WRAP_VFUNC(std::string get_executable() const, "get_executable") + _WRAP_VFUNC(Glib::RefPtr<Icon> get_icon() const, "get_icon") +#m4 _CONVERSION(`const Glib::ListHandle<std::string>&',`GList*',`$3.data()') +#m4 _CONVERSION(`GList*',`const Glib::ListHandle<std::string>&',`Glib::ListHandle<std::string>($3, Glib::OWNERSHIP_NONE)') + _WRAP_VFUNC(bool launch(const Glib::ListHandle<std::string>& filenames, const Glib::RefPtr<AppLaunchContext>& launch_context, GError** error), "launch") + _WRAP_VFUNC(bool supports_uris() const, "supports_uris") + _WRAP_VFUNC(bool supports_files() const, "supports_files") + _WRAP_VFUNC(bool launch_uris(const Glib::ListHandle<std::string>& uris, const Glib::RefPtr<AppLaunchContext>& launch_context, GError** error), "launch_uris") + _WRAP_VFUNC(bool should_show() const, "should_show") + _WRAP_VFUNC(bool set_as_default_for_type(const std::string& content_type, GError** error), "set_as_default_for_type") + _WRAP_VFUNC(bool set_as_default_for_extension(const std::string& extension, GError** error), "set_as_default_for_extension") + _WRAP_VFUNC(bool add_supports_type(const std::string& content_type, GError** error), "add_supports_type") + _WRAP_VFUNC(bool can_remove_supports_type() const, "can_remove_supports_type") + _WRAP_VFUNC(bool remove_supports_type(const std::string& content_type, GError** error), "remove_supports_type") }; } // namespace Gio diff --git a/gio/src/gio_vfuncs.defs b/gio/src/gio_vfuncs.defs index 17c4d895..08fb987e 100644 --- a/gio/src/gio_vfuncs.defs +++ b/gio/src/gio_vfuncs.defs @@ -125,3 +125,119 @@ (of-object "GIcon") (return-type "guint") ) + +; GAppInfo + +(define-vfunc dup + (of-object "GAppInfo") + (return-type "GAppInfo*") +) + +(define-vfunc equal + (of-object "GAppInfo") + (return-type "gboolean") + (parameters + '("GAppInfo*" "appinfo2") + ) +) + +(define-vfunc get_id + (of-object "GAppInfo") + (return-type "const-char*") +) + +(define-vfunc get_name + (of-object "GAppInfo") + (return-type "const-char*") +) + +(define-vfunc get_description + (of-object "GAppInfo") + (return-type "const-char*") +) + +(define-vfunc get_executable + (of-object "GAppInfo") + (return-type "const-char*") +) + +(define-vfunc get_icon + (of-object "GAppInfo") + (return-type "GIcon*") +) + +(define-vfunc launch + (of-object "GAppInfo") + (return-type "gboolean") + (parameters + '("GList*" "filenames") + '("GAppLaunchContext*" "launch_context") + '("GError**" "error") + ) +) + +(define-vfunc supports_uris + (of-object "GAppInfo") + (return-type "gboolean") +) + +(define-vfunc supports_files + (of-object "GAppInfo") + (return-type "gboolean") +) + +(define-vfunc launch_uris + (of-object "GAppInfo") + (return-type "gboolean") + (parameters + '("GList*" "uris") + '("GAppLaunchContext*" "launch_context") + '("GError**" "error") + ) +) + +(define-vfunc should_show + (of-object "GAppInfo") + (return-type "gboolean") +) + +(define-vfunc set_as_default_for_type + (of-object "GAppInfo") + (return-type "gboolean") + (parameters + '("const-char*" "content_type") + '("GError**" "error") + ) +) + +(define-vfunc set_as_default_for_extension + (of-object "GAppInfo") + (return-type "gboolean") + (parameters + '("const-char*" "extension") + '("GError**" "error") + ) +) + +(define-vfunc add_supports_type + (of-object "GAppInfo") + (return-type "gboolean") + (parameters + '("const-char*" "content_type") + '("GError**" "error") + ) +) + +(define-vfunc can_remove_supports_type + (of-object "GAppInfo") + (return-type "gboolean") +) + +(define-vfunc remove_supports_type + (of-object "GAppInfo") + (return-type "gboolean") + (parameters + '("const-char*" "content_type") + '("GError**" "error") + ) +) |