mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 19:21:46 +00:00
Replace "EventProvider" class of the DefaultEventManager implementation with "Common::EventSource".
svn-id: r42718
This commit is contained in:
parent
908af0a37f
commit
ba7e01ad7c
@ -29,7 +29,7 @@
|
||||
#include "common/system.h"
|
||||
#include "backends/events/default/default-events.h"
|
||||
|
||||
class BaseBackend : public OSystem, EventProvider {
|
||||
class BaseBackend : public OSystem, Common::EventSource {
|
||||
public:
|
||||
virtual Common::EventManager *getEventManager();
|
||||
virtual void displayMessageOnOSD(const char *msg);
|
||||
|
@ -92,7 +92,7 @@ void writeRecord(Common::OutSaveFile *outFile, uint32 diff, Common::Event &event
|
||||
}
|
||||
}
|
||||
|
||||
DefaultEventManager::DefaultEventManager(EventProvider *boss) :
|
||||
DefaultEventManager::DefaultEventManager(Common::EventSource *boss) :
|
||||
_boss(boss),
|
||||
_buttonState(0),
|
||||
_modifierState(0),
|
||||
|
@ -41,20 +41,8 @@ namespace Common {
|
||||
}
|
||||
|
||||
|
||||
class EventProvider {
|
||||
public:
|
||||
virtual ~EventProvider() {}
|
||||
/**
|
||||
* Get the next event in the event queue.
|
||||
* @param event point to an Common::Event struct, which will be filled with the event data.
|
||||
* @return true if an event was retrieved.
|
||||
*/
|
||||
virtual bool pollEvent(Common::Event &event) = 0;
|
||||
};
|
||||
|
||||
|
||||
class DefaultEventManager : public Common::EventManager {
|
||||
EventProvider *_boss;
|
||||
Common::EventSource *_boss;
|
||||
|
||||
#ifdef ENABLE_VKEYBD
|
||||
Common::VirtualKeyboard *_vk;
|
||||
@ -128,7 +116,7 @@ class DefaultEventManager : public Common::EventManager {
|
||||
void record(Common::Event &event);
|
||||
bool playback(Common::Event &event);
|
||||
public:
|
||||
DefaultEventManager(EventProvider *boss);
|
||||
DefaultEventManager(Common::EventSource *boss);
|
||||
~DefaultEventManager();
|
||||
|
||||
virtual void init();
|
||||
|
@ -199,6 +199,8 @@ public:
|
||||
/**
|
||||
* Tries to catch events from the registered event
|
||||
* sources and dispatch them to the observers.
|
||||
*
|
||||
* This dispatches *all* events the sources offer.
|
||||
*/
|
||||
void dispatch();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user