-/* $Id$
-
-This file is part of libmspgbase
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
#ifndef MSP_INPUT_KEYS_H_
#define MSP_INPUT_KEYS_H_
+#include <msp/strings/lexicalcast.h>
+
namespace Msp {
namespace Input {
-enum
+enum Key
{
+ KEY_NONE = 0x00,
+
// Codes 0x01-0x7E reserved for ASCII
KEY_BACKSPACE = 0x08,
KEY_TAB = 0x09,
KEY_PAUSE = 0xE0,
KEY_PRINT_SCREEN,
KEY_MENU,
+ KEY_BACK,
+ KEY_VOLUME_UP,
+ KEY_VOLUME_DOWN,
N_KEYS_ = 0x100
};
-extern unsigned key_from_sys(unsigned);
-extern unsigned key_to_sys(unsigned);
+enum MouseAxis
+{
+ MOUSE_X_AXIS = 0,
+ MOUSE_Y_AXIS,
+};
+
+enum MouseButton
+{
+ MOUSE_LEFT = 1,
+ MOUSE_MIDDLE,
+ MOUSE_RIGHT,
+ MOUSE_WHEEL_UP,
+ MOUSE_WHEEL_DOWN
+};
+
+void operator>>(const LexicalConverter &, Key &);
+void operator<<(LexicalConverter &, Key);
+void operator>>(const LexicalConverter &, MouseAxis &);
+void operator<<(LexicalConverter &, MouseAxis);
+void operator>>(const LexicalConverter &, MouseButton &);
+void operator<<(LexicalConverter &, MouseButton);
} // namespace Input
} // namespace Msp