aboutsummaryrefslogtreecommitdiff
path: root/backends/events/sdl/sdl-events.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/events/sdl/sdl-events.h')
-rw-r--r--backends/events/sdl/sdl-events.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/backends/events/sdl/sdl-events.h b/backends/events/sdl/sdl-events.h
index 805b76b108..2ba88c702b 100644
--- a/backends/events/sdl/sdl-events.h
+++ b/backends/events/sdl/sdl-events.h
@@ -24,6 +24,7 @@
#define BACKEND_EVENTS_SDL_H
#include "backends/platform/sdl/sdl-sys.h"
+#include "backends/graphics/sdl/sdl-graphics.h"
#include "common/events.h"
@@ -36,6 +37,8 @@ public:
SdlEventSource();
virtual ~SdlEventSource();
+ void setGraphicsManager(SdlGraphicsManager *gMan) { _graphicsManager = gMan; }
+
/**
* Gets and processes SDL events.
*/
@@ -77,6 +80,11 @@ protected:
int _lastScreenID;
/**
+ * The associated graphics manager.
+ */
+ SdlGraphicsManager *_graphicsManager;
+
+ /**
* Pre process an event before it is dispatched.
*/
virtual void preprocessEvents(SDL_Event *event) {}
@@ -108,9 +116,10 @@ protected:
//@}
/**
- * Assigns the mouse coords to the mouse event
+ * Assigns the mouse coords to the mouse event. Furthermore notify the
+ * graphics manager about the position change.
*/
- virtual void fillMouseEvent(Common::Event &event, int x, int y);
+ virtual void processMouseEvent(Common::Event &event, int x, int y);
/**
* Remaps key events. This allows platforms to configure
@@ -127,6 +136,11 @@ protected:
* Configures the key modifiers flags status
*/
virtual void SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event);
+
+ /**
+ * Translates SDL key codes to OSystem key codes
+ */
+ Common::KeyCode SDLToOSystemKeycode(const SDLKey key);
};
#endif