]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/systemkeyboardinput.h
Add an input method subsystem
[libs/gltk.git] / source / systemkeyboardinput.h
diff --git a/source/systemkeyboardinput.h b/source/systemkeyboardinput.h
new file mode 100644 (file)
index 0000000..ae988ca
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef MSP_GLTK_SYSTEMKEYBOARDINPUT_H_
+#define MSP_GLTK_SYSTEMKEYBOARDINPUT_H_
+
+#include <msp/input/keyboard.h>
+#include "inputmethod.h"
+
+namespace Msp {
+namespace GLtk {
+
+class SystemKeyboardInput: public InputMethod, public sigc::trackable
+{
+private:
+       Input::Keyboard &keyboard;
+
+public:
+       SystemKeyboardInput(Root &, Input::Keyboard &);
+
+private:
+       bool key_press(unsigned);
+       bool key_release(unsigned);
+       bool character(StringCodec::unichar);
+};
+
+} // namespace GLtk
+} // namespace Msp
+
+#endif