CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
uievent.h
1#pragma once
2
3#include <cx/cx.h>
4
5// Very simple OS-managed event object with wait function that also returns
6// early when UI input occurs. Designed to get kernel support for Events
7// with EV_UIEvent.
8
9#if defined(_PLATFORM_WIN)
10#define _UIEVENT_SUPPORTED
11#endif
12
13typedef struct UIEvent UIEvent;
14
15enum UIEVENT_Result {
16 UIEVENT_Error = 0,
17 UIEVENT_Event = 1, // Event was signaled
18 UIEVENT_UI = 2, // Other UI input occured
19 UIEVENT_Timeout = 3 // timeout reached
20};
21
22UIEvent *uieventCreate();
23bool uieventSignal(UIEvent *e, int count);
24int uieventWaitTimeout(UIEvent *e, uint64 timeout);
25void uieventDestroy(UIEvent *e);