[glibmm] giomm: Add the RemoteActionGroup interface.



commit dcb9aaf817387feda52f5cad54cf20b40017f6a0
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date:   Mon Feb 20 14:10:15 2012 -0500

    giomm: Add the RemoteActionGroup interface.
    
    	* gio/src/remoteactiongroup.{ccg,hg}:
    	* gio/src/filelist.am: Add the sources, wrapping the methods and
    	virtual functions, and include them in the list of files to be built.
    	* gio/src/gio_vfuncs.defs: Add the GRemoteActionGroup virtual
    	functions.
    
    	* gio/src/applicationcommandline.hg: Add the class documentation
    	block.

 ChangeLog                         |   13 ++++++++++
 gio/src/applicationcommandline.hg |   28 +++++++++++++++++++++
 gio/src/filelist.am               |    1 +
 gio/src/gio_vfuncs.defs           |   22 ++++++++++++++++
 gio/src/remoteactiongroup.ccg     |   23 +++++++++++++++++
 gio/src/remoteactiongroup.hg      |   49 +++++++++++++++++++++++++++++++++++++
 6 files changed, 136 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 38e2f2a..bbd4273 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-02-20  Josà Alburquerque  <jaalburquerque gmail com>
+
+	giomm: Add the RemoteActionGroup interface.
+
+	* gio/src/remoteactiongroup.{ccg,hg}:
+	* gio/src/filelist.am: Add the sources, wrapping the methods and
+	virtual functions, and include them in the list of files to be built.
+	* gio/src/gio_vfuncs.defs: Add the GRemoteActionGroup virtual
+	functions.
+
+	* gio/src/applicationcommandline.hg: Add the class documentation
+	block.
+
 2012-02-16  Josà Alburquerque  <jaalburquerque gmail com>
 
 	h2def.py: Handle deprecated functions.
diff --git a/gio/src/applicationcommandline.hg b/gio/src/applicationcommandline.hg
index 58d1139..023d27d 100644
--- a/gio/src/applicationcommandline.hg
+++ b/gio/src/applicationcommandline.hg
@@ -24,6 +24,34 @@ _PINCLUDE(glibmm/private/object_p.h)
 namespace Gio
 {
 
+/** ApplicationCommandLine - A command-line invocation of an application.
+ * ApplicationCommandLine represents a command-line invocation of an
+ * application. It is created by Application and emitted in the "command-line"
+ * signal and virtual function.
+ *
+ * The class contains the list of arguments that the program was invoked with.
+ * It is also possible to query if the commandline invocation was local (ie:
+ * the current process is running in direct response to the invocation) or
+ * remote (ie: some other process forwarded the commandline to this process).
+ *
+ * The ApplicationCommandLine object can provide the argc and argv parameters
+ * for use with the Glib::OptionContext command-line parsing API, with the
+ * get_arguments() method.
+ *
+ * The exit status of the originally-invoked process may be set and messages
+ * can be printed to stdout or stderr of that process. The lifecycle of the
+ * originally-invoked process is tied to the lifecycle of this object (ie: the
+ * process exits when the last reference is dropped).
+ *
+ * The main use for ApplicationCommandline (and the "command-line" signal) is
+ * 'Emacs server' like use cases: You can set the EDITOR environment variable
+ * to have e.g. git use your favourite editor to edit commit messages, and if
+ * you already have an instance of the editor running, the editing will happen
+ * in the running instance, instead of opening a new one. An important aspect
+ * of this use case is that the process that gets started by git does not
+ * return until the editing is done.
+ * @newin{2,32}
+ */
 class ApplicationCommandLine : public Glib::Object
 {
   _CLASS_GOBJECT(ApplicationCommandLine, GApplicationCommandLine, G_APPLICATION_COMMAND_LINE, Glib::Object, GObject)
diff --git a/gio/src/filelist.am b/gio/src/filelist.am
index 567b5a3..582c5d3 100644
--- a/gio/src/filelist.am
+++ b/gio/src/filelist.am
@@ -77,6 +77,7 @@ giomm_files_any_hg =			\
 	proxy.hg \
 	proxyaddress.hg \
 	proxyresolver.hg \
+	remoteactiongroup.hg		\
 	resolver.hg			\
 	seekable.hg			\
 	settings.hg			\
diff --git a/gio/src/gio_vfuncs.defs b/gio/src/gio_vfuncs.defs
index b3bf4ac..ed7d359 100644
--- a/gio/src/gio_vfuncs.defs
+++ b/gio/src/gio_vfuncs.defs
@@ -501,6 +501,28 @@
  )
 )
 
+; GRemoteActionGroup
+
+(define-vfunc activate_action_full
+ (of-object "GRemoteActionGroup")
+ (return-type "void")
+ (parameters
+  '("const-gchar*" "action_name")
+  '("GVariant*" "parameter")
+  '("GVariant*" "platform_data")
+ )
+)
+
+(define-vfunc change_action_state_full
+ (of-object "GRemoteActionGroup")
+ (return-type "void")
+ (parameters
+  '("const-gchar*" "action_name")
+  '("GVariant*" "value")
+  '("GVariant*" "platform_data")
+ )
+)
+
 ; GSocketControlMessage
 
 (define-vfunc deserialize
diff --git a/gio/src/remoteactiongroup.ccg b/gio/src/remoteactiongroup.ccg
new file mode 100644
index 0000000..be265e5
--- /dev/null
+++ b/gio/src/remoteactiongroup.ccg
@@ -0,0 +1,23 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* Copyright (C) 2012 The giomm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gio
+{
+
+} // namespace Gio
diff --git a/gio/src/remoteactiongroup.hg b/gio/src/remoteactiongroup.hg
new file mode 100644
index 0000000..13a3b73
--- /dev/null
+++ b/gio/src/remoteactiongroup.hg
@@ -0,0 +1,49 @@
+// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+/* Copyright (C) 2012 The giomm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(glibmm/private/interface_p.h)
+_PINCLUDE(gio/gio.h)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GRemoteActionGroupInterface GRemoteActionGroupInterface;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Gio
+{
+
+/** TODO (When the C API docs is available).
+ */
+class RemoteActionGroup : public Glib::Interface
+{
+  _CLASS_INTERFACE(RemoteActionGroup, GRemoteActionGroup, G_REMOTE_ACTION_GROUP, GRemoteActionGroupInterface)
+
+public:
+  _WRAP_METHOD(void activate_action(const Glib::ustring& action_name, const Glib::VariantBase& parameter, const Glib::VariantBase& platform_data), g_remote_action_group_activate_action_full)
+  _WRAP_METHOD(void change_action_state(const Glib::ustring& action_name, const Glib::VariantBase& value, const Glib::VariantBase& platform_data), g_remote_action_group_change_action_state_full)
+
+#m4 _CONVERSION(`GVariant*',`const Glib::VariantBase&',`Glib::wrap($3, true)')
+
+  _WRAP_VFUNC(void activate_action(const Glib::ustring& action_name, const Glib::VariantBase& parameter, const Glib::VariantBase& platform_data), "activate_action_full")
+  _WRAP_VFUNC(void change_action_state(const Glib::ustring& action_name, const Glib::VariantBase& value, const Glib::VariantBase& platform_data), "change_action_state_full")
+};
+
+} // namespace Gio



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