summaryrefslogtreecommitdiff
path: root/src/glfw/setup.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glfw/setup.h')
-rw-r--r--src/glfw/setup.h419
1 files changed, 419 insertions, 0 deletions
diff --git a/src/glfw/setup.h b/src/glfw/setup.h
new file mode 100644
index 0000000..1b30728
--- /dev/null
+++ b/src/glfw/setup.h
@@ -0,0 +1,419 @@
+#ifndef HONEY_GLFW_SETUP_H
+#define HONEY_GLFW_SETUP_H
+
+#include <lua.h>
+#include <GLFW/glfw3.h>
+
+struct h_glfw_window_data_t {
+ lua_State *L;
+ int self_ref;
+
+ /* callbacks */
+ int key_cb_ref;
+ int char_cb_ref;
+ int char_mods_cb_ref;
+ int mouse_button_cb_ref;
+ int cursor_pos_cb_ref;
+ int cursor_enter_cb_ref;
+ int scroll_cb_ref;
+ int drop_cb_ref;
+ int pos_cb_ref;
+ int size_cb_ref;
+ int close_cb_ref;
+ int refresh_cb_ref;
+ int focus_cb_ref;
+ int iconify_cb_ref;
+ int maximize_cb_ref;
+ int framebuffer_size_cb_ref;
+ int content_scale_cb_ref;
+};
+
+
+GLFWmonitor ** create_monitor(lua_State *L);
+
+
+#define H_GLFW_METATABLES \
+ X("glfw.window", window) \
+ X("glfw.cursor", cursor) \
+ X("glfw.monitor", monitor) \
+
+#define X(str, name) extern const char *glfw_ ## name ## _tname;
+H_GLFW_METATABLES
+#undef X
+
+
+#define H_GLFW_FUNCTIONS \
+ /* context */ \
+ X("MakeContextCurrent", glfwMakeContextCurrent_bind) \
+ X("GetCurrentContext", glfwGetCurrentContext_bind) \
+ X("SwapInterval", glfwSwapInterval_bind) \
+ X("ExtensionSupported", glfwExtensionSupported_bind) \
+ X("GetProcAddress", glfwGetProcAddress_bind) \
+\
+ /* setup/error */ \
+ X("Init", glfwInit_bind) \
+ X("Terminate", glfwTerminate_bind) \
+ X("InitHint", glfwInitHint_bind) \
+ X("GetVersion", glfwGetVersion_bind) \
+ X("GetVersionString", glfwGetVersionString_bind) \
+ X("GetError", glfwGetError_bind) \
+\
+ /* input */ \
+ X("GetInputMode", glfwGetInputMode_bind) \
+ X("SetInputMode", glfwSetInputMode_bind) \
+ X("RawMouseMotionSupported", glfwRawMouseMotionSupported_bind) \
+ X("GetKeyName", glfwGetKeyName_bind) \
+ X("GetKeyScancode", glfwGetKeyScancode_bind) \
+ X("GetKey", glfwGetKey_bind) \
+ X("GetMouseButton", glfwGetMouseButton_bind) \
+ X("GetCursorPos", glfwGetCursorPos_bind) \
+ X("SetCursorPos", glfwSetCursorPos_bind) \
+ X("CreateCursor", glfwCreateCursor_bind) \
+ X("CreateStandardCursor", glfwCreateStandardCursor_bind) \
+ X("DestroyCursor", glfwDestroyCursor_bind) \
+ X("SetCursor", glfwSetCursor_bind) \
+ X("SetKeyCallback", glfwSetKeyCallback_bind) \
+ X("SetCharCallback", glfwSetCharCallback_bind) \
+ X("SetCharModsCallback", glfwSetCharModsCallback_bind) \
+ X("SetMouseButtonCallback", glfwSetMouseButtonCallback_bind) \
+ X("SetCursorPosCallback", glfwSetCursorPosCallback_bind) \
+ X("SetCursorEnterCallback", glfwSetCursorEnterCallback_bind) \
+ X("SetScrollCallback", glfwSetScrollCallback_bind) \
+ X("SetDropCallback", glfwSetDropCallback_bind) \
+ X("JoystickPresent", glfwJoystickPresent_bind) \
+ X("GetJoystickAxes", glfwGetJoystickAxes_bind) \
+ X("GetJoystickButtons", glfwGetJoystickButtons_bind) \
+ X("GetJoystickHats", glfwGetJoystickHats_bind) \
+ X("GetJoystickName", glfwGetJoystickName_bind) \
+ X("GetJoystickGUID", glfwGetJoystickGUID_bind) \
+ X("JoystickIsGamepad", glfwJoystickIsGamepad_bind) \
+ X("SetJoystickCallback", glfwSetJoystickCallback_bind) \
+ X("UpdateGamepadMappings", glfwUpdateGamepadMappings_bind) \
+ X("GetGamepadName", glfwGetGamepadName_bind) \
+ X("GetGamepadState", glfwGetGamepadState_bind) \
+ X("SetClipboardString", glfwSetClipboardString_bind) \
+ X("GetClipboardString", glfwGetClipboardString_bind) \
+ X("GetTime", glfwGetTime_bind) \
+ X("SetTime", glfwSetTime_bind) \
+ X("GetTimerValue", glfwGetTimerValue_bind) \
+ X("GetTimerFrequency", glfwGetTimerFrequency_bind) \
+\
+ /* monitor */ \
+ X("GetMonitors", glfwGetMonitors_bind) \
+ X("GetPrimaryMonitor", glfwGetPrimaryMonitor_bind) \
+ X("GetMonitorPos", glfwGetMonitorPos_bind) \
+ X("GetMonitorWorkarea", glfwGetMonitorWorkarea_bind) \
+ X("GetMonitorPhysicalSize", glfwGetMonitorPhysicalSize_bind) \
+ X("GetMonitorContentScale", glfwGetMonitorContentScale_bind) \
+ X("GetMonitorName", glfwGetMonitorName_bind) \
+ X("SetMonitorCallback", glfwSetMonitorCallback_bind) \
+ X("GetVideoModes", glfwGetVideoModes_bind) \
+ X("GetVideoMode", glfwGetVideoMode_bind) \
+ X("SetGamma", glfwSetGamma_bind) \
+ X("GetGammaRamp", glfwGetGammaRamp_bind) \
+ X("SetGammaRamp", glfwSetGammaRamp_bind) \
+\
+ /* window */ \
+ X("DefaultWindowHints", glfwDefaultWindowHints_bind) \
+ X("WindowHint", glfwWindowHint_bind) \
+ X("WindowHintString", glfwWindowHintString_bind) \
+ X("CreateWindow", glfwCreateWindow_bind) \
+ X("DestroyWindow", glfwDestroyWindow_bind) \
+ X("WindowShouldClose", glfwWindowShouldClose_bind) \
+ X("SetWindowShouldClose", glfwSetWindowShouldClose_bind) \
+ X("SetWindowTitle", glfwSetWindowTitle_bind) \
+ X("SetWindowIcon", glfwSetWindowIcon_bind) \
+ X("GetWindowPos", glfwGetWindowPos_bind) \
+ X("SetWindowPos", glfwSetWindowPos_bind) \
+ X("GetWindowSize", glfwGetWindowSize_bind) \
+ X("SetWindowSizeLimits", glfwSetWindowSizeLimits_bind) \
+ X("SetWindowAspectRatio", glfwSetWindowAspectRatio_bind) \
+ X("SetWindowSize", glfwSetWindowSize_bind) \
+ X("GetFramebufferSize", glfwGetFramebufferSize_bind) \
+ X("GetWindowFrameSize", glfwGetWindowFrameSize_bind) \
+ X("GetWindowContentScale", glfwGetWindowContentScale_bind) \
+ X("GetWindowOpacity", glfwGetWindowOpacity_bind) \
+ X("SetWindowOpacity", glfwSetWindowOpacity_bind) \
+ X("IconifyWindow", glfwIconifyWindow_bind) \
+ X("RestoreWindow", glfwRestoreWindow_bind) \
+ X("MaximizeWindow", glfwMaximizeWindow_bind) \
+ X("ShowWindow", glfwShowWindow_bind) \
+ X("HideWindow", glfwHideWindow_bind) \
+ X("FocusWindow", glfwFocusWindow_bind) \
+ X("RequestWindowAttention", glfwRequestWindowAttention_bind) \
+ X("GetWindowMonitor", glfwGetWindowMonitor_bind) \
+ X("SetWindowMonitor", glfwSetWindowMonitor_bind) \
+ X("GetWindowAttrib", glfwGetWindowAttrib_bind) \
+ X("SetWindowAttrib", glfwSetWindowAttrib_bind) \
+ X("SetWindowPosCallback", glfwSetWindowPosCallback_bind) \
+ X("SetWindowSizeCallback", glfwSetWindowSizeCallback_bind) \
+ X("SetWindowCloseCallback", glfwSetWindowCloseCallback_bind) \
+ X("SetWindowRefreshCallback", glfwSetWindowRefreshCallback_bind) \
+ X("SetWindowFocusCallback", glfwSetWindowFocusCallback_bind) \
+ X("SetWindowIconifyCallback", glfwSetWindowIconifyCallback_bind) \
+ X("SetWindowMaximizeCallback", glfwSetWindowMaximizeCallback_bind) \
+ X("SetFramebufferSizeCallback", glfwSetFramebufferSizeCallback_bind) \
+ X("SetWindowContentScaleCallback", glfwSetWindowContentScaleCallback_bind) \
+ X("PollEvents", glfwPollEvents_bind) \
+ X("WaitEvents", glfwWaitEvents_bind) \
+ X("WaitEventsTimeout", glfwWaitEventsTimeout_bind) \
+ X("PostEmptyEvent", glfwPostEmptyEvent_bind) \
+ X("SwapBuffers", glfwSwapBuffers_bind) \
+
+
+#define X(name, func) int func(lua_State *L);
+H_GLFW_FUNCTIONS
+#undef X
+
+
+#define H_GLFW_ENUM \
+ X("FOCUSED", GLFW_FOCUSED) \
+ X("ICONIFIED", GLFW_ICONIFIED) \
+ X("RESIZABLE", GLFW_RESIZABLE) \
+ X("VISIBLE", GLFW_VISIBLE) \
+ X("DECORATED", GLFW_DECORATED) \
+ X("GLFW_AUTO_ICONIFY", GLFW_AUTO_ICONIFY) \
+ X("FLOATING", GLFW_FLOATING) \
+ X("MAXIMIZED", GLFW_MAXIMIZED) \
+ X("CENTER_CURSOR", GLFW_CENTER_CURSOR) \
+ X("TRANSPARENT_FRAMEBUFFER", GLFW_TRANSPARENT_FRAMEBUFFER) \
+ X("HOVERED", GLFW_HOVERED) \
+ X("FOCUS_ON_SHOW", GLFW_FOCUS_ON_SHOW) \
+ X("RED_BITS", GLFW_RED_BITS) \
+ X("GREEN_BITS", GLFW_GREEN_BITS) \
+ X("BLUE_BITS", GLFW_BLUE_BITS) \
+ X("ALPHA_BITS", GLFW_ALPHA_BITS) \
+ X("DEPTH_BITS", GLFW_DEPTH_BITS) \
+ X("STENCIL_BITS", GLFW_STENCIL_BITS) \
+ X("ACCUM_RED_BITS", GLFW_ACCUM_RED_BITS) \
+ X("ACCUM_GREEN_BITS", GLFW_ACCUM_GREEN_BITS) \
+ X("ACCUM_BLUE_BITS", GLFW_ACCUM_BLUE_BITS) \
+ X("ACCUM_ALPHA_BITS", GLFW_ACCUM_ALPHA_BITS) \
+ X("AUX_BUFFERS", GLFW_AUX_BUFFERS) \
+ X("STEREO", GLFW_STEREO) \
+ X("SAMPLES", GLFW_SAMPLES) \
+ X("SRGB_CAPABLE", GLFW_SRGB_CAPABLE) \
+ X("REFRESH_RATE", GLFW_REFRESH_RATE) \
+ X("DOUBLEBUFFER", GLFW_DOUBLEBUFFER) \
+ X("CLIENT_API", GLFW_CLIENT_API) \
+ X("CONTEXT_VERSION_MAJOR", GLFW_CONTEXT_VERSION_MAJOR) \
+ X("CONTEXT_VERSION_MINOR", GLFW_CONTEXT_VERSION_MINOR) \
+ X("CONTEXT_REVISION", GLFW_CONTEXT_REVISION) \
+ X("CONTEXT_ROBUSTNESS", GLFW_CONTEXT_ROBUSTNESS) \
+ X("OPENGL_FORWARD_COMPAT", GLFW_OPENGL_FORWARD_COMPAT) \
+ X("OPENGL_DEBUG_CONTEXT", GLFW_OPENGL_DEBUG_CONTEXT) \
+ X("OPENGL_PROFILE", GLFW_OPENGL_PROFILE) \
+ X("CONTEXT_RELEASE_BEHAVIOR", GLFW_CONTEXT_RELEASE_BEHAVIOR) \
+ X("CONTEXT_NO_ERROR", GLFW_CONTEXT_NO_ERROR) \
+ X("CONTEXT_CREATION_API", GLFW_CONTEXT_CREATION_API) \
+ X("SCALE_TO_MONITOR", GLFW_SCALE_TO_MONITOR) \
+ X("COCOA_RETINA_FRAMEBUFFER", GLFW_COCOA_RETINA_FRAMEBUFFER) \
+ X("COCOA_FRAME_NAME", GLFW_COCOA_FRAME_NAME) \
+ X("COCOA_GRAPHICS_SWITCHING", GLFW_COCOA_GRAPHICS_SWITCHING) \
+ X("X11_CLASS_NAME", GLFW_X11_CLASS_NAME) \
+ X("X11_INSTANCE_NAME", GLFW_X11_INSTANCE_NAME) \
+ X("GAMEPAD_AXIS_LEFT_X", GLFW_GAMEPAD_AXIS_LEFT_X) \
+ X("GAMEPAD_AXIS_LEFT_Y", GLFW_GAMEPAD_AXIS_LEFT_Y) \
+ X("GAMEPAD_AXIS_RIGHT_X", GLFW_GAMEPAD_AXIS_RIGHT_X) \
+ X("GAMEPAD_AXIS_RIGHT_Y", GLFW_GAMEPAD_AXIS_RIGHT_Y) \
+ X("GAMEPAD_AXIS_LEFT_TRIGGER", GLFW_GAMEPAD_AXIS_LEFT_TRIGGER) \
+ X("GAMEPAD_AXIS_RIGHT_TRIGGER", GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER) \
+ X("GAMEPAD_AXIS_LAST", GLFW_GAMEPAD_AXIS_LAST) \
+ X("GAMEPAD_AXIS_LEFT_X", GLFW_GAMEPAD_AXIS_LEFT_X) \
+ X("GAMEPAD_AXIS_LEFT_Y", GLFW_GAMEPAD_AXIS_LEFT_Y) \
+ X("GAMEPAD_AXIS_RIGHT_X", GLFW_GAMEPAD_AXIS_RIGHT_X) \
+ X("GAMEPAD_AXIS_RIGHT_Y", GLFW_GAMEPAD_AXIS_RIGHT_Y) \
+ X("GAMEPAD_AXIS_LEFT_TRIGGER", GLFW_GAMEPAD_AXIS_LEFT_TRIGGER) \
+ X("GAMEPAD_AXIS_RIGHT_TRIGGER", GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER) \
+ X("GAMEPAD_AXIS_LAST", GLFW_GAMEPAD_AXIS_LAST) \
+ X("HAT_CENTERED", GLFW_HAT_CENTERED) \
+ X("HAT_UP", GLFW_HAT_UP) \
+ X("HAT_RIGHT", GLFW_HAT_RIGHT) \
+ X("HAT_DOWN", GLFW_HAT_DOWN) \
+ X("HAT_LEFT", GLFW_HAT_LEFT) \
+ X("HAT_RIGHT_UP", GLFW_HAT_RIGHT_UP) \
+ X("HAT_RIGHT_DOWN", GLFW_HAT_RIGHT_DOWN) \
+ X("HAT_LEFT_UP", GLFW_HAT_LEFT_UP) \
+ X("HAT_LEFT_DOWN", GLFW_HAT_LEFT_DOWN) \
+ X("JOYSTICK_1", GLFW_JOYSTICK_1) \
+ X("JOYSTICK_2", GLFW_JOYSTICK_2) \
+ X("JOYSTICK_3", GLFW_JOYSTICK_3) \
+ X("JOYSTICK_4", GLFW_JOYSTICK_4) \
+ X("JOYSTICK_5", GLFW_JOYSTICK_5) \
+ X("JOYSTICK_6", GLFW_JOYSTICK_6) \
+ X("JOYSTICK_7", GLFW_JOYSTICK_7) \
+ X("JOYSTICK_8", GLFW_JOYSTICK_8) \
+ X("JOYSTICK_9", GLFW_JOYSTICK_9) \
+ X("JOYSTICK_10", GLFW_JOYSTICK_10) \
+ X("JOYSTICK_11", GLFW_JOYSTICK_11) \
+ X("JOYSTICK_12", GLFW_JOYSTICK_12) \
+ X("JOYSTICK_13", GLFW_JOYSTICK_13) \
+ X("JOYSTICK_14", GLFW_JOYSTICK_14) \
+ X("JOYSTICK_15", GLFW_JOYSTICK_15) \
+ X("JOYSTICK_16", GLFW_JOYSTICK_16) \
+ X("JOYSTICK_LAST", GLFW_JOYSTICK_LAST) \
+ X("KEY_UNKNOWN", GLFW_KEY_UNKNOWN) \
+ X("KEY_SPACE", GLFW_KEY_SPACE) \
+ X("KEY_APOSTROPHE", GLFW_KEY_APOSTROPHE) \
+ X("KEY_COMMA", GLFW_KEY_COMMA) \
+ X("KEY_MINUS", GLFW_KEY_MINUS) \
+ X("KEY_PERIOD", GLFW_KEY_PERIOD) \
+ X("KEY_SLASH", GLFW_KEY_SLASH) \
+ X("KEY_0", GLFW_KEY_0) \
+ X("KEY_1", GLFW_KEY_1) \
+ X("KEY_2", GLFW_KEY_2) \
+ X("KEY_3", GLFW_KEY_3) \
+ X("KEY_4", GLFW_KEY_4) \
+ X("KEY_5", GLFW_KEY_5) \
+ X("KEY_6", GLFW_KEY_6) \
+ X("KEY_7", GLFW_KEY_7) \
+ X("KEY_8", GLFW_KEY_8) \
+ X("KEY_9", GLFW_KEY_9) \
+ X("KEY_SEMICOLON", GLFW_KEY_SEMICOLON) \
+ X("KEY_EQUAL", GLFW_KEY_EQUAL) \
+ X("KEY_A", GLFW_KEY_A) \
+ X("KEY_B", GLFW_KEY_B) \
+ X("KEY_C", GLFW_KEY_C) \
+ X("KEY_D", GLFW_KEY_D) \
+ X("KEY_E", GLFW_KEY_E) \
+ X("KEY_F", GLFW_KEY_F) \
+ X("KEY_G", GLFW_KEY_G) \
+ X("KEY_H", GLFW_KEY_H) \
+ X("KEY_I", GLFW_KEY_I) \
+ X("KEY_J", GLFW_KEY_J) \
+ X("KEY_K", GLFW_KEY_K) \
+ X("KEY_L", GLFW_KEY_L) \
+ X("KEY_M", GLFW_KEY_M) \
+ X("KEY_N", GLFW_KEY_N) \
+ X("KEY_O", GLFW_KEY_O) \
+ X("KEY_P", GLFW_KEY_P) \
+ X("KEY_Q", GLFW_KEY_Q) \
+ X("KEY_R", GLFW_KEY_R) \
+ X("KEY_S", GLFW_KEY_S) \
+ X("KEY_T", GLFW_KEY_T) \
+ X("KEY_U", GLFW_KEY_U) \
+ X("KEY_V", GLFW_KEY_V) \
+ X("KEY_W", GLFW_KEY_W) \
+ X("KEY_X", GLFW_KEY_X) \
+ X("KEY_Y", GLFW_KEY_Y) \
+ X("KEY_Z", GLFW_KEY_Z) \
+ X("KEY_LEFT_BRACKET", GLFW_KEY_LEFT_BRACKET) \
+ X("KEY_BACKSLASH", GLFW_KEY_BACKSLASH) \
+ X("KEY_RIGHT_BRACKET", GLFW_KEY_RIGHT_BRACKET) \
+ X("KEY_GRAVE_ACCENT", GLFW_KEY_GRAVE_ACCENT) \
+ X("KEY_WORLD_1", GLFW_KEY_WORLD_1) \
+ X("KEY_WORLD_2", GLFW_KEY_WORLD_2) \
+ X("KEY_ESCAPE", GLFW_KEY_ESCAPE) \
+ X("KEY_ENTER", GLFW_KEY_ENTER) \
+ X("KEY_TAB", GLFW_KEY_TAB) \
+ X("KEY_BACKSPACE", GLFW_KEY_BACKSPACE) \
+ X("KEY_INSERT", GLFW_KEY_INSERT) \
+ X("KEY_DELETE", GLFW_KEY_DELETE) \
+ X("KEY_RIGHT", GLFW_KEY_RIGHT) \
+ X("KEY_LEFT", GLFW_KEY_LEFT) \
+ X("KEY_DOWN", GLFW_KEY_DOWN) \
+ X("KEY_UP", GLFW_KEY_UP) \
+ X("KEY_PAGE_UP", GLFW_KEY_PAGE_UP) \
+ X("KEY_PAGE_DOWN", GLFW_KEY_PAGE_DOWN) \
+ X("KEY_HOME", GLFW_KEY_HOME) \
+ X("KEY_END", GLFW_KEY_END) \
+ X("KEY_CAPS_LOCK", GLFW_KEY_CAPS_LOCK) \
+ X("KEY_SCROLL_LOCK", GLFW_KEY_SCROLL_LOCK) \
+ X("KEY_NUM_LOCK", GLFW_KEY_NUM_LOCK) \
+ X("KEY_PRINT_SCREEN", GLFW_KEY_PRINT_SCREEN) \
+ X("KEY_PAUSE", GLFW_KEY_PAUSE) \
+ X("KEY_F1", GLFW_KEY_F1) \
+ X("KEY_F2", GLFW_KEY_F2) \
+ X("KEY_F3", GLFW_KEY_F3) \
+ X("KEY_F4", GLFW_KEY_F4) \
+ X("KEY_F5", GLFW_KEY_F5) \
+ X("KEY_F6", GLFW_KEY_F6) \
+ X("KEY_F7", GLFW_KEY_F7) \
+ X("KEY_F8", GLFW_KEY_F8) \
+ X("KEY_F9", GLFW_KEY_F9) \
+ X("KEY_F10", GLFW_KEY_F10) \
+ X("KEY_F11", GLFW_KEY_F11) \
+ X("KEY_F12", GLFW_KEY_F12) \
+ X("KEY_F13", GLFW_KEY_F13) \
+ X("KEY_F14", GLFW_KEY_F14) \
+ X("KEY_F15", GLFW_KEY_F15) \
+ X("KEY_F16", GLFW_KEY_F16) \
+ X("KEY_F17", GLFW_KEY_F17) \
+ X("KEY_F18", GLFW_KEY_F18) \
+ X("KEY_F19", GLFW_KEY_F19) \
+ X("KEY_F20", GLFW_KEY_F20) \
+ X("KEY_F21", GLFW_KEY_F21) \
+ X("KEY_F22", GLFW_KEY_F22) \
+ X("KEY_F23", GLFW_KEY_F23) \
+ X("KEY_F24", GLFW_KEY_F24) \
+ X("KEY_F25", GLFW_KEY_F25) \
+ X("KEY_KP_0", GLFW_KEY_KP_0) \
+ X("KEY_KP_1", GLFW_KEY_KP_1) \
+ X("KEY_KP_2", GLFW_KEY_KP_2) \
+ X("KEY_KP_3", GLFW_KEY_KP_3) \
+ X("KEY_KP_4", GLFW_KEY_KP_4) \
+ X("KEY_KP_5", GLFW_KEY_KP_5) \
+ X("KEY_KP_6", GLFW_KEY_KP_6) \
+ X("KEY_KP_7", GLFW_KEY_KP_7) \
+ X("KEY_KP_8", GLFW_KEY_KP_8) \
+ X("KEY_KP_9", GLFW_KEY_KP_9) \
+ X("KEY_KP_DECIMAL", GLFW_KEY_KP_DECIMAL) \
+ X("KEY_KP_DIVIDE", GLFW_KEY_KP_DIVIDE) \
+ X("KEY_KP_MULTIPLY", GLFW_KEY_KP_MULTIPLY) \
+ X("KEY_KP_SUBTRACT", GLFW_KEY_KP_SUBTRACT) \
+ X("KEY_KP_ADD", GLFW_KEY_KP_ADD) \
+ X("KEY_KP_ENTER", GLFW_KEY_KP_ENTER) \
+ X("KEY_KP_EQUAL", GLFW_KEY_KP_EQUAL) \
+ X("KEY_LEFT_SHIFT", GLFW_KEY_LEFT_SHIFT) \
+ X("KEY_LEFT_CONTROL", GLFW_KEY_LEFT_CONTROL) \
+ X("KEY_LEFT_ALT", GLFW_KEY_LEFT_ALT) \
+ X("KEY_LEFT_SUPER", GLFW_KEY_LEFT_SUPER) \
+ X("KEY_RIGHT_SHIFT", GLFW_KEY_RIGHT_SHIFT) \
+ X("KEY_RIGHT_CONTROL", GLFW_KEY_RIGHT_CONTROL) \
+ X("KEY_RIGHT_ALT", GLFW_KEY_RIGHT_ALT) \
+ X("KEY_RIGHT_SUPER", GLFW_KEY_RIGHT_SUPER) \
+ X("KEY_MENU", GLFW_KEY_MENU) \
+ X("KEY_LAST", GLFW_KEY_LAST) \
+ X("MOD_SHIFT", GLFW_MOD_SHIFT) \
+ X("MOD_CONTROL", GLFW_MOD_CONTROL) \
+ X("MOD_ALT", GLFW_MOD_ALT) \
+ X("MOD_SUPER", GLFW_MOD_SUPER) \
+ X("MOD_CAPS_LOCK", GLFW_MOD_CAPS_LOCK) \
+ X("MOD_NUM_LOCK", GLFW_MOD_NUM_LOCK) \
+ X("MOUSE_BUTTON_1", GLFW_MOUSE_BUTTON_1) \
+ X("MOUSE_BUTTON_2", GLFW_MOUSE_BUTTON_2) \
+ X("MOUSE_BUTTON_3", GLFW_MOUSE_BUTTON_3) \
+ X("MOUSE_BUTTON_4", GLFW_MOUSE_BUTTON_4) \
+ X("MOUSE_BUTTON_5", GLFW_MOUSE_BUTTON_5) \
+ X("MOUSE_BUTTON_6", GLFW_MOUSE_BUTTON_6) \
+ X("MOUSE_BUTTON_7", GLFW_MOUSE_BUTTON_7) \
+ X("MOUSE_BUTTON_8", GLFW_MOUSE_BUTTON_8) \
+ X("MOUSE_BUTTON_LAST", GLFW_MOUSE_BUTTON_LAST) \
+ X("MOUSE_BUTTON_LEFT", GLFW_MOUSE_BUTTON_LEFT) \
+ X("MOUSE_BUTTON_RIGHT", GLFW_MOUSE_BUTTON_RIGHT) \
+ X("MOUSE_BUTTON_MIDDLE", GLFW_MOUSE_BUTTON_MIDDLE) \
+ X("ARROW_CURSOR", GLFW_ARROW_CURSOR) \
+ X("IBEAM_CURSOR", GLFW_IBEAM_CURSOR) \
+ X("CROSSHAIR_CURSOR", GLFW_CROSSHAIR_CURSOR) \
+ X("HAND_CURSOR", GLFW_HAND_CURSOR) \
+ X("HRESIZE_CURSOR", GLFW_HRESIZE_CURSOR) \
+ X("VRESIZE_CURSOR", GLFW_VRESIZE_CURSOR) \
+ X("TRUE", GLFW_TRUE) \
+ X("FALSE", GLFW_FALSE) \
+ X("JOYSTICK_HAT_BUTTONS", GLFW_JOYSTICK_HAT_BUTTONS) \
+ X("COCOA_CHDIR_RESOURCES", GLFW_COCOA_CHDIR_RESOURCES) \
+ X("COCOA_MENUBAR", GLFW_COCOA_MENUBAR) \
+ X("NO_ERROR", GLFW_NO_ERROR) \
+ X("NOT_INITIALIZED", GLFW_NOT_INITIALIZED) \
+ X("NO_CURRENT_CONTEXT", GLFW_NO_CURRENT_CONTEXT) \
+ X("INVALID_ENUM", GLFW_INVALID_ENUM) \
+ X("INVALID_VALUE", GLFW_INVALID_VALUE) \
+ X("OUT_OF_MEMORY", GLFW_OUT_OF_MEMORY) \
+ X("API_UNAVAILABLE", GLFW_API_UNAVAILABLE) \
+ X("VERSION_UNAVAILABLE", GLFW_VERSION_UNAVAILABLE) \
+ X("PLATFORM_ERROR", GLFW_PLATFORM_ERROR) \
+ X("FORMAT_UNAVAILABLE", GLFW_FORMAT_UNAVAILABLE) \
+ X("NO_WINDOW_CONTEXT", GLFW_NO_WINDOW_CONTEXT) \
+
+
+#endif