aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/base-backend.h2
-rw-r--r--backends/events/default/default-events.cpp2
-rw-r--r--backends/events/default/default-events.h16
-rw-r--r--common/events.h2
4 files changed, 6 insertions, 16 deletions
diff --git a/backends/base-backend.h b/backends/base-backend.h
index 697577cd33..3fcca9c3b7 100644
--- a/backends/base-backend.h
+++ b/backends/base-backend.h
@@ -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);
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 4fdf96e57e..4805321ac3 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -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),
diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h
index 9d47104608..9be90f4ad8 100644
--- a/backends/events/default/default-events.h
+++ b/backends/events/default/default-events.h
@@ -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();
diff --git a/common/events.h b/common/events.h
index 7a187cc7c8..54c9f6df22 100644
--- a/common/events.h
+++ b/common/events.h
@@ -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();