162 assert(title !=
NULL);
168 if (width <= 0 || height <= 0)
171 "Invalid window size %ix%i",
181 wndconfig.
width = width;
182 wndconfig.
height = height;
183 wndconfig.
title = title;
430 assert(value !=
NULL);
477 while (*prev != window)
478 prev = &((*prev)->next);
480 *prev = window->
next;
489 assert(window !=
NULL);
498 assert(window !=
NULL);
507 assert(window !=
NULL);
508 assert(title !=
NULL);
518 assert(window !=
NULL);
520 assert(count == 0 || images !=
NULL);
529 assert(window !=
NULL);
543 assert(window !=
NULL);
556 assert(window !=
NULL);
570 assert(window !=
NULL);
583 int minwidth,
int minheight,
584 int maxwidth,
int maxheight)
587 assert(window !=
NULL);
593 if (minwidth < 0 || minheight < 0)
596 "Invalid window minimum size %ix%i",
597 minwidth, minheight);
604 if (maxwidth < 0 || maxheight < 0 ||
605 maxwidth < minwidth || maxheight < minheight)
608 "Invalid window maximum size %ix%i",
609 maxwidth, maxheight);
624 maxwidth, maxheight);
630 assert(window !=
NULL);
638 if (numer <= 0 || denom <= 0)
641 "Invalid window aspect ratio %i:%i",
647 window->
numer = numer;
648 window->
denom = denom;
659 assert(window !=
NULL);
672 int* right,
int* bottom)
675 assert(window !=
NULL);
691 float* xscale,
float* yscale)
694 assert(window !=
NULL);
708 assert(window !=
NULL);
717 assert(window !=
NULL);
718 assert(opacity == opacity);
719 assert(opacity >= 0.f);
720 assert(opacity <= 1.f);
724 if (opacity != opacity || opacity < 0.f || opacity > 1.f)
736 assert(window !=
NULL);
745 assert(window !=
NULL);
754 assert(window !=
NULL);
767 assert(window !=
NULL);
783 assert(window !=
NULL);
793 assert(window !=
NULL);
806 assert(window !=
NULL);
816 assert(window !=
NULL);
879 assert(window !=
NULL);
919 assert(window !=
NULL);
928 int width,
int height,
933 assert(window !=
NULL);
939 if (width <= 0 || height <= 0)
942 "Invalid window size %ix%i",
950 "Invalid refresh rate %i",
960 xpos, ypos, width, height,
967 assert(window !=
NULL);
976 assert(window !=
NULL);
986 assert(window !=
NULL);
997 assert(window !=
NULL);
1008 assert(window !=
NULL);
1019 assert(window !=
NULL);
1030 assert(window !=
NULL);
1041 assert(window !=
NULL);
1052 assert(window !=
NULL);
1063 assert(window !=
NULL);
1074 assert(window !=
NULL);
1096 assert(timeout == timeout);
1097 assert(timeout >= 0.0);
1098 assert(timeout <= DBL_MAX);
1100 if (timeout != timeout || timeout < 0.0 || timeout > DBL_MAX)
void _glfwPlatformSetWindowMonitor(_GLFWwindow *window, _GLFWmonitor *monitor, int xpos, int ypos, int width, int height, int refreshRate)
void _glfwPlatformGetWindowContentScale(_GLFWwindow *window, float *xscale, float *yscale)
void _glfwPlatformSetWindowResizable(_GLFWwindow *window, GLFWbool enabled)
int _glfwPlatformWindowIconified(_GLFWwindow *window)
void _glfwPlatformMaximizeWindow(_GLFWwindow *window)
void _glfwPlatformIconifyWindow(_GLFWwindow *window)
void _glfwPlatformSetWindowSize(_GLFWwindow *window, int width, int height)
void _glfwPlatformWaitEvents(void)
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow *window, int minwidth, int minheight, int maxwidth, int maxheight)
int _glfwPlatformFramebufferTransparent(_GLFWwindow *window)
void _glfwPlatformPollEvents(void)
void _glfwPlatformGetFramebufferSize(_GLFWwindow *window, int *width, int *height)
int _glfwPlatformWindowVisible(_GLFWwindow *window)
void _glfwPlatformGetWindowSize(_GLFWwindow *window, int *width, int *height)
void _glfwPlatformSetWindowPos(_GLFWwindow *window, int x, int y)
void _glfwPlatformGetWindowFrameSize(_GLFWwindow *window, int *left, int *top, int *right, int *bottom)
void _glfwPlatformSetWindowIcon(_GLFWwindow *window, int count, const GLFWimage *images)
void _glfwPlatformSetWindowDecorated(_GLFWwindow *window, GLFWbool enabled)
void _glfwPlatformGetWindowPos(_GLFWwindow *window, int *xpos, int *ypos)
void _glfwPlatformSetWindowOpacity(_GLFWwindow *window, float opacity)
float _glfwPlatformGetWindowOpacity(_GLFWwindow *window)
void _glfwPlatformRestoreWindow(_GLFWwindow *window)
int _glfwPlatformWindowHovered(_GLFWwindow *window)
void _glfwPlatformDestroyWindow(_GLFWwindow *window)
void _glfwPlatformWaitEventsTimeout(double timeout)
void _glfwPlatformHideWindow(_GLFWwindow *window)
int _glfwPlatformWindowMaximized(_GLFWwindow *window)
void _glfwPlatformShowWindow(_GLFWwindow *window)
int _glfwPlatformWindowFocused(_GLFWwindow *window)
void _glfwPlatformPostEmptyEvent(void)
int _glfwPlatformGetKeyScancode(int key)
int _glfwPlatformCreateWindow(_GLFWwindow *window, const _GLFWwndconfig *wndconfig, const _GLFWctxconfig *ctxconfig, const _GLFWfbconfig *fbconfig)
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow *window, int numer, int denom)
void _glfwPlatformRequestWindowAttention(_GLFWwindow *window)
void _glfwPlatformSetWindowTitle(_GLFWwindow *window, const char *title)
void _glfwPlatformFocusWindow(_GLFWwindow *window)
void _glfwPlatformSetWindowMousePassthrough(_GLFWwindow *window, GLFWbool enabled)
void _glfwPlatformSetWindowFloating(_GLFWwindow *window, GLFWbool enabled)
GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig *ctxconfig)
GLFWbool _glfwRefreshContextAttribs(_GLFWwindow *window, const _GLFWctxconfig *ctxconfig)
#define GLFW_NATIVE_CONTEXT_API
#define GLFW_CURSOR_NORMAL
GLFWAPI void glfwMakeContextCurrent(GLFWwindow *window)
Makes the context of the specified window current for the calling thread.
#define GLFW_INVALID_ENUM
One of the arguments to the function was an invalid enum value.
#define GLFW_INVALID_VALUE
One of the arguments to the function was an invalid value.
struct GLFWmonitor GLFWmonitor
Opaque monitor object.
GLFWAPI void glfwGetWindowPos(GLFWwindow *handle, int *xpos, int *ypos)
Retrieves the position of the content area of the specified window.
GLFWAPI void glfwWaitEventsTimeout(double timeout)
Waits with timeout until events are queued and processes them.
GLFWAPI void glfwFocusWindow(GLFWwindow *handle)
Brings the specified window to front and sets input focus.
GLFWAPI void glfwSetWindowPos(GLFWwindow *handle, int xpos, int ypos)
Sets the position of the content area of the specified window.
#define GLFW_REFRESH_RATE
Monitor refresh rate hint.
GLFWAPI void glfwSetWindowMonitor(GLFWwindow *wh, GLFWmonitor *mh, int xpos, int ypos, int width, int height, int refreshRate)
Sets the mode, monitor, video mode and placement of a window.
#define GLFW_OPENGL_FORWARD_COMPAT
OpenGL forward-compatibility hint and attribute.
GLFWAPI void glfwSetWindowIcon(GLFWwindow *handle, int count, const GLFWimage *images)
Sets the icon for the specified window.
GLFWAPI int glfwGetWindowAttrib(GLFWwindow *handle, int attrib)
Returns an attribute of the specified window.
GLFWAPI void glfwSetWindowShouldClose(GLFWwindow *handle, int value)
Sets the close flag of the specified window.
GLFWAPI void glfwRestoreWindow(GLFWwindow *handle)
Restores the specified window.
#define GLFW_DECORATED
Window decoration window hint and attribute.
#define GLFW_ACCUM_BLUE_BITS
Framebuffer bit depth hint.
GLFWAPI void glfwIconifyWindow(GLFWwindow *handle)
Iconifies the specified window.
#define GLFW_SAMPLES
Framebuffer MSAA samples hint.
#define GLFW_DEPTH_BITS
Framebuffer bit depth hint.
#define GLFW_CONTEXT_VERSION_MINOR
Context client API minor version hint and attribute.
#define GLFW_ICONIFIED
Window iconification window attribute.
GLFWAPI void glfwWindowHintString(int hint, const char *value)
Sets the specified window hint to the desired value.
struct GLFWwindow GLFWwindow
Opaque window object.
GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow *handle, GLFWwindowiconifyfun cbfun)
Sets the iconify callback for the specified window.
GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow *handle, GLFWframebuffersizefun cbfun)
Sets the framebuffer resize callback for the specified window.
#define GLFW_SRGB_CAPABLE
Framebuffer sRGB hint.
#define GLFW_OPENGL_PROFILE
OpenGL profile hint and attribute.
#define GLFW_X11_INSTANCE_NAME
X11 specific window hint.
GLFWAPI void glfwMaximizeWindow(GLFWwindow *handle)
Maximizes the specified window.
#define GLFW_CONTEXT_CREATION_API
Context creation API hint and attribute.
GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow *handle, GLFWwindowposfun cbfun)
Sets the position callback for the specified window.
#define GLFW_STENCIL_BITS
Framebuffer bit depth hint.
#define GLFW_COCOA_GRAPHICS_SWITCHING
macOS specific window hint.
void(* GLFWframebuffersizefun)(GLFWwindow *, int, int)
The function pointer type for framebuffer size callbacks.
#define GLFW_FOCUSED
Input focus window hint and attribute.
#define GLFW_CONTEXT_NO_ERROR
Context error suppression hint and attribute.
#define GLFW_CENTER_CURSOR
Cursor centering window hint.
void(* GLFWwindowclosefun)(GLFWwindow *)
The function pointer type for window close callbacks.
#define GLFW_TRANSPARENT_FRAMEBUFFER
Window framebuffer transparency hint and attribute.
#define GLFW_SCALE_TO_MONITOR
Window content area scaling window window hint.
GLFWAPI void glfwSetWindowOpacity(GLFWwindow *handle, float opacity)
Sets the opacity of the whole window.
GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow *handle, GLFWwindowrefreshfun cbfun)
Sets the refresh callback for the specified window.
#define GLFW_CLIENT_API
Context client API hint and attribute.
#define GLFW_ACCUM_GREEN_BITS
Framebuffer bit depth hint.
GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow *handle, GLFWwindowclosefun cbfun)
Sets the close callback for the specified window.
GLFWAPI void glfwWindowHint(int hint, int value)
Sets the specified window hint to the desired value.
void(* GLFWwindowfocusfun)(GLFWwindow *, int)
The function pointer type for window focus callbacks.
GLFWAPI void glfwWaitEvents(void)
Waits until events are queued and processes them.
#define GLFW_COCOA_FRAME_NAME
macOS specific window hint.
#define GLFW_DOUBLEBUFFER
Framebuffer double buffering hint and attribute.
GLFWAPI void glfwGetWindowContentScale(GLFWwindow *handle, float *xscale, float *yscale)
Retrieves the content scale for the specified window.
#define GLFW_CONTEXT_RELEASE_BEHAVIOR
Context flush-on-release hint and attribute.
void(* GLFWwindowrefreshfun)(GLFWwindow *)
The function pointer type for window content refresh callbacks.
GLFWAPI void glfwShowWindow(GLFWwindow *handle)
Makes the specified window visible.
#define GLFW_FLOATING
Window decoration window hint and attribute.
GLFWAPI void glfwGetWindowSize(GLFWwindow *handle, int *width, int *height)
Retrieves the size of the content area of the specified window.
void glfwDefaultWindowHints(void)
Resets all window hints to their default values.
GLFWAPI void glfwDestroyWindow(GLFWwindow *handle)
Destroys the specified window and its context.
void(* GLFWwindowmaximizefun)(GLFWwindow *, int)
The function pointer type for window maximize callbacks.
#define GLFW_STEREO
OpenGL stereoscopic rendering hint.
GLFWAPI void glfwSetWindowTitle(GLFWwindow *handle, const char *title)
Sets the title of the specified window.
#define GLFW_HOVERED
Mouse cursor hover window attribute.
GLFWAPI void glfwPollEvents(void)
Processes all pending events.
#define GLFW_MOUSE_PASSTHROUGH
Mouse input transparency window hint and attribute.
GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow *handle, int minwidth, int minheight, int maxwidth, int maxheight)
Sets the size limits of the specified window.
#define GLFW_CONTEXT_DEBUG
Debug mode context hint and attribute.
#define GLFW_AUTO_ICONIFY
Window auto-iconification window hint and attribute.
GLFWAPI void glfwHideWindow(GLFWwindow *handle)
Hides the specified window.
GLFWAPI int glfwWindowShouldClose(GLFWwindow *handle)
Checks the close flag of the specified window.
void(* GLFWwindowiconifyfun)(GLFWwindow *, int)
The function pointer type for window iconify callbacks.
void(* GLFWwindowsizefun)(GLFWwindow *, int, int)
The function pointer type for window size callbacks.
GLFWAPI GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)
Creates a window and its associated context.
GLFWAPI void glfwGetWindowFrameSize(GLFWwindow *handle, int *left, int *top, int *right, int *bottom)
Retrieves the size of the frame of the window.
#define GLFW_AUX_BUFFERS
Framebuffer auxiliary buffer hint.
GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow *handle, GLFWwindowsizefun cbfun)
Sets the size callback for the specified window.
#define GLFW_BLUE_BITS
Framebuffer bit depth hint.
#define GLFW_COCOA_RETINA_FRAMEBUFFER
macOS specific window hint.
GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow *handle, GLFWwindowcontentscalefun cbfun)
Sets the window content scale callback for the specified window.
void(* GLFWwindowcontentscalefun)(GLFWwindow *, float, float)
The function pointer type for window content scale callbacks.
GLFWAPI void glfwSetWindowUserPointer(GLFWwindow *handle, void *pointer)
Sets the user pointer of the specified window.
GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow *handle, GLFWwindowfocusfun cbfun)
Sets the focus callback for the specified window.
GLFWAPI void * glfwGetWindowUserPointer(GLFWwindow *handle)
Returns the user pointer of the specified window.
GLFWAPI void glfwRequestWindowAttention(GLFWwindow *handle)
Requests user attention to the specified window.
GLFWAPI float glfwGetWindowOpacity(GLFWwindow *handle)
Returns the opacity of the whole window.
GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow *handle, int numer, int denom)
Sets the aspect ratio of the specified window.
GLFWAPI void glfwSetWindowAttrib(GLFWwindow *handle, int attrib, int value)
Sets an attribute of the specified window.
GLFWAPI GLFWmonitor * glfwGetWindowMonitor(GLFWwindow *handle)
Returns the monitor that the window uses for full screen mode.
GLFWAPI void glfwPostEmptyEvent(void)
Posts an empty event to the event queue.
#define GLFW_MAXIMIZED
Window maximization window hint and attribute.
#define GLFW_RESIZABLE
Window resize-ability window hint and attribute.
#define GLFW_CONTEXT_ROBUSTNESS
Context robustness hint and attribute.
GLFWAPI void glfwSetWindowSize(GLFWwindow *handle, int width, int height)
Sets the size of the content area of the specified window.
#define GLFW_X11_CLASS_NAME
X11 specific window hint.
GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow *handle, GLFWwindowmaximizefun cbfun)
Sets the maximize callback for the specified window.
#define GLFW_ACCUM_ALPHA_BITS
Framebuffer bit depth hint.
#define GLFW_ACCUM_RED_BITS
Framebuffer bit depth hint.
#define GLFW_WIN32_KEYBOARD_MENU
#define GLFW_RED_BITS
Framebuffer bit depth hint.
GLFWAPI void glfwGetFramebufferSize(GLFWwindow *handle, int *width, int *height)
Retrieves the size of the framebuffer of the specified window.
#define GLFW_FOCUS_ON_SHOW
Input focus on calling show window hint and attribute.
#define GLFW_VISIBLE
Window visibility window hint and attribute.
#define GLFW_CONTEXT_REVISION
Context client API revision number hint and attribute.
#define GLFW_GREEN_BITS
Framebuffer bit depth hint.
#define GLFW_CONTEXT_VERSION_MAJOR
Context client API major version hint and attribute.
#define GLFW_ALPHA_BITS
Framebuffer bit depth hint.
void(* GLFWwindowposfun)(GLFWwindow *, int, int)
The function pointer type for window position callbacks.
void _glfwInputError(int code, const char *format,...)
#define _GLFW_REQUIRE_INIT_OR_RETURN(x)
#define _GLFW_SWAP_POINTERS(x, y)
void * _glfwPlatformGetTls(_GLFWtls *tls)
#define _GLFW_REQUIRE_INIT()
struct _GLFWctxconfig::@21 nsgl
_GLFWfbconfig framebuffer
_GLFWwindow * windowListHead
struct _GLFWlibrary::@23 hints
GLFWwindowmaximizefun maximize
struct _GLFWwindow::@22 callbacks
char mouseButtons[GLFW_MOUSE_BUTTON_LAST+1]
GLFWframebuffersizefun fbsize
GLFWbool mousePassthrough
struct _GLFWwindow * next
GLFWwindowrefreshfun refresh
GLFWwindowiconifyfun iconify
GLFWwindowcontentscalefun scale
char keys[GLFW_KEY_LAST+1]
struct _GLFWwndconfig::@20 win32
struct _GLFWwndconfig::@18 ns
GLFWbool mousePassthrough
struct _GLFWwndconfig::@19 x11
void _glfwInputFramebufferSize(_GLFWwindow *window, int width, int height)
void _glfwInputWindowIconify(_GLFWwindow *window, GLFWbool iconified)
void _glfwInputWindowMaximize(_GLFWwindow *window, GLFWbool maximized)
void _glfwInputWindowSize(_GLFWwindow *window, int width, int height)
void _glfwInputWindowMonitor(_GLFWwindow *window, _GLFWmonitor *monitor)
void _glfwInputWindowPos(_GLFWwindow *window, int x, int y)
void _glfwInputWindowContentScale(_GLFWwindow *window, float xscale, float yscale)
void _glfwInputWindowDamage(_GLFWwindow *window)
void _glfwInputWindowCloseRequest(_GLFWwindow *window)
void _glfwInputWindowFocus(_GLFWwindow *window, GLFWbool focused)