1
0
Fork 0

Adding System/EventListener

This commit is contained in:
Henrik Hautakoski 2020-01-30 23:52:16 +01:00
parent 10198484e7
commit cd32d0b7c2
No known key found for this signature in database
GPG key ID: 96765B12FEAC4745
3 changed files with 38 additions and 0 deletions

View file

@ -28,6 +28,7 @@ local system_module = Module("source/System", {
"MessageHandler.cpp",
"MessageQueue.cpp",
"Event.cpp",
"EventListener.cpp",
"Log.cpp"
})

View file

@ -0,0 +1,23 @@
#ifndef SYSTEM_EVENT_LISTENER_H
#define SYSTEM_EVENT_LISTENER_H
#include <Spectre/System/Event.h>
#include <Spectre/Input/Mouse.h>
#include <Spectre/Input/Keyboard.h>
namespace sp {
class Display;
class EventListener
{
public :
virtual void onSizeChanged(Display* display, int width, int height);
virtual void onEvent(const Event& event);
};
} // namespace sp
#endif /* SYSTEM_EVENT_LISTENER_H */

View file

@ -0,0 +1,14 @@
#include <Spectre/Display/Display.h>
#include <Spectre/System/EventListener.h>
namespace sp {
void EventListener::onSizeChanged(Display* display, int width, int height)
{
}
void EventListener::onEvent(const Event& event)
{
}
} // namespace sp