-
Notifications
You must be signed in to change notification settings - Fork 0
/
glfw.c3i
54 lines (29 loc) · 1.2 KB
/
glfw.c3i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module glfw;
import glfw::error;
def UserPointer = void*;
const VERSION_MAJOR = 3;
const VERSION_MINOR = 4;
const DONT_CARE = -1;
fn CBool init() @extern("glfwInit");
fn void terminate() @extern("glfwTerminate");
fn void pollEvents() @extern("glfwPollEvents");
fn void waitEvents() @extern("glfwWaitEvents");
fn void waitEventsTimeout(double timeout) @extern("glfwWaitEventsTimeout");
fn void postEmptyEvent() @extern("glfwPostEmptyEvent");
fn void getVersion(CInt* major, CInt* minor, CInt* revision) @extern("glfwGetVersion");
fn ZString getVersionString() @extern("glfwGetVersionString");
fn Platform getPlatform() @extern("glfwGetPlatform");
fn CBool platformSupported(Platform platform) @extern("glfwPlatformSupported");
fn CBool rawMouseMotionSupported() @extern("glfwRawMouseMotionSupported");
fn double getTime() @extern("glfwGetTime");
fn void setTime() @extern("glfwSetTime");
fn CULong getTimerValue() @extern("glfwGetTimerValue");
fn CULong getTimerFrequency() @extern("glfwGetTimerFrequency");
distinct ConnectionState = CInt;
const ConnectionState CONNECTED = 0x00040001;
const ConnectionState DISCONNECTED = 0x00040002;
struct Image {
CInt width;
CInt height;
CUChar* pixels;
}