GLFW 3.0.1 A multi-platform library for OpenGL, window and input

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros Groups Pages
glfw3.h
Go to the documentation of this file.
1 /*************************************************************************
2 * GLFW - An OpenGL library
3 * API version: 3.0
4 * WWW: http://www.glfw.org/
5 *------------------------------------------------------------------------
6 * Copyright (c) 2002-2006 Marcus Geelnard
7 * Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
8 *
9 * This software is provided 'as-is', without any express or implied
10 * warranty. In no event will the authors be held liable for any damages
11 * arising from the use of this software.
12 *
13 * Permission is granted to anyone to use this software for any purpose,
14 * including commercial applications, and to alter it and redistribute it
15 * freely, subject to the following restrictions:
16 *
17 * 1. The origin of this software must not be misrepresented; you must not
18 * claim that you wrote the original software. If you use this software
19 * in a product, an acknowledgment in the product documentation would
20 * be appreciated but is not required.
21 *
22 * 2. Altered source versions must be plainly marked as such, and must not
23 * be misrepresented as being the original software.
24 *
25 * 3. This notice may not be removed or altered from any source
26 * distribution.
27 *
28 *************************************************************************/
29
30 #ifndef _glfw3_h_
31 #define _glfw3_h_
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37
38 /*************************************************************************
39 * Doxygen documentation
40 *************************************************************************/
41
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 #if defined(_WIN32)
136 #include <stddef.h>
137 #endif
138
139
140 /* ---------------- GLFW related system specific defines ----------------- */
141
142 #if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL)
143 #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined"
144 #endif
145
146 #if defined(_WIN32) && defined(_GLFW_BUILD_DLL)
147
148 /* We are building a Win32 DLL */
149 #define GLFWAPI __declspec(dllexport)
150
151 #elif defined(_WIN32) && defined(GLFW_DLL)
152
153 /* We are calling a Win32 DLL */
154 #if defined(__LCC__)
155 #define GLFWAPI extern
156 #else
157 #define GLFWAPI __declspec(dllimport)
158 #endif
159
160 #elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL)
161
162 #define GLFWAPI __attribute__((visibility("default")))
163
164 #else
165
166 /* We are either building/calling a static lib or we are non-win32 */
167 #define GLFWAPI
168
169 #endif
170
171 /* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */
172
173 /* Include the chosen client API headers.
174 */
175 #if defined(__APPLE_CC__)
176 #if defined(GLFW_INCLUDE_GLCOREARB)
177 #include <OpenGL/gl3.h>
178 #elif !defined(GLFW_INCLUDE_NONE)
179 #define GL_GLEXT_LEGACY
180 #include <OpenGL/gl.h>
181 #endif
182 #if defined(GLFW_INCLUDE_GLU)
183 #include <OpenGL/glu.h>
184 #endif
185 #else
186 #if defined(GLFW_INCLUDE_GLCOREARB)
187 #include <GL/glcorearb.h>
188 #elif defined(GLFW_INCLUDE_ES1)
189 #include <GLES/gl.h>
190 #elif defined(GLFW_INCLUDE_ES2)
191 #include <GLES2/gl2.h>
192 #elif defined(GLFW_INCLUDE_ES3)
193 #include <GLES3/gl3.h>
194 #elif !defined(GLFW_INCLUDE_NONE)
195 #include <GL/gl.h>
196 #endif
197 #if defined(GLFW_INCLUDE_GLU)
198 #include <GL/glu.h>
199 #endif
200 #endif
201
202
203 /*************************************************************************
204 * GLFW API tokens
205 *************************************************************************/
206
214 #define GLFW_VERSION_MAJOR 3
215
221 #define GLFW_VERSION_MINOR 0
222
228 #define GLFW_VERSION_REVISION 1
229
236 #define GLFW_RELEASE 0
237
240 #define GLFW_PRESS 1
241
244 #define GLFW_REPEAT 2
245
268 /* The unknown key */
269 #define GLFW_KEY_UNKNOWN -1
270
271 /* Printable keys */
272 #define GLFW_KEY_SPACE 32
273 #define GLFW_KEY_APOSTROPHE 39 /* ' */
274 #define GLFW_KEY_COMMA 44 /* , */
275 #define GLFW_KEY_MINUS 45 /* - */
276 #define GLFW_KEY_PERIOD 46 /* . */
277 #define GLFW_KEY_SLASH 47 /* / */
278 #define GLFW_KEY_0 48
279 #define GLFW_KEY_1 49
280 #define GLFW_KEY_2 50
281 #define GLFW_KEY_3 51
282 #define GLFW_KEY_4 52
283 #define GLFW_KEY_5 53
284 #define GLFW_KEY_6 54
285 #define GLFW_KEY_7 55
286 #define GLFW_KEY_8 56
287 #define GLFW_KEY_9 57
288 #define GLFW_KEY_SEMICOLON 59 /* ; */
289 #define GLFW_KEY_EQUAL 61 /* = */
290 #define GLFW_KEY_A 65
291 #define GLFW_KEY_B 66
292 #define GLFW_KEY_C 67
293 #define GLFW_KEY_D 68
294 #define GLFW_KEY_E 69
295 #define GLFW_KEY_F 70
296 #define GLFW_KEY_G 71
297 #define GLFW_KEY_H 72
298 #define GLFW_KEY_I 73
299 #define GLFW_KEY_J 74
300 #define GLFW_KEY_K 75
301 #define GLFW_KEY_L 76
302 #define GLFW_KEY_M 77
303 #define GLFW_KEY_N 78
304 #define GLFW_KEY_O 79
305 #define GLFW_KEY_P 80
306 #define GLFW_KEY_Q 81
307 #define GLFW_KEY_R 82
308 #define GLFW_KEY_S 83
309 #define GLFW_KEY_T 84
310 #define GLFW_KEY_U 85
311 #define GLFW_KEY_V 86
312 #define GLFW_KEY_W 87
313 #define GLFW_KEY_X 88
314 #define GLFW_KEY_Y 89
315 #define GLFW_KEY_Z 90
316 #define GLFW_KEY_LEFT_BRACKET 91 /* [ */
317 #define GLFW_KEY_BACKSLASH 92 /* \ */
318 #define GLFW_KEY_RIGHT_BRACKET 93 /* ] */
319 #define GLFW_KEY_GRAVE_ACCENT 96 /* ` */
320 #define GLFW_KEY_WORLD_1 161 /* non-US #1 */
321 #define GLFW_KEY_WORLD_2 162 /* non-US #2 */
322
323 /* Function keys */
324 #define GLFW_KEY_ESCAPE 256
325 #define GLFW_KEY_ENTER 257
326 #define GLFW_KEY_TAB 258
327 #define GLFW_KEY_BACKSPACE 259
328 #define GLFW_KEY_INSERT 260
329 #define GLFW_KEY_DELETE 261
330 #define GLFW_KEY_RIGHT 262
331 #define GLFW_KEY_LEFT 263
332 #define GLFW_KEY_DOWN 264
333 #define GLFW_KEY_UP 265
334 #define GLFW_KEY_PAGE_UP 266
335 #define GLFW_KEY_PAGE_DOWN 267
336 #define GLFW_KEY_HOME 268
337 #define GLFW_KEY_END 269
338 #define GLFW_KEY_CAPS_LOCK 280
339 #define GLFW_KEY_SCROLL_LOCK 281
340 #define GLFW_KEY_NUM_LOCK 282
341 #define GLFW_KEY_PRINT_SCREEN 283
342 #define GLFW_KEY_PAUSE 284
343 #define GLFW_KEY_F1 290
344 #define GLFW_KEY_F2 291
345 #define GLFW_KEY_F3 292
346 #define GLFW_KEY_F4 293
347 #define GLFW_KEY_F5 294
348 #define GLFW_KEY_F6 295
349 #define GLFW_KEY_F7 296
350 #define GLFW_KEY_F8 297
351 #define GLFW_KEY_F9 298
352 #define GLFW_KEY_F10 299
353 #define GLFW_KEY_F11 300
354 #define GLFW_KEY_F12 301
355 #define GLFW_KEY_F13 302
356 #define GLFW_KEY_F14 303
357 #define GLFW_KEY_F15 304
358 #define GLFW_KEY_F16 305
359 #define GLFW_KEY_F17 306
360 #define GLFW_KEY_F18 307
361 #define GLFW_KEY_F19 308
362 #define GLFW_KEY_F20 309
363 #define GLFW_KEY_F21 310
364 #define GLFW_KEY_F22 311
365 #define GLFW_KEY_F23 312
366 #define GLFW_KEY_F24 313
367 #define GLFW_KEY_F25 314
368 #define GLFW_KEY_KP_0 320
369 #define GLFW_KEY_KP_1 321
370 #define GLFW_KEY_KP_2 322
371 #define GLFW_KEY_KP_3 323
372 #define GLFW_KEY_KP_4 324
373 #define GLFW_KEY_KP_5 325
374 #define GLFW_KEY_KP_6 326
375 #define GLFW_KEY_KP_7 327
376 #define GLFW_KEY_KP_8 328
377 #define GLFW_KEY_KP_9 329
378 #define GLFW_KEY_KP_DECIMAL 330
379 #define GLFW_KEY_KP_DIVIDE 331
380 #define GLFW_KEY_KP_MULTIPLY 332
381 #define GLFW_KEY_KP_SUBTRACT 333
382 #define GLFW_KEY_KP_ADD 334
383 #define GLFW_KEY_KP_ENTER 335
384 #define GLFW_KEY_KP_EQUAL 336
385 #define GLFW_KEY_LEFT_SHIFT 340
386 #define GLFW_KEY_LEFT_CONTROL 341
387 #define GLFW_KEY_LEFT_ALT 342
388 #define GLFW_KEY_LEFT_SUPER 343
389 #define GLFW_KEY_RIGHT_SHIFT 344
390 #define GLFW_KEY_RIGHT_CONTROL 345
391 #define GLFW_KEY_RIGHT_ALT 346
392 #define GLFW_KEY_RIGHT_SUPER 347
393 #define GLFW_KEY_MENU 348
394 #define GLFW_KEY_LAST GLFW_KEY_MENU
395
404 #define GLFW_MOD_SHIFT 0x0001
405
407 #define GLFW_MOD_CONTROL 0x0002
408
410 #define GLFW_MOD_ALT 0x0004
411
413 #define GLFW_MOD_SUPER 0x0008
414
420 #define GLFW_MOUSE_BUTTON_1 0
421 #define GLFW_MOUSE_BUTTON_2 1
422 #define GLFW_MOUSE_BUTTON_3 2
423 #define GLFW_MOUSE_BUTTON_4 3
424 #define GLFW_MOUSE_BUTTON_5 4
425 #define GLFW_MOUSE_BUTTON_6 5
426 #define GLFW_MOUSE_BUTTON_7 6
427 #define GLFW_MOUSE_BUTTON_8 7
428 #define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8
429 #define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1
430 #define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2
431 #define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3
432
437 #define GLFW_JOYSTICK_1 0
438 #define GLFW_JOYSTICK_2 1
439 #define GLFW_JOYSTICK_3 2
440 #define GLFW_JOYSTICK_4 3
441 #define GLFW_JOYSTICK_5 4
442 #define GLFW_JOYSTICK_6 5
443 #define GLFW_JOYSTICK_7 6
444 #define GLFW_JOYSTICK_8 7
445 #define GLFW_JOYSTICK_9 8
446 #define GLFW_JOYSTICK_10 9
447 #define GLFW_JOYSTICK_11 10
448 #define GLFW_JOYSTICK_12 11
449 #define GLFW_JOYSTICK_13 12
450 #define GLFW_JOYSTICK_14 13
451 #define GLFW_JOYSTICK_15 14
452 #define GLFW_JOYSTICK_16 15
453 #define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16
454
461 #define GLFW_NOT_INITIALIZED 0x00010001
462
464 #define GLFW_NO_CURRENT_CONTEXT 0x00010002
465
468 #define GLFW_INVALID_ENUM 0x00010003
469
471 #define GLFW_INVALID_VALUE 0x00010004
472
474 #define GLFW_OUT_OF_MEMORY 0x00010005
475
478 #define GLFW_API_UNAVAILABLE 0x00010006
479
481 #define GLFW_VERSION_UNAVAILABLE 0x00010007
482
485 #define GLFW_PLATFORM_ERROR 0x00010008
486
488 #define GLFW_FORMAT_UNAVAILABLE 0x00010009
489
491 #define GLFW_FOCUSED 0x00020001
492 #define GLFW_ICONIFIED 0x00020002
493 #define GLFW_RESIZABLE 0x00020003
494 #define GLFW_VISIBLE 0x00020004
495 #define GLFW_DECORATED 0x00020005
496
497 #define GLFW_RED_BITS 0x00021001
498 #define GLFW_GREEN_BITS 0x00021002
499 #define GLFW_BLUE_BITS 0x00021003
500 #define GLFW_ALPHA_BITS 0x00021004
501 #define GLFW_DEPTH_BITS 0x00021005
502 #define GLFW_STENCIL_BITS 0x00021006
503 #define GLFW_ACCUM_RED_BITS 0x00021007
504 #define GLFW_ACCUM_GREEN_BITS 0x00021008
505 #define GLFW_ACCUM_BLUE_BITS 0x00021009
506 #define GLFW_ACCUM_ALPHA_BITS 0x0002100A
507 #define GLFW_AUX_BUFFERS 0x0002100B
508 #define GLFW_STEREO 0x0002100C
509 #define GLFW_SAMPLES 0x0002100D
510 #define GLFW_SRGB_CAPABLE 0x0002100E
511 #define GLFW_REFRESH_RATE 0x0002100F
512
513 #define GLFW_CLIENT_API 0x00022001
514 #define GLFW_CONTEXT_VERSION_MAJOR 0x00022002
515 #define GLFW_CONTEXT_VERSION_MINOR 0x00022003
516 #define GLFW_CONTEXT_REVISION 0x00022004
517 #define GLFW_CONTEXT_ROBUSTNESS 0x00022005
518 #define GLFW_OPENGL_FORWARD_COMPAT 0x00022006
519 #define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007
520 #define GLFW_OPENGL_PROFILE 0x00022008
521
522 #define GLFW_OPENGL_API 0x00030001
523 #define GLFW_OPENGL_ES_API 0x00030002
524
525 #define GLFW_NO_ROBUSTNESS 0
526 #define GLFW_NO_RESET_NOTIFICATION 0x00031001
527 #define GLFW_LOSE_CONTEXT_ON_RESET 0x00031002
528
529 #define GLFW_OPENGL_ANY_PROFILE 0
530 #define GLFW_OPENGL_CORE_PROFILE 0x00032001
531 #define GLFW_OPENGL_COMPAT_PROFILE 0x00032002
532
533 #define GLFW_CURSOR 0x00033001
534 #define GLFW_STICKY_KEYS 0x00033002
535 #define GLFW_STICKY_MOUSE_BUTTONS 0x00033003
536
537 #define GLFW_CURSOR_NORMAL 0x00034001
538 #define GLFW_CURSOR_HIDDEN 0x00034002
539 #define GLFW_CURSOR_DISABLED 0x00034003
540
541 #define GLFW_CONNECTED 0x00040001
542 #define GLFW_DISCONNECTED 0x00040002
543
544
545 /*************************************************************************
546 * GLFW API types
547 *************************************************************************/
548
556 typedef void (*GLFWglproc)(void);
557
564 typedef struct GLFWmonitor GLFWmonitor;
565
572 typedef struct GLFWwindow GLFWwindow;
573
585 typedef void (* GLFWerrorfun)(int,const char*);
586
601 typedef void (* GLFWwindowposfun)(GLFWwindow*,int,int);
602
615 typedef void (* GLFWwindowsizefun)(GLFWwindow*,int,int);
616
627 typedef void (* GLFWwindowclosefun)(GLFWwindow*);
628
639 typedef void (* GLFWwindowrefreshfun)(GLFWwindow*);
640
653 typedef void (* GLFWwindowfocusfun)(GLFWwindow*,int);
654
668 typedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int);
669
683 typedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int);
684
700 typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int);
701
714 typedef void (* GLFWcursorposfun)(GLFWwindow*,double,double);
715
728 typedef void (* GLFWcursorenterfun)(GLFWwindow*,int);
729
742 typedef void (* GLFWscrollfun)(GLFWwindow*,double,double);
743
759 typedef void (* GLFWkeyfun)(GLFWwindow*,int,int,int,int);
760
772 typedef void (* GLFWcharfun)(GLFWwindow*,unsigned int);
773
785 typedef void (* GLFWmonitorfun)(GLFWmonitor*,int);
786
793 typedef struct
794 {
797 int width;
800 int height;
803 int redBits;
806 int greenBits;
809 int blueBits;
812 int refreshRate;
813 } GLFWvidmode;
814
823 typedef struct
824 {
827 unsigned short* red;
830 unsigned short* green;
833 unsigned short* blue;
836 unsigned int size;
837 } GLFWgammaramp;
838
839
840 /*************************************************************************
841 * GLFW API functions
842 *************************************************************************/
843
875 GLFWAPI int glfwInit(void);
876
899 GLFWAPI void glfwTerminate(void);
900
919 GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);
920
949 GLFWAPI const char* glfwGetVersionString(void);
950
974 GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun);
975
996 GLFWAPI GLFWmonitor** glfwGetMonitors(int* count);
997
1009 GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void);
1010
1022 GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
1023
1041 GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* width, int* height);
1042
1057 GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor);
1058
1075 GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun);
1076
1099 GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count);
1100
1117 GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor);
1118
1129 GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma);
1130
1143 GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);
1144
1156 GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
1157
1169 GLFWAPI void glfwDefaultWindowHints(void);
1170
1191 GLFWAPI void glfwWindowHint(int target, int hint);
1192
1244 GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
1245
1266 GLFWAPI void glfwDestroyWindow(GLFWwindow* window);
1267
1277 GLFWAPI int glfwWindowShouldClose(GLFWwindow* window);
1278
1290 GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value);
1291
1304 GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
1305
1321 GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos);
1322
1353 GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos);
1354
1370 GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
1371
1394 GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height);
1395
1411 GLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height);
1412
1428 GLFWAPI void glfwIconifyWindow(GLFWwindow* window);
1429
1445 GLFWAPI void glfwRestoreWindow(GLFWwindow* window);
1446
1461 GLFWAPI void glfwShowWindow(GLFWwindow* window);
1462
1477 GLFWAPI void glfwHideWindow(GLFWwindow* window);
1478
1489 GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window);
1490
1503 GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib);
1504
1518 GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer);
1519
1531 GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);
1532
1547 GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun cbfun);
1548
1563 GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun cbfun);
1564
1587 GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun cbfun);
1588
1611 GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun cbfun);
1612
1631 GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun cbfun);
1632
1646 GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun cbfun);
1647
1661 GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun cbfun);
1662
1686 GLFWAPI void glfwPollEvents(void);
1687
1713 GLFWAPI void glfwWaitEvents(void);
1714
1725 GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
1726
1760 GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value);
1761
1786 GLFWAPI int glfwGetKey(GLFWwindow* window, int key);
1787
1804 GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button);
1805
1830 GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos);
1831
1852 GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);
1853
1886 GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun);
1887
1905 GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun);
1906
1926 GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun cbfun);
1927
1942 GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun cbfun);
1943
1958 GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun cbfun);
1959
1977 GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun cbfun);
1978
1988 GLFWAPI int glfwJoystickPresent(int joy);
1989
2007 GLFWAPI const float* glfwGetJoystickAxes(int joy, int* count);
2008
2026 GLFWAPI const unsigned char* glfwGetJoystickButtons(int joy, int* count);
2027
2044 GLFWAPI const char* glfwGetJoystickName(int joy);
2045
2061 GLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string);
2062
2084 GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window);
2085
2102 GLFWAPI double glfwGetTime(void);
2103
2117 GLFWAPI void glfwSetTime(double time);
2118
2135 GLFWAPI void glfwMakeContextCurrent(GLFWwindow* window);
2136
2151 GLFWAPI GLFWwindow* glfwGetCurrentContext(void);
2152
2171 GLFWAPI void glfwSwapBuffers(GLFWwindow* window);
2172
2200 GLFWAPI void glfwSwapInterval(int interval);
2201
2221 GLFWAPI int glfwExtensionSupported(const char* extension);
2222
2242 GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname);
2243
2244
2245 /*************************************************************************
2246 * Global definition cleanup
2247 *************************************************************************/
2248
2249 /* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */
2250
2251 #ifdef GLFW_WINGDIAPI_DEFINED
2252 #undef WINGDIAPI
2253 #undef GLFW_WINGDIAPI_DEFINED
2254 #endif
2255
2256 #ifdef GLFW_CALLBACK_DEFINED
2257 #undef CALLBACK
2258 #undef GLFW_CALLBACK_DEFINED
2259 #endif
2260
2261 /* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */
2262
2263
2264 #ifdef __cplusplus
2265 }
2266 #endif
2267
2268 #endif /* _glfw3_h_ */
2269