diff options
author | José Alburquerque <jaalburqu@svn.gnome.org> | 2011-09-22 15:01:57 -0400 |
---|---|---|
committer | José Alburquerque <jaalburqu@svn.gnome.org> | 2011-09-22 15:58:59 -0400 |
commit | cef8ad38f68f16197f653e5a1dc1a646cfb11458 (patch) | |
tree | 2102ec4f0f134ed0a848f512245507022cad9fc8 | |
parent | d1a70549a88dd1f0f5dc81ecd37428103e8aeec8 (diff) | |
download | glibmm-cef8ad38f68f16197f653e5a1dc1a646cfb11458.tar.gz |
giomm: Add SimpleActionGroup.
* gio/src/simpleactiongroup.{ccg,hg}:
* gio/src/filelist.am: Add sources and include them in the build file
list.
* tools/m4/convert_gio.m4: Add necessary conversions.
* gio/src/simpleaction.hg: Added class doc title.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | gio/src/filelist.am | 1 | ||||
-rw-r--r-- | gio/src/simpleaction.hg | 3 | ||||
-rw-r--r-- | gio/src/simpleactiongroup.ccg | 24 | ||||
-rw-r--r-- | gio/src/simpleactiongroup.hg | 54 | ||||
-rw-r--r-- | tools/m4/convert_gio.m4 | 4 |
6 files changed, 95 insertions, 1 deletions
@@ -1,3 +1,13 @@ +2011-09-22 José Alburquerque <jaalburqu@svn.gnome.org> + + giomm: Add SimpleActionGroup. + + * gio/src/simpleactiongroup.{ccg,hg}: + * gio/src/filelist.am: Add sources and include them in the build file + list. + * tools/m4/convert_gio.m4: Add necessary conversions. + * gio/src/simpleaction.hg: Added class doc title. + 2011-09-21 José Alburquerque <jaalburqu@svn.gnome.org> SimpleAction: Add create() methods. diff --git a/gio/src/filelist.am b/gio/src/filelist.am index 803f442c..8e2ce3f5 100644 --- a/gio/src/filelist.am +++ b/gio/src/filelist.am @@ -80,6 +80,7 @@ giomm_files_any_hg = \ seekable.hg \ settings.hg \ simpleaction.hg \ + simpleactiongroup.hg \ socket.hg \ socketaddress.hg \ socketaddressenumerator.hg \ diff --git a/gio/src/simpleaction.hg b/gio/src/simpleaction.hg index 08bdc581..cf1292e5 100644 --- a/gio/src/simpleaction.hg +++ b/gio/src/simpleaction.hg @@ -29,7 +29,8 @@ typedef GObjectClass GSimpleActionClass; namespace Gio { -/** A SimpleAction is the obvious simple implementation of the Action +/** SimpleAction - A simple Action implementation. + * A SimpleAction is the obvious simple implementation of the Action * interface. This is the easiest way to create an action for purposes of * adding it to a SimpleActionGroup. * diff --git a/gio/src/simpleactiongroup.ccg b/gio/src/simpleactiongroup.ccg new file mode 100644 index 00000000..cd3e297a --- /dev/null +++ b/gio/src/simpleactiongroup.ccg @@ -0,0 +1,24 @@ +/* Copyright (C) 2011 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 <gio/gio.h> +#include <giomm/action.h> + +namespace Gio +{ + +}// namespace Gio diff --git a/gio/src/simpleactiongroup.hg b/gio/src/simpleactiongroup.hg new file mode 100644 index 00000000..e9596e35 --- /dev/null +++ b/gio/src/simpleactiongroup.hg @@ -0,0 +1,54 @@ +/* Copyright (C) 2011 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/object.h> +#include <giomm/actiongroup.h> + +_DEFS(giomm,gio) +_PINCLUDE(glibmm/private/object_p.h) + +namespace Gio +{ + +class Action; + +/** SimpleActionGroup - A simple ActionGroup implementation. + * SimpleActionGroup is a hash table filled with Action objects, implementing + * the ActionGroup interface. + * + * @newin{2,30} + */ +class SimpleActionGroup : public Glib::Object, public ActionGroup +{ + _CLASS_GOBJECT(SimpleActionGroup, GSimpleActionGroup, G_SIMPLE_ACTION_GROUP, Glib::Object, GObject) + _IMPLEMENTS_INTERFACE(ActionGroup) + +protected: + _CTOR_DEFAULT() + +public: + _WRAP_METHOD_DOCS_ONLY(g_simple_action_group_new) + _WRAP_CREATE() + + _WRAP_METHOD(Glib::RefPtr<Action> lookup(const Glib::ustring& action_name), g_simple_action_group_lookup) + _WRAP_METHOD(void insert(const Glib::RefPtr<Action>& action), g_simple_action_group_insert) + _WRAP_METHOD(void remove(const Glib::ustring& action_name), g_simple_action_group_remove) + + //TODO?: _WRAP_METHOD(void add_entries(const GActionEntry* entries, int n_entries, gpointer user_data), g_simple_action_group_add_entries) +}; + +} // namespace Gio diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4 index ea8e3b4d..77e74fbc 100644 --- a/tools/m4/convert_gio.m4 +++ b/tools/m4/convert_gio.m4 @@ -36,6 +36,10 @@ _CONV_ENUM(G,SocketProtocol) _CONV_ENUM(G,SocketType) _CONV_ENUM(G,UnixSocketAddressType) +# Action +_CONVERSION(`GAction*',`Glib::RefPtr<Action>',`Glib::wrap($3)') +_CONVERSION(`const Glib::RefPtr<Action>&',`GAction*',__CONVERT_REFPTR_TO_P) + # ActionGroup _CONVERSION(`const Glib::RefPtr<ActionGroup>&',`GActionGroup*',__CONVERT_REFPTR_TO_P) |