OSC: Catch new strips, gone strips and redo banks and observers. Add more select...
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / keyboard.h
index 4319c9a4f606acf86854bb4ebb9e02c434ac7ceb..34be6e44aba4350d4ce400ed1db2aed1f1f4370d 100644 (file)
 #include <vector>
 #include <string>
 
-#include <sigc++/signal.h>
 #include <gtk/gtk.h>
 #include <gtkmm/accelkey.h>
 
 #include "pbd/stateful.h"
+#include "pbd/signals.h"
 
 #include "gtkmm2ext/visibility.h"
 
@@ -38,6 +38,9 @@ namespace Gtk {
 
 namespace Gtkmm2ext {
 
+class Bindings;
+class ActionMap;
+
 class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
 {
   public:
@@ -161,22 +164,18 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
 
        static void keybindings_changed ();
        static void save_keybindings ();
-       static bool load_keybindings (std::string path);
        static void set_can_save_keybindings (bool yn);
        static std::string current_binding_name () { return _current_binding_name; }
        static std::map<std::string,std::string> binding_files;
 
-       int reset_bindings ();
+        static bool catch_user_event_for_pre_dialog_focus (GdkEvent* ev, Gtk::Window* w);
+
+       static bool load_keybindings (std::string const& path);
+       static void save_keybindings (std::string const& path);
+
+       static std::string binding_filename_suffix;
 
-       struct AccelKeyLess {
-           bool operator() (const Gtk::AccelKey a, const Gtk::AccelKey b) const {
-                   if (a.get_key() != b.get_key()) {
-                           return a.get_key() < b.get_key();
-                   } else {
-                           return a.get_mod() < b.get_mod();
-                   }
-           }
-       };
+       int reset_bindings ();
 
        sigc::signal0<void> ZoomVerticalModifierReleased;
 
@@ -203,14 +202,17 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
 
        typedef std::pair<std::string,std::string> two_strings;
 
-       static std::map<Gtk::AccelKey,two_strings,AccelKeyLess> release_keys;
-
        static gint _snooper (GtkWidget*, GdkEventKey*, gpointer);
        gint snooper (GtkWidget*, GdkEventKey*);
 
        static void set_modifier (uint32_t newval, uint32_t& variable);
 
        static bool _some_magic_widget_has_focus;
+
+        static Gtk::Window* pre_dialog_active_window;
+
+       static int read_keybindings (std::string const& path);
+       static int store_keybindings (std::string const& path);
 };
 
 } /* namespace */