Add window.id, add native EXIT event, filter window-based events and send to correct window instance
This commit is contained in:
39
project/include/app/ApplicationEvent.h
Normal file
39
project/include/app/ApplicationEvent.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef LIME_APP_APPLICATION_EVENT_H
|
||||
#define LIME_APP_APPLICATION_EVENT_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
enum ApplicationEventType {
|
||||
|
||||
UPDATE,
|
||||
EXIT
|
||||
|
||||
};
|
||||
|
||||
|
||||
class ApplicationEvent {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
|
||||
ApplicationEvent ();
|
||||
|
||||
static void Dispatch (ApplicationEvent* event);
|
||||
|
||||
int deltaTime;
|
||||
ApplicationEventType type;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,38 +0,0 @@
|
||||
#ifndef LIME_APP_UPDATE_EVENT_H
|
||||
#define LIME_APP_UPDATE_EVENT_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
enum UpdateEventType {
|
||||
|
||||
UPDATE
|
||||
|
||||
};
|
||||
|
||||
|
||||
class UpdateEvent {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
|
||||
UpdateEvent ();
|
||||
|
||||
static void Dispatch (UpdateEvent* event);
|
||||
|
||||
int deltaTime;
|
||||
UpdateEventType type;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user