28 #ifndef _glfw3_internal_h_ 29 #define _glfw3_internal_h_ 32 #if defined(_GLFW_USE_CONFIG_H) 36 #define _GLFW_VERSION_NUMBER "3.1.2" 38 #if defined(GLFW_INCLUDE_GLCOREARB) || \ 39 defined(GLFW_INCLUDE_ES1) || \ 40 defined(GLFW_INCLUDE_ES2) || \ 41 defined(GLFW_INCLUDE_ES3) || \ 42 defined(GLFW_INCLUDE_NONE) || \ 43 defined(GLFW_INCLUDE_GLEXT) || \ 44 defined(GLFW_INCLUDE_GLU) || \ 46 #error "You may not define any header option macros when compiling GLFW" 49 #if defined(_GLFW_USE_OPENGL) 51 #elif defined(_GLFW_USE_GLESV1) 52 #define GLFW_INCLUDE_ES1 53 #elif defined(_GLFW_USE_GLESV2) 54 #define GLFW_INCLUDE_ES2 56 #error "No supported client library selected" 61 #define GL_GLEXT_LEGACY 63 #include "../include/GLFW/glfw3.h" 65 #if defined(_GLFW_USE_OPENGL) 69 #include "../deps/GL/glext.h" 84 #if defined(_GLFW_COCOA) 85 #include "cocoa_platform.h" 86 #elif defined(_GLFW_WIN32) 88 #elif defined(_GLFW_X11) 89 #include "x11_platform.h" 90 #elif defined(_GLFW_WAYLAND) 91 #include "wl_platform.h" 92 #elif defined(_GLFW_MIR) 93 #include "mir_platform.h" 95 #error "No supported window creation API selected" 131 #define _GLFW_REQUIRE_INIT() \ 132 if (!_glfwInitialized) \ 134 _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \ 137 #define _GLFW_REQUIRE_INIT_OR_RETURN(x) \ 138 if (!_glfwInitialized) \ 140 _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \ 145 #define _GLFW_SWAP_POINTERS(x, y) \ 265 #if defined(_GLFW_USE_OPENGL) 878 #endif // _glfw3_internal_h_ void _glfwInputChar(_GLFWwindow *window, unsigned int codepoint, int mods, int plain)
Notifies shared code of a Unicode character input event.
GLboolean _glfwInitialized
Flag indicating whether GLFW has been successfully initialized.
void(* GLFWwindowiconifyfun)(GLFWwindow *, int)
The function signature for window iconify/restore callbacks.
const GLubyte *APIENTRYP PFNGLGETSTRINGIPROC(GLenum name, GLuint index)
void _glfwFreeGammaArrays(GLFWgammaramp *ramp)
GLFWcursorposfun cursorPos
GLboolean _glfwIsValidContext(const _GLFWctxconfig *ctxconfig)
Checks whether the current context fulfils the specified hard constraints.
GLFWgammaramp currentRamp
void _glfwFreeMonitor(_GLFWmonitor *monitor)
Frees a monitor object and any data associated with it.
_GLFWfbconfig framebuffer
_GLFW_PLATFORM_CURSOR_STATE
int _glfwStringInExtensionString(const char *string, const char *extensions)
Searches an extension string for the specified extension.
void(* GLFWmonitorfun)(GLFWmonitor *, int)
The function signature for monitor configuration callbacks.
void _glfwInputWindowIconify(_GLFWwindow *window, int iconified)
Notifies shared code of a window iconification event.
GLint GLint GLsizei GLsizei height
GLint GLint GLint GLint GLint GLint y
void _glfwInputWindowSize(_GLFWwindow *window, int width, int height)
Notifies shared code of a window resize event.
GLFWmousebuttonfun mouseButton
const _GLFWfbconfig * _glfwChooseFBConfig(const _GLFWfbconfig *desired, const _GLFWfbconfig *alternatives, unsigned int count)
Chooses the framebuffer config that best matches the desired one.
GLenum GLenum GLsizei void * image
typedef GLenum(APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target)
GLFWcursorenterfun cursorEnter
GLFWframebuffersizefun fbsize
_GLFW_PLATFORM_LIBRARY_TIME_STATE
const GLubyte *(APIENTRY * PFNGLGETSTRINGPROC)(GLenum)
void _glfwInputWindowFocus(_GLFWwindow *window, GLboolean focused)
Notifies shared code of a window focus event.
void(APIENTRY * PFNGLGETINTEGERVPROC)(GLenum, GLint *)
PFNGLGETSTRINGPROC GetString
_GLFWwindow * windowListHead
void _glfwInputWindowDamage(_GLFWwindow *window)
Notifies shared code of a window damage event.
void _glfwInputWindowCloseRequest(_GLFWwindow *window)
Notifies shared code of a window close request event.
void _glfwInputDrop(_GLFWwindow *window, int count, const char **names)
Notifies dropped object over window.
typedef GLint(APIENTRYP PFNGLGETATTRIBLOCATIONPROC)(GLuint program
GLFWwindowrefreshfun refresh
_GLFWcursor * cursorListHead
_GLFWlibrary _glfw
All global data protected by _glfwInitialized. This should only be touched after a call to glfwInit t...
char keys[GLFW_KEY_LAST+1]
_GLFWwindow * cursorWindow
typedef GLboolean(APIENTRYP PFNGLISQUERYPROC)(GLuint id)
_GLFW_PLATFORM_CONTEXT_STATE
GLuint GLuint GLsizei count
PFNGLGETINTEGERVPROC GetIntegerv
_GLFW_PLATFORM_WINDOW_STATE
void(* GLFWwindowsizefun)(GLFWwindow *, int, int)
The function signature for window resize callbacks.
_GLFW_PLATFORM_LIBRARY_WINDOW_STATE
struct _GLFWwindow * next
void _glfwFreeMonitors(_GLFWmonitor **monitors, int count)
_GLFW_PLATFORM_LIBRARY_TLS_STATE
void _glfwSplitBPP(int bpp, int *red, int *green, int *blue)
Splits a color depth into red, green and blue bit depths.
void(* GLFWframebuffersizefun)(GLFWwindow *, int, int)
The function signature for framebuffer resize callbacks.
void(APIENTRY * PFNGLCLEARPROC)(GLbitfield)
_GLFWmonitor * _glfwAllocMonitor(const char *name, int widthMM, int heightMM)
Allocates and returns a monitor object with the specified name and dimensions.
void _glfwInputMouseClick(_GLFWwindow *window, int button, int action, int mods)
Notifies shared code of a mouse button click event.
void _glfwInputWindowPos(_GLFWwindow *window, int xpos, int ypos)
Notifies shared code of a window movement event.
void(* GLFWwindowposfun)(GLFWwindow *, int, int)
The function signature for window position callbacks.
void _glfwAllocGammaArrays(GLFWgammaramp *ramp, unsigned int size)
void _glfwInputScroll(_GLFWwindow *window, double x, double y)
Notifies shared code of a scroll event.
_GLFW_PLATFORM_LIBRARY_CONTEXT_STATE
GLFWgammaramp originalRamp
typedef void(APIENTRYP PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode
GLboolean _glfwRefreshContextAttribs(const _GLFWctxconfig *ctxconfig)
Retrieves the attributes of the current context.
void _glfwInputCursorEnter(_GLFWwindow *window, int entered)
Notifies shared code of a cursor enter/leave event.
GLboolean stickyMouseButtons
_GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE
_GLFW_PLATFORM_MONITOR_STATE
void _glfwInputCursorMotion(_GLFWwindow *window, double x, double y)
Notifies shared code of a cursor motion event.
GLboolean _glfwIsValidContextConfig(const _GLFWctxconfig *ctxconfig)
Checks whether the desired context attributes are valid.
void _glfwInputMonitorChange(void)
GLint GLint GLsizei width
GLuint const GLchar * name
void _glfwInputKey(_GLFWwindow *window, int key, int scancode, int action, int mods)
Notifies shared code of a physical key event.
int _glfwCompareVideoModes(const GLFWvidmode *first, const GLFWvidmode *second)
Performs lexical comparison between two GLFWvidmode structures.
void(* GLFWwindowclosefun)(GLFWwindow *)
The function signature for window close callbacks.
void _glfwInputError(int error, const char *format,...)
Notifies shared code of an error.
typedef GLbitfield(APIENTRYP PFNGLQUERYMATRIXXOESPROC)(GLfixed *mantissa
void _glfwInputFramebufferSize(_GLFWwindow *window, int width, int height)
Notifies shared code of a framebuffer resize event.
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
const GLFWvidmode * _glfwChooseVideoMode(_GLFWmonitor *monitor, const GLFWvidmode *desired)
char mouseButtons[GLFW_MOUSE_BUTTON_LAST+1]
Window and context structure.
Framebuffer configuration.
GLdouble GLdouble GLdouble GLdouble top
GLFWwindowiconifyfun iconify
GLint GLint GLint GLint GLint x
void(* GLFWwindowrefreshfun)(GLFWwindow *)
The function signature for window content refresh callbacks.
void(* GLFWglproc)(void)
Client API function pointer type.
void(* GLFWwindowfocusfun)(GLFWwindow *, int)
The function signature for window focus/defocus callbacks.