X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fkeyboard.h;h=822de31df55403e6ebc1211b402af297722b4822;hb=5d688fbf457b1f4d3bebde431a7f58c898be584c;hp=54479ea9da6e42873683a66647778b1698146c46;hpb=999ca92aa9ee10585c0b2094d84364159253982f;p=libs%2Fgui.git diff --git a/source/input/keyboard.h b/source/input/keyboard.h index 54479ea..822de31 100644 --- a/source/input/keyboard.h +++ b/source/input/keyboard.h @@ -1,21 +1,22 @@ -/* $Id$ - -This file is part of libmspgbase -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#ifndef MSP_GBASE_KEYBOARD_H_ -#define MSP_GBASE_KEYBOARD_H_ +#ifndef MSP_INPUT_KEYBOARD_H_ +#define MSP_INPUT_KEYBOARD_H_ +#include +#include #include "device.h" -#include "../gbase/window.h" namespace Msp { 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 { +public: + sigc::signal signal_character; + private: Graphics::Window &window; @@ -24,8 +25,7 @@ public: 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