aboutsummaryrefslogtreecommitdiff
path: root/lib/driver/rcsdl.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/driver/rcsdl.h')
-rw-r--r--lib/driver/rcsdl.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/driver/rcsdl.h b/lib/driver/rcsdl.h
new file mode 100644
index 00000000..9732f5e4
--- /dev/null
+++ b/lib/driver/rcsdl.h
@@ -0,0 +1,37 @@
+#ifndef __lib_driver_rcsdl_h
+#define __lib_driver_rcsdl_h
+
+#include <lib/driver/rc.h>
+
+#include <SDL.h>
+
+class eSDLInputDevice : public eRCDevice
+{
+private:
+ bool m_escape;
+ unsigned int m_unicode;
+ int translateKey(SDLKey key);
+
+public:
+ eSDLInputDevice(eRCDriver *driver);
+ ~eSDLInputDevice();
+
+ virtual void handleCode(long arg);
+ virtual const char *getDescription() const;
+};
+
+class eSDLInputDriver : public eRCDriver
+{
+private:
+ static eSDLInputDriver *instance;
+
+public:
+ eSDLInputDriver();
+ ~eSDLInputDriver();
+
+ static eSDLInputDriver *getInstance() { return instance; }
+
+ void keyPressed(const SDL_KeyboardEvent *key);
+};
+
+#endif