[gtkmm] Application: Add get/set_accels_for_action() and list_action_descriptions().



commit aafe69b3946d1f307d6afaaf215fa2e0c04c3a25
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 18 12:15:46 2014 +0100

    Application: Add get/set_accels_for_action() and list_action_descriptions().

 gtk/src/application.hg |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index ac471ad..01af134 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -22,6 +22,8 @@ _CONFIGINCLUDE(gtkmmconfig.h)
 #include <gtkmm/actiongroup.h>
 #include <giomm/application.h>
 #include <giomm/menumodel.h>
+#include <vector>
+#include <glibmm/arrayhandle.h>
 
 
 _DEFS(gtkmm,gtk)
@@ -315,6 +317,15 @@ public:
   _WRAP_METHOD(Window* get_active_window(), gtk_application_get_active_window, refreturn)
   _WRAP_METHOD(const Window* get_active_window() const, gtk_application_get_active_window, refreturn, 
constversion)
 
+#m4 
_CONVERSION(`gchar**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, 
Glib::OWNERSHIP_DEEP)')
+  _WRAP_METHOD(std::vector<Glib::ustring> list_action_descriptions() const, 
gtk_application_list_action_descriptions)
+
+#m4 
_CONVERSION(`gchar**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, 
Glib::OWNERSHIP_DEEP)')
+  _WRAP_METHOD(std::vector<Glib::ustring> get_accels_for_action(const Glib::ustring& detailed_action_name) 
const, gtk_application_get_accels_for_action)
+
+//TODO: Add one to set just one accel:
+#m4 _CONVERSION(`const std::vector<Glib::ustring>&',`const 
gchar*-const*',`Glib::ArrayHandler<Glib::ustring>::vector_to_array($3).data ()')
+  _WRAP_METHOD(void set_accels_for_action(const Glib::ustring& detailed_action_name, const 
std::vector<Glib::ustring>& ccels), gtk_application_set_accels_for_action)
 
   _WRAP_PROPERTY("app-menu", Glib::RefPtr<Gio::MenuModel>)
   _WRAP_PROPERTY("menubar", Glib::RefPtr<Gio::MenuModel>)


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