diff options
Diffstat (limited to 'gio')
-rw-r--r-- | gio/giomm.h | 4 | ||||
-rw-r--r-- | gio/src/application.hg | 4 | ||||
-rw-r--r-- | gio/src/filelist.am | 2 | ||||
-rw-r--r-- | gio/src/menu.ccg | 23 | ||||
-rw-r--r-- | gio/src/menu.hg | 62 | ||||
-rw-r--r-- | gio/src/menuitem.ccg | 23 | ||||
-rw-r--r-- | gio/src/menuitem.hg | 62 |
7 files changed, 178 insertions, 2 deletions
diff --git a/gio/giomm.h b/gio/giomm.h index 207d43f1..a98f33aa 100644 --- a/gio/giomm.h +++ b/gio/giomm.h @@ -40,6 +40,7 @@ #include <giomm/dbuserror.h> #include <giomm/dbuserrorutils.h> #include <giomm/dbusintrospection.h> +#include <giomm/dbusmenumodel.h> #include <giomm/dbusmessage.h> #include <giomm/dbusmethodinvocation.h> #include <giomm/dbusownname.h> @@ -76,6 +77,9 @@ #include <giomm/inputstream.h> #include <giomm/iostream.h> #include <giomm/loadableicon.h> +#include <giomm/menu.h> +#include <giomm/menuitem.h> +#include <giomm/menumodel.h> #include <giomm/memoryinputstream.h> #include <giomm/memoryoutputstream.h> #include <giomm/mount.h> diff --git a/gio/src/application.hg b/gio/src/application.hg index 13643f0c..edaf38fd 100644 --- a/gio/src/application.hg +++ b/gio/src/application.hg @@ -90,11 +90,11 @@ class Application : public Glib::Object, public ActionGroup, public ActionMap _IMPLEMENTS_INTERFACE(ActionMap) protected: - explicit Application(const Glib::ustring& application_id, ApplicationFlags flags=APPLICATION_FLAGS_NONE); + explicit Application(const Glib::ustring& application_id, ApplicationFlags flags = APPLICATION_FLAGS_NONE); _IGNORE(g_application_new) public: - _WRAP_CREATE(const Glib::ustring& application_id, ApplicationFlags flags=APPLICATION_FLAGS_NONE) + _WRAP_CREATE(const Glib::ustring& application_id, ApplicationFlags flags = APPLICATION_FLAGS_NONE) _WRAP_METHOD(static bool id_is_valid(const Glib::ustring& application_id), g_application_id_is_valid) diff --git a/gio/src/filelist.am b/gio/src/filelist.am index 95c1ebe8..ee2334a5 100644 --- a/gio/src/filelist.am +++ b/gio/src/filelist.am @@ -75,6 +75,8 @@ giomm_files_any_hg = \ memoryoutputstream.hg \ menuattributeiter.hg \ menulinkiter.hg \ + menu.hg \ + menuitem.hg \ menumodel.hg \ mount.hg \ mountoperation.hg \ diff --git a/gio/src/menu.ccg b/gio/src/menu.ccg new file mode 100644 index 00000000..969d51ec --- /dev/null +++ b/gio/src/menu.ccg @@ -0,0 +1,23 @@ +/* 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 <gio/gio.h> + +namespace Gio +{ + +} // namespace Gio diff --git a/gio/src/menu.hg b/gio/src/menu.hg new file mode 100644 index 00000000..c3ebb12c --- /dev/null +++ b/gio/src/menu.hg @@ -0,0 +1,62 @@ +/* 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 <giomm/menumodel.h> +#include <giomm/menuitem.h> + +_DEFS(giomm,gio) +_PINCLUDE(giomm/private/menumodel_p.h) + +namespace Gio +{ + +/** TODO + * + * @newin{2,32} + */ +class Menu : public Gio::MenuModel +{ + _CLASS_GOBJECT(Menu, GMenu, G_MENU, ::Gio::MenuModel, GMenuModel) + +protected: + _CTOR_DEFAULT + _IGNORE(g_menu_new) + +public: + _WRAP_CREATE() + + _WRAP_METHOD(void freeze(), g_menu_freeze) + + _WRAP_METHOD(void insert_item(int position, const Glib::RefPtr<MenuItem>& item), g_menu_insert_item) + _WRAP_METHOD(void prepend_item(const Glib::RefPtr<MenuItem>& item), g_menu_prepend_item) + _WRAP_METHOD(void append_item(const Glib::RefPtr<MenuItem>& item), g_menu_append_item) + _WRAP_METHOD(void remove(int position), g_menu_remove) + + _WRAP_METHOD(void insert(int position, const Glib::ustring& label, const Glib::ustring& detailed_action), g_menu_insert) + _WRAP_METHOD(void prepend(const Glib::ustring& label, const Glib::ustring& detailed_action), g_menu_prepend) + _WRAP_METHOD(void append(const Glib::ustring& label, const Glib::ustring& detailed_action), g_menu_append) + + _WRAP_METHOD(void insert_section(int position, const Glib::ustring& label, const Glib::RefPtr<MenuModel>& section), g_menu_insert_section) + _WRAP_METHOD(void prepend_section(const Glib::ustring& label, const Glib::RefPtr<MenuModel>& section), g_menu_prepend_section) + + _WRAP_METHOD(void insert_submenu(int position, const Glib::ustring& label, const Glib::RefPtr<MenuModel>& submenu), g_menu_insert_submenu) + _WRAP_METHOD(void prepend_submenu(const Glib::ustring& label, const Glib::RefPtr<MenuModel>& submenu), g_menu_prepend_submenu) + _WRAP_METHOD(void append_submenu(const Glib::ustring& label, const Glib::RefPtr<MenuModel>& submenu), g_menu_append_submenu) + +}; + +} // namespace Gio diff --git a/gio/src/menuitem.ccg b/gio/src/menuitem.ccg new file mode 100644 index 00000000..969d51ec --- /dev/null +++ b/gio/src/menuitem.ccg @@ -0,0 +1,23 @@ +/* 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 <gio/gio.h> + +namespace Gio +{ + +} // namespace Gio diff --git a/gio/src/menuitem.hg b/gio/src/menuitem.hg new file mode 100644 index 00000000..f8b240cd --- /dev/null +++ b/gio/src/menuitem.hg @@ -0,0 +1,62 @@ +/* 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/object.h> +#include <giomm/menumodel.h> + +_DEFS(giomm,gio) +_PINCLUDE(glibmm/private/object_p.h) + +namespace Gio +{ + +/** TODO + * + * @newin{2,32} + */ +class MenuItem : public Glib::Object +{ + _CLASS_GOBJECT(MenuItem, GMenuItem, G_MENU_ITEM, Glib::Object, GObject) + +protected: + _WRAP_CTOR(MenuItem(const Glib::ustring& label, const Glib::ustring& detailed_action), g_menu_item_new) + + _WRAP_CTOR(MenuItem(const Glib::ustring& label, const Glib::RefPtr<MenuModel>& submenu), g_menu_item_new_submenu) + +public: + _WRAP_CREATE(const Glib::ustring& label, const Glib::ustring& detailed_action) + + _WRAP_CREATE(const Glib::ustring& label, const Glib::RefPtr<MenuModel>& submenu) + + + +//TODO: GMenuItem * g_menu_item_new_section (const Glib::ustring& label, +// const Glib::RefPtr<MenuModel>& section); + + _WRAP_METHOD(void set_attribute_value(const Glib::ustring& attribute, const Glib::VariantBase& value), g_menu_item_set_attribute_value) + _IGNORE(g_menu_item_set_attribute) + + _WRAP_METHOD(void set_link(const Glib::ustring& link, const Glib::RefPtr<MenuModel>& model), g_menu_item_set_link) + _WRAP_METHOD(void set_label(const Glib::ustring& label), g_menu_item_set_label) + _WRAP_METHOD(void set_submenu(const Glib::RefPtr<MenuModel>& submenu), g_menu_item_set_submenu) + _WRAP_METHOD(void set_section(const Glib::RefPtr<MenuModel>& section), g_menu_item_set_section) + _WRAP_METHOD(void set_action_and_target_value(const Glib::ustring& action, const Glib::VariantBase& target_value), g_menu_item_set_action_and_target_value) + _IGNORE(g_menu_item_set_action_and_target) + _WRAP_METHOD(void set_detailed_action(const Glib::ustring& detailed_action), g_menu_item_set_detailed_action) +}; + +} // namespace Gio |