X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fkeyboard_target.h;h=f542261b54cec1385f631855a7cbf3d929c57d76;hb=f535b0f4913a9c0b31ca3b21bd717c367676ebfc;hp=cb76579314a0c47f08f500da98d7c7f50fe79dd7;hpb=209d967b1bb80a9735d690d8f4f0455ecb9970ca;p=ardour.git diff --git a/gtk2_ardour/keyboard_target.h b/gtk2_ardour/keyboard_target.h index cb76579314..f542261b54 100644 --- a/gtk2_ardour/keyboard_target.h +++ b/gtk2_ardour/keyboard_target.h @@ -23,56 +23,57 @@ #include #include -#include +#include +#include #include -#include #include #include "keyboard.h" -using std::map; -using std::string; +namespace Gtk { + class Window; +} class KeyboardTarget { public: - KeyboardTarget(Gtk::Window& w, string name); + KeyboardTarget(Gtk::Window& w, std::string name); virtual ~KeyboardTarget(); - SigC::Signal0 Hiding; - SigC::Signal0 GoingAway; + sigc::signal Hiding; + sigc::signal GoingAway; - typedef SigC::Slot0 KeyAction; + typedef sigc::slot KeyAction; - string name() const { return _name; } + std::string name() const { return _name; } void key_press_event (GdkEventKey *, Keyboard::State&, bool& handled); void key_release_event (GdkEventKey *, Keyboard::State&); - int add_binding (string keys, string name); - string get_binding (string name); /* returns keys bound to name */ + int add_binding (std::string keys, std::string name); + std::string get_binding (std::string name); /* returns keys bound to name */ XMLNode& get_binding_state () const; int set_binding_state (const XMLNode&); - static int32_t add_action (string, KeyAction); - static int32_t find_action (string, KeyAction&); - static int32_t remove_action (string); + static int32_t add_action (std::string, KeyAction); + static int32_t find_action (std::string, KeyAction&); + static int32_t remove_action (std::string); static void show_all_actions(); Gtk::Window& window() const { return _window; } protected: - typedef map KeyMap; - typedef map BindingMap; + typedef std::map KeyMap; + typedef std::map BindingMap; KeyMap keymap; BindingMap bindings; private: - typedef map ActionMap; + typedef map ActionMap; static ActionMap actions; - string _name; + std::string _name; Gtk::Window& _window; int load_bindings (const XMLNode&);