GLFW  3.0.2
A multi-platform library for OpenGL, window and input
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
glfw3.h
Go to the documentation of this file.
1 /*************************************************************************
2  * GLFW 3.0 - www.glfw.org
3  * A library for OpenGL, window and input
4  *------------------------------------------------------------------------
5  * Copyright (c) 2002-2006 Marcus Geelnard
6  * Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
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 #ifndef _glfw3_h_
30 #define _glfw3_h_
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 
37 /*************************************************************************
38  * Doxygen documentation
39  *************************************************************************/
40 
66 /*************************************************************************
67  * Global definitions
68  *************************************************************************/
69 
70 /* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */
71 
72 /* Please report any problems that you find with your compiler, which may
73  * be solved in this section! There are several compilers that I have not
74  * been able to test this file with yet.
75  *
76  * First: If we are we on Windows, we want a single define for it (_WIN32)
77  * (Note: For Cygwin the compiler flag -mwin32 should be used, but to
78  * make sure that things run smoothly for Cygwin users, we add __CYGWIN__
79  * to the list of "valid Win32 identifiers", which removes the need for
80  * -mwin32)
81  */
82 #if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__))
83  #define _WIN32
84 #endif /* _WIN32 */
85 
86 /* In order for extension support to be portable, we need to define an
87  * OpenGL function call method. We use the keyword APIENTRY, which is
88  * defined for Win32. (Note: Windows also needs this for <GL/gl.h>)
89  */
90 #ifndef APIENTRY
91  #ifdef _WIN32
92  #define APIENTRY __stdcall
93  #else
94  #define APIENTRY
95  #endif
96 #endif /* APIENTRY */
97 
98 /* The following three defines are here solely to make some Windows-based
99  * <GL/gl.h> files happy. Theoretically we could include <windows.h>, but
100  * it has the major drawback of severely polluting our namespace.
101  */
102 
103 /* Under Windows, we need WINGDIAPI defined */
104 #if !defined(WINGDIAPI) && defined(_WIN32)
105  #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__POCC__)
106  /* Microsoft Visual C++, Borland C++ Builder and Pelles C */
107  #define WINGDIAPI __declspec(dllimport)
108  #elif defined(__LCC__)
109  /* LCC-Win32 */
110  #define WINGDIAPI __stdcall
111  #else
112  /* Others (e.g. MinGW, Cygwin) */
113  #define WINGDIAPI extern
114  #endif
115  #define GLFW_WINGDIAPI_DEFINED
116 #endif /* WINGDIAPI */
117 
118 /* Some <GL/glu.h> files also need CALLBACK defined */
119 #if !defined(CALLBACK) && defined(_WIN32)
120  #if defined(_MSC_VER)
121  /* Microsoft Visual C++ */
122  #if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
123  #define CALLBACK __stdcall
124  #else
125  #define CALLBACK
126  #endif
127  #else
128  /* Other Windows compilers */
129  #define CALLBACK __stdcall
130  #endif
131  #define GLFW_CALLBACK_DEFINED
132 #endif /* CALLBACK */
133 
134 /* Most GL/glu.h variants on Windows need wchar_t
135  * OpenGL/gl.h blocks the definition of ptrdiff_t by glext.h on OS X */
136 #include <stddef.h>
137 
138 
139 /* ---------------- GLFW related system specific defines ----------------- */
140 
141 #if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
142  /* GLFW_DLL is defined by users of GLFW when compiling programs that will link
143  * to the DLL version of the GLFW library. _GLFW_BUILD_DLL is defined by the
144  * GLFW configuration header when compiling the DLL version of the library.
145  */
146  #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined"
147 #endif
148 
149 #if defined(_WIN32) && defined(_GLFW_BUILD_DLL)
150 
151  /* We are building a Win32 DLL */
152  #define GLFWAPI __declspec(dllexport)
153 
154 #elif defined(_WIN32) && defined(GLFW_DLL)
155 
156  /* We are calling a Win32 DLL */
157  #if defined(__LCC__)
158  #define GLFWAPI extern
159  #else
160  #define GLFWAPI __declspec(dllimport)
161  #endif
162 
163 #elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL)
164 
165  #define GLFWAPI __attribute__((visibility("default")))
166 
167 #else
168 
169  /* We are either building/calling a static lib or we are non-win32 */
170  #define GLFWAPI
171 
172 #endif
173 
174 /* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */
175 
176 /* Include the chosen client API headers.
177  */
178 #if defined(__APPLE_CC__)
179  #if defined(GLFW_INCLUDE_GLCOREARB)
180  #include <OpenGL/gl3.h>
181  #elif !defined(GLFW_INCLUDE_NONE)
182  #define GL_GLEXT_LEGACY
183  #include <OpenGL/gl.h>
184  #endif
185  #if defined(GLFW_INCLUDE_GLU)
186  #include <OpenGL/glu.h>
187  #endif
188 #else
189  #if defined(GLFW_INCLUDE_GLCOREARB)
190  #include <GL/glcorearb.h>
191  #elif defined(GLFW_INCLUDE_ES1)
192  #include <GLES/gl.h>
193  #elif defined(GLFW_INCLUDE_ES2)
194  #include <GLES2/gl2.h>
195  #elif defined(GLFW_INCLUDE_ES3)
196  #include <GLES3/gl3.h>
197  #elif !defined(GLFW_INCLUDE_NONE)
198  #include <GL/gl.h>
199  #endif
200  #if defined(GLFW_INCLUDE_GLU)
201  #include <GL/glu.h>
202  #endif
203 #endif
204 
205 
206 /*************************************************************************
207  * GLFW API tokens
208  *************************************************************************/
209 
217 #define GLFW_VERSION_MAJOR 3
218 
224 #define GLFW_VERSION_MINOR 0
225 
231 #define GLFW_VERSION_REVISION 2
232 
239 #define GLFW_RELEASE 0
240 
243 #define GLFW_PRESS 1
244 
247 #define GLFW_REPEAT 2
248 
271 /* The unknown key */
272 #define GLFW_KEY_UNKNOWN -1
273 
274 /* Printable keys */
275 #define GLFW_KEY_SPACE 32
276 #define GLFW_KEY_APOSTROPHE 39 /* ' */
277 #define GLFW_KEY_COMMA 44 /* , */
278 #define GLFW_KEY_MINUS 45 /* - */
279 #define GLFW_KEY_PERIOD 46 /* . */
280 #define GLFW_KEY_SLASH 47 /* / */
281 #define GLFW_KEY_0 48
282 #define GLFW_KEY_1 49
283 #define GLFW_KEY_2 50
284 #define GLFW_KEY_3 51
285 #define GLFW_KEY_4 52
286 #define GLFW_KEY_5 53
287 #define GLFW_KEY_6 54
288 #define GLFW_KEY_7 55
289 #define GLFW_KEY_8 56
290 #define GLFW_KEY_9 57
291 #define GLFW_KEY_SEMICOLON 59 /* ; */
292 #define GLFW_KEY_EQUAL 61 /* = */
293 #define GLFW_KEY_A 65
294 #define GLFW_KEY_B 66
295 #define GLFW_KEY_C 67
296 #define GLFW_KEY_D 68
297 #define GLFW_KEY_E 69
298 #define GLFW_KEY_F 70
299 #define GLFW_KEY_G 71
300 #define GLFW_KEY_H 72
301 #define GLFW_KEY_I 73
302 #define GLFW_KEY_J 74
303 #define GLFW_KEY_K 75
304 #define GLFW_KEY_L 76
305 #define GLFW_KEY_M 77
306 #define GLFW_KEY_N 78
307 #define GLFW_KEY_O 79
308 #define GLFW_KEY_P 80
309 #define GLFW_KEY_Q 81
310 #define GLFW_KEY_R 82
311 #define GLFW_KEY_S 83
312 #define GLFW_KEY_T 84
313 #define GLFW_KEY_U 85
314 #define GLFW_KEY_V 86
315 #define GLFW_KEY_W 87
316 #define GLFW_KEY_X 88
317 #define GLFW_KEY_Y 89
318 #define GLFW_KEY_Z 90
319 #define GLFW_KEY_LEFT_BRACKET 91 /* [ */
320 #define GLFW_KEY_BACKSLASH 92 /* \ */
321 #define GLFW_KEY_RIGHT_BRACKET 93 /* ] */
322 #define GLFW_KEY_GRAVE_ACCENT 96 /* ` */
323 #define GLFW_KEY_WORLD_1 161 /* non-US #1 */
324 #define GLFW_KEY_WORLD_2 162 /* non-US #2 */
325 
326 /* Function keys */
327 #define GLFW_KEY_ESCAPE 256
328 #define GLFW_KEY_ENTER 257
329 #define GLFW_KEY_TAB 258
330 #define GLFW_KEY_BACKSPACE 259
331 #define GLFW_KEY_INSERT 260
332 #define GLFW_KEY_DELETE 261
333 #define GLFW_KEY_RIGHT 262
334 #define GLFW_KEY_LEFT 263
335 #define GLFW_KEY_DOWN 264
336 #define GLFW_KEY_UP 265
337 #define GLFW_KEY_PAGE_UP 266
338 #define GLFW_KEY_PAGE_DOWN 267
339 #define GLFW_KEY_HOME 268
340 #define GLFW_KEY_END 269
341 #define GLFW_KEY_CAPS_LOCK 280
342 #define GLFW_KEY_SCROLL_LOCK 281
343 #define GLFW_KEY_NUM_LOCK 282
344 #define GLFW_KEY_PRINT_SCREEN 283
345 #define GLFW_KEY_PAUSE 284
346 #define GLFW_KEY_F1 290
347 #define GLFW_KEY_F2 291
348 #define GLFW_KEY_F3 292
349 #define GLFW_KEY_F4 293
350 #define GLFW_KEY_F5 294
351 #define GLFW_KEY_F6 295
352 #define GLFW_KEY_F7 296
353 #define GLFW_KEY_F8 297
354 #define GLFW_KEY_F9 298
355 #define GLFW_KEY_F10 299
356 #define GLFW_KEY_F11 300
357 #define GLFW_KEY_F12 301
358 #define GLFW_KEY_F13 302
359 #define GLFW_KEY_F14 303
360 #define GLFW_KEY_F15 304
361 #define GLFW_KEY_F16 305
362 #define GLFW_KEY_F17 306
363 #define GLFW_KEY_F18 307
364 #define GLFW_KEY_F19 308
365 #define GLFW_KEY_F20 309
366 #define GLFW_KEY_F21 310
367 #define GLFW_KEY_F22 311
368 #define GLFW_KEY_F23 312
369 #define GLFW_KEY_F24 313
370 #define GLFW_KEY_F25 314
371 #define GLFW_KEY_KP_0 320
372 #define GLFW_KEY_KP_1 321
373 #define GLFW_KEY_KP_2 322
374 #define GLFW_KEY_KP_3 323
375 #define GLFW_KEY_KP_4 324
376 #define GLFW_KEY_KP_5 325
377 #define GLFW_KEY_KP_6 326
378 #define GLFW_KEY_KP_7 327
379 #define GLFW_KEY_KP_8 328
380 #define GLFW_KEY_KP_9 329
381 #define GLFW_KEY_KP_DECIMAL 330
382 #define GLFW_KEY_KP_DIVIDE 331
383 #define GLFW_KEY_KP_MULTIPLY 332
384 #define GLFW_KEY_KP_SUBTRACT 333
385 #define GLFW_KEY_KP_ADD 334
386 #define GLFW_KEY_KP_ENTER 335
387 #define GLFW_KEY_KP_EQUAL 336
388 #define GLFW_KEY_LEFT_SHIFT 340
389 #define GLFW_KEY_LEFT_CONTROL 341
390 #define GLFW_KEY_LEFT_ALT 342
391 #define GLFW_KEY_LEFT_SUPER 343
392 #define GLFW_KEY_RIGHT_SHIFT 344
393 #define GLFW_KEY_RIGHT_CONTROL 345
394 #define GLFW_KEY_RIGHT_ALT 346
395 #define GLFW_KEY_RIGHT_SUPER 347
396 #define GLFW_KEY_MENU 348
397 #define GLFW_KEY_LAST GLFW_KEY_MENU
398 
407 #define GLFW_MOD_SHIFT 0x0001
408 
410 #define GLFW_MOD_CONTROL 0x0002
411 
413 #define GLFW_MOD_ALT 0x0004
414 
416 #define GLFW_MOD_SUPER 0x0008
417 
423 #define GLFW_MOUSE_BUTTON_1 0
424 #define GLFW_MOUSE_BUTTON_2 1
425 #define GLFW_MOUSE_BUTTON_3 2
426 #define GLFW_MOUSE_BUTTON_4 3
427 #define GLFW_MOUSE_BUTTON_5 4
428 #define GLFW_MOUSE_BUTTON_6 5
429 #define GLFW_MOUSE_BUTTON_7 6
430 #define GLFW_MOUSE_BUTTON_8 7
431 #define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8
432 #define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1
433 #define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2
434 #define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3
435 
440 #define GLFW_JOYSTICK_1 0
441 #define GLFW_JOYSTICK_2 1
442 #define GLFW_JOYSTICK_3 2
443 #define GLFW_JOYSTICK_4 3
444 #define GLFW_JOYSTICK_5 4
445 #define GLFW_JOYSTICK_6 5
446 #define GLFW_JOYSTICK_7 6
447 #define GLFW_JOYSTICK_8 7
448 #define GLFW_JOYSTICK_9 8
449 #define GLFW_JOYSTICK_10 9
450 #define GLFW_JOYSTICK_11 10
451 #define GLFW_JOYSTICK_12 11
452 #define GLFW_JOYSTICK_13 12
453 #define GLFW_JOYSTICK_14 13
454 #define GLFW_JOYSTICK_15 14
455 #define GLFW_JOYSTICK_16 15
456 #define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16
457 
464 #define GLFW_NOT_INITIALIZED 0x00010001
465 
467 #define GLFW_NO_CURRENT_CONTEXT 0x00010002
468 
471 #define GLFW_INVALID_ENUM 0x00010003
472 
474 #define GLFW_INVALID_VALUE 0x00010004
475 
477 #define GLFW_OUT_OF_MEMORY 0x00010005
478 
481 #define GLFW_API_UNAVAILABLE 0x00010006
482 
484 #define GLFW_VERSION_UNAVAILABLE 0x00010007
485 
488 #define GLFW_PLATFORM_ERROR 0x00010008
489 
491 #define GLFW_FORMAT_UNAVAILABLE 0x00010009
492 
494 #define GLFW_FOCUSED 0x00020001
495 #define GLFW_ICONIFIED 0x00020002
496 #define GLFW_RESIZABLE 0x00020003
497 #define GLFW_VISIBLE 0x00020004
498 #define GLFW_DECORATED 0x00020005
499 
500 #define GLFW_RED_BITS 0x00021001
501 #define GLFW_GREEN_BITS 0x00021002
502 #define GLFW_BLUE_BITS 0x00021003
503 #define GLFW_ALPHA_BITS 0x00021004
504 #define GLFW_DEPTH_BITS 0x00021005
505 #define GLFW_STENCIL_BITS 0x00021006
506 #define GLFW_ACCUM_RED_BITS 0x00021007
507 #define GLFW_ACCUM_GREEN_BITS 0x00021008
508 #define GLFW_ACCUM_BLUE_BITS 0x00021009
509 #define GLFW_ACCUM_ALPHA_BITS 0x0002100A
510 #define GLFW_AUX_BUFFERS 0x0002100B
511 #define GLFW_STEREO 0x0002100C
512 #define GLFW_SAMPLES 0x0002100D
513 #define GLFW_SRGB_CAPABLE 0x0002100E
514 #define GLFW_REFRESH_RATE 0x0002100F
515 
516 #define GLFW_CLIENT_API 0x00022001
517 #define GLFW_CONTEXT_VERSION_MAJOR 0x00022002
518 #define GLFW_CONTEXT_VERSION_MINOR 0x00022003
519 #define GLFW_CONTEXT_REVISION 0x00022004
520 #define GLFW_CONTEXT_ROBUSTNESS 0x00022005
521 #define GLFW_OPENGL_FORWARD_COMPAT 0x00022006
522 #define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007
523 #define GLFW_OPENGL_PROFILE 0x00022008
524 
525 #define GLFW_OPENGL_API 0x00030001
526 #define GLFW_OPENGL_ES_API 0x00030002
527 
528 #define GLFW_NO_ROBUSTNESS 0
529 #define GLFW_NO_RESET_NOTIFICATION 0x00031001
530 #define GLFW_LOSE_CONTEXT_ON_RESET 0x00031002
531 
532 #define GLFW_OPENGL_ANY_PROFILE 0
533 #define GLFW_OPENGL_CORE_PROFILE 0x00032001
534 #define GLFW_OPENGL_COMPAT_PROFILE 0x00032002
535 
536 #define GLFW_CURSOR 0x00033001
537 #define GLFW_STICKY_KEYS 0x00033002
538 #define GLFW_STICKY_MOUSE_BUTTONS 0x00033003
539 
540 #define GLFW_CURSOR_NORMAL 0x00034001
541 #define GLFW_CURSOR_HIDDEN 0x00034002
542 #define GLFW_CURSOR_DISABLED 0x00034003
543 
544 #define GLFW_CONNECTED 0x00040001
545 #define GLFW_DISCONNECTED 0x00040002
546 
547 
548 /*************************************************************************
549  * GLFW API types
550  *************************************************************************/
551 
559 typedef void (*GLFWglproc)(void);
560 
567 typedef struct GLFWmonitor GLFWmonitor;
568 
575 typedef struct GLFWwindow GLFWwindow;
576 
588 typedef void (* GLFWerrorfun)(int,const char*);
589 
604 typedef void (* GLFWwindowposfun)(GLFWwindow*,int,int);
605 
618 typedef void (* GLFWwindowsizefun)(GLFWwindow*,int,int);
619 
630 typedef void (* GLFWwindowclosefun)(GLFWwindow*);
631 
642 typedef void (* GLFWwindowrefreshfun)(GLFWwindow*);
643 
656 typedef void (* GLFWwindowfocusfun)(GLFWwindow*,int);
657 
671 typedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int);
672 
686 typedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int);
687 
703 typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int);
704 
717 typedef void (* GLFWcursorposfun)(GLFWwindow*,double,double);
718 
731 typedef void (* GLFWcursorenterfun)(GLFWwindow*,int);
732 
745 typedef void (* GLFWscrollfun)(GLFWwindow*,double,double);
746 
762 typedef void (* GLFWkeyfun)(GLFWwindow*,int,int,int,int);
763 
775 typedef void (* GLFWcharfun)(GLFWwindow*,unsigned int);
776 
788 typedef void (* GLFWmonitorfun)(GLFWmonitor*,int);
789 
796 typedef struct
797 {
800  int width;
803  int height;
806  int redBits;
812  int blueBits;
816 } GLFWvidmode;
817 
826 typedef struct
827 {
830  unsigned short* red;
833  unsigned short* green;
836  unsigned short* blue;
839  unsigned int size;
840 } GLFWgammaramp;
841 
842 
843 /*************************************************************************
844  * GLFW API functions
845  *************************************************************************/
846 
878 GLFWAPI int glfwInit(void);
879 
902 GLFWAPI void glfwTerminate(void);
903 
922 GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);
923 
952 GLFWAPI const char* glfwGetVersionString(void);
953 
978 
999 GLFWAPI GLFWmonitor** glfwGetMonitors(int* count);
1000 
1012 GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void);
1013 
1025 GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
1026 
1044 GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* width, int* height);
1045 
1060 GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor);
1061 
1079 
1102 GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count);
1103 
1120 GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor);
1121 
1132 GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma);
1133 
1146 GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);
1147 
1159 GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
1160 
1172 GLFWAPI void glfwDefaultWindowHints(void);
1173 
1194 GLFWAPI void glfwWindowHint(int target, int hint);
1195 
1253 GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
1254 
1275 GLFWAPI void glfwDestroyWindow(GLFWwindow* window);
1276 
1288 GLFWAPI int glfwWindowShouldClose(GLFWwindow* window);
1289 
1303 GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value);
1304 
1317 GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
1318 
1334 GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
1335 
1366 GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
1367 
1383 GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
1384 
1407 GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height);
1408 
1424 GLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height);
1425 
1441 GLFWAPI void glfwIconifyWindow(GLFWwindow* window);
1442 
1458 GLFWAPI void glfwRestoreWindow(GLFWwindow* window);
1459 
1474 GLFWAPI void glfwShowWindow(GLFWwindow* window);
1475 
1490 GLFWAPI void glfwHideWindow(GLFWwindow* window);
1491 
1502 GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);
1503 
1516 GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib);
1517 
1531 GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer);
1532 
1544 GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);
1545 
1560 GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun cbfun);
1561 
1576 GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun cbfun);
1577 
1600 GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun cbfun);
1601 
1625 
1644 GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun cbfun);
1645 
1660 
1675 
1699 GLFWAPI void glfwPollEvents(void);
1700 
1726 GLFWAPI void glfwWaitEvents(void);
1727 
1738 GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
1739 
1773 GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value);
1774 
1799 GLFWAPI int glfwGetKey(GLFWwindow* window, int key);
1800 
1817 GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
1818 
1843 GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);
1844 
1865 GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);
1866 
1899 GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun);
1900 
1918 GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun);
1919 
1939 GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun cbfun);
1940 
1955 GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun cbfun);
1956 
1971 GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun cbfun);
1972 
1990 GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun cbfun);
1991 
2001 GLFWAPI int glfwJoystickPresent(int joy);
2002 
2020 GLFWAPI const float* glfwGetJoystickAxes(int joy, int* count);
2021 
2039 GLFWAPI const unsigned char* glfwGetJoystickButtons(int joy, int* count);
2040 
2057 GLFWAPI const char* glfwGetJoystickName(int joy);
2058 
2074 GLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string);
2075 
2097 GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window);
2098 
2115 GLFWAPI double glfwGetTime(void);
2116 
2130 GLFWAPI void glfwSetTime(double time);
2131 
2148 GLFWAPI void glfwMakeContextCurrent(GLFWwindow* window);
2149 
2164 GLFWAPI GLFWwindow* glfwGetCurrentContext(void);
2165 
2184 GLFWAPI void glfwSwapBuffers(GLFWwindow* window);
2185 
2213 GLFWAPI void glfwSwapInterval(int interval);
2214 
2234 GLFWAPI int glfwExtensionSupported(const char* extension);
2235 
2255 GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname);
2256 
2257 
2258 /*************************************************************************
2259  * Global definition cleanup
2260  *************************************************************************/
2261 
2262 /* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */
2263 
2264 #ifdef GLFW_WINGDIAPI_DEFINED
2265  #undef WINGDIAPI
2266  #undef GLFW_WINGDIAPI_DEFINED
2267 #endif
2268 
2269 #ifdef GLFW_CALLBACK_DEFINED
2270  #undef CALLBACK
2271  #undef GLFW_CALLBACK_DEFINED
2272 #endif
2273 
2274 /* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */
2275 
2276 
2277 #ifdef __cplusplus
2278 }
2279 #endif
2280 
2281 #endif /* _glfw3_h_ */
2282