internal.h
Go to the documentation of this file.
1 //========================================================================
2 // GLFW 3.3 - www.glfw.org
3 //------------------------------------------------------------------------
4 // Copyright (c) 2002-2006 Marcus Geelnard
5 // Copyright (c) 2006-2016 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 // MODIFIED_ERIN
31 //#if defined(_GLFW_USE_CONFIG_H)
32  #include "glfw_config.h"
33 //#endif
34 
35 #if defined(GLFW_INCLUDE_GLCOREARB) || \
36  defined(GLFW_INCLUDE_ES1) || \
37  defined(GLFW_INCLUDE_ES2) || \
38  defined(GLFW_INCLUDE_ES3) || \
39  defined(GLFW_INCLUDE_ES31) || \
40  defined(GLFW_INCLUDE_ES32) || \
41  defined(GLFW_INCLUDE_NONE) || \
42  defined(GLFW_INCLUDE_GLEXT) || \
43  defined(GLFW_INCLUDE_GLU) || \
44  defined(GLFW_INCLUDE_VULKAN) || \
45  defined(GLFW_DLL)
46  #error "You must not define any header option macros when compiling GLFW"
47 #endif
48 
49 #define GLFW_INCLUDE_NONE
50 #include "../include/GLFW/glfw3.h"
51 
52 #define _GLFW_INSERT_FIRST 0
53 #define _GLFW_INSERT_LAST 1
54 
55 #define _GLFW_POLL_PRESENCE 0
56 #define _GLFW_POLL_AXES 1
57 #define _GLFW_POLL_BUTTONS 2
58 #define _GLFW_POLL_ALL (_GLFW_POLL_AXES | _GLFW_POLL_BUTTONS)
59 
60 #define _GLFW_MESSAGE_SIZE 1024
61 
62 typedef int GLFWbool;
63 
64 typedef struct _GLFWerror _GLFWerror;
69 typedef struct _GLFWcontext _GLFWcontext;
70 typedef struct _GLFWwindow _GLFWwindow;
71 typedef struct _GLFWlibrary _GLFWlibrary;
72 typedef struct _GLFWmonitor _GLFWmonitor;
73 typedef struct _GLFWcursor _GLFWcursor;
75 typedef struct _GLFWmapping _GLFWmapping;
77 typedef struct _GLFWtls _GLFWtls;
78 typedef struct _GLFWmutex _GLFWmutex;
79 
82 typedef void (* _GLFWswapintervalfun)(int);
83 typedef int (* _GLFWextensionsupportedfun)(const char*);
84 typedef GLFWglproc (* _GLFWgetprocaddressfun)(const char*);
86 
87 #define GL_VERSION 0x1f02
88 #define GL_NONE 0
89 #define GL_COLOR_BUFFER_BIT 0x00004000
90 #define GL_UNSIGNED_BYTE 0x1401
91 #define GL_EXTENSIONS 0x1f03
92 #define GL_NUM_EXTENSIONS 0x821d
93 #define GL_CONTEXT_FLAGS 0x821e
94 #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
95 #define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
96 #define GL_CONTEXT_PROFILE_MASK 0x9126
97 #define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
98 #define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
99 #define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
100 #define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
101 #define GL_NO_RESET_NOTIFICATION_ARB 0x8261
102 #define GL_CONTEXT_RELEASE_BEHAVIOR 0x82fb
103 #define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82fc
104 #define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
105 
106 typedef int GLint;
107 typedef unsigned int GLuint;
108 typedef unsigned int GLenum;
109 typedef unsigned int GLbitfield;
110 typedef unsigned char GLubyte;
111 
116 
117 #define VK_NULL_HANDLE 0
118 
119 typedef void* VkInstance;
120 typedef void* VkPhysicalDevice;
121 typedef uint64_t VkSurfaceKHR;
122 typedef uint32_t VkFlags;
123 typedef uint32_t VkBool32;
124 
125 typedef enum VkStructureType
126 {
134 
135 typedef enum VkResult
136 {
155  VK_SUBOPTIMAL_KHR = 1000001003,
160  VK_RESULT_MAX_ENUM = 0x7FFFFFFF
161 } VkResult;
162 
164 
165 typedef struct VkExtensionProperties
166 {
167  char extensionName[256];
168  uint32_t specVersion;
170 
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 // Constructs a version number string from the public header macros
198 #define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r
199 #define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r)
200 #define _GLFW_VERSION_NUMBER _GLFW_MAKE_VERSION(GLFW_VERSION_MAJOR, \
201  GLFW_VERSION_MINOR, \
202  GLFW_VERSION_REVISION)
203 
204 // Checks for whether the library has been initialized
205 #define _GLFW_REQUIRE_INIT() \
206  if (!_glfw.initialized) \
207  { \
208  _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \
209  return; \
210  }
211 #define _GLFW_REQUIRE_INIT_OR_RETURN(x) \
212  if (!_glfw.initialized) \
213  { \
214  _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \
215  return x; \
216  }
217 
218 // Swaps the provided pointers
219 #define _GLFW_SWAP_POINTERS(x, y) \
220  { \
221  void* t; \
222  t = x; \
223  x = y; \
224  y = t; \
225  }
226 
227 // Per-thread error structure
228 //
230 {
232  int code;
233  char description[_GLFW_MESSAGE_SIZE];
234 };
235 
236 // Initialization configuration
237 //
238 // Parameters relating to the initialization of the library
239 //
241 {
243  struct {
246  } ns;
247 };
248 
249 // Window configuration
250 //
251 // Parameters relating to the creation of the window but not directly related
252 // to the framebuffer. This is used to pass window creation parameters from
253 // shared code to the platform API.
254 //
256 {
257  int width;
258  int height;
259  const char* title;
270  struct {
272  char frameName[256];
273  } ns;
274  struct {
275  char className[256];
276  char instanceName[256];
277  } x11;
278 };
279 
280 // Context configuration
281 //
282 // Parameters relating to the creation of the context but not directly related
283 // to the framebuffer. This is used to pass context creation parameters from
284 // shared code to the platform API.
285 //
287 {
288  int client;
289  int source;
290  int major;
291  int minor;
295  int profile;
297  int release;
299  struct {
301  } nsgl;
302 };
303 
304 // Framebuffer configuration
305 //
306 // This describes buffers and their sizes. It also contains
307 // a platform-specific ID used to map back to the backend API object.
308 //
309 // It is used to pass framebuffer parameters from shared code to the platform
310 // API and also to enumerate and select available framebuffer configs.
311 //
313 {
314  int redBits;
316  int blueBits;
326  int samples;
330  uintptr_t handle;
331 };
332 
333 // Context structure
334 //
336 {
337  int client;
338  int source;
339  int major, minor, revision;
340  GLFWbool forward, debug, noerror;
341  int profile;
343  int release;
344 
348 
355 
356  // This is defined in the context API's context.h
358  // This is defined in egl_context.h
360  // This is defined in osmesa_context.h
362 };
363 
364 // Window and context structure
365 //
367 {
368  struct _GLFWwindow* next;
369 
370  // Window settings and state
377  void* userPointer;
381 
384  int numer, denom;
385 
391  char keys[GLFW_KEY_LAST + 1];
392  // Virtual cursor position when cursor is disabled
394 
396 
397  struct {
415  } callbacks;
416 
417  // This is defined in the window API's platform.h
419 };
420 
421 // Monitor structure
422 //
424 {
425  char* name;
426  void* userPointer;
427 
428  // Physical dimensions in millimeters.
429  int widthMM, heightMM;
430 
431  // The window whose video mode is current on this monitor
433 
437 
440 
441  // This is defined in the window API's platform.h
443 };
444 
445 // Cursor structure
446 //
448 {
450 
451  // This is defined in the window API's platform.h
453 };
454 
455 // Gamepad mapping element structure
456 //
458 {
459  uint8_t type;
460  uint8_t index;
461  int8_t axisScale;
462  int8_t axisOffset;
463 };
464 
465 // Gamepad mapping structure
466 //
468 {
469  char name[128];
470  char guid[33];
471  _GLFWmapelement buttons[15];
473 };
474 
475 // Joystick structure
476 //
478 {
480  float* axes;
482  unsigned char* buttons;
484  unsigned char* hats;
485  int hatCount;
486  char* name;
487  void* userPointer;
488  char guid[33];
490 
491  // This is defined in the joystick API's joystick.h
493 };
494 
495 // Thread local storage structure
496 //
497 struct _GLFWtls
498 {
499  // This is defined in the platform's thread.h
501 };
502 
503 // Mutex structure
504 //
506 {
507  // This is defined in the platform's thread.h
509 };
510 
511 // Library global data
512 //
514 {
516 
517  struct {
523  } hints;
524 
528 
531 
535 
539 
540  struct {
541  uint64_t offset;
542  // This is defined in the platform's time.h
544  } timer;
545 
546  struct {
548  void* handle;
549  char* extensions[2];
550 #if !defined(_GLFW_VULKAN_STATIC)
553 #endif
555 #if defined(_GLFW_WIN32)
556  GLFWbool KHR_win32_surface;
557 #elif defined(_GLFW_COCOA)
558  GLFWbool MVK_macos_surface;
559 #elif defined(_GLFW_X11)
562 #elif defined(_GLFW_WAYLAND)
563  GLFWbool KHR_wayland_surface;
564 #endif
565  } vk;
566 
567  struct {
570  } callbacks;
571 
572  // This is defined in the window API's platform.h
574  // This is defined in the context API's context.h
576  // This is defined in the platform's joystick.h
578  // This is defined in egl_context.h
580  // This is defined in osmesa_context.h
582 };
583 
584 // Global state shared between compilation units of GLFW
585 //
586 extern _GLFWlibrary _glfw;
587 
588 
592 
593 int _glfwPlatformInit(void);
594 void _glfwPlatformTerminate(void);
595 const char* _glfwPlatformGetVersionString(void);
596 
597 void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos);
598 void _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos);
599 void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode);
601  const GLFWimage* image, int xhot, int yhot);
602 int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape);
604 void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor);
605 
606 const char* _glfwPlatformGetScancodeName(int scancode);
607 int _glfwPlatformGetKeyScancode(int key);
608 
610 void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos);
612  float* xscale, float* yscale);
616 void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
617 
618 void _glfwPlatformSetClipboardString(const char* string);
619 const char* _glfwPlatformGetClipboardString(void);
620 
621 int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode);
622 void _glfwPlatformUpdateGamepadGUID(char* guid);
623 
624 uint64_t _glfwPlatformGetTimerValue(void);
625 uint64_t _glfwPlatformGetTimerFrequency(void);
626 
628  const _GLFWwndconfig* wndconfig,
629  const _GLFWctxconfig* ctxconfig,
630  const _GLFWfbconfig* fbconfig);
632 void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title);
634  int count, const GLFWimage* images);
635 void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos);
636 void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos);
637 void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height);
638 void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height);
640  int minwidth, int minheight,
641  int maxwidth, int maxheight);
642 void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom);
643 void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height);
645  int* left, int* top,
646  int* right, int* bottom);
648  float* xscale, float* yscale);
657  int xpos, int ypos, int width, int height,
658  int refreshRate);
669 void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity);
670 
671 void _glfwPlatformPollEvents(void);
672 void _glfwPlatformWaitEvents(void);
673 void _glfwPlatformWaitEventsTimeout(double timeout);
674 void _glfwPlatformPostEmptyEvent(void);
675 
678  VkPhysicalDevice device,
679  uint32_t queuefamily);
681  _GLFWwindow* window,
682  const VkAllocationCallbacks* allocator,
683  VkSurfaceKHR* surface);
684 
687 void* _glfwPlatformGetTls(_GLFWtls* tls);
688 void _glfwPlatformSetTls(_GLFWtls* tls, void* value);
689 
694 
695 
699 
700 void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused);
701 void _glfwInputWindowPos(_GLFWwindow* window, int xpos, int ypos);
702 void _glfwInputWindowSize(_GLFWwindow* window, int width, int height);
703 void _glfwInputFramebufferSize(_GLFWwindow* window, int width, int height);
705  float xscale, float yscale);
706 void _glfwInputWindowIconify(_GLFWwindow* window, GLFWbool iconified);
707 void _glfwInputWindowMaximize(_GLFWwindow* window, GLFWbool maximized);
708 void _glfwInputWindowDamage(_GLFWwindow* window);
710 void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor);
711 
712 void _glfwInputKey(_GLFWwindow* window,
713  int key, int scancode, int action, int mods);
714 void _glfwInputChar(_GLFWwindow* window,
715  unsigned int codepoint, int mods, GLFWbool plain);
716 void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset);
717 void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods);
718 void _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos);
719 void _glfwInputCursorEnter(_GLFWwindow* window, GLFWbool entered);
720 void _glfwInputDrop(_GLFWwindow* window, int count, const char** names);
721 void _glfwInputJoystick(_GLFWjoystick* js, int event);
722 void _glfwInputJoystickAxis(_GLFWjoystick* js, int axis, float value);
723 void _glfwInputJoystickButton(_GLFWjoystick* js, int button, char value);
724 void _glfwInputJoystickHat(_GLFWjoystick* js, int hat, char value);
725 
726 void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement);
727 void _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window);
728 
729 #if defined(__GNUC__)
730 void _glfwInputError(int code, const char* format, ...)
731  __attribute__((format(printf, 2, 3)));
732 #else
733 void _glfwInputError(int code, const char* format, ...);
734 #endif
735 
736 
740 
741 GLFWbool _glfwStringInExtensionString(const char* string, const char* extensions);
742 const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
743  const _GLFWfbconfig* alternatives,
744  unsigned int count);
746  const _GLFWctxconfig* ctxconfig);
748 
750  const GLFWvidmode* desired);
751 int _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second);
752 _GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM);
753 void _glfwFreeMonitor(_GLFWmonitor* monitor);
754 void _glfwAllocGammaArrays(GLFWgammaramp* ramp, unsigned int size);
756 void _glfwSplitBPP(int bpp, int* red, int* green, int* blue);
757 
758 _GLFWjoystick* _glfwAllocJoystick(const char* name,
759  const char* guid,
760  int axisCount,
761  int buttonCount,
762  int hatCount);
764 
765 GLFWbool _glfwInitVulkan(int mode);
766 void _glfwTerminateVulkan(void);
767 const char* _glfwGetVulkanResultString(VkResult result);
768 
769 char* _glfw_strdup(const char* source);
770 float _glfw_fminf(float a, float b);
771 float _glfw_fmaxf(float a, float b);
772 
_GLFW_PLATFORM_CONTEXT_STATE
Definition: internal.h:357
_GLFWtls errorSlot
Definition: internal.h:536
void _glfwInputScroll(_GLFWwindow *window, double xoffset, double yoffset)
Definition: input.c:310
GLFWcharmodsfun charmods
Definition: internal.h:413
char extensionName[256]
Definition: internal.h:167
GLFWbool initialized
Definition: internal.h:515
_GLFWswapbuffersfun swapBuffers
Definition: internal.h:350
_GLFWjoystick * _glfwAllocJoystick(const char *name, const char *guid, int axisCount, int buttonCount, int hatCount)
Definition: input.c:411
GLFWwindowposfun pos
Definition: internal.h:398
void(* GLFWwindowiconifyfun)(GLFWwindow *, int)
The function signature for window iconify/restore callbacks.
Definition: glfw3.h:1269
void _glfwPlatformDestroyTls(_GLFWtls *tls)
Definition: posix_thread.c:53
uint32_t specVersion
Definition: internal.h:168
int GLint
Definition: internal.h:106
GLFWbool _glfwRefreshContextAttribs(_GLFWwindow *window, const _GLFWctxconfig *ctxconfig)
Definition: context.c:344
GLFWbool KHR_xlib_surface
Definition: internal.h:560
GLFWcursorposfun cursorPos
Definition: internal.h:408
GLFWbool focusOnShow
Definition: internal.h:268
_GLFWwindow * share
Definition: internal.h:298
GLFWbool centerCursor
Definition: internal.h:267
char * name
Definition: internal.h:486
void _glfwPlatformGetWindowSize(_GLFWwindow *window, int *width, int *height)
Definition: null_window.c:104
GLFWgammaramp currentRamp
Definition: internal.h:439
void _glfwInputJoystickButton(_GLFWjoystick *js, int button, char value)
Definition: input.c:385
void(* GLFWcharmodsfun)(GLFWwindow *, unsigned int, int)
The function signature for Unicode character with modifiers callbacks.
Definition: glfw3.h:1458
_GLFWfbconfig framebuffer
Definition: internal.h:519
void _glfwPlatformDestroyMutex(_GLFWmutex *mutex)
Definition: posix_thread.c:85
float _glfw_fminf(float a, float b)
Definition: init.c:122
list extensions
Definition: conf.py:60
GLFWbool retina
Definition: internal.h:271
void _glfwInputWindowCloseRequest(_GLFWwindow *window)
Definition: window.c:131
_GLFW_PLATFORM_CURSOR_STATE
Definition: internal.h:452
GLFWwindowcontentscalefun scale
Definition: internal.h:406
GLFWbool scaleToMonitor
Definition: internal.h:269
int _glfwPlatformCreateWindow(_GLFWwindow *window, const _GLFWwndconfig *wndconfig, const _GLFWctxconfig *ctxconfig, const _GLFWfbconfig *fbconfig)
Definition: null_window.c:45
_GLFWgetprocaddressfun getProcAddress
Definition: internal.h:353
PFN_vkVoidFunction(APIENTRY * PFN_vkGetInstanceProcAddr)(VkInstance, const char *)
Definition: internal.h:177
void(* GLFWmonitorfun)(GLFWmonitor *, int)
The function signature for monitor configuration callbacks.
Definition: glfw3.h:1492
_GLFW_EGL_CONTEXT_STATE
Definition: internal.h:359
_GLFW_PLATFORM_MUTEX_STATE
Definition: internal.h:508
void _glfwPlatformPostEmptyEvent(void)
Definition: null_window.c:247
PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties
Definition: internal.h:551
_GLFWerror * next
Definition: internal.h:231
void(* _GLFWdestroycontextfun)(_GLFWwindow *)
Definition: internal.h:85
_GLFWtls contextSlot
Definition: internal.h:537
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow *window, int minwidth, int minheight, int maxwidth, int maxheight)
Definition: null_window.c:118
GLFWbool sRGB
Definition: internal.h:327
void _glfwAllocGammaArrays(GLFWgammaramp *ramp, unsigned int size)
Definition: monitor.c:192
uintptr_t handle
Definition: internal.h:330
void(* _GLFWswapintervalfun)(int)
Definition: internal.h:82
_GLFWinitconfig init
Definition: internal.h:518
GLFWmousebuttonfun mouseButton
Definition: internal.h:407
GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig *ctxconfig)
Definition: context.c:47
void _glfwInputWindowIconify(_GLFWwindow *window, GLFWbool iconified)
Definition: window.c:89
GLFWbool decorated
Definition: internal.h:262
GLFWwindowclosefun close
Definition: internal.h:400
_GLFWcursor * next
Definition: internal.h:449
void _glfwInputDrop(_GLFWwindow *window, int count, const char **names)
Definition: input.c:360
#define vkGetInstanceProcAddr
Definition: internal.h:180
_GLFWdestroycontextfun destroy
Definition: internal.h:354
void _glfwSplitBPP(int bpp, int *red, int *green, int *blue)
Definition: monitor.c:272
float _glfw_fmaxf(float a, float b)
Definition: init.c:134
GLFWvidmode * modes
Definition: internal.h:434
void _glfwInputFramebufferSize(_GLFWwindow *window, int width, int height)
Definition: window.c:106
void _glfwPlatformGetFramebufferSize(_GLFWwindow *window, int *width, int *height)
Definition: null_window.c:128
int code
Definition: internal.h:232
int GLint
Definition: gl.h:986
int accumGreenBits
Definition: internal.h:321
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow *window, int numer, int denom)
Definition: null_window.c:124
_GLFWctxconfig context
Definition: internal.h:521
uint64_t _glfwPlatformGetTimerValue(void)
Definition: cocoa_time.c:51
_GLFWmonitor * _glfwAllocMonitor(const char *name, int widthMM, int heightMM)
Definition: monitor.c:161
void(* GLFWdropfun)(GLFWwindow *, int, const char **)
The function signature for file drop callbacks.
Definition: glfw3.h:1475
void _glfwInputWindowMaximize(_GLFWwindow *window, GLFWbool maximized)
Definition: window.c:97
PFNGLGETSTRINGPROC GetString
Definition: internal.h:347
uint64_t _glfwPlatformGetTimerFrequency(void)
Definition: cocoa_time.c:56
GLFWcursorenterfun cursorEnter
Definition: internal.h:409
GLFWframebuffersizefun fbsize
Definition: internal.h:405
void(* GLFWkeyfun)(GLFWwindow *, int, int, int, int)
The function signature for keyboard key callbacks.
Definition: glfw3.h:1418
const GLubyte *(APIENTRY * PFNGLGETSTRINGPROC)(GLenum)
Definition: internal.h:113
void(* GLFWmousebuttonfun)(GLFWwindow *, int, int, int)
The function signature for mouse button callbacks.
Definition: glfw3.h:1344
const char * _glfwGetVulkanResultString(VkResult result)
Definition: vulkan.c:159
void _glfwPlatformGetVideoMode(_GLFWmonitor *monitor, GLFWvidmode *mode)
Definition: null_monitor.c:57
GLFWbool forward
Definition: internal.h:292
GLFWkeyfun key
Definition: internal.h:411
void(* GLFWcharfun)(GLFWwindow *, unsigned int)
The function signature for Unicode character callbacks.
Definition: glfw3.h:1435
GLFWbool present
Definition: internal.h:479
_GLFWerror * errorListHead
Definition: internal.h:525
_GLFW_PLATFORM_TLS_STATE
Definition: internal.h:500
khronos_uint8_t GLubyte
Definition: gl.h:983
void(APIENTRY * PFNGLGETINTEGERVPROC)(GLenum, GLint *)
Definition: internal.h:114
GLFWbool autoIconify
Definition: internal.h:264
void _glfwTerminateVulkan(void)
Definition: vulkan.c:151
unsigned int GLenum
Definition: gl.h:978
void _glfwPlatformSetClipboardString(const char *string)
Definition: null_window.c:283
int stencilBits
Definition: internal.h:319
const char * _glfwPlatformGetClipboardString(void)
Definition: null_window.c:287
unsigned int GLuint
Definition: gl.h:987
_GLFWcontext context
Definition: internal.h:395
_GLFWwindow * windowListHead
Definition: internal.h:527
GLFWbool noerror
Definition: internal.h:340
int GLFWbool
Definition: internal.h:62
float * axes
Definition: internal.h:480
void _glfwFreeGammaArrays(GLFWgammaramp *ramp)
Definition: monitor.c:202
int modeCount
Definition: internal.h:435
GLFWbool floating
Definition: internal.h:265
void * handle
Definition: internal.h:548
const char * title
Definition: internal.h:259
void _glfwInputWindowDamage(_GLFWwindow *window)
Definition: window.c:123
void _glfwPlatformIconifyWindow(_GLFWwindow *window)
Definition: null_window.c:151
#define vkEnumerateInstanceExtensionProperties
Definition: internal.h:179
void _glfwInputWindowPos(_GLFWwindow *window, int xpos, int ypos)
Definition: window.c:72
GLFWvidmode videoMode
Definition: internal.h:378
GLFWbool KHR_surface
Definition: internal.h:554
GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor *monitor, GLFWgammaramp *ramp)
Definition: null_monitor.c:61
struct VkExtensionProperties VkExtensionProperties
GLFWbool offline
Definition: internal.h:300
char * name
Definition: internal.h:425
GLFWwindowrefreshfun refresh
Definition: internal.h:401
GLFWbool resizable
Definition: internal.h:371
GLFWbool transparent
Definition: internal.h:329
int buttonCount
Definition: internal.h:483
_GLFWcursor * cursorListHead
Definition: internal.h:526
_GLFWlibrary _glfw
Definition: init.c:44
int maxwidth
Definition: internal.h:383
void _glfwPlatformSetWindowOpacity(_GLFWwindow *window, float opacity)
Definition: null_window.c:195
GLFWbool shouldClose
Definition: internal.h:376
char keys[GLFW_KEY_LAST+1]
Definition: internal.h:391
int _glfwPlatformInit(void)
Definition: null_init.c:35
int refreshRate
Definition: internal.h:522
unsigned int GLuint
Definition: internal.h:107
void _glfwPlatformSetWindowFloating(_GLFWwindow *window, GLFWbool enabled)
Definition: null_window.c:186
void(* GLFWcursorposfun)(GLFWwindow *, double, double)
The function signature for cursor position callbacks.
Definition: glfw3.h:1363
int maxheight
Definition: internal.h:383
GLFWbool maximized
Definition: internal.h:266
void _glfwFreeMonitor(_GLFWmonitor *monitor)
Definition: monitor.c:175
_GLFW_OSMESA_LIBRARY_CONTEXT_STATE
Definition: internal.h:581
void _glfwInputMouseClick(_GLFWwindow *window, int button, int action, int mods)
Definition: input.c:318
void _glfwInputWindowFocus(_GLFWwindow *window, GLFWbool focused)
Definition: window.c:43
int _glfwPlatformWindowIconified(_GLFWwindow *window)
Definition: null_window.c:225
int _glfwPlatformFramebufferTransparent(_GLFWwindow *window)
Definition: null_window.c:173
void(* GLFWwindowcontentscalefun)(GLFWwindow *, float, float)
The function signature for window content scale callbacks.
Definition: glfw3.h:1323
GLFWbool focused
Definition: internal.h:263
GLFWbool stickyMouseButtons
Definition: internal.h:387
_GLFW_PLATFORM_WINDOW_STATE
Definition: internal.h:418
int monitorCount
Definition: internal.h:530
void * VkInstance
Definition: internal.h:119
GLFWcharfun character
Definition: internal.h:412
void(* _GLFWswapbuffersfun)(_GLFWwindow *)
Definition: internal.h:81
void _glfwInputWindowContentScale(_GLFWwindow *window, float xscale, float yscale)
Definition: window.c:115
int cursorMode
Definition: internal.h:389
void(* GLFWwindowsizefun)(GLFWwindow *, int, int)
The function signature for window resize callbacks.
Definition: glfw3.h:1202
PFNGLGETINTEGERVPROC GetIntegerv
Definition: internal.h:346
GLFWwindowsizefun size
Definition: internal.h:399
void _glfwPlatformSetGammaRamp(_GLFWmonitor *monitor, const GLFWgammaramp *ramp)
Definition: null_monitor.c:66
void * VkPhysicalDevice
Definition: internal.h:120
PFN_vkGetInstanceProcAddr GetInstanceProcAddr
Definition: internal.h:552
int _glfwPlatformWindowMaximized(_GLFWwindow *window)
Definition: null_window.c:163
void * userPointer
Definition: internal.h:377
GLFWbool _glfwStringInExtensionString(const char *string, const char *extensions)
Definition: context.c:580
void _glfwPlatformShowWindow(_GLFWwindow *window)
Definition: null_window.c:199
void _glfwPlatformFocusWindow(_GLFWwindow *window)
Definition: null_window.c:216
_GLFW_PLATFORM_LIBRARY_WINDOW_STATE
Definition: internal.h:573
#define GLFW_JOYSTICK_LAST
Definition: glfw3.h:574
void _glfwPlatformLockMutex(_GLFWmutex *mutex)
Definition: posix_thread.c:92
GLFWbool available
Definition: internal.h:547
int accumBlueBits
Definition: internal.h:322
struct _GLFWwindow * next
Definition: internal.h:368
void(* _GLFWmakecontextcurrentfun)(_GLFWwindow *)
Definition: internal.h:80
GLFWbool noerror
Definition: internal.h:294
_GLFWmakecontextcurrentfun makeCurrent
Definition: internal.h:349
void _glfwPlatformGetWindowFrameSize(_GLFWwindow *window, int *left, int *top, int *right, int *bottom)
Definition: null_window.c:136
void _glfwPlatformGetMonitorPos(_GLFWmonitor *monitor, int *xpos, int *ypos)
Definition: null_monitor.c:39
void(* GLFWframebuffersizefun)(GLFWwindow *, int, int)
The function signature for framebuffer resize callbacks.
Definition: glfw3.h:1305
GLFWvidmode currentMode
Definition: internal.h:436
void(APIENTRY * PFNGLCLEARPROC)(GLbitfield)
Definition: internal.h:112
void _glfwPlatformFreeMonitor(_GLFWmonitor *monitor)
Definition: null_monitor.c:35
void _glfwInputJoystick(_GLFWjoystick *js, int event)
Definition: input.c:368
double virtualCursorPosY
Definition: internal.h:393
uint64_t VkSurfaceKHR
Definition: internal.h:121
int _glfwPlatformWindowVisible(_GLFWwindow *window)
Definition: null_window.c:230
_GLFWwndconfig window
Definition: internal.h:520
void _glfwPlatformGetWindowPos(_GLFWwindow *window, int *xpos, int *ypos)
Definition: null_window.c:96
int auxBuffers
Definition: internal.h:324
void _glfwPlatformSetCursorPos(_GLFWwindow *window, double xpos, double ypos)
Definition: null_window.c:255
void _glfwInputError(int code, const char *format,...)
Definition: init.c:153
void _glfwPlatformUnlockMutex(_GLFWmutex *mutex)
Definition: posix_thread.c:98
int minwidth
Definition: internal.h:382
int(* _GLFWextensionsupportedfun)(const char *)
Definition: internal.h:83
GLFWbool lockKeyMods
Definition: internal.h:388
void _glfwPlatformSetWindowIcon(_GLFWwindow *window, int count, const GLFWimage *images)
Definition: null_window.c:83
GLFWbool _glfwPlatformCreateMutex(_GLFWmutex *mutex)
Definition: posix_thread.c:72
const char * _glfwPlatformGetVersionString(void)
Definition: null_init.c:46
_GLFWextensionsupportedfun extensionSupported
Definition: internal.h:352
void _glfwInputMonitor(_GLFWmonitor *monitor, int action, int placement)
Definition: monitor.c:91
const _GLFWfbconfig * _glfwChooseFBConfig(const _GLFWfbconfig *desired, const _GLFWfbconfig *alternatives, unsigned int count)
Definition: context.c:176
void _glfwInputCursorPos(_GLFWwindow *window, double xpos, double ypos)
Definition: input.c:338
uint8_t index
Definition: internal.h:460
GLFWbool _glfwPlatformCreateTls(_GLFWtls *tls)
Definition: posix_thread.c:38
unsigned char * buttons
Definition: internal.h:482
void _glfwInputJoystickHat(_GLFWjoystick *js, int hat, char value)
Definition: input.c:392
void _glfwInputKey(_GLFWwindow *window, int key, int scancode, int action, int mods)
Definition: input.c:259
void _glfwPlatformPollEvents(void)
Definition: null_window.c:235
void(* GLFWwindowposfun)(GLFWwindow *, int, int)
The function signature for window position callbacks.
Definition: glfw3.h:1184
void _glfwPlatformSetWindowResizable(_GLFWwindow *window, GLFWbool enabled)
Definition: null_window.c:178
GLFWbool visible
Definition: internal.h:261
void _glfwPlatformRestoreWindow(_GLFWwindow *window)
Definition: null_window.c:155
VkStructureType
Definition: internal.h:125
GLFWbool debug
Definition: internal.h:293
#define APIENTRY
Definition: glfw3.h:106
float _glfwPlatformGetWindowOpacity(_GLFWwindow *window)
Definition: null_window.c:190
void _glfwInputWindowSize(_GLFWwindow *window, int width, int height)
Definition: window.c:81
const char * _glfwPlatformGetScancodeName(int scancode)
Definition: null_window.c:292
int _glfwCompareVideoModes(const GLFWvidmode *first, const GLFWvidmode *second)
Definition: monitor.c:265
void(APIENTRY * PFN_vkVoidFunction)(void)
Definition: internal.h:171
void _glfwPlatformSetWindowSize(_GLFWwindow *window, int width, int height)
Definition: null_window.c:112
unsigned int GLenum
Definition: internal.h:108
const GLubyte *(APIENTRY * PFNGLGETSTRINGIPROC)(GLenum, GLuint)
Definition: internal.h:115
GLFWvidmode * _glfwPlatformGetVideoModes(_GLFWmonitor *monitor, int *count)
Definition: null_monitor.c:52
void _glfwPlatformGetWindowContentScale(_GLFWwindow *window, float *xscale, float *yscale)
Definition: null_window.c:142
PFNGLGETSTRINGIPROC GetStringi
Definition: internal.h:345
typedef void(GLAD_API_PTR *GLDEBUGPROC)(GLenum source
GLFWbool floating
Definition: internal.h:374
void _glfwPlatformWaitEvents(void)
Definition: null_window.c:239
_GLFWswapintervalfun swapInterval
Definition: internal.h:351
_GLFW_PLATFORM_LIBRARY_CONTEXT_STATE
Definition: internal.h:575
GLFWgammaramp originalRamp
Definition: internal.h:438
void _glfwInputWindowMonitor(_GLFWwindow *window, _GLFWmonitor *monitor)
Definition: window.c:141
GLFWbool hatButtons
Definition: internal.h:242
GLFWglproc(* _GLFWgetprocaddressfun)(const char *)
Definition: internal.h:84
int _glfwPlatformWindowFocused(_GLFWwindow *window)
Definition: null_window.c:220
void _glfwPlatformSetTls(_GLFWtls *tls, void *value)
Definition: posix_thread.c:66
GLFWbool autoIconify
Definition: internal.h:373
char * _glfw_strdup(const char *source)
Definition: init.c:114
#define GLFW_KEY_LAST
Definition: glfw3.h:483
void _glfwInputCursorEnter(_GLFWwindow *window, GLFWbool entered)
Definition: input.c:352
_GLFW_PLATFORM_LIBRARY_TIMER_STATE
Definition: internal.h:543
_GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE
Definition: internal.h:577
int _glfwPlatformCreateCursor(_GLFWcursor *cursor, const GLFWimage *image, int xhot, int yhot)
Definition: null_window.c:263
_GLFW_PLATFORM_MONITOR_STATE
Definition: internal.h:442
GLFWbool resizable
Definition: internal.h:260
Gamma ramp.
Definition: glfw3.h:1559
struct VkAllocationCallbacks VkAllocationCallbacks
Definition: internal.h:163
void(* GLFWjoystickfun)(int, int)
The function signature for joystick configuration callbacks.
Definition: glfw3.h:1510
void _glfwPlatformWaitEventsTimeout(double timeout)
Definition: null_window.c:243
GLFWbool stereo
Definition: internal.h:325
Video mode type.
Definition: glfw3.h:1525
GLFWbool chdir
Definition: internal.h:245
void _glfwInputChar(_GLFWwindow *window, unsigned int codepoint, int mods, GLFWbool plain)
Definition: input.c:290
void _glfwPlatformSetWindowDecorated(_GLFWwindow *window, GLFWbool enabled)
Definition: null_window.c:182
void _glfwPlatformMaximizeWindow(_GLFWwindow *window)
Definition: null_window.c:159
void _glfwPlatformGetRequiredInstanceExtensions(char **extensions)
Definition: null_window.c:302
void _glfwPlatformGetCursorPos(_GLFWwindow *window, double *xpos, double *ypos)
Definition: null_window.c:251
GLFWbool focusOnShow
Definition: internal.h:375
void _glfwPlatformTerminate(void)
Definition: null_init.c:41
GLFWmonitorfun monitor
Definition: internal.h:568
uint64_t offset
Definition: internal.h:541
void _glfwInputMonitorWindow(_GLFWmonitor *monitor, _GLFWwindow *window)
Definition: monitor.c:149
void _glfwInputJoystickAxis(_GLFWjoystick *js, int axis, float value)
Definition: input.c:378
void(* GLFWwindowclosefun)(GLFWwindow *)
The function signature for window close callbacks.
Definition: glfw3.h:1218
int _glfwPlatformWindowHovered(_GLFWwindow *window)
Definition: null_window.c:168
int8_t axisOffset
Definition: internal.h:462
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)
Definition: null_window.c:306
void _glfwPlatformSetCursorMode(_GLFWwindow *window, int mode)
Definition: null_window.c:259
GLFWbool KHR_xcb_surface
Definition: internal.h:561
GLFWbool _glfwInitVulkan(int mode)
Definition: vulkan.c:42
GLFWdropfun drop
Definition: internal.h:414
_GLFWcursor * cursor
Definition: internal.h:380
_GLFWmapping * mapping
Definition: internal.h:489
unsigned char * hats
Definition: internal.h:484
#define GLFW_MOUSE_BUTTON_LAST
Definition: glfw3.h:545
void * _glfwPlatformGetTls(_GLFWtls *tls)
Definition: posix_thread.c:60
_GLFW_PLATFORM_JOYSTICK_STATE
Definition: internal.h:492
int minheight
Definition: internal.h:382
_GLFW_OSMESA_CONTEXT_STATE
Definition: internal.h:361
int accumAlphaBits
Definition: internal.h:323
int _glfwPlatformCreateStandardCursor(_GLFWcursor *cursor, int shape)
Definition: null_window.c:270
GLFWbool doublebuffer
Definition: internal.h:328
char mouseButtons[GLFW_MOUSE_BUTTON_LAST+1]
Definition: internal.h:390
void _glfwPlatformDestroyWindow(_GLFWwindow *window)
Definition: null_window.c:73
_GLFWmonitor ** monitors
Definition: internal.h:529
void(* GLFWcursorenterfun)(GLFWwindow *, int)
The function signature for cursor enter/leave callbacks.
Definition: glfw3.h:1380
int _glfwPlatformPollJoystick(_GLFWjoystick *js, int mode)
GLFWbool stickyKeys
Definition: internal.h:386
Image data.
Definition: glfw3.h:1588
VkResult(APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *)
Definition: internal.h:178
void _glfwPlatformRequestWindowAttention(_GLFWwindow *window)
Definition: null_window.c:204
#define _GLFW_MESSAGE_SIZE
Definition: internal.h:60
void(* GLFWscrollfun)(GLFWwindow *, double, double)
The function signature for scroll callbacks.
Definition: glfw3.h:1397
void(* GLFWwindowmaximizefun)(GLFWwindow *, int)
The function signature for window maximize/restore callbacks.
Definition: glfw3.h:1287
void * userPointer
Definition: internal.h:487
void _glfwPlatformGetMonitorContentScale(_GLFWmonitor *monitor, float *xscale, float *yscale)
Definition: null_monitor.c:43
uint32_t VkFlags
Definition: internal.h:122
VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, _GLFWwindow *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)
Definition: null_window.c:313
_GLFWmapping * mappings
Definition: internal.h:533
uint8_t type
Definition: internal.h:459
void _glfwPlatformSetWindowTitle(_GLFWwindow *window, const char *title)
Definition: null_window.c:79
void _glfwPlatformHideWindow(_GLFWwindow *window)
Definition: null_window.c:212
_GLFWwindow * window
Definition: internal.h:432
double virtualCursorPosX
Definition: internal.h:393
GLFWscrollfun scroll
Definition: internal.h:410
const GLFWvidmode * _glfwChooseVideoMode(_GLFWmonitor *monitor, const GLFWvidmode *desired)
Definition: monitor.c:213
void _glfwPlatformSetWindowPos(_GLFWwindow *window, int xpos, int ypos)
Definition: null_window.c:100
GLFWbool menubar
Definition: internal.h:244
_GLFWmonitor * monitor
Definition: internal.h:379
GLFWbool decorated
Definition: internal.h:372
void _glfwPlatformUpdateGamepadGUID(char *guid)
unsigned int GLbitfield
Definition: internal.h:109
GLFWwindowmaximizefun maximize
Definition: internal.h:404
GLFWjoystickfun joystick
Definition: internal.h:569
GLFWwindowiconifyfun iconify
Definition: internal.h:403
void _glfwFreeJoystick(_GLFWjoystick *js)
Definition: input.c:447
int mappingCount
Definition: internal.h:534
void _glfwPlatformSetCursor(_GLFWwindow *window, _GLFWcursor *cursor)
Definition: null_window.c:279
void _glfwPlatformDestroyCursor(_GLFWcursor *cursor)
Definition: null_window.c:275
unsigned char GLubyte
Definition: internal.h:110
int robustness
Definition: internal.h:342
void(* GLFWwindowrefreshfun)(GLFWwindow *)
The function signature for window content refresh callbacks.
Definition: glfw3.h:1234
int revision
Definition: internal.h:339
GLFWwindowfocusfun focus
Definition: internal.h:402
uint32_t VkBool32
Definition: internal.h:123
int accumRedBits
Definition: internal.h:320
int8_t axisScale
Definition: internal.h:461
void(* GLFWglproc)(void)
Client API function pointer type.
Definition: glfw3.h:1099
_GLFW_EGL_LIBRARY_CONTEXT_STATE
Definition: internal.h:579
_GLFWmutex errorLock
Definition: internal.h:538
int _glfwPlatformGetKeyScancode(int key)
Definition: null_window.c:297
void * userPointer
Definition: internal.h:426
void _glfwPlatformSetWindowMonitor(_GLFWwindow *window, _GLFWmonitor *monitor, int xpos, int ypos, int width, int height, int refreshRate)
Definition: null_window.c:88
VkResult
Definition: internal.h:135
void(* GLFWwindowfocusfun)(GLFWwindow *, int)
The function signature for window focus/defocus callbacks.
Definition: glfw3.h:1251


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:21