diff options
author | Eugene Sandulenko | 2009-01-11 00:20:27 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-01-11 00:20:27 +0000 |
commit | 83972e2001e0654e057b5a4930cd2cbc05165786 (patch) | |
tree | 1137fef4016651c2ad56aa44024649c80d0a939f /backends/events/default/default-events.h | |
parent | 326df55debb696f73c33450569af4a6d0c60b0fd (diff) | |
parent | fe39d4f5075cc723945ca813142d02983069d0d5 (diff) | |
download | scummvm-rg350-83972e2001e0654e057b5a4930cd2cbc05165786.tar.gz scummvm-rg350-83972e2001e0654e057b5a4930cd2cbc05165786.tar.bz2 scummvm-rg350-83972e2001e0654e057b5a4930cd2cbc05165786.zip |
Merge in Virtual Keybpard & KeyMapper branch,
- Merge is perfromed in order to not let rotting the code
- Makefile modifications were avoided
Stuff to resolve:
- Circular dependency of common/vkeybd from graphics/
- Make it compilable (?)
- Add some keyboards
- Decide on the key bindings
svn-id: r35813
Diffstat (limited to 'backends/events/default/default-events.h')
-rw-r--r-- | backends/events/default/default-events.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h index 89846da1ae..1aeab4d68b 100644 --- a/backends/events/default/default-events.h +++ b/backends/events/default/default-events.h @@ -29,9 +29,20 @@ #include "common/events.h" #include "common/savefile.h" #include "common/mutex.h" +#include "common/queue.h" class OSystem; +namespace Common { +#ifdef ENABLE_KEYMAPPER + class Keymapper; +#endif +#ifdef ENABLE_VKEYBD + class VirtualKeyboard; +#endif +} + + /* At some point we will remove pollEvent from OSystem and change DefaultEventManager to use a "boss" derived from this class: @@ -47,6 +58,17 @@ use a subclass of EventProvider. class DefaultEventManager : public Common::EventManager { OSystem *_boss; +#ifdef ENABLE_VKEYBD + Common::VirtualKeyboard *_vk; +#endif + +#ifdef ENABLE_KEYMAPPER + Common::Keymapper *_keymapper; + bool _remap; +#endif + + Common::Queue<Common::Event> _artificialEventQueue; + Common::Point _mousePos; int _buttonState; int _modifierState; @@ -111,8 +133,9 @@ public: DefaultEventManager(OSystem *boss); ~DefaultEventManager(); + virtual void init(); virtual bool pollEvent(Common::Event &event); - virtual void pushEvent(Common::Event event); + virtual void pushEvent(const Common::Event &event); virtual void registerRandomSource(Common::RandomSource &rnd, const char *name); virtual void processMillis(uint32 &millis); @@ -122,6 +145,10 @@ public: virtual int shouldQuit() const { return _shouldQuit; } virtual int shouldRTL() const { return _shouldRTL; } virtual void resetRTL() { _shouldRTL = false; } + +#ifdef ENABLE_KEYMAPPER + virtual Common::Keymapper *getKeymapper() { return _keymapper; } +#endif }; #endif |