aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/symbian/src/SymbianOS.cpp
diff options
context:
space:
mode:
authorMax Horn2007-03-17 19:02:05 +0000
committerMax Horn2007-03-17 19:02:05 +0000
commited54ea9155961d8ca5d5fb3c7777fc57a29f2751 (patch)
tree467b926af11cd4129ba003d04ba01de044c7a6df /backends/platform/symbian/src/SymbianOS.cpp
parentf272d1957084098c5b53975ad3501074f6971af8 (diff)
downloadscummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.tar.gz
scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.tar.bz2
scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.zip
Moved Event/EventType/keyboard enum from common/system.h (part of class OSystem) to common/events.h (part of namespace Common). Porters may have to make minor changes to their backends to get them to compile again
svn-id: r26180
Diffstat (limited to 'backends/platform/symbian/src/SymbianOS.cpp')
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index 71303ff3ce..846f1cce06 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -25,6 +25,7 @@
#include "backends/platform/symbian/src/SymbianOS.h"
#include "backends/platform/symbian/src/SymbianActions.h"
#include "common/config-manager.h"
+#include "common/events.h"
#include "gui/Actions.h"
#include "gui/Key.h"
#include "gui/message.h"
@@ -248,9 +249,9 @@ void OSystem_SDL_Symbian::symbianMix(byte *samples, int len) {
* This is an implementation by the remapKey function
* @param SDL_Event to remap
* @param ScumVM event to modify if special result is requested
- * @return true if Event has a valid return status
+ * @return true if Common::Event has a valid return status
*/
-bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Event &event) {
+bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) {
if (GUI::Actions::Instance()->mappingActive() || ev.key.keysym.sym <= SDLK_UNKNOWN)
return false;
@@ -267,7 +268,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Event &event) {
_km.y_vel = 0;
_km.y_down_count = 0;
}
- event.type = EVENT_MOUSEMOVE;
+ event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _km.x, _km.y);
return true;
@@ -280,7 +281,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Event &event) {
_km.y_vel = 0;
_km.y_down_count = 0;
}
- event.type = EVENT_MOUSEMOVE;
+ event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _km.x, _km.y);
return true;
@@ -293,7 +294,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Event &event) {
_km.x_vel = 0;
_km.x_down_count = 0;
}
- event.type = EVENT_MOUSEMOVE;
+ event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _km.x, _km.y);
return true;
@@ -306,19 +307,19 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Event &event) {
_km.x_vel = 0;
_km.x_down_count = 0;
}
- event.type = EVENT_MOUSEMOVE;
+ event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _km.x, _km.y);
return true;
case GUI::ACTION_LEFTCLICK:
- event.type = (ev.type == SDL_KEYDOWN ? EVENT_LBUTTONDOWN : EVENT_LBUTTONUP);
+ event.type = (ev.type == SDL_KEYDOWN ? Common::EVENT_LBUTTONDOWN : Common::EVENT_LBUTTONUP);
fillMouseEvent(event, _km.x, _km.y);
return true;
case GUI::ACTION_RIGHTCLICK:
- event.type = (ev.type == SDL_KEYDOWN ? EVENT_RBUTTONDOWN : EVENT_RBUTTONUP);
+ event.type = (ev.type == SDL_KEYDOWN ? Common::EVENT_RBUTTONDOWN : Common::EVENT_RBUTTONUP);
fillMouseEvent(event, _km.x, _km.y);
return true;
@@ -338,7 +339,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Event &event) {
_currentZone++;
if (_currentZone >= TOTAL_ZONES)
_currentZone = 0;
- event.type = EVENT_MOUSEMOVE;
+ event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _mouseXZone[_currentZone], _mouseYZone[_currentZone]);
SDL_WarpMouse(event.mouse.x, event.mouse.y);
}
@@ -359,20 +360,20 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Event &event) {
ev.key.keysym.scancode= key.keycode();
ev.key.keysym.mod = (SDLMod) key.flags();
- // Translate from SDL keymod event to Scummvm Key Mod Event.
+ // Translate from SDL keymod event to Scummvm Key Mod Common::Event.
// This codes is also present in GP32 backend and in SDL backend as a static function
// Perhaps it should be shared.
if(key.flags() != 0) {
event.kbd.flags = 0;
if (ev.key.keysym.mod & KMOD_SHIFT)
- event.kbd.flags |= OSystem::KBD_SHIFT;
+ event.kbd.flags |= Common::KBD_SHIFT;
if (ev.key.keysym.mod & KMOD_ALT)
- event.kbd.flags |= OSystem::KBD_ALT;
+ event.kbd.flags |= Common::KBD_ALT;
if (ev.key.keysym.mod & KMOD_CTRL)
- event.kbd.flags |= OSystem::KBD_CTRL;
+ event.kbd.flags |= Common::KBD_CTRL;
}
return false;