diff options
author | Max Horn | 2007-03-17 19:02:05 +0000 |
---|---|---|
committer | Max Horn | 2007-03-17 19:02:05 +0000 |
commit | ed54ea9155961d8ca5d5fb3c7777fc57a29f2751 (patch) | |
tree | 467b926af11cd4129ba003d04ba01de044c7a6df /backends/events/default | |
parent | f272d1957084098c5b53975ad3501074f6971af8 (diff) | |
download | scummvm-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/events/default')
-rw-r--r-- | backends/events/default/default-events.cpp | 20 | ||||
-rw-r--r-- | backends/events/default/default-events.h | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp index f4c2623f0d..8066ea5a38 100644 --- a/backends/events/default/default-events.cpp +++ b/backends/events/default/default-events.cpp @@ -38,7 +38,7 @@ DefaultEventManager::DefaultEventManager(OSystem *boss) : _currentKeyDown.keycode = 0; } -bool DefaultEventManager::pollEvent(OSystem::Event &event) { +bool DefaultEventManager::pollEvent(Common::Event &event) { uint32 time = _boss->getMillis(); bool result; @@ -47,7 +47,7 @@ bool DefaultEventManager::pollEvent(OSystem::Event &event) { if (result) { event.synthetic = false; switch (event.type) { - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: _modifierState = event.kbd.flags; // init continuous event stream @@ -59,7 +59,7 @@ bool DefaultEventManager::pollEvent(OSystem::Event &event) { _keyRepeatTime = time + kKeyRepeatInitialDelay; #endif break; - case OSystem::EVENT_KEYUP: + case Common::EVENT_KEYUP: _modifierState = event.kbd.flags; if (event.kbd.keycode == _currentKeyDown.keycode) { // Only stop firing events if it's the current key @@ -67,29 +67,29 @@ bool DefaultEventManager::pollEvent(OSystem::Event &event) { } break; - case OSystem::EVENT_MOUSEMOVE: + case Common::EVENT_MOUSEMOVE: _mousePos = event.mouse; break; - case OSystem::EVENT_LBUTTONDOWN: + case Common::EVENT_LBUTTONDOWN: _mousePos = event.mouse; _buttonState |= LBUTTON; break; - case OSystem::EVENT_LBUTTONUP: + case Common::EVENT_LBUTTONUP: _mousePos = event.mouse; _buttonState &= ~LBUTTON; break; - case OSystem::EVENT_RBUTTONDOWN: + case Common::EVENT_RBUTTONDOWN: _mousePos = event.mouse; _buttonState |= RBUTTON; break; - case OSystem::EVENT_RBUTTONUP: + case Common::EVENT_RBUTTONUP: _mousePos = event.mouse; _buttonState &= ~RBUTTON; break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: _shouldQuit = true; break; @@ -100,7 +100,7 @@ bool DefaultEventManager::pollEvent(OSystem::Event &event) { // Check if event should be sent again (keydown) if (_currentKeyDown.keycode != 0 && _keyRepeatTime < time) { // fire event - event.type = OSystem::EVENT_KEYDOWN; + event.type = Common::EVENT_KEYDOWN; event.synthetic = true; event.kbd.ascii = _currentKeyDown.ascii; event.kbd.keycode = _currentKeyDown.keycode; diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h index 229249a44d..be644cfdc8 100644 --- a/backends/events/default/default-events.h +++ b/backends/events/default/default-events.h @@ -62,7 +62,7 @@ class DefaultEventManager : public Common::EventManager { public: DefaultEventManager(OSystem *boss); - virtual bool pollEvent(OSystem::Event &event); + virtual bool pollEvent(Common::Event &event); virtual Common::Point getMousePos() const { return _mousePos; } virtual int getButtonState() const { return _buttonState; } |