aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2010-11-28 18:39:04 +0000
committerMax Horn2010-11-28 18:39:04 +0000
commit364382cf9fcc013d7acb6c8252bf62e805ccd01c (patch)
tree5528d4092cdd5d5969e1e0f41345ae0b406dc8d4
parent06df4459c73e53a0998fe835269b5741e4bd9f5e (diff)
downloadscummvm-rg350-364382cf9fcc013d7acb6c8252bf62e805ccd01c.tar.gz
scummvm-rg350-364382cf9fcc013d7acb6c8252bf62e805ccd01c.tar.bz2
scummvm-rg350-364382cf9fcc013d7acb6c8252bf62e805ccd01c.zip
SDL: Change refs to SdlEventManager to SdlEventSource
svn-id: r54544
-rw-r--r--backends/events/gp2xsdl/gp2xsdl-events.cpp22
-rw-r--r--backends/events/gp2xsdl/gp2xsdl-events.h8
-rw-r--r--backends/events/samsungtvsdl/samsungtvsdl-events.cpp10
-rw-r--r--backends/events/samsungtvsdl/samsungtvsdl-events.h5
-rw-r--r--backends/events/sdl/sdl-events.h4
-rw-r--r--backends/events/symbiansdl/symbiansdl-events.cpp10
-rw-r--r--backends/events/symbiansdl/symbiansdl-events.h4
-rw-r--r--backends/platform/gp2x/gp2x.cpp2
-rw-r--r--backends/platform/linuxmoto/linuxmoto-sdl.cpp2
-rw-r--r--backends/platform/samsungtv/samsungtv.cpp2
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp2
11 files changed, 29 insertions, 42 deletions
diff --git a/backends/events/gp2xsdl/gp2xsdl-events.cpp b/backends/events/gp2xsdl/gp2xsdl-events.cpp
index f52007e746..c5191dd534 100644
--- a/backends/events/gp2xsdl/gp2xsdl-events.cpp
+++ b/backends/events/gp2xsdl/gp2xsdl-events.cpp
@@ -84,14 +84,12 @@ enum {
TAPMODE_HOVER = 2
};
-GP2XSdlEventManager::GP2XSdlEventManager(Common::EventSource *boss)
- :
- _buttonStateL(false),
- SdlEventManager(boss) {
+GP2XSdlEventSource::GP2XSdlEventSource()
+ : _buttonStateL(false){
}
-void GP2XSdlEventManager::SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event) {
+void GP2XSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event) {
event.kbd.flags = 0;
if (mod & KMOD_SHIFT)
@@ -108,7 +106,7 @@ void GP2XSdlEventManager::SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &eve
event.kbd.flags |= Common::KBD_CAPS;
}
-void GP2XSdlEventManager::moveStick() {
+void GP2XSdlEventSource::moveStick() {
bool stickBtn[32];
memcpy(stickBtn, _stickBtn, sizeof(stickBtn));
@@ -189,7 +187,7 @@ GP2X_BUTTON_L & GP2X_BUTTON_A Common::EVENT_PREDICTIVE_DIALOG for predictive
GP2X_BUTTON_L & GP2X_BUTTON_Y Toggles setZoomOnMouse() for larger then 320*240 games to scale to the point + raduis. (GP2X only)
*/
-bool GP2XSdlEventManager::handleKeyDown(SDL_Event &ev, Common::Event &event) {
+bool GP2XSdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
SDLModToOSystemKeyFlags(SDL_GetModState(), event);
if (remapKey(ev, event))
@@ -202,7 +200,7 @@ bool GP2XSdlEventManager::handleKeyDown(SDL_Event &ev, Common::Event &event) {
return true;
}
-bool GP2XSdlEventManager::handleKeyUp(SDL_Event &ev, Common::Event &event) {
+bool GP2XSdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
if (remapKey(ev, event))
return true;
@@ -224,7 +222,7 @@ bool GP2XSdlEventManager::handleKeyUp(SDL_Event &ev, Common::Event &event) {
return true;
}
-bool GP2XSdlEventManager::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
+bool GP2XSdlEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
_stickBtn[ev.jbutton.button] = 1;
event.kbd.flags = 0;
@@ -353,7 +351,7 @@ bool GP2XSdlEventManager::handleJoyButtonDown(SDL_Event &ev, Common::Event &even
return true;
}
-bool GP2XSdlEventManager::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
+bool GP2XSdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
_stickBtn[ev.jbutton.button] = 0;
event.kbd.flags = 0;
@@ -439,7 +437,7 @@ bool GP2XSdlEventManager::handleJoyButtonUp(SDL_Event &ev, Common::Event &event)
return true;
}
-bool GP2XSdlEventManager::handleJoyAxisMotion(SDL_Event &ev, Common::Event &event) {
+bool GP2XSdlEventSource::handleJoyAxisMotion(SDL_Event &ev, Common::Event &event) {
int axis = ev.jaxis.value;
if ( axis > JOY_DEADZONE) {
axis -= JOY_DEADZONE;
@@ -486,7 +484,7 @@ bool GP2XSdlEventManager::handleJoyAxisMotion(SDL_Event &ev, Common::Event &even
return true;
}
-bool GP2XSdlEventManager::remapKey(SDL_Event &ev, Common::Event &event) {
+bool GP2XSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
return false;
}
diff --git a/backends/events/gp2xsdl/gp2xsdl-events.h b/backends/events/gp2xsdl/gp2xsdl-events.h
index dbbdb2993b..129069e131 100644
--- a/backends/events/gp2xsdl/gp2xsdl-events.h
+++ b/backends/events/gp2xsdl/gp2xsdl-events.h
@@ -31,9 +31,9 @@
/**
* SDL events manager for GP2X and GP2XWIZ
*/
-class GP2XSdlEventManager : public SdlEventManager {
+class GP2XSdlEventSource : public SdlEventSource {
public:
- GP2XSdlEventManager(Common::EventSource *boss);
+ GP2XSdlEventSource();
protected:
bool _stickBtn[32];
@@ -50,11 +50,11 @@ protected:
virtual bool handleKeyUp(SDL_Event &ev, Common::Event &event);
virtual bool handleJoyButtonDown(SDL_Event &ev, Common::Event &event);
virtual bool handleJoyButtonUp(SDL_Event &ev, Common::Event &event);
- virtual bool GP2XSdlEventManager::handleJoyAxisMotion(SDL_Event &ev, Common::Event &event);
+ virtual bool handleJoyAxisMotion(SDL_Event &ev, Common::Event &event);
virtual void SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event);
- virtual bool GP2XSdlEventManager::remapKey(SDL_Event &ev, Common::Event &event);
+ virtual bool remapKey(SDL_Event &ev, Common::Event &event);
};
#endif
diff --git a/backends/events/samsungtvsdl/samsungtvsdl-events.cpp b/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
index d1c35d3a5a..1d8e5e4a28 100644
--- a/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
+++ b/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
@@ -27,13 +27,7 @@
#include "backends/events/samsungtvsdl/samsungtvsdl-events.h"
-SamsungTVSdlEventManager::SamsungTVSdlEventManager(Common::EventSource *boss)
- :
- SdlEventManager(boss) {
-
-}
-
-bool SamsungTVSdlEventManager::remapKey(SDL_Event &ev, Common::Event &event) {
+bool SamsungTVSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
switch (ev.type) {
case SDL_KEYDOWN:{
if (ev.key.keysym.sym == SDLK_POWER) {
@@ -72,7 +66,7 @@ bool SamsungTVSdlEventManager::remapKey(SDL_Event &ev, Common::Event &event) {
}
// Invoke parent implementation of this method
- return SdlEventManager::remapKey(ev, event);
+ return SdlEventSource::remapKey(ev, event);
}
#endif
diff --git a/backends/events/samsungtvsdl/samsungtvsdl-events.h b/backends/events/samsungtvsdl/samsungtvsdl-events.h
index 10e1eb84bb..453c6473a3 100644
--- a/backends/events/samsungtvsdl/samsungtvsdl-events.h
+++ b/backends/events/samsungtvsdl/samsungtvsdl-events.h
@@ -31,10 +31,7 @@
/**
* SDL events manager for Samsung TV
*/
-class SamsungTVSdlEventManager : public SdlEventManager {
-public:
- SamsungTVSdlEventManager(Common::EventSource *boss);
-
+class SamsungTVSdlEventSource : public SdlEventSource {
protected:
virtual bool remapKey(SDL_Event &ev, Common::Event &event);
};
diff --git a/backends/events/sdl/sdl-events.h b/backends/events/sdl/sdl-events.h
index b060d021fc..ab6a64d7ef 100644
--- a/backends/events/sdl/sdl-events.h
+++ b/backends/events/sdl/sdl-events.h
@@ -94,10 +94,10 @@ protected:
/** @name Event Handlers
- * Handlers for specific SDL events, called by SdlEventManager::dispatchSDLEvent().
+ * Handlers for specific SDL events, called by SdlEventSource::dispatchSDLEvent().
* This way, if a managers inherits fromt this SDL events manager, it can
* change the behavior of only a single event, without having to override all
- * of SdlEventManager::dispatchSDLEvent().
+ * of SdlEventSource::dispatchSDLEvent().
*/
//@{
diff --git a/backends/events/symbiansdl/symbiansdl-events.cpp b/backends/events/symbiansdl/symbiansdl-events.cpp
index 2d144f9ad9..dabd9658d3 100644
--- a/backends/events/symbiansdl/symbiansdl-events.cpp
+++ b/backends/events/symbiansdl/symbiansdl-events.cpp
@@ -32,23 +32,21 @@
#include <bautils.h>
-SymbianSdlEventManager::zoneDesc SymbianSdlEventManager::_zones[TOTAL_ZONES] = {
+SymbianSdlEventSource::zoneDesc SymbianSdlEventSource::_zones[TOTAL_ZONES] = {
{ 0, 0, 320, 145 },
{ 0, 145, 150, 55 },
{ 150, 145, 170, 55 }
};
-SymbianSdlEventManager::SymbianSdlEventManager(Common::EventSource *boss)
- :
- _currentZone(0),
- SdlEventManager(boss) {
+SymbianSdlEventSource::SymbianSdlEventSource(Common::EventSource *boss)
+ : _currentZone(0) {
for (int i = 0; i < TOTAL_ZONES; i++) {
_mouseXZone[i] = (_zones[i].x + (_zones[i].width / 2));
_mouseYZone[i] = (_zones[i].y + (_zones[i].height / 2));
}
}
-bool SymbianSdlEventManager::remapKey(SDL_Event &ev, Common::Event &event) {
+bool SymbianSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
if (GUI::Actions::Instance()->mappingActive() || ev.key.keysym.sym <= SDLK_UNKNOWN)
return false;
diff --git a/backends/events/symbiansdl/symbiansdl-events.h b/backends/events/symbiansdl/symbiansdl-events.h
index fa1c066cae..b65d7baf0e 100644
--- a/backends/events/symbiansdl/symbiansdl-events.h
+++ b/backends/events/symbiansdl/symbiansdl-events.h
@@ -33,9 +33,9 @@
/**
* SDL events manager for Symbian
*/
-class SymbianSdlEventManager : public SdlEventManager {
+class SymbianSdlEventSource : public SdlEventSource {
public:
- SymbianSdlEventManager(Common::EventSource *boss);
+ SymbianSdlEventSource();
protected:
// Used to handle joystick navi zones
diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp
index 3a6d1a27f9..49a7132974 100644
--- a/backends/platform/gp2x/gp2x.cpp
+++ b/backends/platform/gp2x/gp2x.cpp
@@ -137,7 +137,7 @@ void OSystem_GP2X::initBackend() {
// Create the events manager
if (_eventManager == 0)
- _eventManager = new GP2XSdlEventManager(this);
+ _eventManager = new GP2XSdlEventSource(this);
// Create the graphics manager
if (_graphicsManager == 0)
diff --git a/backends/platform/linuxmoto/linuxmoto-sdl.cpp b/backends/platform/linuxmoto/linuxmoto-sdl.cpp
index 6ef03ed3ac..6a44bfe882 100644
--- a/backends/platform/linuxmoto/linuxmoto-sdl.cpp
+++ b/backends/platform/linuxmoto/linuxmoto-sdl.cpp
@@ -31,7 +31,7 @@
void OSystem_LINUXMOTO::initBackend() {
// Create the backend custom managers
if (_eventManager == 0)
- _eventManager = new LinuxmotoSdlEventManager(this);
+ _eventManager = new LinuxmotoSdlEventSource(this);
if (_graphicsManager == 0)
_graphicsManager = new LinuxmotoSdlGraphicsManager();
diff --git a/backends/platform/samsungtv/samsungtv.cpp b/backends/platform/samsungtv/samsungtv.cpp
index 77993881df..d0b4a578de 100644
--- a/backends/platform/samsungtv/samsungtv.cpp
+++ b/backends/platform/samsungtv/samsungtv.cpp
@@ -42,7 +42,7 @@ bool OSystem_SDL_SamsungTV::hasFeature(Feature f) {
void OSystem_SDL_SamsungTV::initBackend() {
// Create the events manager
if (_eventManager == 0)
- _eventManager = new SamsungTVSdlEventManager(this);
+ _eventManager = new SamsungTVSdlEventSource(this);
// Call parent implementation of this method
OSystem_SDL::initBackend();
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index faced0c2c4..10555ca33a 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -102,7 +102,7 @@ void OSystem_SDL_Symbian::initBackend() {
// Creates the backend managers
if (_eventManager == 0)
- _eventManager = new SymbianSdlEventManager(this);
+ _eventManager = new SymbianSdlEventSource(this);
if (_mixerManager == 0) {
_mixerManager = new SymbianSdlMixerManager();