Wise&mystical  1.0
Project about Europe
Loading...
Searching...
No Matches
internal.h
Go to the documentation of this file.
1//========================================================================
2// GLFW 3.4 - www.glfw.org
3//------------------------------------------------------------------------
4// Copyright (c) 2002-2006 Marcus Geelnard
5// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
6//
7// This software is provided 'as-is', without any express or implied
8// warranty. In no event will the authors be held liable for any damages
9// arising from the use of this software.
10//
11// Permission is granted to anyone to use this software for any purpose,
12// including commercial applications, and to alter it and redistribute it
13// freely, subject to the following restrictions:
14//
15// 1. The origin of this software must not be misrepresented; you must not
16// claim that you wrote the original software. If you use this software
17// in a product, an acknowledgment in the product documentation would
18// be appreciated but is not required.
19//
20// 2. Altered source versions must be plainly marked as such, and must not
21// be misrepresented as being the original software.
22//
23// 3. This notice may not be removed or altered from any source
24// distribution.
25//
26//========================================================================
27
28#pragma once
29
30#if defined(_GLFW_USE_CONFIG_H)
31 #include "glfw_config.h"
32#endif
33
34#if defined(GLFW_INCLUDE_GLCOREARB) || \
35 defined(GLFW_INCLUDE_ES1) || \
36 defined(GLFW_INCLUDE_ES2) || \
37 defined(GLFW_INCLUDE_ES3) || \
38 defined(GLFW_INCLUDE_ES31) || \
39 defined(GLFW_INCLUDE_ES32) || \
40 defined(GLFW_INCLUDE_NONE) || \
41 defined(GLFW_INCLUDE_GLEXT) || \
42 defined(GLFW_INCLUDE_GLU) || \
43 defined(GLFW_INCLUDE_VULKAN) || \
44 defined(GLFW_DLL)
45 #error "You must not define any header option macros when compiling GLFW"
46#endif
47
48#define GLFW_INCLUDE_NONE
49#include "../include/GLFW/glfw3.h"
50
51#define _GLFW_INSERT_FIRST 0
52#define _GLFW_INSERT_LAST 1
53
54#define _GLFW_POLL_PRESENCE 0
55#define _GLFW_POLL_AXES 1
56#define _GLFW_POLL_BUTTONS 2
57#define _GLFW_POLL_ALL (_GLFW_POLL_AXES | _GLFW_POLL_BUTTONS)
58
59#define _GLFW_MESSAGE_SIZE 1024
60
61typedef int GLFWbool;
62
63typedef struct _GLFWerror _GLFWerror;
69typedef struct _GLFWwindow _GLFWwindow;
72typedef struct _GLFWcursor _GLFWcursor;
76typedef struct _GLFWtls _GLFWtls;
77typedef struct _GLFWmutex _GLFWmutex;
78
81typedef void (* _GLFWswapintervalfun)(int);
82typedef int (* _GLFWextensionsupportedfun)(const char*);
83typedef GLFWglproc (* _GLFWgetprocaddressfun)(const char*);
85
86#define GL_VERSION 0x1f02
87#define GL_NONE 0
88#define GL_COLOR_BUFFER_BIT 0x00004000
89#define GL_UNSIGNED_BYTE 0x1401
90#define GL_EXTENSIONS 0x1f03
91#define GL_NUM_EXTENSIONS 0x821d
92#define GL_CONTEXT_FLAGS 0x821e
93#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
94#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
95#define GL_CONTEXT_PROFILE_MASK 0x9126
96#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
97#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
98#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
99#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
100#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
101#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82fb
102#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82fc
103#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
104
105typedef int GLint;
106typedef unsigned int GLuint;
107typedef unsigned int GLenum;
108typedef unsigned int GLbitfield;
109typedef unsigned char GLubyte;
110
115
116#define VK_NULL_HANDLE 0
117
118typedef void* VkInstance;
119typedef void* VkPhysicalDevice;
123
124typedef enum VkStructureType
125{
132 VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
134
135typedef enum VkResult
136{
155 VK_SUBOPTIMAL_KHR = 1000001003,
160 VK_RESULT_MAX_ENUM = 0x7FFFFFFF
162
164
165typedef struct VkExtensionProperties
166{
167 char extensionName[256];
170
171typedef void (APIENTRY * PFN_vkVoidFunction)(void);
172
173#if defined(_GLFW_VULKAN_STATIC)
176#else
179 #define vkEnumerateInstanceExtensionProperties _glfw.vk.EnumerateInstanceExtensionProperties
180 #define vkGetInstanceProcAddr _glfw.vk.GetInstanceProcAddr
181#endif
182
183#if defined(_GLFW_COCOA)
184 #include "cocoa_platform.h"
185#elif defined(_GLFW_WIN32)
186 #include "win32_platform.h"
187#elif defined(_GLFW_X11)
188 #include "x11_platform.h"
189#elif defined(_GLFW_WAYLAND)
190 #include "wl_platform.h"
191#elif defined(_GLFW_OSMESA)
192 #include "null_platform.h"
193#else
194 #error "No supported window creation API selected"
195#endif
196
197#include "egl_context.h"
198#include "osmesa_context.h"
199
200// Constructs a version number string from the public header macros
201#define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r
202#define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r)
203#define _GLFW_VERSION_NUMBER _GLFW_MAKE_VERSION(GLFW_VERSION_MAJOR, \
204 GLFW_VERSION_MINOR, \
205 GLFW_VERSION_REVISION)
206
207// Checks for whether the library has been initialized
208#define _GLFW_REQUIRE_INIT() \
209 if (!_glfw.initialized) \
210 { \
211 _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \
212 return; \
213 }
214#define _GLFW_REQUIRE_INIT_OR_RETURN(x) \
215 if (!_glfw.initialized) \
216 { \
217 _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \
218 return x; \
219 }
220
221// Swaps the provided pointers
222#define _GLFW_SWAP_POINTERS(x, y) \
223 { \
224 void* t; \
225 t = x; \
226 x = y; \
227 y = t; \
228 }
229
230// Per-thread error structure
231//
233{
235 int code;
237};
238
239// Initialization configuration
240//
241// Parameters relating to the initialization of the library
242//
244{
247 struct {
250 } ns;
251 struct {
254};
255
256// Window configuration
257//
258// Parameters relating to the creation of the window but not directly related
259// to the framebuffer. This is used to pass window creation parameters from
260// shared code to the platform API.
261//
263{
264 int width;
266 const char* title;
278 struct {
280 char frameName[256];
281 } ns;
282 struct {
283 char className[256];
284 char instanceName[256];
286 struct {
289};
290
291// Context configuration
292//
293// Parameters relating to the creation of the context but not directly related
294// to the framebuffer. This is used to pass context creation parameters from
295// shared code to the platform API.
296//
298{
301 int major;
302 int minor;
310 struct {
313};
314
315// Framebuffer configuration
316//
317// This describes buffers and their sizes. It also contains
318// a platform-specific ID used to map back to the backend API object.
319//
320// It is used to pass framebuffer parameters from shared code to the platform
321// API and also to enumerate and select available framebuffer configs.
322//
324{
342};
343
344// Context structure
345//
347{
355
359
366
367 // This is defined in the context API's context.h
369 // This is defined in egl_context.h
371 // This is defined in osmesa_context.h
373};
374
375// Window and context structure
376//
378{
380
381 // Window settings and state
394
398
405 // Virtual cursor position when cursor is disabled
408
410
411 struct {
430
431 // This is defined in the window API's platform.h
433};
434
435// Monitor structure
436//
438{
439 char name[128];
441
442 // Physical dimensions in millimeters.
444
445 // The window whose video mode is current on this monitor
447
451
454
455 // This is defined in the window API's platform.h
457};
458
459// Cursor structure
460//
462{
464
465 // This is defined in the window API's platform.h
467};
468
469// Gamepad mapping element structure
470//
472{
477};
478
479// Gamepad mapping structure
480//
482{
483 char name[128];
484 char guid[33];
487};
488
489// Joystick structure
490//
492{
494 float* axes;
496 unsigned char* buttons;
498 unsigned char* hats;
500 char name[128];
502 char guid[33];
504
505 // This is defined in the joystick API's joystick.h
507};
508
509// Thread local storage structure
510//
512{
513 // This is defined in the platform's thread.h
515};
516
517// Mutex structure
518//
520{
521 // This is defined in the platform's thread.h
523};
524
525// Library global data
526//
528{
530
531 struct {
538
542
545
550
554
555 struct {
557 // This is defined in the platform's time.h
560
561 struct {
563 void* handle;
564 char* extensions[2];
565#if !defined(_GLFW_VULKAN_STATIC)
568#endif
570#if defined(_GLFW_WIN32)
571 GLFWbool KHR_win32_surface;
572#elif defined(_GLFW_COCOA)
573 GLFWbool MVK_macos_surface;
574 GLFWbool EXT_metal_surface;
575#elif defined(_GLFW_X11)
576 GLFWbool KHR_xlib_surface;
577 GLFWbool KHR_xcb_surface;
578#elif defined(_GLFW_WAYLAND)
579 GLFWbool KHR_wayland_surface;
580#endif
581 } vk;
582
583 struct {
587
588 // This is defined in the window API's platform.h
590 // This is defined in the context API's context.h
592 // This is defined in the platform's joystick.h
594 // This is defined in egl_context.h
596 // This is defined in osmesa_context.h
598};
599
600// Global state shared between compilation units of GLFW
601//
602extern _GLFWlibrary _glfw;
603
604
608
609int _glfwPlatformInit(void);
610void _glfwPlatformTerminate(void);
611const char* _glfwPlatformGetVersionString(void);
612
613void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos);
614void _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos);
615void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode);
619 const GLFWimage* image, int xhot, int yhot);
620int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape);
622void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor);
623
624const char* _glfwPlatformGetScancodeName(int scancode);
625int _glfwPlatformGetKeyScancode(int key);
626
628void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos);
630 float* xscale, float* yscale);
631void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height);
635void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
636
637void _glfwPlatformSetClipboardString(const char* string);
638const char* _glfwPlatformGetClipboardString(void);
639
643void _glfwPlatformUpdateGamepadGUID(char* guid);
644
647
649 const _GLFWwndconfig* wndconfig,
650 const _GLFWctxconfig* ctxconfig,
651 const _GLFWfbconfig* fbconfig);
653void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title);
655 int count, const GLFWimage* images);
656void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos);
657void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos);
658void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height);
659void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height);
661 int minwidth, int minheight,
662 int maxwidth, int maxheight);
663void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom);
664void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height);
666 int* left, int* top,
667 int* right, int* bottom);
669 float* xscale, float* yscale);
678 int xpos, int ypos, int width, int height,
679 int refreshRate);
691void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity);
692
693void _glfwPlatformPollEvents(void);
694void _glfwPlatformWaitEvents(void);
695void _glfwPlatformWaitEventsTimeout(double timeout);
697
701
702void _glfwPlatformGetRequiredInstanceExtensions(char** extensions);
704 VkPhysicalDevice device,
705 uint32_t queuefamily);
707 _GLFWwindow* window,
708 const VkAllocationCallbacks* allocator,
709 VkSurfaceKHR* surface);
710
713void* _glfwPlatformGetTls(_GLFWtls* tls);
714void _glfwPlatformSetTls(_GLFWtls* tls, void* value);
715
720
721
725
726void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused);
727void _glfwInputWindowPos(_GLFWwindow* window, int xpos, int ypos);
728void _glfwInputWindowSize(_GLFWwindow* window, int width, int height);
729void _glfwInputFramebufferSize(_GLFWwindow* window, int width, int height);
731 float xscale, float yscale);
732void _glfwInputWindowIconify(_GLFWwindow* window, GLFWbool iconified);
733void _glfwInputWindowMaximize(_GLFWwindow* window, GLFWbool maximized);
736void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor);
737
738void _glfwInputKey(_GLFWwindow* window,
739 int key, int scancode, int action, int mods);
740void _glfwInputChar(_GLFWwindow* window,
741 unsigned int codepoint, int mods, GLFWbool plain);
742void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset);
743void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods);
744void _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos);
745void _glfwInputCursorEnter(_GLFWwindow* window, GLFWbool entered);
746void _glfwInputDrop(_GLFWwindow* window, int count, const char** names);
747void _glfwInputJoystick(_GLFWjoystick* js, int event);
748void _glfwInputJoystickAxis(_GLFWjoystick* js, int axis, float value);
749void _glfwInputJoystickButton(_GLFWjoystick* js, int button, char value);
750void _glfwInputJoystickHat(_GLFWjoystick* js, int hat, char value);
751
752void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement);
753void _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window);
754
755#if defined(__GNUC__)
756void _glfwInputError(int code, const char* format, ...)
757 __attribute__((format(printf, 2, 3)));
758#else
759void _glfwInputError(int code, const char* format, ...);
760#endif
761
762
766
767GLFWbool _glfwStringInExtensionString(const char* string, const char* extensions);
769 const _GLFWfbconfig* alternatives,
770 unsigned int count);
772 const _GLFWctxconfig* ctxconfig);
774
776 const GLFWvidmode* desired);
777int _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second);
778_GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM);
779void _glfwFreeMonitor(_GLFWmonitor* monitor);
780void _glfwAllocGammaArrays(GLFWgammaramp* ramp, unsigned int size);
782void _glfwSplitBPP(int bpp, int* red, int* green, int* blue);
783
784_GLFWjoystick* _glfwAllocJoystick(const char* name,
785 const char* guid,
786 int axisCount,
787 int buttonCount,
788 int hatCount);
791
792GLFWbool _glfwInitVulkan(int mode);
793void _glfwTerminateVulkan(void);
794const char* _glfwGetVulkanResultString(VkResult result);
795
796char* _glfw_strdup(const char* source);
797float _glfw_fminf(float a, float b);
798float _glfw_fmaxf(float a, float b);
799
unsigned int EGLenum
Definition: egl_context.h:109
void * EGLNativeDisplayType
Definition: egl_context.h:115
void * EGLNativeWindowType
Definition: egl_context.h:116
int EGLint
Definition: egl_context.h:107
khronos_uint8_t GLubyte
Definition: glad.h:2308
int GLint
Definition: glad.h:2314
unsigned int GLenum
Definition: glad.h:2298
unsigned int GLuint
Definition: glad.h:2316
#define APIENTRY
Compiler- and platform-specific preprocessor work.
Definition: glfw3.h:125
#define GLFW_MOUSE_BUTTON_LAST
Definition: glfw3.h:577
void(* GLFWglproc)(void)
GLFW API types.
Definition: glfw3.h:1281
void(* GLFWscrollfun)(GLFWwindow *, double, double)
The function pointer type for scroll callbacks.
Definition: glfw3.h:1636
void(* GLFWcursorposfun)(GLFWwindow *, double, double)
The function pointer type for cursor position callbacks.
Definition: glfw3.h:1594
void(* GLFWcharfun)(GLFWwindow *, unsigned int)
The function pointer type for Unicode character callbacks.
Definition: glfw3.h:1683
void(* GLFWdropfun)(GLFWwindow *, int, const char *[])
The function pointer type for path drop callbacks.
Definition: glfw3.h:1734
void(* GLFWcharmodsfun)(GLFWwindow *, unsigned int, int)
The function pointer type for Unicode character with modifiers callbacks.
Definition: glfw3.h:1710
void(* GLFWcursorenterfun)(GLFWwindow *, int)
The function pointer type for cursor enter/leave callbacks.
Definition: glfw3.h:1615
void(* GLFWkeyfun)(GLFWwindow *, int, int, int, int)
The function pointer type for keyboard key callbacks.
Definition: glfw3.h:1662
void(* GLFWmousebuttonfun)(GLFWwindow *, int, int, int)
The function pointer type for mouse button callbacks.
Definition: glfw3.h:1571
void(* GLFWjoystickfun)(int, int)
The function pointer type for joystick configuration callbacks.
Definition: glfw3.h:1776
#define GLFW_JOYSTICK_LAST
Definition: glfw3.h:606
#define GLFW_KEY_LAST
Definition: glfw3.h:515
void(* GLFWmonitorfun)(GLFWmonitor *, int)
The function pointer type for monitor configuration callbacks.
Definition: glfw3.h:1755
void(* GLFWframebuffersizefun)(GLFWwindow *, int, int)
The function pointer type for framebuffer size callbacks.
Definition: glfw3.h:1524
void(* GLFWwindowclosefun)(GLFWwindow *)
The function pointer type for window close callbacks.
Definition: glfw3.h:1420
void(* GLFWwindowfocusfun)(GLFWwindow *, int)
The function pointer type for window focus callbacks.
Definition: glfw3.h:1461
void(* GLFWwindowrefreshfun)(GLFWwindow *)
The function pointer type for window content refresh callbacks.
Definition: glfw3.h:1440
void(* GLFWwindowmaximizefun)(GLFWwindow *, int)
The function pointer type for window maximize callbacks.
Definition: glfw3.h:1503
void(* GLFWwindowiconifyfun)(GLFWwindow *, int)
The function pointer type for window iconify callbacks.
Definition: glfw3.h:1482
void(* GLFWwindowsizefun)(GLFWwindow *, int, int)
The function pointer type for window size callbacks.
Definition: glfw3.h:1400
void(* GLFWwindowcontentscalefun)(GLFWwindow *, float, float)
The function pointer type for window content scale callbacks.
Definition: glfw3.h:1545
void(* GLFWwindowposfun)(GLFWwindow *, int, int)
The function pointer type for window position callbacks.
Definition: glfw3.h:1378
void _glfwPlatformTerminateJoysticks(void)
unsigned char GLubyte
Definition: internal.h:109
void _glfwPlatformSetWindowMonitor(_GLFWwindow *window, _GLFWmonitor *monitor, int xpos, int ypos, int width, int height, int refreshRate)
void _glfwInputMonitorWindow(_GLFWmonitor *monitor, _GLFWwindow *window)
Definition: monitor.c:155
int _glfwPlatformPollJoystick(_GLFWjoystick *js, int mode)
void _glfwPlatformSetWindowPos(_GLFWwindow *window, int xpos, int ypos)
uint64_t VkSurfaceKHR
Definition: internal.h:120
void _glfwPlatformFreeMonitor(_GLFWmonitor *monitor)
void _glfwPlatformGetWindowContentScale(_GLFWwindow *window, float *xscale, float *yscale)
unsigned int GLbitfield
Definition: internal.h:108
float _glfw_fmaxf(float a, float b)
Definition: init.c:141
void _glfwPlatformSetWindowResizable(_GLFWwindow *window, GLFWbool enabled)
int _glfwPlatformWindowIconified(_GLFWwindow *window)
void _glfwInputFramebufferSize(_GLFWwindow *window, int width, int height)
Definition: window.c:108
void _glfwPlatformMaximizeWindow(_GLFWwindow *window)
EGLenum _glfwPlatformGetEGLPlatform(EGLint **attribs)
void _glfwPlatformIconifyWindow(_GLFWwindow *window)
void * VkInstance
Definition: internal.h:118
void _glfwPlatformLockMutex(_GLFWmutex *mutex)
Definition: posix_thread.c:94
void _glfwPlatformSetWindowSize(_GLFWwindow *window, int width, int height)
void _glfwInputMonitor(_GLFWmonitor *monitor, int action, int placement)
Definition: monitor.c:97
_GLFWjoystick * _glfwAllocJoystick(const char *name, const char *guid, int axisCount, int buttonCount, int hatCount)
Definition: input.c:429
void _glfwPlatformWaitEvents(void)
void _glfwInputWindowIconify(_GLFWwindow *window, GLFWbool iconified)
Definition: window.c:91
_GLFWlibrary _glfw
Definition: init.c:46
GLFWbool _glfwPlatformInitJoysticks(void)
void _glfwPlatformSetTls(_GLFWtls *tls, void *value)
Definition: posix_thread.c:68
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow *window, int minwidth, int minheight, int maxwidth, int maxheight)
void _glfwPlatformGetRequiredInstanceExtensions(char **extensions)
void _glfwInputWindowMaximize(_GLFWwindow *window, GLFWbool maximized)
Definition: window.c:99
void _glfwInputError(int code, const char *format,...)
Definition: init.c:160
VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, _GLFWwindow *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)
int _glfwPlatformFramebufferTransparent(_GLFWwindow *window)
void _glfwPlatformDestroyTls(_GLFWtls *tls)
Definition: posix_thread.c:55
void _glfwPlatformDestroyMutex(_GLFWmutex *mutex)
Definition: posix_thread.c:87
void(APIENTRY * PFNGLCLEARPROC)(GLbitfield)
Definition: internal.h:111
int _glfwPlatformCreateCursor(_GLFWcursor *cursor, const GLFWimage *image, int xhot, int yhot)
void _glfwPlatformPollEvents(void)
GLFWbool _glfwInitVulkan(int mode)
Definition: vulkan.c:44
void _glfwInputJoystick(_GLFWjoystick *js, int event)
Definition: input.c:386
const GLubyte *(APIENTRY * PFNGLGETSTRINGIPROC)(GLenum, GLuint)
Definition: internal.h:114
void _glfwSplitBPP(int bpp, int *red, int *green, int *blue)
Definition: monitor.c:276
void _glfwPlatformGetFramebufferSize(_GLFWwindow *window, int *width, int *height)
const GLFWvidmode * _glfwChooseVideoMode(_GLFWmonitor *monitor, const GLFWvidmode *desired)
Definition: monitor.c:217
void(APIENTRY * PFN_vkVoidFunction)(void)
Definition: internal.h:171
void _glfwInputWindowSize(_GLFWwindow *window, int width, int height)
Definition: window.c:83
int _glfwPlatformWindowVisible(_GLFWwindow *window)
void(* _GLFWswapbuffersfun)(_GLFWwindow *)
Definition: internal.h:80
void _glfwInputCursorEnter(_GLFWwindow *window, GLFWbool entered)
Definition: input.c:370
void _glfwPlatformSetCursor(_GLFWwindow *window, _GLFWcursor *cursor)
void(* _GLFWmakecontextcurrentfun)(_GLFWwindow *)
Definition: internal.h:79
void(* _GLFWswapintervalfun)(int)
Definition: internal.h:81
void _glfwPlatformGetWindowSize(_GLFWwindow *window, int *width, int *height)
void _glfwFreeMonitor(_GLFWmonitor *monitor)
Definition: monitor.c:180
const char * _glfwPlatformGetVersionString(void)
Definition: cocoa_init.m:612
int GLint
Definition: internal.h:105
void _glfwInputWindowMonitor(_GLFWwindow *window, _GLFWmonitor *monitor)
Definition: window.c:143
void _glfwPlatformGetWindowFrameSize(_GLFWwindow *window, int *left, int *top, int *right, int *bottom)
uint64_t _glfwPlatformGetTimerValue(void)
Definition: cocoa_time.c:53
GLFWvidmode * _glfwPlatformGetVideoModes(_GLFWmonitor *monitor, int *count)
void _glfwPlatformSetWindowIcon(_GLFWwindow *window, int count, const GLFWimage *images)
Definition: cocoa_window.m:993
EGLNativeWindowType _glfwPlatformGetEGLNativeWindow(_GLFWwindow *window)
const char * _glfwPlatformGetScancodeName(int scancode)
GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig *ctxconfig)
Definition: context.c:49
void _glfwPlatformSetWindowDecorated(_GLFWwindow *window, GLFWbool enabled)
void _glfwInputScroll(_GLFWwindow *window, double xoffset, double yoffset)
Definition: input.c:328
void _glfwPlatformGetWindowPos(_GLFWwindow *window, int *xpos, int *ypos)
GLFWbool _glfwPlatformCreateMutex(_GLFWmutex *mutex)
Definition: posix_thread.c:74
void _glfwPlatformSetWindowOpacity(_GLFWwindow *window, float opacity)
GLFWbool _glfwStringInExtensionString(const char *string, const char *extensions)
Definition: context.c:578
void _glfwPlatformSetCursorPos(_GLFWwindow *window, double xpos, double ypos)
float _glfwPlatformGetWindowOpacity(_GLFWwindow *window)
void _glfwPlatformDestroyCursor(_GLFWcursor *cursor)
void _glfwPlatformTerminate(void)
Definition: cocoa_init.m:566
void * _glfwPlatformGetTls(_GLFWtls *tls)
Definition: posix_thread.c:62
void _glfwPlatformRestoreWindow(_GLFWwindow *window)
void _glfwTerminateVulkan(void)
Definition: vulkan.c:157
unsigned int GLenum
Definition: internal.h:107
GLFWbool _glfwPlatformRawMouseMotionSupported(void)
void _glfwPlatformSetCursorMode(_GLFWwindow *window, int mode)
void _glfwInputChar(_GLFWwindow *window, unsigned int codepoint, int mods, GLFWbool plain)
Definition: input.c:308
int _glfwPlatformWindowHovered(_GLFWwindow *window)
void _glfwPlatformDestroyWindow(_GLFWwindow *window)
Definition: cocoa_window.m:951
void _glfwPlatformWaitEventsTimeout(double timeout)
void _glfwPlatformUnlockMutex(_GLFWmutex *mutex)
Definition: posix_thread.c:100
void _glfwPlatformHideWindow(_GLFWwindow *window)
int(* _GLFWextensionsupportedfun)(const char *)
Definition: internal.h:82
void _glfwInputWindowPos(_GLFWwindow *window, int xpos, int ypos)
Definition: window.c:74
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)
void _glfwInputCursorPos(_GLFWwindow *window, double xpos, double ypos)
Definition: input.c:356
int _glfwPlatformWindowMaximized(_GLFWwindow *window)
void _glfwInputDrop(_GLFWwindow *window, int count, const char **names)
Definition: input.c:378
void _glfwFreeGammaArrays(GLFWgammaramp *ramp)
Definition: monitor.c:206
unsigned int GLuint
Definition: internal.h:106
void * VkPhysicalDevice
Definition: internal.h:119
int _glfwCompareVideoModes(const GLFWvidmode *first, const GLFWvidmode *second)
Definition: monitor.c:269
int _glfwPlatformInit(void)
Definition: cocoa_init.m:492
const GLubyte *(APIENTRY * PFNGLGETSTRINGPROC)(GLenum)
Definition: internal.h:112
void(APIENTRY * PFNGLGETINTEGERVPROC)(GLenum, GLint *)
Definition: internal.h:113
void _glfwPlatformSetClipboardString(const char *string)
const char * _glfwGetVulkanResultString(VkResult result)
Definition: vulkan.c:165
VkResult(APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *)
Definition: internal.h:178
uint64_t _glfwPlatformGetTimerFrequency(void)
Definition: cocoa_time.c:58
void _glfwInputWindowContentScale(_GLFWwindow *window, float xscale, float yscale)
Definition: window.c:117
_GLFWmonitor * _glfwAllocMonitor(const char *name, int widthMM, int heightMM)
Definition: monitor.c:167
void _glfwPlatformGetVideoMode(_GLFWmonitor *monitor, GLFWvidmode *mode)
void _glfwInputJoystickAxis(_GLFWjoystick *js, int axis, float value)
Definition: input.c:396
void _glfwPlatformUpdateGamepadGUID(char *guid)
void _glfwInputKey(_GLFWwindow *window, int key, int scancode, int action, int mods)
Definition: input.c:277
uint32_t VkFlags
Definition: internal.h:121
void _glfwPlatformShowWindow(_GLFWwindow *window)
void _glfwPlatformSetGammaRamp(_GLFWmonitor *monitor, const GLFWgammaramp *ramp)
VkResult
Definition: internal.h:136
@ VK_ERROR_VALIDATION_FAILED_EXT
Definition: internal.h:159
@ VK_SUBOPTIMAL_KHR
Definition: internal.h:155
@ VK_ERROR_EXTENSION_NOT_PRESENT
Definition: internal.h:149
@ VK_INCOMPLETE
Definition: internal.h:142
@ VK_ERROR_DEVICE_LOST
Definition: internal.h:146
@ VK_SUCCESS
Definition: internal.h:137
@ VK_EVENT_SET
Definition: internal.h:140
@ VK_EVENT_RESET
Definition: internal.h:141
@ VK_ERROR_OUT_OF_HOST_MEMORY
Definition: internal.h:143
@ VK_ERROR_INITIALIZATION_FAILED
Definition: internal.h:145
@ VK_ERROR_INCOMPATIBLE_DISPLAY_KHR
Definition: internal.h:157
@ VK_ERROR_OUT_OF_DEVICE_MEMORY
Definition: internal.h:144
@ VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
Definition: internal.h:158
@ VK_ERROR_OUT_OF_DATE_KHR
Definition: internal.h:156
@ VK_TIMEOUT
Definition: internal.h:139
@ VK_ERROR_FORMAT_NOT_SUPPORTED
Definition: internal.h:153
@ VK_ERROR_SURFACE_LOST_KHR
Definition: internal.h:154
@ VK_NOT_READY
Definition: internal.h:138
@ VK_ERROR_FEATURE_NOT_PRESENT
Definition: internal.h:150
@ VK_ERROR_TOO_MANY_OBJECTS
Definition: internal.h:152
@ VK_RESULT_MAX_ENUM
Definition: internal.h:160
@ VK_ERROR_MEMORY_MAP_FAILED
Definition: internal.h:147
@ VK_ERROR_LAYER_NOT_PRESENT
Definition: internal.h:148
@ VK_ERROR_INCOMPATIBLE_DRIVER
Definition: internal.h:151
void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled)
int _glfwPlatformWindowFocused(_GLFWwindow *window)
void _glfwPlatformGetMonitorPos(_GLFWmonitor *monitor, int *xpos, int *ypos)
void _glfwPlatformPostEmptyEvent(void)
GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor *monitor, GLFWgammaramp *ramp)
int GLFWbool
Definition: internal.h:61
void _glfwInputJoystickHat(_GLFWjoystick *js, int hat, char value)
Definition: input.c:410
void _glfwPlatformGetMonitorContentScale(_GLFWmonitor *monitor, float *xscale, float *yscale)
void _glfwAllocGammaArrays(GLFWgammaramp *ramp, unsigned int size)
Definition: monitor.c:196
int _glfwPlatformGetKeyScancode(int key)
int _glfwPlatformCreateStandardCursor(_GLFWcursor *cursor, int shape)
void _glfwCenterCursorInContentArea(_GLFWwindow *window)
Definition: input.c:475
GLFWbool _glfwRefreshContextAttribs(_GLFWwindow *window, const _GLFWctxconfig *ctxconfig)
Definition: context.c:340
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor *monitor, int *xpos, int *ypos, int *width, int *height)
int _glfwPlatformCreateWindow(_GLFWwindow *window, const _GLFWwndconfig *wndconfig, const _GLFWctxconfig *ctxconfig, const _GLFWfbconfig *fbconfig)
Definition: cocoa_window.m:899
void _glfwInputWindowDamage(_GLFWwindow *window)
Definition: window.c:125
void(* _GLFWdestroycontextfun)(_GLFWwindow *)
Definition: internal.h:84
const _GLFWfbconfig * _glfwChooseFBConfig(const _GLFWfbconfig *desired, const _GLFWfbconfig *alternatives, unsigned int count)
Definition: context.c:178
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow *window, int numer, int denom)
const char * _glfwPlatformGetClipboardString(void)
void _glfwInputMouseClick(_GLFWwindow *window, int button, int action, int mods)
Definition: input.c:336
void _glfwInputWindowCloseRequest(_GLFWwindow *window)
Definition: window.c:133
void _glfwPlatformGetCursorPos(_GLFWwindow *window, double *xpos, double *ypos)
uint32_t VkBool32
Definition: internal.h:122
#define vkGetInstanceProcAddr
Definition: internal.h:180
void _glfwPlatformRequestWindowAttention(_GLFWwindow *window)
EGLNativeDisplayType _glfwPlatformGetEGLNativeDisplay(void)
void _glfwPlatformSetWindowTitle(_GLFWwindow *window, const char *title)
Definition: cocoa_window.m:982
void _glfwFreeJoystick(_GLFWjoystick *js)
Definition: input.c:465
void _glfwPlatformFocusWindow(_GLFWwindow *window)
void _glfwInputJoystickButton(_GLFWjoystick *js, int button, char value)
Definition: input.c:403
float _glfw_fminf(float a, float b)
Definition: init.c:129
#define _GLFW_MESSAGE_SIZE
Definition: internal.h:59
char * _glfw_strdup(const char *source)
Definition: init.c:121
GLFWbool _glfwPlatformCreateTls(_GLFWtls *tls)
Definition: posix_thread.c:40
void _glfwInputWindowFocus(_GLFWwindow *window, GLFWbool focused)
Definition: window.c:45
PFN_vkVoidFunction(APIENTRY * PFN_vkGetInstanceProcAddr)(VkInstance, const char *)
Definition: internal.h:177
void _glfwPlatformSetWindowMousePassthrough(_GLFWwindow *window, GLFWbool enabled)
void _glfwPlatformSetWindowFloating(_GLFWwindow *window, GLFWbool enabled)
VkStructureType
Definition: internal.h:125
@ VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK
Definition: internal.h:130
@ VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR
Definition: internal.h:129
@ VK_STRUCTURE_TYPE_MAX_ENUM
Definition: internal.h:132
@ VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT
Definition: internal.h:131
@ VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR
Definition: internal.h:128
@ VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR
Definition: internal.h:126
@ VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR
Definition: internal.h:127
#define vkEnumerateInstanceExtensionProperties
Definition: internal.h:179
GLFWglproc(* _GLFWgetprocaddressfun)(const char *)
Definition: internal.h:83
_W64 unsigned int uintptr_t
Definition: stdint.h:119
unsigned int uint32_t
Definition: stdint.h:80
unsigned char uint8_t
Definition: stdint.h:78
unsigned __int64 uint64_t
Definition: stdint.h:90
signed char int8_t
Definition: stdint.h:75
PFNGLGETSTRINGPROC GetString
Definition: internal.h:358
GLFWbool forward
Definition: internal.h:351
_GLFWswapintervalfun swapInterval
Definition: internal.h:362
int revision
Definition: internal.h:350
GLFWbool debug
Definition: internal.h:351
_GLFWswapbuffersfun swapBuffers
Definition: internal.h:361
GLFWbool noerror
Definition: internal.h:351
PFNGLGETSTRINGIPROC GetStringi
Definition: internal.h:356
int robustness
Definition: internal.h:353
_GLFWdestroycontextfun destroy
Definition: internal.h:365
PFNGLGETINTEGERVPROC GetIntegerv
Definition: internal.h:357
_GLFWcontextOSMesa osmesa
Definition: internal.h:372
_GLFW_PLATFORM_CONTEXT_STATE
Definition: internal.h:368
_GLFWcontextEGL egl
Definition: internal.h:370
_GLFWmakecontextcurrentfun makeCurrent
Definition: internal.h:360
_GLFWextensionsupportedfun extensionSupported
Definition: internal.h:363
_GLFWgetprocaddressfun getProcAddress
Definition: internal.h:364
GLFWbool offline
Definition: internal.h:311
GLFWbool debug
Definition: internal.h:304
GLFWbool noerror
Definition: internal.h:305
struct _GLFWctxconfig::@21 nsgl
_GLFWwindow * share
Definition: internal.h:309
GLFWbool forward
Definition: internal.h:303
_GLFW_PLATFORM_CURSOR_STATE
Definition: internal.h:466
_GLFWcursor * next
Definition: internal.h:463
char description[_GLFW_MESSAGE_SIZE]
Definition: internal.h:236
_GLFWerror * next
Definition: internal.h:234
int code
Definition: internal.h:235
int accumBlueBits
Definition: internal.h:333
int auxBuffers
Definition: internal.h:335
int stencilBits
Definition: internal.h:330
GLFWbool stereo
Definition: internal.h:336
int accumGreenBits
Definition: internal.h:332
GLFWbool transparent
Definition: internal.h:340
uintptr_t handle
Definition: internal.h:341
int accumAlphaBits
Definition: internal.h:334
int accumRedBits
Definition: internal.h:331
GLFWbool sRGB
Definition: internal.h:338
GLFWbool doublebuffer
Definition: internal.h:339
struct _GLFWinitconfig::@16 ns
GLFWbool xcbVulkanSurface
Definition: internal.h:252
GLFWbool chdir
Definition: internal.h:249
struct _GLFWinitconfig::@17 x11
GLFWbool hatButtons
Definition: internal.h:245
GLFWbool menubar
Definition: internal.h:248
char guid[33]
Definition: internal.h:502
_GLFW_PLATFORM_JOYSTICK_STATE
Definition: internal.h:506
_GLFWmapping * mapping
Definition: internal.h:503
int buttonCount
Definition: internal.h:497
char name[128]
Definition: internal.h:500
void * userPointer
Definition: internal.h:501
unsigned char * hats
Definition: internal.h:498
GLFWbool present
Definition: internal.h:493
float * axes
Definition: internal.h:494
unsigned char * buttons
Definition: internal.h:496
_GLFW_PLATFORM_LIBRARY_CONTEXT_STATE
Definition: internal.h:591
struct _GLFWlibrary::@26 callbacks
_GLFWmapping * mappings
Definition: internal.h:548
uint64_t offset
Definition: internal.h:556
_GLFWmutex errorLock
Definition: internal.h:553
_GLFWlibraryEGL egl
Definition: internal.h:595
struct _GLFWlibrary::@25 vk
PFN_vkGetInstanceProcAddr GetInstanceProcAddr
Definition: internal.h:567
_GLFWtls errorSlot
Definition: internal.h:551
_GLFWerror * errorListHead
Definition: internal.h:539
_GLFWfbconfig framebuffer
Definition: internal.h:533
GLFWbool KHR_surface
Definition: internal.h:569
void * handle
Definition: internal.h:563
struct _GLFWlibrary::@24 timer
GLFWjoystickfun joystick
Definition: internal.h:585
_GLFWwndconfig window
Definition: internal.h:534
_GLFWctxconfig context
Definition: internal.h:535
_GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE
Definition: internal.h:593
_GLFWwindow * windowListHead
Definition: internal.h:541
GLFWbool available
Definition: internal.h:562
_GLFWjoystick joysticks[GLFW_JOYSTICK_LAST+1]
Definition: internal.h:547
_GLFWinitconfig init
Definition: internal.h:532
char * extensions[2]
Definition: internal.h:564
_GLFWcursor * cursorListHead
Definition: internal.h:540
int mappingCount
Definition: internal.h:549
GLFWbool joysticksInitialized
Definition: internal.h:546
_GLFWtls contextSlot
Definition: internal.h:552
int refreshRate
Definition: internal.h:536
struct _GLFWlibrary::@23 hints
_GLFWmonitor ** monitors
Definition: internal.h:543
GLFWmonitorfun monitor
Definition: internal.h:584
_GLFW_PLATFORM_LIBRARY_WINDOW_STATE
Definition: internal.h:589
_GLFWlibraryOSMesa osmesa
Definition: internal.h:597
int monitorCount
Definition: internal.h:544
_GLFW_PLATFORM_LIBRARY_TIMER_STATE
Definition: internal.h:558
GLFWbool initialized
Definition: internal.h:529
PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties
Definition: internal.h:566
uint8_t type
Definition: internal.h:473
int8_t axisScale
Definition: internal.h:475
int8_t axisOffset
Definition: internal.h:476
uint8_t index
Definition: internal.h:474
_GLFWmapelement buttons[15]
Definition: internal.h:485
_GLFWmapelement axes[6]
Definition: internal.h:486
char name[128]
Definition: internal.h:483
char guid[33]
Definition: internal.h:484
GLFWvidmode * modes
Definition: internal.h:448
int modeCount
Definition: internal.h:449
GLFWgammaramp originalRamp
Definition: internal.h:452
GLFWgammaramp currentRamp
Definition: internal.h:453
void * userPointer
Definition: internal.h:440
_GLFWwindow * window
Definition: internal.h:446
GLFWvidmode currentMode
Definition: internal.h:450
char name[128]
Definition: internal.h:439
int heightMM
Definition: internal.h:443
_GLFW_PLATFORM_MONITOR_STATE
Definition: internal.h:456
_GLFW_PLATFORM_MUTEX_STATE
Definition: internal.h:522
_GLFW_PLATFORM_TLS_STATE
Definition: internal.h:514
int minwidth
Definition: internal.h:395
GLFWbool doublebuffer
Definition: internal.h:390
int minheight
Definition: internal.h:395
GLFWvidmode videoMode
Definition: internal.h:391
_GLFW_PLATFORM_WINDOW_STATE
Definition: internal.h:432
GLFWcursorposfun cursorPos
Definition: internal.h:422
GLFWwindowmaximizefun maximize
Definition: internal.h:418
struct _GLFWwindow::@22 callbacks
int cursorMode
Definition: internal.h:402
char mouseButtons[GLFW_MOUSE_BUTTON_LAST+1]
Definition: internal.h:403
GLFWframebuffersizefun fbsize
Definition: internal.h:419
double virtualCursorPosY
Definition: internal.h:406
_GLFWmonitor * monitor
Definition: internal.h:392
GLFWbool mousePassthrough
Definition: internal.h:387
GLFWbool resizable
Definition: internal.h:382
double virtualCursorPosX
Definition: internal.h:406
struct _GLFWwindow * next
Definition: internal.h:379
GLFWcharmodsfun charmods
Definition: internal.h:427
int maxheight
Definition: internal.h:396
GLFWbool stickyMouseButtons
Definition: internal.h:400
GLFWcharfun character
Definition: internal.h:426
GLFWbool decorated
Definition: internal.h:383
GLFWbool focusOnShow
Definition: internal.h:386
int maxwidth
Definition: internal.h:396
GLFWdropfun drop
Definition: internal.h:428
GLFWbool lockKeyMods
Definition: internal.h:401
GLFWwindowrefreshfun refresh
Definition: internal.h:415
GLFWwindowiconifyfun iconify
Definition: internal.h:417
GLFWscrollfun scroll
Definition: internal.h:424
GLFWwindowposfun pos
Definition: internal.h:412
GLFWbool shouldClose
Definition: internal.h:388
GLFWwindowsizefun size
Definition: internal.h:413
GLFWbool rawMouseMotion
Definition: internal.h:407
GLFWbool autoIconify
Definition: internal.h:384
GLFWbool stickyKeys
Definition: internal.h:399
void * userPointer
Definition: internal.h:389
GLFWkeyfun key
Definition: internal.h:425
GLFWbool floating
Definition: internal.h:385
GLFWwindowclosefun close
Definition: internal.h:414
GLFWwindowcontentscalefun scale
Definition: internal.h:420
char keys[GLFW_KEY_LAST+1]
Definition: internal.h:404
GLFWwindowfocusfun focus
Definition: internal.h:416
GLFWmousebuttonfun mouseButton
Definition: internal.h:421
_GLFWcursor * cursor
Definition: internal.h:393
GLFWcursorenterfun cursorEnter
Definition: internal.h:423
_GLFWcontext context
Definition: internal.h:409
GLFWbool decorated
Definition: internal.h:269
GLFWbool centerCursor
Definition: internal.h:274
GLFWbool scaleToMonitor
Definition: internal.h:277
GLFWbool keymenu
Definition: internal.h:287
const char * title
Definition: internal.h:266
char className[256]
Definition: internal.h:283
struct _GLFWwndconfig::@20 win32
GLFWbool visible
Definition: internal.h:268
char frameName[256]
Definition: internal.h:280
GLFWbool focusOnShow
Definition: internal.h:275
struct _GLFWwndconfig::@18 ns
GLFWbool resizable
Definition: internal.h:267
char instanceName[256]
Definition: internal.h:284
GLFWbool retina
Definition: internal.h:279
GLFWbool mousePassthrough
Definition: internal.h:276
GLFWbool floating
Definition: internal.h:272
GLFWbool focused
Definition: internal.h:270
GLFWbool autoIconify
Definition: internal.h:271
struct _GLFWwndconfig::@19 x11
GLFWbool maximized
Definition: internal.h:273
Gamma ramp.
Definition: glfw3.h:1826
Image data.
Definition: glfw3.h:1855
Video mode type.
Definition: glfw3.h:1792
uint32_t specVersion
Definition: vulkan.h:1382
char extensionName[VK_MAX_EXTENSION_NAME_SIZE]
Definition: vulkan.h:1381
VkResult
Definition: vulkan.h:842
VkStructureType
Definition: vulkan.h:897