]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/keys.h
Add decorations for things which should be exported from the library
[libs/gui.git] / source / input / keys.h
index 5727e685174265874831e0588ec27e24dda7642a..ffa97e5e4d4e33dea3cb99c30d169a0f29d3900c 100644 (file)
@@ -1,11 +1,16 @@
 #ifndef MSP_INPUT_KEYS_H_
 #define MSP_INPUT_KEYS_H_
 
+#include <msp/graphics/mspgui_api.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,
@@ -135,23 +140,34 @@ enum
        KEY_PAUSE = 0xE0,
        KEY_PRINT_SCREEN,
        KEY_MENU,
+       KEY_BACK,
+       KEY_VOLUME_UP,
+       KEY_VOLUME_DOWN,
 
        N_KEYS_ = 0x100
 };
 
-enum
+enum MouseAxis
 {
-       MOD_SHIFT = 1,
-       MOD_CONTROL = 2,
-       MOD_ALT = 4,
-       MOD_SUPER = 8,
-       N_MODS_ = 4
+       MOUSE_X_AXIS = 0,
+       MOUSE_Y_AXIS,
 };
 
-extern unsigned key_from_sys(unsigned);
-extern unsigned key_to_sys(unsigned);
+enum MouseButton
+{
+       MOUSE_LEFT = 1,
+       MOUSE_MIDDLE,
+       MOUSE_RIGHT,
+       MOUSE_WHEEL_UP,
+       MOUSE_WHEEL_DOWN
+};
 
-extern unsigned mod_from_sys(unsigned);
+MSPGUI_API void operator>>(const LexicalConverter &, Key &);
+MSPGUI_API void operator<<(LexicalConverter &, Key);
+MSPGUI_API void operator>>(const LexicalConverter &, MouseAxis &);
+MSPGUI_API void operator<<(LexicalConverter &, MouseAxis);
+MSPGUI_API void operator>>(const LexicalConverter &, MouseButton &);
+MSPGUI_API void operator<<(LexicalConverter &, MouseButton);
 
 } // namespace Input
 } // namespace Msp