window.c
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 // Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net>
7 //
8 // This software is provided 'as-is', without any express or implied
9 // warranty. In no event will the authors be held liable for any damages
10 // arising from the use of this software.
11 //
12 // Permission is granted to anyone to use this software for any purpose,
13 // including commercial applications, and to alter it and redistribute it
14 // freely, subject to the following restrictions:
15 //
16 // 1. The origin of this software must not be misrepresented; you must not
17 // claim that you wrote the original software. If you use this software
18 // in a product, an acknowledgment in the product documentation would
19 // be appreciated but is not required.
20 //
21 // 2. Altered source versions must be plainly marked as such, and must not
22 // be misrepresented as being the original software.
23 //
24 // 3. This notice may not be removed or altered from any source
25 // distribution.
26 //
27 //========================================================================
28 
29 #include "internal.h"
30 
31 #include <assert.h>
32 #include <string.h>
33 #include <stdlib.h>
34 #include <float.h>
35 
36 
40 
41 // Notifies shared code that a window has lost or received input focus
42 //
44 {
45  if (window->callbacks.focus)
46  window->callbacks.focus((GLFWwindow*) window, focused);
47 
48  if (!focused)
49  {
50  int key, button;
51 
52  for (key = 0; key <= GLFW_KEY_LAST; key++)
53  {
54  if (window->keys[key] == GLFW_PRESS)
55  {
56  const int scancode = _glfwPlatformGetKeyScancode(key);
57  _glfwInputKey(window, key, scancode, GLFW_RELEASE, 0);
58  }
59  }
60 
61  for (button = 0; button <= GLFW_MOUSE_BUTTON_LAST; button++)
62  {
63  if (window->mouseButtons[button] == GLFW_PRESS)
64  _glfwInputMouseClick(window, button, GLFW_RELEASE, 0);
65  }
66  }
67 }
68 
69 // Notifies shared code that a window has moved
70 // The position is specified in client-area relative screen coordinates
71 //
73 {
74  if (window->callbacks.pos)
75  window->callbacks.pos((GLFWwindow*) window, x, y);
76 }
77 
78 // Notifies shared code that a window has been resized
79 // The size is specified in screen coordinates
80 //
82 {
83  if (window->callbacks.size)
84  window->callbacks.size((GLFWwindow*) window, width, height);
85 }
86 
87 // Notifies shared code that a window has been iconified or restored
88 //
90 {
91  if (window->callbacks.iconify)
92  window->callbacks.iconify((GLFWwindow*) window, iconified);
93 }
94 
95 // Notifies shared code that a window has been maximized or restored
96 //
98 {
99  if (window->callbacks.maximize)
100  window->callbacks.maximize((GLFWwindow*) window, maximized);
101 }
102 
103 // Notifies shared code that a window framebuffer has been resized
104 // The size is specified in pixels
105 //
107 {
108  if (window->callbacks.fbsize)
109  window->callbacks.fbsize((GLFWwindow*) window, width, height);
110 }
111 
112 // Notifies shared code that a window content scale has changed
113 // The scale is specified as the ratio between the current and default DPI
114 //
115 void _glfwInputWindowContentScale(_GLFWwindow* window, float xscale, float yscale)
116 {
117  if (window->callbacks.scale)
118  window->callbacks.scale((GLFWwindow*) window, xscale, yscale);
119 }
120 
121 // Notifies shared code that the window contents needs updating
122 //
124 {
125  if (window->callbacks.refresh)
126  window->callbacks.refresh((GLFWwindow*) window);
127 }
128 
129 // Notifies shared code that the user wishes to close a window
130 //
132 {
133  window->shouldClose = GLFW_TRUE;
134 
135  if (window->callbacks.close)
136  window->callbacks.close((GLFWwindow*) window);
137 }
138 
139 // Notifies shared code that a window has changed its desired monitor
140 //
142 {
143  window->monitor = monitor;
144 }
145 
146 
150 
152  const char* title,
153  GLFWmonitor* monitor,
154  GLFWwindow* share)
155 {
156  _GLFWfbconfig fbconfig;
157  _GLFWctxconfig ctxconfig;
158  _GLFWwndconfig wndconfig;
160 
161  assert(title != NULL);
162  assert(width >= 0);
163  assert(height >= 0);
164 
166 
167  if (width <= 0 || height <= 0)
168  {
170  "Invalid window size %ix%i",
171  width, height);
172 
173  return NULL;
174  }
175 
176  fbconfig = _glfw.hints.framebuffer;
177  ctxconfig = _glfw.hints.context;
178  wndconfig = _glfw.hints.window;
179 
180  wndconfig.width = width;
181  wndconfig.height = height;
182  wndconfig.title = title;
183  ctxconfig.share = (_GLFWwindow*) share;
184 
185  if (!_glfwIsValidContextConfig(&ctxconfig))
186  return NULL;
187 
188  window = calloc(1, sizeof(_GLFWwindow));
189  window->next = _glfw.windowListHead;
191 
192  window->videoMode.width = width;
193  window->videoMode.height = height;
194  window->videoMode.redBits = fbconfig.redBits;
195  window->videoMode.greenBits = fbconfig.greenBits;
196  window->videoMode.blueBits = fbconfig.blueBits;
198 
199  window->monitor = (_GLFWmonitor*) monitor;
200  window->resizable = wndconfig.resizable;
201  window->decorated = wndconfig.decorated;
202  window->autoIconify = wndconfig.autoIconify;
203  window->floating = wndconfig.floating;
204  window->focusOnShow = wndconfig.focusOnShow;
205  window->cursorMode = GLFW_CURSOR_NORMAL;
206 
207  window->minwidth = GLFW_DONT_CARE;
208  window->minheight = GLFW_DONT_CARE;
209  window->maxwidth = GLFW_DONT_CARE;
210  window->maxheight = GLFW_DONT_CARE;
211  window->numer = GLFW_DONT_CARE;
212  window->denom = GLFW_DONT_CARE;
213 
214  // Open the actual window and create its context
215  if (!_glfwPlatformCreateWindow(window, &wndconfig, &ctxconfig, &fbconfig))
216  {
217  glfwDestroyWindow((GLFWwindow*) window);
218  return NULL;
219  }
220 
221  if (ctxconfig.client != GLFW_NO_API)
222  {
223  if (!_glfwRefreshContextAttribs(window, &ctxconfig))
224  {
225  glfwDestroyWindow((GLFWwindow*) window);
226  return NULL;
227  }
228  }
229 
230  if (window->monitor)
231  {
232  if (wndconfig.centerCursor)
233  {
234  int width, height;
235  _glfwPlatformGetWindowSize(window, &width, &height);
236  _glfwPlatformSetCursorPos(window, width / 2.0, height / 2.0);
237  }
238  }
239  else
240  {
241  if (wndconfig.visible)
242  {
243  _glfwPlatformShowWindow(window);
244  if (wndconfig.focused)
245  _glfwPlatformFocusWindow(window);
246  }
247  }
248 
249  return (GLFWwindow*) window;
250 }
251 
253 {
255 
256  // The default is OpenGL with minimum version 1.0
257  memset(&_glfw.hints.context, 0, sizeof(_glfw.hints.context));
260  _glfw.hints.context.major = 1;
261  _glfw.hints.context.minor = 0;
262 
263  // The default is a focused, visible, resizable window with decorations
264  memset(&_glfw.hints.window, 0, sizeof(_glfw.hints.window));
272 
273  // The default is 24 bits of color, 24 bits of depth and 8 bits of stencil,
274  // double buffered
275  memset(&_glfw.hints.framebuffer, 0, sizeof(_glfw.hints.framebuffer));
283 
284  // The default is to select the highest available refresh rate
286 
287  // The default is to use full Retina resolution framebuffers
289 }
290 
291 GLFWAPI void glfwWindowHint(int hint, int value)
292 {
294 
295  switch (hint)
296  {
297  case GLFW_RED_BITS:
299  return;
300  case GLFW_GREEN_BITS:
302  return;
303  case GLFW_BLUE_BITS:
305  return;
306  case GLFW_ALPHA_BITS:
308  return;
309  case GLFW_DEPTH_BITS:
311  return;
312  case GLFW_STENCIL_BITS:
314  return;
315  case GLFW_ACCUM_RED_BITS:
317  return;
320  return;
323  return;
326  return;
327  case GLFW_AUX_BUFFERS:
329  return;
330  case GLFW_STEREO:
332  return;
333  case GLFW_DOUBLEBUFFER:
335  return;
338  return;
339  case GLFW_SAMPLES:
341  return;
342  case GLFW_SRGB_CAPABLE:
344  return;
345  case GLFW_RESIZABLE:
347  return;
348  case GLFW_DECORATED:
350  return;
351  case GLFW_FOCUSED:
353  return;
354  case GLFW_AUTO_ICONIFY:
356  return;
357  case GLFW_FLOATING:
359  return;
360  case GLFW_MAXIMIZED:
362  return;
363  case GLFW_VISIBLE:
365  return;
368  return;
371  return;
374  return;
375  case GLFW_CENTER_CURSOR:
377  return;
378  case GLFW_FOCUS_ON_SHOW:
380  return;
381  case GLFW_CLIENT_API:
383  return;
386  return;
389  return;
392  return;
395  return;
398  return;
401  return;
404  return;
405  case GLFW_OPENGL_PROFILE:
407  return;
410  return;
411  case GLFW_REFRESH_RATE:
413  return;
414  }
415 
416  _glfwInputError(GLFW_INVALID_ENUM, "Invalid window hint 0x%08X", hint);
417 }
418 
419 GLFWAPI void glfwWindowHintString(int hint, const char* value)
420 {
421  assert(value != NULL);
422 
424 
425  switch (hint)
426  {
428  strncpy(_glfw.hints.window.ns.frameName, value,
429  sizeof(_glfw.hints.window.ns.frameName) - 1);
430  return;
431  case GLFW_X11_CLASS_NAME:
432  strncpy(_glfw.hints.window.x11.className, value,
433  sizeof(_glfw.hints.window.x11.className) - 1);
434  return;
436  strncpy(_glfw.hints.window.x11.instanceName, value,
437  sizeof(_glfw.hints.window.x11.instanceName) - 1);
438  return;
439  }
440 
441  _glfwInputError(GLFW_INVALID_ENUM, "Invalid window hint string 0x%08X", hint);
442 }
443 
445 {
446  _GLFWwindow* window = (_GLFWwindow*) handle;
447 
449 
450  // Allow closing of NULL (to match the behavior of free)
451  if (window == NULL)
452  return;
453 
454  // Clear all callbacks to avoid exposing a half torn-down window object
455  memset(&window->callbacks, 0, sizeof(window->callbacks));
456 
457  // The window's context must not be current on another thread when the
458  // window is destroyed
459  if (window == _glfwPlatformGetTls(&_glfw.contextSlot))
461 
463 
464  // Unlink window from global linked list
465  {
466  _GLFWwindow** prev = &_glfw.windowListHead;
467 
468  while (*prev != window)
469  prev = &((*prev)->next);
470 
471  *prev = window->next;
472  }
473 
474  free(window);
475 }
476 
478 {
479  _GLFWwindow* window = (_GLFWwindow*) handle;
480  assert(window != NULL);
481 
483  return window->shouldClose;
484 }
485 
487 {
488  _GLFWwindow* window = (_GLFWwindow*) handle;
489  assert(window != NULL);
490 
492  window->shouldClose = value;
493 }
494 
495 GLFWAPI void glfwSetWindowTitle(GLFWwindow* handle, const char* title)
496 {
497  _GLFWwindow* window = (_GLFWwindow*) handle;
498  assert(window != NULL);
499  assert(title != NULL);
500 
502  _glfwPlatformSetWindowTitle(window, title);
503 }
504 
506  int count, const GLFWimage* images)
507 {
508  _GLFWwindow* window = (_GLFWwindow*) handle;
509  assert(window != NULL);
510  assert(count >= 0);
511  assert(count == 0 || images != NULL);
512 
514  _glfwPlatformSetWindowIcon(window, count, images);
515 }
516 
518 {
519  _GLFWwindow* window = (_GLFWwindow*) handle;
520  assert(window != NULL);
521 
522  if (xpos)
523  *xpos = 0;
524  if (ypos)
525  *ypos = 0;
526 
528  _glfwPlatformGetWindowPos(window, xpos, ypos);
529 }
530 
532 {
533  _GLFWwindow* window = (_GLFWwindow*) handle;
534  assert(window != NULL);
535 
537 
538  if (window->monitor)
539  return;
540 
541  _glfwPlatformSetWindowPos(window, xpos, ypos);
542 }
543 
545 {
546  _GLFWwindow* window = (_GLFWwindow*) handle;
547  assert(window != NULL);
548 
549  if (width)
550  *width = 0;
551  if (height)
552  *height = 0;
553 
555  _glfwPlatformGetWindowSize(window, width, height);
556 }
557 
559 {
560  _GLFWwindow* window = (_GLFWwindow*) handle;
561  assert(window != NULL);
562  assert(width >= 0);
563  assert(height >= 0);
564 
566 
567  window->videoMode.width = width;
568  window->videoMode.height = height;
569 
570  _glfwPlatformSetWindowSize(window, width, height);
571 }
572 
574  int minwidth, int minheight,
575  int maxwidth, int maxheight)
576 {
577  _GLFWwindow* window = (_GLFWwindow*) handle;
578  assert(window != NULL);
579 
581 
582  if (minwidth != GLFW_DONT_CARE && minheight != GLFW_DONT_CARE)
583  {
584  if (minwidth < 0 || minheight < 0)
585  {
587  "Invalid window minimum size %ix%i",
588  minwidth, minheight);
589  return;
590  }
591  }
592 
593  if (maxwidth != GLFW_DONT_CARE && maxheight != GLFW_DONT_CARE)
594  {
595  if (maxwidth < 0 || maxheight < 0 ||
596  maxwidth < minwidth || maxheight < minheight)
597  {
599  "Invalid window maximum size %ix%i",
600  maxwidth, maxheight);
601  return;
602  }
603  }
604 
605  window->minwidth = minwidth;
606  window->minheight = minheight;
607  window->maxwidth = maxwidth;
608  window->maxheight = maxheight;
609 
610  if (window->monitor || !window->resizable)
611  return;
612 
614  minwidth, minheight,
615  maxwidth, maxheight);
616 }
617 
618 GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* handle, int numer, int denom)
619 {
620  _GLFWwindow* window = (_GLFWwindow*) handle;
621  assert(window != NULL);
622  assert(numer != 0);
623  assert(denom != 0);
624 
626 
627  if (numer != GLFW_DONT_CARE && denom != GLFW_DONT_CARE)
628  {
629  if (numer <= 0 || denom <= 0)
630  {
632  "Invalid window aspect ratio %i:%i",
633  numer, denom);
634  return;
635  }
636  }
637 
638  window->numer = numer;
639  window->denom = denom;
640 
641  if (window->monitor || !window->resizable)
642  return;
643 
644  _glfwPlatformSetWindowAspectRatio(window, numer, denom);
645 }
646 
648 {
649  _GLFWwindow* window = (_GLFWwindow*) handle;
650  assert(window != NULL);
651 
652  if (width)
653  *width = 0;
654  if (height)
655  *height = 0;
656 
658  _glfwPlatformGetFramebufferSize(window, width, height);
659 }
660 
662  int* left, int* top,
663  int* right, int* bottom)
664 {
665  _GLFWwindow* window = (_GLFWwindow*) handle;
666  assert(window != NULL);
667 
668  if (left)
669  *left = 0;
670  if (top)
671  *top = 0;
672  if (right)
673  *right = 0;
674  if (bottom)
675  *bottom = 0;
676 
678  _glfwPlatformGetWindowFrameSize(window, left, top, right, bottom);
679 }
680 
682  float* xscale, float* yscale)
683 {
684  _GLFWwindow* window = (_GLFWwindow*) handle;
685  assert(window != NULL);
686 
687  if (xscale)
688  *xscale = 0.f;
689  if (yscale)
690  *yscale = 0.f;
691 
693  _glfwPlatformGetWindowContentScale(window, xscale, yscale);
694 }
695 
697 {
698  _GLFWwindow* window = (_GLFWwindow*) handle;
699  assert(window != NULL);
700 
702  return _glfwPlatformGetWindowOpacity(window);
703 }
704 
706 {
707  _GLFWwindow* window = (_GLFWwindow*) handle;
708  assert(window != NULL);
709  assert(opacity == opacity);
710  assert(opacity >= 0.f);
711  assert(opacity <= 1.f);
712 
714 
715  if (opacity != opacity || opacity < 0.f || opacity > 1.f)
716  {
717  _glfwInputError(GLFW_INVALID_VALUE, "Invalid window opacity %f", opacity);
718  return;
719  }
720 
721  _glfwPlatformSetWindowOpacity(window, opacity);
722 }
723 
725 {
726  _GLFWwindow* window = (_GLFWwindow*) handle;
727  assert(window != NULL);
728 
731 }
732 
734 {
735  _GLFWwindow* window = (_GLFWwindow*) handle;
736  assert(window != NULL);
737 
740 }
741 
743 {
744  _GLFWwindow* window = (_GLFWwindow*) handle;
745  assert(window != NULL);
746 
748 
749  if (window->monitor)
750  return;
751 
753 }
754 
756 {
757  _GLFWwindow* window = (_GLFWwindow*) handle;
758  assert(window != NULL);
759 
761 
762  if (window->monitor)
763  return;
764 
765  _glfwPlatformShowWindow(window);
766 
767  if (window->focusOnShow)
768  _glfwPlatformFocusWindow(window);
769 }
770 
772 {
773  _GLFWwindow* window = (_GLFWwindow*) handle;
774  assert(window != NULL);
775 
777 
779 }
780 
782 {
783  _GLFWwindow* window = (_GLFWwindow*) handle;
784  assert(window != NULL);
785 
787 
788  if (window->monitor)
789  return;
790 
791  _glfwPlatformHideWindow(window);
792 }
793 
795 {
796  _GLFWwindow* window = (_GLFWwindow*) handle;
797  assert(window != NULL);
798 
800 
801  _glfwPlatformFocusWindow(window);
802 }
803 
805 {
806  _GLFWwindow* window = (_GLFWwindow*) handle;
807  assert(window != NULL);
808 
810 
811  switch (attrib)
812  {
813  case GLFW_FOCUSED:
814  return _glfwPlatformWindowFocused(window);
815  case GLFW_ICONIFIED:
816  return _glfwPlatformWindowIconified(window);
817  case GLFW_VISIBLE:
818  return _glfwPlatformWindowVisible(window);
819  case GLFW_MAXIMIZED:
820  return _glfwPlatformWindowMaximized(window);
821  case GLFW_HOVERED:
822  return _glfwPlatformWindowHovered(window);
823  case GLFW_FOCUS_ON_SHOW:
824  return window->focusOnShow;
827  case GLFW_RESIZABLE:
828  return window->resizable;
829  case GLFW_DECORATED:
830  return window->decorated;
831  case GLFW_FLOATING:
832  return window->floating;
833  case GLFW_AUTO_ICONIFY:
834  return window->autoIconify;
835  case GLFW_CLIENT_API:
836  return window->context.client;
838  return window->context.source;
840  return window->context.major;
842  return window->context.minor;
844  return window->context.revision;
846  return window->context.robustness;
848  return window->context.forward;
850  return window->context.debug;
851  case GLFW_OPENGL_PROFILE:
852  return window->context.profile;
854  return window->context.release;
856  return window->context.noerror;
857  }
858 
859  _glfwInputError(GLFW_INVALID_ENUM, "Invalid window attribute 0x%08X", attrib);
860  return 0;
861 }
862 
864 {
865  _GLFWwindow* window = (_GLFWwindow*) handle;
866  assert(window != NULL);
867 
869 
870  value = value ? GLFW_TRUE : GLFW_FALSE;
871 
872  if (attrib == GLFW_AUTO_ICONIFY)
873  window->autoIconify = value;
874  else if (attrib == GLFW_RESIZABLE)
875  {
876  if (window->resizable == value)
877  return;
878 
879  window->resizable = value;
880  if (!window->monitor)
881  _glfwPlatformSetWindowResizable(window, value);
882  }
883  else if (attrib == GLFW_DECORATED)
884  {
885  if (window->decorated == value)
886  return;
887 
888  window->decorated = value;
889  if (!window->monitor)
890  _glfwPlatformSetWindowDecorated(window, value);
891  }
892  else if (attrib == GLFW_FLOATING)
893  {
894  if (window->floating == value)
895  return;
896 
897  window->floating = value;
898  if (!window->monitor)
899  _glfwPlatformSetWindowFloating(window, value);
900  }
901  else if (attrib == GLFW_FOCUS_ON_SHOW)
902  window->focusOnShow = value;
903  else
904  _glfwInputError(GLFW_INVALID_ENUM, "Invalid window attribute 0x%08X", attrib);
905 }
906 
908 {
909  _GLFWwindow* window = (_GLFWwindow*) handle;
910  assert(window != NULL);
911 
913  return (GLFWmonitor*) window->monitor;
914 }
915 
917  GLFWmonitor* mh,
918  int xpos, int ypos,
919  int width, int height,
920  int refreshRate)
921 {
922  _GLFWwindow* window = (_GLFWwindow*) wh;
923  _GLFWmonitor* monitor = (_GLFWmonitor*) mh;
924  assert(window != NULL);
925  assert(width >= 0);
926  assert(height >= 0);
927 
929 
930  if (width <= 0 || height <= 0)
931  {
933  "Invalid window size %ix%i",
934  width, height);
935  return;
936  }
937 
938  if (refreshRate < 0 && refreshRate != GLFW_DONT_CARE)
939  {
941  "Invalid refresh rate %i",
942  refreshRate);
943  return;
944  }
945 
946  window->videoMode.width = width;
947  window->videoMode.height = height;
948  window->videoMode.refreshRate = refreshRate;
949 
950  _glfwPlatformSetWindowMonitor(window, monitor,
951  xpos, ypos, width, height,
952  refreshRate);
953 }
954 
956 {
957  _GLFWwindow* window = (_GLFWwindow*) handle;
958  assert(window != NULL);
959 
961  window->userPointer = pointer;
962 }
963 
965 {
966  _GLFWwindow* window = (_GLFWwindow*) handle;
967  assert(window != NULL);
968 
970  return window->userPointer;
971 }
972 
974  GLFWwindowposfun cbfun)
975 {
976  _GLFWwindow* window = (_GLFWwindow*) handle;
977  assert(window != NULL);
978 
980  _GLFW_SWAP_POINTERS(window->callbacks.pos, cbfun);
981  return cbfun;
982 }
983 
985  GLFWwindowsizefun cbfun)
986 {
987  _GLFWwindow* window = (_GLFWwindow*) handle;
988  assert(window != NULL);
989 
991  _GLFW_SWAP_POINTERS(window->callbacks.size, cbfun);
992  return cbfun;
993 }
994 
996  GLFWwindowclosefun cbfun)
997 {
998  _GLFWwindow* window = (_GLFWwindow*) handle;
999  assert(window != NULL);
1000 
1002  _GLFW_SWAP_POINTERS(window->callbacks.close, cbfun);
1003  return cbfun;
1004 }
1005 
1007  GLFWwindowrefreshfun cbfun)
1008 {
1009  _GLFWwindow* window = (_GLFWwindow*) handle;
1010  assert(window != NULL);
1011 
1013  _GLFW_SWAP_POINTERS(window->callbacks.refresh, cbfun);
1014  return cbfun;
1015 }
1016 
1018  GLFWwindowfocusfun cbfun)
1019 {
1020  _GLFWwindow* window = (_GLFWwindow*) handle;
1021  assert(window != NULL);
1022 
1024  _GLFW_SWAP_POINTERS(window->callbacks.focus, cbfun);
1025  return cbfun;
1026 }
1027 
1029  GLFWwindowiconifyfun cbfun)
1030 {
1031  _GLFWwindow* window = (_GLFWwindow*) handle;
1032  assert(window != NULL);
1033 
1035  _GLFW_SWAP_POINTERS(window->callbacks.iconify, cbfun);
1036  return cbfun;
1037 }
1038 
1040  GLFWwindowmaximizefun cbfun)
1041 {
1042  _GLFWwindow* window = (_GLFWwindow*) handle;
1043  assert(window != NULL);
1044 
1046  _GLFW_SWAP_POINTERS(window->callbacks.maximize, cbfun);
1047  return cbfun;
1048 }
1049 
1051  GLFWframebuffersizefun cbfun)
1052 {
1053  _GLFWwindow* window = (_GLFWwindow*) handle;
1054  assert(window != NULL);
1055 
1057  _GLFW_SWAP_POINTERS(window->callbacks.fbsize, cbfun);
1058  return cbfun;
1059 }
1060 
1063 {
1064  _GLFWwindow* window = (_GLFWwindow*) handle;
1065  assert(window != NULL);
1066 
1068  _GLFW_SWAP_POINTERS(window->callbacks.scale, cbfun);
1069  return cbfun;
1070 }
1071 
1073 {
1076 }
1077 
1079 {
1081 
1082  if (!_glfw.windowListHead)
1083  return;
1084 
1086 }
1087 
1089 {
1091  assert(timeout == timeout);
1092  assert(timeout >= 0.0);
1093  assert(timeout <= DBL_MAX);
1094 
1095  if (timeout != timeout || timeout < 0.0 || timeout > DBL_MAX)
1096  {
1097  _glfwInputError(GLFW_INVALID_VALUE, "Invalid time %f", timeout);
1098  return;
1099  }
1100 
1102 }
1103 
1105 {
1107 
1108  if (!_glfw.windowListHead)
1109  return;
1110 
1112 }
1113 
GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow *handle, int numer, int denom)
Sets the aspect ratio of the specified window.
Definition: window.c:618
int redBits
Definition: glfw3.h:1535
GLFWwindowposfun pos
Definition: internal.h:397
void(* GLFWwindowiconifyfun)(GLFWwindow *, int)
The function signature for window iconify/restore callbacks.
Definition: glfw3.h:1269
#define GLFW_AUTO_ICONIFY
Window auto-iconification window hint and attribute.
Definition: glfw3.h:792
#define GLFW_CONTEXT_RELEASE_BEHAVIOR
Context flush-on-release hint and attribute.
Definition: glfw3.h:963
void _glfwInputWindowMonitor(_GLFWwindow *window, _GLFWmonitor *monitor)
Definition: window.c:141
int height
Definition: glfw3.h:1532
GLFWbool focusOnShow
Definition: internal.h:267
_GLFWwindow * share
Definition: internal.h:297
GLFWbool centerCursor
Definition: internal.h:266
GLFWAPI void glfwFocusWindow(GLFWwindow *handle)
Brings the specified window to front and sets input focus.
Definition: window.c:794
GLint y
GLFWAPI void glfwGetWindowSize(GLFWwindow *handle, int *width, int *height)
Retrieves the size of the client area of the specified window.
Definition: window.c:544
GLenum GLsizei const void * pointer
void _glfwPlatformGetWindowSize(_GLFWwindow *window, int *width, int *height)
Definition: null_window.c:104
int blueBits
Definition: glfw3.h:1541
_GLFWfbconfig framebuffer
Definition: internal.h:518
GLFWbool retina
Definition: internal.h:270
GLFWAPI int glfwGetWindowAttrib(GLFWwindow *handle, int attrib)
Returns an attribute of the specified window.
Definition: window.c:804
GLFWwindowcontentscalefun scale
Definition: internal.h:405
GLFWbool scaleToMonitor
Definition: internal.h:268
int _glfwPlatformCreateWindow(_GLFWwindow *window, const _GLFWwndconfig *wndconfig, const _GLFWctxconfig *ctxconfig, const _GLFWfbconfig *fbconfig)
Definition: null_window.c:45
GLFWAPI void glfwSetWindowTitle(GLFWwindow *handle, const char *title)
Sets the title of the specified window.
Definition: window.c:495
GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow *handle, GLFWwindowsizefun cbfun)
Sets the size callback for the specified window.
Definition: window.c:984
#define GLFWAPI
Definition: glfw3.h:240
GLdouble GLdouble GLdouble top
#define GLFW_CONTEXT_ROBUSTNESS
Context robustness hint and attribute.
Definition: glfw3.h:939
void _glfwPlatformPostEmptyEvent(void)
Definition: null_window.c:247
GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow *handle, int minwidth, int minheight, int maxwidth, int maxheight)
Sets the size limits of the specified window.
Definition: window.c:573
_GLFWtls contextSlot
Definition: internal.h:536
#define _GLFW_REQUIRE_INIT()
Definition: internal.h:204
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow *window, int minwidth, int minheight, int maxwidth, int maxheight)
Definition: null_window.c:118
GLFWbool sRGB
Definition: internal.h:326
GLFWAPI void glfwHideWindow(GLFWwindow *handle)
Hides the specified window.
Definition: window.c:781
static GLFWwindow * window
Definition: joysticks.c:55
#define GLFW_OPENGL_FORWARD_COMPAT
OpenGL forward-compatibility hint and attribute.
Definition: glfw3.h:945
int width
Definition: glfw3.h:1529
GLFWAPI void glfwSetWindowAttrib(GLFWwindow *handle, int attrib, int value)
Sets an attribute of the specified window.
Definition: window.c:863
GLFWbool decorated
Definition: internal.h:261
GLuint64 GLenum void * handle
Definition: glext.h:7785
GLFWwindowclosefun close
Definition: internal.h:399
#define GLFW_ICONIFIED
Window iconification window attribute.
Definition: glfw3.h:768
#define GLFW_ACCUM_GREEN_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:868
void _glfwInputWindowFocus(_GLFWwindow *window, GLFWbool focused)
Definition: window.c:43
void _glfwInputWindowSize(_GLFWwindow *window, int width, int height)
Definition: window.c:81
GLfloat value
GLFWAPI void * glfwGetWindowUserPointer(GLFWwindow *handle)
Returns the user pointer of the specified window.
Definition: window.c:964
#define GLFW_CONTEXT_VERSION_MAJOR
Context client API major version hint and attribute.
Definition: glfw3.h:921
void _glfwPlatformGetFramebufferSize(_GLFWwindow *window, int *width, int *height)
Definition: null_window.c:128
int accumGreenBits
Definition: internal.h:320
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow *window, int numer, int denom)
Definition: null_window.c:124
_GLFWctxconfig context
Definition: internal.h:520
struct GLFWmonitor GLFWmonitor
GLFWAPI float glfwGetWindowOpacity(GLFWwindow *handle)
Returns the opacity of the whole window.
Definition: window.c:696
void _glfwInputWindowCloseRequest(_GLFWwindow *window)
Definition: window.c:131
GLFWAPI void glfwPostEmptyEvent(void)
Posts an empty event to the event queue.
Definition: window.c:1104
struct _GLFWwindow::@26 callbacks
#define GLFW_REFRESH_RATE
Monitor refresh rate hint.
Definition: glfw3.h:903
#define GLFW_X11_CLASS_NAME
Definition: glfw3.h:985
GLFWframebuffersizefun fbsize
Definition: internal.h:404
#define GLFW_FALSE
Zero.
Definition: glfw3.h:287
int refreshRate
Definition: glfw3.h:1544
GLFWbool forward
Definition: internal.h:291
void _glfwInputWindowPos(_GLFWwindow *window, int x, int y)
Definition: window.c:72
GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow *handle, GLFWframebuffersizefun cbfun)
Sets the framebuffer resize callback for the specified window.
Definition: window.c:1050
#define GLFW_OPENGL_API
Definition: glfw3.h:990
void _glfwInputWindowContentScale(_GLFWwindow *window, float xscale, float yscale)
Definition: window.c:115
char frameName[256]
Definition: internal.h:271
#define GLFW_OPENGL_PROFILE
OpenGL profile hint and attribute.
Definition: glfw3.h:957
GLFWbool autoIconify
Definition: internal.h:263
int stencilBits
Definition: internal.h:318
void _glfwInputWindowMaximize(_GLFWwindow *window, GLFWbool maximized)
Definition: window.c:97
_GLFWcontext context
Definition: internal.h:394
_GLFWwindow * windowListHead
Definition: internal.h:526
GLFWbool noerror
Definition: internal.h:339
int GLFWbool
Definition: internal.h:61
GLFWbool floating
Definition: internal.h:264
#define GLFW_TRANSPARENT_FRAMEBUFFER
Window framebuffer transparency hint and attribute.
Definition: glfw3.h:816
#define GLFW_CONTEXT_CREATION_API
Context creation API hint and attribute.
Definition: glfw3.h:975
const char * title
Definition: internal.h:258
#define GLFW_HOVERED
Mouse cursor hover window attribute.
Definition: glfw3.h:821
#define GLFW_DONT_CARE
Definition: glfw3.h:1080
void _glfwPlatformIconifyWindow(_GLFWwindow *window)
Definition: null_window.c:151
#define GLFW_SCALE_TO_MONITOR
Window content area scaling window window hint.
Definition: glfw3.h:979
GLFWvidmode videoMode
Definition: internal.h:377
int greenBits
Definition: glfw3.h:1538
#define GLFW_OPENGL_DEBUG_CONTEXT
OpenGL debug context hint and attribute.
Definition: glfw3.h:951
GLFWbool offline
Definition: internal.h:299
#define GLFW_RELEASE
The key or mouse button was released.
Definition: glfw3.h:297
GLuint64 key
Definition: glext.h:8966
GLFWbool _glfwRefreshContextAttribs(_GLFWwindow *window, const _GLFWctxconfig *ctxconfig)
Definition: context.c:344
#define GLFW_COCOA_RETINA_FRAMEBUFFER
Definition: glfw3.h:981
GLFWwindowrefreshfun refresh
Definition: internal.h:400
#define _GLFW_SWAP_POINTERS(x, y)
Definition: internal.h:218
GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow *handle, GLFWwindowiconifyfun cbfun)
Sets the iconify callback for the specified window.
Definition: window.c:1028
GLFWbool resizable
Definition: internal.h:370
GLFWbool transparent
Definition: internal.h:328
GLdouble f
int maxwidth
Definition: internal.h:382
void _glfwPlatformSetWindowOpacity(_GLFWwindow *window, float opacity)
Definition: null_window.c:195
GLFWbool shouldClose
Definition: internal.h:375
#define GLFW_RED_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:833
#define _GLFW_REQUIRE_INIT_OR_RETURN(x)
Definition: internal.h:210
char keys[GLFW_KEY_LAST+1]
Definition: internal.h:390
GLFWAPI void glfwSetWindowUserPointer(GLFWwindow *handle, void *pointer)
Sets the user pointer of the specified window.
Definition: window.c:955
int refreshRate
Definition: internal.h:521
GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig *ctxconfig)
Definition: context.c:47
void _glfwPlatformSetWindowFloating(_GLFWwindow *window, GLFWbool enabled)
Definition: null_window.c:186
#define GLFW_ALPHA_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:848
#define GLFW_FLOATING
Window decoration window hint and attribute.
Definition: glfw3.h:798
int maxheight
Definition: internal.h:382
#define GLFW_CURSOR_NORMAL
Definition: glfw3.h:1006
GLFWbool maximized
Definition: internal.h:265
#define GLFW_NATIVE_CONTEXT_API
Definition: glfw3.h:1014
_GLFWlibrary _glfw
Definition: init.c:44
#define GLFW_CONTEXT_NO_ERROR
Context error suppression hint and attribute.
Definition: glfw3.h:969
GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow *handle, GLFWwindowrefreshfun cbfun)
Sets the refresh callback for the specified window.
Definition: window.c:1006
struct _GLFWlibrary::@27 hints
#define GLFW_STENCIL_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:858
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
void _glfwInputWindowIconify(_GLFWwindow *window, GLFWbool iconified)
Definition: window.c:89
GLFWbool focused
Definition: internal.h:262
GLdouble x
void _glfwInputWindowDamage(_GLFWwindow *window)
Definition: window.c:123
GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow *handle, GLFWwindowposfun cbfun)
Sets the position callback for the specified window.
Definition: window.c:973
int cursorMode
Definition: internal.h:388
void(* GLFWwindowsizefun)(GLFWwindow *, int, int)
The function signature for window resize callbacks.
Definition: glfw3.h:1202
GLFWwindowsizefun size
Definition: internal.h:398
GLFWAPI void glfwIconifyWindow(GLFWwindow *handle)
Iconifies the specified window.
Definition: window.c:724
int _glfwPlatformWindowMaximized(_GLFWwindow *window)
Definition: null_window.c:163
#define GLFW_ACCUM_ALPHA_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:878
GLFWAPI void glfwGetWindowContentScale(GLFWwindow *handle, float *xscale, float *yscale)
Retrieves the content scale for the specified window.
Definition: window.c:681
void * userPointer
Definition: internal.h:376
GLint GLsizei GLsizei height
void glfwDefaultWindowHints(void)
Resets all window hints to their default values.
Definition: window.c:252
void _glfwPlatformShowWindow(_GLFWwindow *window)
Definition: null_window.c:199
void _glfwPlatformFocusWindow(_GLFWwindow *window)
Definition: null_window.c:216
GLFWAPI void glfwMakeContextCurrent(GLFWwindow *window)
Makes the context of the specified window current for the calling thread.
Definition: context.c:611
int accumBlueBits
Definition: internal.h:321
struct _GLFWwindow * next
Definition: internal.h:367
#define GLFW_COCOA_FRAME_NAME
Definition: glfw3.h:982
GLFWbool noerror
Definition: internal.h:293
GLFWAPI void glfwGetWindowFrameSize(GLFWwindow *handle, int *left, int *top, int *right, int *bottom)
Retrieves the size of the frame of the window.
Definition: window.c:661
GLFWAPI void glfwMaximizeWindow(GLFWwindow *handle)
Maximizes the specified window.
Definition: window.c:742
void _glfwPlatformGetWindowFrameSize(_GLFWwindow *window, int *left, int *top, int *right, int *bottom)
Definition: null_window.c:136
void(* GLFWframebuffersizefun)(GLFWwindow *, int, int)
The function signature for framebuffer resize callbacks.
Definition: glfw3.h:1305
void _glfwInputKey(_GLFWwindow *window, int key, int scancode, int action, int mods)
Definition: input.c:259
GLint left
Definition: glext.h:1963
int _glfwPlatformWindowVisible(_GLFWwindow *window)
Definition: null_window.c:230
_GLFWwndconfig window
Definition: internal.h:519
void _glfwPlatformGetWindowPos(_GLFWwindow *window, int *xpos, int *ypos)
Definition: null_window.c:96
GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow *handle, GLFWwindowfocusfun cbfun)
Sets the focus callback for the specified window.
Definition: window.c:1017
int auxBuffers
Definition: internal.h:323
void _glfwPlatformSetCursorPos(_GLFWwindow *window, double xpos, double ypos)
Definition: null_window.c:255
#define GLFW_AUX_BUFFERS
Framebuffer auxiliary buffer hint.
Definition: glfw3.h:883
#define GLFW_CENTER_CURSOR
Cursor centering window hint.
Definition: glfw3.h:809
int minwidth
Definition: internal.h:381
#define GLFW_ACCUM_RED_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:863
#define GLFW_GREEN_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:838
void _glfwPlatformSetWindowIcon(_GLFWwindow *window, int count, const GLFWimage *images)
Definition: null_window.c:83
void _glfwInputError(int code, const char *format,...)
Definition: init.c:129
struct _GLFWwndconfig::@23 ns
#define GLFW_RESIZABLE
Window resize-ability window hint and attribute.
Definition: glfw3.h:774
void _glfwPlatformPollEvents(void)
Definition: null_window.c:235
void(* GLFWwindowposfun)(GLFWwindow *, int, int)
The function signature for window position callbacks.
Definition: glfw3.h:1184
GLFWAPI GLFWmonitor * glfwGetWindowMonitor(GLFWwindow *handle)
Returns the monitor that the window uses for full screen mode.
Definition: window.c:907
void _glfwPlatformSetWindowResizable(_GLFWwindow *window, GLFWbool enabled)
Definition: null_window.c:178
GLFWbool visible
Definition: internal.h:260
void _glfwPlatformRestoreWindow(_GLFWwindow *window)
Definition: null_window.c:155
GLFWbool debug
Definition: internal.h:292
GLFWAPI void glfwSetWindowSize(GLFWwindow *handle, int width, int height)
Sets the size of the client area of the specified window.
Definition: window.c:558
float _glfwPlatformGetWindowOpacity(_GLFWwindow *window)
Definition: null_window.c:190
GLFWAPI void glfwSetWindowPos(GLFWwindow *handle, int xpos, int ypos)
Sets the position of the client area of the specified window.
Definition: window.c:531
void _glfwPlatformSetWindowSize(_GLFWwindow *window, int width, int height)
Definition: null_window.c:112
#define GLFW_FOCUSED
Input focus window hint and attribute.
Definition: glfw3.h:763
GLFWAPI void glfwSetWindowShouldClose(GLFWwindow *handle, int value)
Sets the close flag of the specified window.
Definition: window.c:486
GLFWAPI void glfwWaitEvents(void)
Waits until events are queued and processes them.
Definition: window.c:1078
GLFWbool debug
Definition: internal.h:339
void _glfwPlatformGetWindowContentScale(_GLFWwindow *window, float *xscale, float *yscale)
Definition: null_window.c:142
GLFWbool floating
Definition: internal.h:373
void _glfwPlatformWaitEvents(void)
Definition: null_window.c:239
#define GLFW_STEREO
OpenGL stereoscopic rendering hint.
Definition: glfw3.h:888
GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow *handle, GLFWwindowcontentscalefun cbfun)
Sets the window content scale callback for the specified window.
Definition: window.c:1061
char className[256]
Definition: internal.h:274
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.
Definition: window.c:916
GLFWAPI GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)
Creates a window and its associated context.
Definition: window.c:151
GLFWAPI void glfwWaitEventsTimeout(double timeout)
Waits with timeout until events are queued and processes them.
Definition: window.c:1088
#define GLFW_TRUE
One.
Definition: glfw3.h:279
#define GLFW_INVALID_ENUM
One of the arguments to the function was an invalid enum value.
Definition: glfw3.h:663
int _glfwPlatformWindowFocused(_GLFWwindow *window)
Definition: null_window.c:220
#define GLFW_INVALID_VALUE
One of the arguments to the function was an invalid value.
Definition: glfw3.h:674
#define GLFW_FOCUS_ON_SHOW
Input focus on calling show window hint and attribute.
Definition: glfw3.h:827
void _glfwInputFramebufferSize(_GLFWwindow *window, int width, int height)
Definition: window.c:106
GLFWAPI void glfwSetWindowOpacity(GLFWwindow *handle, float opacity)
Sets the opacity of the whole window.
Definition: window.c:705
GLFWbool autoIconify
Definition: internal.h:372
#define GLFW_DOUBLEBUFFER
Framebuffer double buffering hint.
Definition: glfw3.h:908
#define GLFW_KEY_LAST
Definition: glfw3.h:483
#define GLFW_SRGB_CAPABLE
Framebuffer sRGB hint.
Definition: glfw3.h:898
GLFWbool resizable
Definition: internal.h:259
void _glfwPlatformWaitEventsTimeout(double timeout)
Definition: null_window.c:243
GLFWbool stereo
Definition: internal.h:324
#define GLFW_MAXIMIZED
Window maximization window hint and attribute.
Definition: glfw3.h:804
GLFWAPI void glfwGetWindowPos(GLFWwindow *handle, int *xpos, int *ypos)
Retrieves the position of the client area of the specified window.
Definition: window.c:517
GLFWAPI void glfwRequestWindowAttention(GLFWwindow *handle)
Requests user attention to the specified window.
Definition: window.c:771
GLdouble right
GLbitfield GLuint64 timeout
void _glfwPlatformSetWindowDecorated(_GLFWwindow *window, GLFWbool enabled)
Definition: null_window.c:182
void _glfwPlatformMaximizeWindow(_GLFWwindow *window)
Definition: null_window.c:159
#define GLFW_CONTEXT_REVISION
Context client API revision number hint and attribute.
Definition: glfw3.h:933
GLFWbool focusOnShow
Definition: internal.h:374
static double xpos
Definition: splitview.c:33
GLFWAPI void glfwDestroyWindow(GLFWwindow *handle)
Destroys the specified window and its context.
Definition: window.c:444
GLFWAPI void glfwGetFramebufferSize(GLFWwindow *handle, int *width, int *height)
Retrieves the size of the framebuffer of the specified window.
Definition: window.c:647
static const char * maximized
Definition: model-views.h:183
GLFWAPI void glfwShowWindow(GLFWwindow *handle)
Makes the specified window visible.
Definition: window.c:755
GLint GLsizei count
GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow *handle, GLFWwindowclosefun cbfun)
Sets the close callback for the specified window.
Definition: window.c:995
void(* GLFWwindowclosefun)(GLFWwindow *)
The function signature for window close callbacks.
Definition: glfw3.h:1218
int _glfwPlatformWindowHovered(_GLFWwindow *window)
Definition: null_window.c:168
#define GLFW_X11_INSTANCE_NAME
Definition: glfw3.h:986
#define GLFW_VISIBLE
Window visibility window hint and attribute.
Definition: glfw3.h:780
struct _GLFWctxconfig::@25 nsgl
#define GLFW_MOUSE_BUTTON_LAST
Definition: glfw3.h:545
#define GLFW_SAMPLES
Framebuffer MSAA samples hint.
Definition: glfw3.h:893
void * _glfwPlatformGetTls(_GLFWtls *tls)
Definition: posix_thread.c:60
int minheight
Definition: internal.h:381
GLFWAPI void glfwPollEvents(void)
Processes all pending events.
Definition: window.c:1072
int accumAlphaBits
Definition: internal.h:322
GLFWbool doublebuffer
Definition: internal.h:327
char mouseButtons[GLFW_MOUSE_BUTTON_LAST+1]
Definition: internal.h:389
#define GLFW_ACCUM_BLUE_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:873
void _glfwPlatformDestroyWindow(_GLFWwindow *window)
Definition: null_window.c:73
#define GLFW_BLUE_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:843
#define NULL
Definition: tinycthread.c:47
Image data.
Definition: glfw3.h:1588
void _glfwPlatformRequestWindowAttention(_GLFWwindow *window)
Definition: null_window.c:204
void _glfwInputMouseClick(_GLFWwindow *window, int button, int action, int mods)
Definition: input.c:318
void(* GLFWwindowmaximizefun)(GLFWwindow *, int)
The function signature for window maximize/restore callbacks.
Definition: glfw3.h:1287
void _glfwPlatformSetWindowTitle(_GLFWwindow *window, const char *title)
Definition: null_window.c:79
#define GLFW_CONTEXT_VERSION_MINOR
Context client API minor version hint and attribute.
Definition: glfw3.h:927
#define GLFW_DECORATED
Window decoration window hint and attribute.
Definition: glfw3.h:786
void _glfwPlatformHideWindow(_GLFWwindow *window)
Definition: null_window.c:212
GLFWbool forward
Definition: internal.h:339
GLFWAPI void glfwWindowHintString(int hint, const char *value)
Sets the specified window hint to the desired value.
Definition: window.c:419
GLFWAPI void glfwRestoreWindow(GLFWwindow *handle)
Restores the specified window.
Definition: window.c:733
void _glfwPlatformSetWindowPos(_GLFWwindow *window, int xpos, int ypos)
Definition: null_window.c:100
#define GLFW_COCOA_GRAPHICS_SWITCHING
Definition: glfw3.h:983
#define GLFW_PRESS
The key or mouse button was pressed.
Definition: glfw3.h:304
_GLFWmonitor * monitor
Definition: internal.h:378
GLFWbool decorated
Definition: internal.h:371
GLFWwindowmaximizefun maximize
Definition: internal.h:403
GLFWwindowiconifyfun iconify
Definition: internal.h:402
int robustness
Definition: internal.h:341
struct _GLFWwndconfig::@24 x11
char instanceName[256]
Definition: internal.h:275
void(* GLFWwindowrefreshfun)(GLFWwindow *)
The function signature for window content refresh callbacks.
Definition: glfw3.h:1234
int revision
Definition: internal.h:338
GLFWwindowfocusfun focus
Definition: internal.h:401
struct GLFWwindow GLFWwindow
GLFWAPI void glfwWindowHint(int hint, int value)
Sets the specified window hint to the desired value.
Definition: window.c:291
int accumRedBits
Definition: internal.h:319
GLFWAPI void glfwSetWindowIcon(GLFWwindow *handle, int count, const GLFWimage *images)
Sets the icon for the specified window.
Definition: window.c:505
#define GLFW_CLIENT_API
Context client API hint and attribute.
Definition: glfw3.h:915
GLint GLsizei width
GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow *handle, GLFWwindowmaximizefun cbfun)
Sets the maximize callback for the specified window.
Definition: window.c:1039
static double ypos
Definition: splitview.c:33
#define GLFW_NO_API
Definition: glfw3.h:989
int _glfwPlatformGetKeyScancode(int key)
Definition: null_window.c:297
void _glfwPlatformSetWindowMonitor(_GLFWwindow *window, _GLFWmonitor *monitor, int xpos, int ypos, int width, int height, int refreshRate)
Definition: null_window.c:88
#define GLFW_DEPTH_BITS
Framebuffer bit depth hint.
Definition: glfw3.h:853
void(* GLFWwindowfocusfun)(GLFWwindow *, int)
The function signature for window focus/defocus callbacks.
Definition: glfw3.h:1251
GLFWAPI int glfwWindowShouldClose(GLFWwindow *handle)
Checks the close flag of the specified window.
Definition: window.c:477
GLdouble GLdouble bottom


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:23