#ifndef GLFW_FUNCTION_TABLE_H #define GLFW_FUNCTION_TABLE_H #include "../glfw/glfw3.h" #ifdef __cplusplus extern "C" { #endif typedef struct GLFWFunctionTable { int (*glfwInit)(void); void (*glfwTerminate)(void); void (*glfwInitHint)(int hint, int value); void (*glfwGetVersion)(int* major, int* minor, int* rev); const char* (*glfwGetVersionString)(void); int (*glfwGetError)(const char** description); GLFWerrorfun (*glfwSetErrorCallback)(GLFWerrorfun callback); GLFWmonitor** (*glfwGetMonitors)(int* count); GLFWmonitor* (*glfwGetPrimaryMonitor)(void); void (*glfwGetMonitorPos)(GLFWmonitor* monitor, int* xpos, int* ypos); void (*glfwGetMonitorWorkarea)(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height); void (*glfwGetMonitorPhysicalSize)(GLFWmonitor* monitor, int* widthMM, int* heightMM); void (*glfwGetMonitorContentScale)(GLFWmonitor* monitor, float* xscale, float* yscale); const char* (*glfwGetMonitorName)(GLFWmonitor* monitor); void (*glfwSetMonitorUserPointer)(GLFWmonitor* monitor, void* pointer); void* (*glfwGetMonitorUserPointer)(GLFWmonitor* monitor); GLFWmonitorfun (*glfwSetMonitorCallback)(GLFWmonitorfun callback); const GLFWvidmode* (*glfwGetVideoModes)(GLFWmonitor* monitor, int* count); const GLFWvidmode* (*glfwGetVideoMode)(GLFWmonitor* monitor); void (*glfwSetGamma)(GLFWmonitor* monitor, float gamma); const GLFWgammaramp* (*glfwGetGammaRamp)(GLFWmonitor* monitor); void (*glfwSetGammaRamp)(GLFWmonitor* monitor, const GLFWgammaramp* ramp); void (*glfwDefaultWindowHints)(void); void (*glfwWindowHint)(int hint, int value); void (*glfwWindowHintString)(int hint, const char* value); GLFWwindow* (*glfwCreateWindow)(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share); void (*glfwDestroyWindow)(GLFWwindow* window); int (*glfwWindowShouldClose)(GLFWwindow* window); void (*glfwSetWindowShouldClose)(GLFWwindow* window, int value); void (*glfwSetWindowTitle)(GLFWwindow* window, const char* title); void (*glfwSetWindowIcon)(GLFWwindow* window, int count, const GLFWimage* images); void (*glfwGetWindowPos)(GLFWwindow* window, int* xpos, int* ypos); void (*glfwSetWindowPos)(GLFWwindow* window, int xpos, int ypos); void (*glfwGetWindowSize)(GLFWwindow* window, int* width, int* height); void (*glfwSetWindowSizeLimits)(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight); void (*glfwSetWindowAspectRatio)(GLFWwindow* window, int numer, int denom); void (*glfwSetWindowSize)(GLFWwindow* window, int width, int height); void (*glfwGetFramebufferSize)(GLFWwindow* window, int* width, int* height); void (*glfwGetWindowFrameSize)(GLFWwindow* window, int* left, int* top, int* right, int* bottom); void (*glfwGetWindowContentScale)(GLFWwindow* window, float* xscale, float* yscale); float (*glfwGetWindowOpacity)(GLFWwindow* window); void (*glfwSetWindowOpacity)(GLFWwindow* window, float opacity); void (*glfwIconifyWindow)(GLFWwindow* window); void (*glfwRestoreWindow)(GLFWwindow* window); void (*glfwMaximizeWindow)(GLFWwindow* window); void (*glfwShowWindow)(GLFWwindow* window); void (*glfwHideWindow)(GLFWwindow* window); void (*glfwFocusWindow)(GLFWwindow* window); void (*glfwRequestWindowAttention)(GLFWwindow* window); GLFWmonitor* (*glfwGetWindowMonitor)(GLFWwindow* window); void (*glfwSetWindowMonitor)(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate); int (*glfwGetWindowAttrib)(GLFWwindow* window, int attrib); void (*glfwSetWindowAttrib)(GLFWwindow* window, int attrib, int value); void (*glfwSetWindowUserPointer)(GLFWwindow* window, void* pointer); void* (*glfwGetWindowUserPointer)(GLFWwindow* window); GLFWwindowposfun (*glfwSetWindowPosCallback)(GLFWwindow* window, GLFWwindowposfun callback); GLFWwindowsizefun (*glfwSetWindowSizeCallback)(GLFWwindow* window, GLFWwindowsizefun callback); GLFWwindowclosefun (*glfwSetWindowCloseCallback)(GLFWwindow* window, GLFWwindowclosefun callback); GLFWwindowrefreshfun (*glfwSetWindowRefreshCallback)(GLFWwindow* window, GLFWwindowrefreshfun callback); GLFWwindowfocusfun (*glfwSetWindowFocusCallback)(GLFWwindow* window, GLFWwindowfocusfun callback); GLFWwindowiconifyfun (*glfwSetWindowIconifyCallback)(GLFWwindow* window, GLFWwindowiconifyfun callback); GLFWwindowmaximizefun (*glfwSetWindowMaximizeCallback)(GLFWwindow* window, GLFWwindowmaximizefun callback); GLFWframebuffersizefun (*glfwSetFramebufferSizeCallback)(GLFWwindow* window, GLFWframebuffersizefun callback); GLFWwindowcontentscalefun (*glfwSetWindowContentScaleCallback)(GLFWwindow* window, GLFWwindowcontentscalefun callback); void (*glfwPollEvents)(void); void (*glfwWaitEvents)(void); void (*glfwWaitEventsTimeout)(double timeout); void (*glfwPostEmptyEvent)(void); int (*glfwGetInputMode)(GLFWwindow* window, int mode); void (*glfwSetInputMode)(GLFWwindow* window, int mode, int value); int (*glfwRawMouseMotionSupported)(void); const char* (*glfwGetKeyName)(int key, int scancode); int (*glfwGetKeyScancode)(int key); int (*glfwGetKey)(GLFWwindow* window, int key); int (*glfwGetMouseButton)(GLFWwindow* window, int button); void (*glfwGetCursorPos)(GLFWwindow* window, double* xpos, double* ypos); void (*glfwSetCursorPos)(GLFWwindow* window, double xpos, double ypos); GLFWcursor* (*glfwCreateCursor)(const GLFWimage* image, int xhot, int yhot); GLFWcursor* (*glfwCreateStandardCursor)(int shape); void (*glfwDestroyCursor)(GLFWcursor* cursor); void (*glfwSetCursor)(GLFWwindow* window, GLFWcursor* cursor); GLFWkeyfun (*glfwSetKeyCallback)(GLFWwindow* window, GLFWkeyfun callback); GLFWcharfun (*glfwSetCharCallback)(GLFWwindow* window, GLFWcharfun callback); GLFWcharmodsfun (*glfwSetCharModsCallback)(GLFWwindow* window, GLFWcharmodsfun callback); GLFWmousebuttonfun (*glfwSetMouseButtonCallback)(GLFWwindow* window, GLFWmousebuttonfun callback); GLFWcursorposfun (*glfwSetCursorPosCallback)(GLFWwindow* window, GLFWcursorposfun callback); GLFWcursorenterfun (*glfwSetCursorEnterCallback)(GLFWwindow* window, GLFWcursorenterfun callback); GLFWscrollfun (*glfwSetScrollCallback)(GLFWwindow* window, GLFWscrollfun callback); GLFWdropfun (*glfwSetDropCallback)(GLFWwindow* window, GLFWdropfun callback); int (*glfwJoystickPresent)(int jid); const float* (*glfwGetJoystickAxes)(int jid, int* count); const unsigned char* (*glfwGetJoystickButtons)(int jid, int* count); const char* (*glfwGetJoystickGUID)(int jid); const unsigned char* (*glfwGetJoystickHats)(int jid, int* count); const char* (*glfwGetJoystickName)(int jid); void* (*glfwGetJoystickUserPointer)(int jid); int (*glfwJoystickIsGamepad)(int jid); GLFWjoystickfun (*glfwSetJoystickCallback)(GLFWjoystickfun callback); int (*glfwUpdateGamepadMappings)(const char* str); const char* (*glfwGetGamepadName)(int jid); int (*glfwGetGamepadState)(int jid, GLFWgamepadstate* state); void (*glfwSetClipboardString)(GLFWwindow* window, const char* str); const char* (*glfwGetClipboardString)(GLFWwindow* window); double (*glfwGetTime)(void); void (*glfwSetTime)(double time); unsigned long long (*glfwGetTimerValue)(void); unsigned long long (*glfwGetTimerFrequency)(void); void (*glfwMakeContextCurrent)(GLFWwindow* window); GLFWwindow* (*glfwGetCurrentContext)(void); void (*glfwSwapBuffers)(GLFWwindow* window); void (*glfwSwapInterval)(int interval); int (*glfwExtensionSupported)(const char* extension); GLFWglproc (*glfwGetProcAddress)(const char* procname); int (*glfwVulkanSupported)(void); const char** (*glfwGetRequiredInstanceExtensions)(unsigned int* count); } GLFWFunctionTable; #ifdef __cplusplus } #endif #endif