X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fkeyboard.h;h=15fe4f95cd814f7ef6c7034659c265f29ede18d9;hb=b45ba2f7ceb60c1a6abc1a951a97b40c03671264;hp=3e5b6b84131f8339364c69cd5199d3d5200cec01;hpb=1023b38fa278cea71fba3d2881e1bfde930cd025;p=libs%2Fgui.git diff --git a/source/input/keyboard.h b/source/input/keyboard.h index 3e5b6b8..15fe4f9 100644 --- a/source/input/keyboard.h +++ b/source/input/keyboard.h @@ -1,7 +1,9 @@ #ifndef MSP_INPUT_KEYBOARD_H_ #define MSP_INPUT_KEYBOARD_H_ +#include #include +#include #include "device.h" namespace Msp { @@ -11,18 +13,21 @@ namespace Input { Adapts key events from a window to the abstracted input framework. Key codes are translated to platform-independent values. See keys.h for a list. */ -class Keyboard: public Device +class Keyboard: public Device, public sigc::trackable { +public: + sigc::signal::accumulated signal_character; + private: - Graphics::EventSource &source; + Graphics::Window &window; public: - Keyboard(Graphics::EventSource &); + Keyboard(Graphics::Window &); + virtual ~Keyboard(); virtual std::string get_button_name(unsigned) const; private: - void key_press(unsigned, unsigned, unsigned); - void key_release(unsigned, unsigned); + void input_event(const Graphics::Window::Event &); }; } // namespace Input