feat(event): add EventGetCurrentContext and EventPostClose

This commit is contained in:
Tristan 'Natrist' Cormier 2023-03-31 12:39:33 -04:00 committed by GitHub
parent e7780e67fb
commit 8e61a4c428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -71,6 +71,14 @@ void EventDoMessageLoop() {
IEvtSchedulerProcess();
}
HEVENTCONTEXT EventGetCurrentContext() {
return PropGet(PROP_EVENTCONTEXT);
}
void EventPostClose() {
EventPostCloseEx(nullptr);
}
void EventPostCloseEx(HEVENTCONTEXT contextHandle) {
if (!contextHandle) {
contextHandle = PropGet(PROP_EVENTCONTEXT);

View File

@ -37,6 +37,8 @@ HEVENTCONTEXT EventCreateContextEx(int32_t interactive, int32_t (*initializeHand
void EventDoMessageLoop();
HEVENTCONTEXT EventGetCurrentContext();
void EventInitialize(int32_t threadCount, int32_t netServer);
void EventInitiateShutdown();
@ -47,6 +49,8 @@ int32_t EventIsKeyDown(KEY key);
int32_t EventIsShiftKeyDown();
void EventPostClose();
void EventPostCloseEx(HEVENTCONTEXT contextHandle);
void EventRegister(EVENTID id, int32_t (*handler)(const void*, void*));