glibmm r555 - in trunk: . gio/src tools/m4



Author: jjongsma
Date: Sat Feb  2 04:49:05 2008
New Revision: 555
URL: http://svn.gnome.org/viewvc/glibmm?rev=555&view=rev

Log:
	* 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



Modified:
   trunk/ChangeLog
   trunk/gio/src/Makefile.am
   trunk/gio/src/appinfo.hg
   trunk/gio/src/gio_vfuncs.defs
   trunk/tools/m4/convert_gio.m4
   trunk/tools/m4/convert_glib.m4

Modified: trunk/gio/src/Makefile.am
==============================================================================
--- trunk/gio/src/Makefile.am	(original)
+++ trunk/gio/src/Makefile.am	Sat Feb  2 04:49:05 2008
@@ -5,7 +5,7 @@
 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
 

Modified: trunk/gio/src/appinfo.hg
==============================================================================
--- trunk/gio/src/appinfo.hg	(original)
+++ trunk/gio/src/appinfo.hg	Sat Feb  2 04:49:05 2008
@@ -139,7 +139,26 @@
 
   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

Modified: trunk/gio/src/gio_vfuncs.defs
==============================================================================
--- trunk/gio/src/gio_vfuncs.defs	(original)
+++ trunk/gio/src/gio_vfuncs.defs	Sat Feb  2 04:49:05 2008
@@ -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")
+  )
+)

Modified: trunk/tools/m4/convert_gio.m4
==============================================================================
--- trunk/tools/m4/convert_gio.m4	(original)
+++ trunk/tools/m4/convert_gio.m4	Sat Feb  2 04:49:05 2008
@@ -16,7 +16,10 @@
 # AppInfo
 _CONVERSION(`GAppInfo*',`Glib::RefPtr<AppInfo>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<AppLaunchContext>&',`GAppLaunchContext*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`GAppLaunchContext*',`const Glib::RefPtr<AppLaunchContext>&',Glib::wrap($3))
 _CONVERSION(`const Glib::RefPtr<AppInfo>&',`GAppInfo*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`Glib::RefPtr<AppInfo>',`GAppInfo*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`GAppInfo*',`const Glib::RefPtr<AppInfo>&',`Glib::wrap($3)')
 
 # AsyncResult
 _CONVERSION(`Glib::RefPtr<Glib::Object>',`GObject*',__CONVERT_REFPTR_TO_P)
@@ -71,6 +74,7 @@
 # Icon
 _CONVERSION(`GIcon*',`Glib::RefPtr<Icon>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Icon>&',`GIcon*',__CONVERT_CONST_REFPTR_TO_P)
+_CONVERSION(`Glib::RefPtr<Icon>',`GIcon*',__CONVERT_REFPTR_TO_P)
 
 # InputStream
 _CONVERSION(`const Glib::RefPtr<InputStream>&',`GInputStream*',__CONVERT_CONST_REFPTR_TO_P)

Modified: trunk/tools/m4/convert_glib.m4
==============================================================================
--- trunk/tools/m4/convert_glib.m4	(original)
+++ trunk/tools/m4/convert_glib.m4	Sat Feb  2 04:49:05 2008
@@ -38,6 +38,7 @@
 _CONVERSION(`const Glib::ustring&',`const char*',`$3.c_str()')
 _CONVERSION(`const Glib::ustring&', `const guchar*', `(($2)$3.c_str())')
 _CONVERSION(`const std::string&',`const char*',`$3.c_str()')
+_CONVERSION(`std::string',`const char*',`$3.c_str()')
 _CONVERSION(`const Glib::ustring&',`gchar*',`const_cast<gchar*>($3.c_str())')
 _CONVERSION(`gchar*',`Glib::ustring',__GCHARP_TO_USTRING)
 _CONVERSION(`const-gchar*',`Glib::ustring',__GCHARP_TO_USTRING)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]