Camilla Berglund | 2955cd3 | 2010-11-17 15:42:55 +0100 | [diff] [blame] | 1 | /************************************************************************* |
Camilla Berglund | 6e553c7 | 2011-03-06 01:46:39 +0100 | [diff] [blame] | 2 | * GLFW - An OpenGL library |
Camilla Berglund | 38b0ccb | 2010-09-07 17:41:26 +0200 | [diff] [blame] | 3 | * API version: 3.0 |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 4 | * WWW: http://www.glfw.org/ |
| 5 | *------------------------------------------------------------------------ |
| 6 | * Copyright (c) 2002-2006 Marcus Geelnard |
Camilla Berglund | f8105ed | 2010-11-09 02:57:46 +0100 | [diff] [blame] | 7 | * Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org> |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 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 | |
Camilla Berglund | 36e5409 | 2010-11-09 02:58:35 +0100 | [diff] [blame] | 30 | #ifndef __glfw3_h__ |
| 31 | #define __glfw3_h__ |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 32 | |
| 33 | #ifdef __cplusplus |
| 34 | extern "C" { |
| 35 | #endif |
| 36 | |
| 37 | |
| 38 | /************************************************************************* |
| 39 | * Global definitions |
| 40 | *************************************************************************/ |
| 41 | |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 42 | /* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */ |
| 43 | |
| 44 | /* Please report any probles that you find with your compiler, which may |
| 45 | * be solved in this section! There are several compilers that I have not |
| 46 | * been able to test this file with yet. |
| 47 | * |
| 48 | * First: If we are we on Windows, we want a single define for it (_WIN32) |
| 49 | * (Note: For Cygwin the compiler flag -mwin32 should be used, but to |
| 50 | * make sure that things run smoothly for Cygwin users, we add __CYGWIN__ |
| 51 | * to the list of "valid Win32 identifiers", which removes the need for |
| 52 | * -mwin32) |
| 53 | */ |
| 54 | #if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)) |
| 55 | #define _WIN32 |
| 56 | #endif /* _WIN32 */ |
| 57 | |
| 58 | /* In order for extension support to be portable, we need to define an |
| 59 | * OpenGL function call method. We use the keyword APIENTRY, which is |
| 60 | * defined for Win32. (Note: Windows also needs this for <GL/gl.h>) |
| 61 | */ |
| 62 | #ifndef APIENTRY |
| 63 | #ifdef _WIN32 |
| 64 | #define APIENTRY __stdcall |
| 65 | #else |
| 66 | #define APIENTRY |
| 67 | #endif |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 68 | #endif /* APIENTRY */ |
| 69 | |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 70 | /* The following three defines are here solely to make some Windows-based |
| 71 | * <GL/gl.h> files happy. Theoretically we could include <windows.h>, but |
| 72 | * it has the major drawback of severely polluting our namespace. |
| 73 | */ |
| 74 | |
| 75 | /* Under Windows, we need WINGDIAPI defined */ |
| 76 | #if !defined(WINGDIAPI) && defined(_WIN32) |
| 77 | #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__POCC__) |
| 78 | /* Microsoft Visual C++, Borland C++ Builder and Pelles C */ |
| 79 | #define WINGDIAPI __declspec(dllimport) |
| 80 | #elif defined(__LCC__) |
| 81 | /* LCC-Win32 */ |
| 82 | #define WINGDIAPI __stdcall |
| 83 | #else |
| 84 | /* Others (e.g. MinGW, Cygwin) */ |
| 85 | #define WINGDIAPI extern |
| 86 | #endif |
Camilla Berglund | 4afc67c | 2011-07-27 17:09:17 +0200 | [diff] [blame] | 87 | #define GLFW_WINGDIAPI_DEFINED |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 88 | #endif /* WINGDIAPI */ |
| 89 | |
| 90 | /* Some <GL/glu.h> files also need CALLBACK defined */ |
| 91 | #if !defined(CALLBACK) && defined(_WIN32) |
| 92 | #if defined(_MSC_VER) |
| 93 | /* Microsoft Visual C++ */ |
| 94 | #if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) |
| 95 | #define CALLBACK __stdcall |
| 96 | #else |
| 97 | #define CALLBACK |
| 98 | #endif |
| 99 | #else |
| 100 | /* Other Windows compilers */ |
| 101 | #define CALLBACK __stdcall |
| 102 | #endif |
Camilla Berglund | 4afc67c | 2011-07-27 17:09:17 +0200 | [diff] [blame] | 103 | #define GLFW_CALLBACK_DEFINED |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 104 | #endif /* CALLBACK */ |
| 105 | |
Camilla Berglund | 3c912cb | 2012-08-02 21:25:00 +0200 | [diff] [blame] | 106 | /* Most <GL/glu.h> variants on Windows need wchar_t */ |
| 107 | #if defined(_WIN32) |
| 108 | #include <stddef.h> |
| 109 | #endif |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 110 | |
| 111 | |
| 112 | /* ---------------- GLFW related system specific defines ----------------- */ |
| 113 | |
Camilla Berglund | cc5d7cd | 2012-03-25 17:43:02 +0200 | [diff] [blame] | 114 | #if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL) |
| 115 | #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined" |
| 116 | #endif |
| 117 | |
Camilla Berglund | 2588c9b | 2012-03-25 17:40:30 +0200 | [diff] [blame] | 118 | #if defined(_WIN32) && defined(_GLFW_BUILD_DLL) |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 119 | |
| 120 | /* We are building a Win32 DLL */ |
Camilla Berglund | 2955cd3 | 2010-11-17 15:42:55 +0100 | [diff] [blame] | 121 | #define GLFWAPI __declspec(dllexport) |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 122 | |
| 123 | #elif defined(_WIN32) && defined(GLFW_DLL) |
| 124 | |
| 125 | /* We are calling a Win32 DLL */ |
| 126 | #if defined(__LCC__) |
Camilla Berglund | 2955cd3 | 2010-11-17 15:42:55 +0100 | [diff] [blame] | 127 | #define GLFWAPI extern |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 128 | #else |
Camilla Berglund | 2955cd3 | 2010-11-17 15:42:55 +0100 | [diff] [blame] | 129 | #define GLFWAPI __declspec(dllimport) |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 130 | #endif |
| 131 | |
| 132 | #else |
| 133 | |
| 134 | /* We are either building/calling a static lib or we are non-win32 */ |
| 135 | #define GLFWAPI |
| 136 | |
| 137 | #endif |
| 138 | |
| 139 | /* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ |
| 140 | |
Camilla Berglund | 2213450 | 2012-06-05 23:55:10 +0200 | [diff] [blame] | 141 | /* Include the chosen OpenGL header and, optionally, the GLU header. |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 142 | */ |
| 143 | #if defined(__APPLE_CC__) |
Camilla Berglund | 410a4e2 | 2012-09-27 22:28:04 +0200 | [diff] [blame] | 144 | #if defined(GLFW_INCLUDE_GLCOREARB) |
Camilla Berglund | d88789e | 2011-09-16 04:44:40 +0200 | [diff] [blame] | 145 | #include <OpenGL/gl3.h> |
| 146 | #else |
| 147 | #define GL_GLEXT_LEGACY |
| 148 | #include <OpenGL/gl.h> |
| 149 | #endif |
Camilla Berglund | 2213450 | 2012-06-05 23:55:10 +0200 | [diff] [blame] | 150 | #if defined(GLFW_INCLUDE_GLU) |
Camilla Berglund | d88789e | 2011-09-16 04:44:40 +0200 | [diff] [blame] | 151 | #include <OpenGL/glu.h> |
| 152 | #endif |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 153 | #else |
Camilla Berglund | 410a4e2 | 2012-09-27 22:28:04 +0200 | [diff] [blame] | 154 | #if defined(GLFW_INCLUDE_GLCOREARB) |
| 155 | #include <GL/glcorearb.h> |
Camilla Berglund | d88789e | 2011-09-16 04:44:40 +0200 | [diff] [blame] | 156 | #else |
| 157 | #include <GL/gl.h> |
| 158 | #endif |
Camilla Berglund | 2213450 | 2012-06-05 23:55:10 +0200 | [diff] [blame] | 159 | #if defined(GLFW_INCLUDE_GLU) |
Camilla Berglund | d88789e | 2011-09-16 04:44:40 +0200 | [diff] [blame] | 160 | #include <GL/glu.h> |
| 161 | #endif |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 162 | #endif |
| 163 | |
| 164 | |
| 165 | /************************************************************************* |
| 166 | * GLFW version |
| 167 | *************************************************************************/ |
| 168 | |
Camilla Berglund | 38b0ccb | 2010-09-07 17:41:26 +0200 | [diff] [blame] | 169 | #define GLFW_VERSION_MAJOR 3 |
| 170 | #define GLFW_VERSION_MINOR 0 |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 171 | #define GLFW_VERSION_REVISION 0 |
| 172 | |
| 173 | |
| 174 | /************************************************************************* |
| 175 | * Input handling definitions |
| 176 | *************************************************************************/ |
| 177 | |
| 178 | /* Key and button state/action definitions */ |
| 179 | #define GLFW_RELEASE 0 |
| 180 | #define GLFW_PRESS 1 |
| 181 | |
Marcus | c0cb4c2 | 2011-01-02 11:18:14 +0100 | [diff] [blame] | 182 | /* Keyboard raw key codes. |
| 183 | * These key codes are inspired by the USB HID Usage Tables v1.12 (p. 53-60), |
| 184 | * but re-arranged to map to 7-bit ASCII for printable keys (function keys are |
| 185 | * put in the 256+ range). |
| 186 | * The naming of the key codes follow these rules: |
| 187 | * - The US keyboard layout is used. |
| 188 | * - Names of printable alpha-numeric characters are used (e.g. "A", "R", |
| 189 | * "3", etc). |
| 190 | * - For non-alphanumeric characters, Unicode:ish names are used (e.g. |
| 191 | * "COMMA", "LEFT_SQUARE_BRACKET", etc). Note that some names do not |
| 192 | * correspond to the Unicode standard (usually for brevity). |
| 193 | * - Keys that lack a clear US mapping are named "WORLD_x". |
| 194 | * - For non-printable keys, custom names are used (e.g. "F4", |
| 195 | * "BACKSPACE", etc). |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 196 | */ |
Marcus | c0cb4c2 | 2011-01-02 11:18:14 +0100 | [diff] [blame] | 197 | |
| 198 | /* Printable keys */ |
| 199 | #define GLFW_KEY_SPACE 32 |
| 200 | #define GLFW_KEY_APOSTROPHE 39 /* ' */ |
| 201 | #define GLFW_KEY_COMMA 44 /* , */ |
| 202 | #define GLFW_KEY_MINUS 45 /* - */ |
| 203 | #define GLFW_KEY_PERIOD 46 /* . */ |
| 204 | #define GLFW_KEY_SLASH 47 /* / */ |
| 205 | #define GLFW_KEY_0 48 |
| 206 | #define GLFW_KEY_1 49 |
| 207 | #define GLFW_KEY_2 50 |
| 208 | #define GLFW_KEY_3 51 |
| 209 | #define GLFW_KEY_4 52 |
| 210 | #define GLFW_KEY_5 53 |
| 211 | #define GLFW_KEY_6 54 |
| 212 | #define GLFW_KEY_7 55 |
| 213 | #define GLFW_KEY_8 56 |
| 214 | #define GLFW_KEY_9 57 |
| 215 | #define GLFW_KEY_SEMICOLON 59 /* ; */ |
| 216 | #define GLFW_KEY_EQUAL 61 /* = */ |
| 217 | #define GLFW_KEY_A 65 |
| 218 | #define GLFW_KEY_B 66 |
| 219 | #define GLFW_KEY_C 67 |
| 220 | #define GLFW_KEY_D 68 |
| 221 | #define GLFW_KEY_E 69 |
| 222 | #define GLFW_KEY_F 70 |
| 223 | #define GLFW_KEY_G 71 |
| 224 | #define GLFW_KEY_H 72 |
| 225 | #define GLFW_KEY_I 73 |
| 226 | #define GLFW_KEY_J 74 |
| 227 | #define GLFW_KEY_K 75 |
| 228 | #define GLFW_KEY_L 76 |
| 229 | #define GLFW_KEY_M 77 |
| 230 | #define GLFW_KEY_N 78 |
| 231 | #define GLFW_KEY_O 79 |
| 232 | #define GLFW_KEY_P 80 |
| 233 | #define GLFW_KEY_Q 81 |
| 234 | #define GLFW_KEY_R 82 |
| 235 | #define GLFW_KEY_S 83 |
| 236 | #define GLFW_KEY_T 84 |
| 237 | #define GLFW_KEY_U 85 |
| 238 | #define GLFW_KEY_V 86 |
| 239 | #define GLFW_KEY_W 87 |
| 240 | #define GLFW_KEY_X 88 |
| 241 | #define GLFW_KEY_Y 89 |
| 242 | #define GLFW_KEY_Z 90 |
Marcus | 3b00847 | 2011-01-03 22:07:01 +0100 | [diff] [blame] | 243 | #define GLFW_KEY_LEFT_BRACKET 91 /* [ */ |
Marcus | c0cb4c2 | 2011-01-02 11:18:14 +0100 | [diff] [blame] | 244 | #define GLFW_KEY_BACKSLASH 92 /* \ */ |
Marcus | 3b00847 | 2011-01-03 22:07:01 +0100 | [diff] [blame] | 245 | #define GLFW_KEY_RIGHT_BRACKET 93 /* ] */ |
Marcus | c0cb4c2 | 2011-01-02 11:18:14 +0100 | [diff] [blame] | 246 | #define GLFW_KEY_GRAVE_ACCENT 96 /* ` */ |
| 247 | #define GLFW_KEY_WORLD_1 161 /* non-US #1 */ |
| 248 | #define GLFW_KEY_WORLD_2 162 /* non-US #2 */ |
| 249 | |
| 250 | /* Function keys */ |
| 251 | #define GLFW_KEY_ESCAPE 256 |
| 252 | #define GLFW_KEY_ENTER 257 |
| 253 | #define GLFW_KEY_TAB 258 |
| 254 | #define GLFW_KEY_BACKSPACE 259 |
| 255 | #define GLFW_KEY_INSERT 260 |
| 256 | #define GLFW_KEY_DELETE 261 |
| 257 | #define GLFW_KEY_RIGHT 262 |
| 258 | #define GLFW_KEY_LEFT 263 |
| 259 | #define GLFW_KEY_DOWN 264 |
| 260 | #define GLFW_KEY_UP 265 |
| 261 | #define GLFW_KEY_PAGE_UP 266 |
| 262 | #define GLFW_KEY_PAGE_DOWN 267 |
| 263 | #define GLFW_KEY_HOME 268 |
| 264 | #define GLFW_KEY_END 269 |
| 265 | #define GLFW_KEY_CAPS_LOCK 280 |
| 266 | #define GLFW_KEY_SCROLL_LOCK 281 |
| 267 | #define GLFW_KEY_NUM_LOCK 282 |
| 268 | #define GLFW_KEY_PRINT_SCREEN 283 |
| 269 | #define GLFW_KEY_PAUSE 284 |
| 270 | #define GLFW_KEY_F1 290 |
| 271 | #define GLFW_KEY_F2 291 |
| 272 | #define GLFW_KEY_F3 292 |
| 273 | #define GLFW_KEY_F4 293 |
| 274 | #define GLFW_KEY_F5 294 |
| 275 | #define GLFW_KEY_F6 295 |
| 276 | #define GLFW_KEY_F7 296 |
| 277 | #define GLFW_KEY_F8 297 |
| 278 | #define GLFW_KEY_F9 298 |
| 279 | #define GLFW_KEY_F10 299 |
| 280 | #define GLFW_KEY_F11 300 |
| 281 | #define GLFW_KEY_F12 301 |
| 282 | #define GLFW_KEY_F13 302 |
| 283 | #define GLFW_KEY_F14 303 |
| 284 | #define GLFW_KEY_F15 304 |
| 285 | #define GLFW_KEY_F16 305 |
| 286 | #define GLFW_KEY_F17 306 |
| 287 | #define GLFW_KEY_F18 307 |
| 288 | #define GLFW_KEY_F19 308 |
| 289 | #define GLFW_KEY_F20 309 |
| 290 | #define GLFW_KEY_F21 310 |
| 291 | #define GLFW_KEY_F22 311 |
| 292 | #define GLFW_KEY_F23 312 |
| 293 | #define GLFW_KEY_F24 313 |
| 294 | #define GLFW_KEY_F25 314 |
| 295 | #define GLFW_KEY_KP_0 320 |
| 296 | #define GLFW_KEY_KP_1 321 |
| 297 | #define GLFW_KEY_KP_2 322 |
| 298 | #define GLFW_KEY_KP_3 323 |
| 299 | #define GLFW_KEY_KP_4 324 |
| 300 | #define GLFW_KEY_KP_5 325 |
| 301 | #define GLFW_KEY_KP_6 326 |
| 302 | #define GLFW_KEY_KP_7 327 |
| 303 | #define GLFW_KEY_KP_8 328 |
| 304 | #define GLFW_KEY_KP_9 329 |
| 305 | #define GLFW_KEY_KP_DECIMAL 330 |
| 306 | #define GLFW_KEY_KP_DIVIDE 331 |
| 307 | #define GLFW_KEY_KP_MULTIPLY 332 |
| 308 | #define GLFW_KEY_KP_SUBTRACT 333 |
| 309 | #define GLFW_KEY_KP_ADD 334 |
| 310 | #define GLFW_KEY_KP_ENTER 335 |
| 311 | #define GLFW_KEY_KP_EQUAL 336 |
| 312 | #define GLFW_KEY_LEFT_SHIFT 340 |
| 313 | #define GLFW_KEY_LEFT_CONTROL 341 |
| 314 | #define GLFW_KEY_LEFT_ALT 342 |
| 315 | #define GLFW_KEY_LEFT_SUPER 343 |
| 316 | #define GLFW_KEY_RIGHT_SHIFT 344 |
| 317 | #define GLFW_KEY_RIGHT_CONTROL 345 |
| 318 | #define GLFW_KEY_RIGHT_ALT 346 |
| 319 | #define GLFW_KEY_RIGHT_SUPER 347 |
| 320 | #define GLFW_KEY_MENU 348 |
| 321 | #define GLFW_KEY_LAST GLFW_KEY_MENU |
| 322 | |
| 323 | /* GLFW 2.x key name aliases (deprecated) */ |
| 324 | #define GLFW_KEY_ESC GLFW_KEY_ESCAPE |
| 325 | #define GLFW_KEY_DEL GLFW_KEY_DELETE |
| 326 | #define GLFW_KEY_PAGEUP GLFW_KEY_PAGE_UP |
| 327 | #define GLFW_KEY_PAGEDOWN GLFW_KEY_PAGE_DOWN |
| 328 | #define GLFW_KEY_KP_NUM_LOCK GLFW_KEY_NUM_LOCK |
| 329 | #define GLFW_KEY_LCTRL GLFW_KEY_LEFT_CONTROL |
| 330 | #define GLFW_KEY_LSHIFT GLFW_KEY_LEFT_SHIFT |
| 331 | #define GLFW_KEY_LALT GLFW_KEY_LEFT_ALT |
| 332 | #define GLFW_KEY_LSUPER GLFW_KEY_LEFT_SUPER |
| 333 | #define GLFW_KEY_RCTRL GLFW_KEY_RIGHT_CONTROL |
| 334 | #define GLFW_KEY_RSHIFT GLFW_KEY_RIGHT_SHIFT |
| 335 | #define GLFW_KEY_RALT GLFW_KEY_RIGHT_ALT |
| 336 | #define GLFW_KEY_RSUPER GLFW_KEY_RIGHT_SUPER |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 337 | |
| 338 | /* Mouse button definitions */ |
| 339 | #define GLFW_MOUSE_BUTTON_1 0 |
| 340 | #define GLFW_MOUSE_BUTTON_2 1 |
| 341 | #define GLFW_MOUSE_BUTTON_3 2 |
| 342 | #define GLFW_MOUSE_BUTTON_4 3 |
| 343 | #define GLFW_MOUSE_BUTTON_5 4 |
| 344 | #define GLFW_MOUSE_BUTTON_6 5 |
| 345 | #define GLFW_MOUSE_BUTTON_7 6 |
| 346 | #define GLFW_MOUSE_BUTTON_8 7 |
| 347 | #define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8 |
| 348 | |
| 349 | /* Mouse button aliases */ |
| 350 | #define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1 |
| 351 | #define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2 |
| 352 | #define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3 |
| 353 | |
| 354 | /* Joystick identifiers */ |
| 355 | #define GLFW_JOYSTICK_1 0 |
| 356 | #define GLFW_JOYSTICK_2 1 |
| 357 | #define GLFW_JOYSTICK_3 2 |
| 358 | #define GLFW_JOYSTICK_4 3 |
| 359 | #define GLFW_JOYSTICK_5 4 |
| 360 | #define GLFW_JOYSTICK_6 5 |
| 361 | #define GLFW_JOYSTICK_7 6 |
| 362 | #define GLFW_JOYSTICK_8 7 |
| 363 | #define GLFW_JOYSTICK_9 8 |
| 364 | #define GLFW_JOYSTICK_10 9 |
| 365 | #define GLFW_JOYSTICK_11 10 |
| 366 | #define GLFW_JOYSTICK_12 11 |
| 367 | #define GLFW_JOYSTICK_13 12 |
| 368 | #define GLFW_JOYSTICK_14 13 |
| 369 | #define GLFW_JOYSTICK_15 14 |
| 370 | #define GLFW_JOYSTICK_16 15 |
| 371 | #define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16 |
| 372 | |
| 373 | |
| 374 | /************************************************************************* |
| 375 | * Other definitions |
| 376 | *************************************************************************/ |
| 377 | |
Camilla Berglund | aff30d0 | 2012-08-06 17:56:41 +0200 | [diff] [blame] | 378 | /* glfwCreateWindow modes */ |
Camilla Berglund | 484a271 | 2010-09-10 13:24:19 +0200 | [diff] [blame] | 379 | #define GLFW_WINDOWED 0x00010001 |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 380 | #define GLFW_FULLSCREEN 0x00010002 |
| 381 | |
| 382 | /* glfwGetWindowParam tokens */ |
Camilla Berglund | 39dfa7d | 2010-11-15 21:39:46 +0100 | [diff] [blame] | 383 | #define GLFW_ACTIVE 0x00020001 |
| 384 | #define GLFW_ICONIFIED 0x00020002 |
Camilla Berglund | 2410e2a | 2012-08-10 13:31:15 +0200 | [diff] [blame] | 385 | #define GLFW_CLOSE_REQUESTED 0x00020003 |
Camilla Berglund | 4fb5578 | 2011-08-15 01:40:10 +0200 | [diff] [blame] | 386 | #define GLFW_OPENGL_REVISION 0x00020004 |
Camilla Berglund | 950a3be | 2010-09-09 19:58:51 +0200 | [diff] [blame] | 387 | |
Camilla Berglund | ddcf5d4 | 2012-08-10 13:03:11 +0200 | [diff] [blame] | 388 | /* glfwWindowHint tokens */ |
Camilla Berglund | 4fb5578 | 2011-08-15 01:40:10 +0200 | [diff] [blame] | 389 | #define GLFW_RED_BITS 0x00021000 |
| 390 | #define GLFW_GREEN_BITS 0x00021001 |
| 391 | #define GLFW_BLUE_BITS 0x00021002 |
| 392 | #define GLFW_ALPHA_BITS 0x00021003 |
| 393 | #define GLFW_DEPTH_BITS 0x00021004 |
| 394 | #define GLFW_STENCIL_BITS 0x00021005 |
| 395 | #define GLFW_REFRESH_RATE 0x00021006 |
| 396 | #define GLFW_ACCUM_RED_BITS 0x00021007 |
| 397 | #define GLFW_ACCUM_GREEN_BITS 0x00021008 |
| 398 | #define GLFW_ACCUM_BLUE_BITS 0x00021009 |
| 399 | #define GLFW_ACCUM_ALPHA_BITS 0x0002100A |
| 400 | #define GLFW_AUX_BUFFERS 0x0002100B |
| 401 | #define GLFW_STEREO 0x0002100C |
Camilla Berglund | 4fb5578 | 2011-08-15 01:40:10 +0200 | [diff] [blame] | 402 | #define GLFW_FSAA_SAMPLES 0x0002100E |
Camilla Berglund | ddcf5d4 | 2012-08-10 13:03:11 +0200 | [diff] [blame] | 403 | |
| 404 | /* The following constants are used with both glfwGetWindowParam |
| 405 | * and glfwWindowHint |
| 406 | */ |
Camilla Berglund | 38cad9a | 2012-09-30 15:32:50 +0200 | [diff] [blame] | 407 | #define GLFW_CLIENT_API 0x00022000 |
| 408 | #define GLFW_OPENGL_VERSION_MAJOR 0x00022001 |
| 409 | #define GLFW_OPENGL_VERSION_MINOR 0x00022002 |
| 410 | #define GLFW_OPENGL_FORWARD_COMPAT 0x00022003 |
| 411 | #define GLFW_OPENGL_DEBUG_CONTEXT 0x00022004 |
| 412 | #define GLFW_OPENGL_PROFILE 0x00022005 |
| 413 | #define GLFW_OPENGL_ROBUSTNESS 0x00022006 |
| 414 | #define GLFW_RESIZABLE 0x00022007 |
| 415 | #define GLFW_VISIBLE 0x00022008 |
| 416 | |
| 417 | /* GLFW_CLIENT_API tokens */ |
| 418 | #define GLFW_OPENGL_API 0x00000001 |
| 419 | #define GLFW_OPENGL_ES_API 0x00000002 |
Camilla Berglund | d43e0b5 | 2011-03-07 20:51:34 +0100 | [diff] [blame] | 420 | |
| 421 | /* GLFW_OPENGL_ROBUSTNESS mode tokens */ |
| 422 | #define GLFW_OPENGL_NO_ROBUSTNESS 0x00000000 |
| 423 | #define GLFW_OPENGL_NO_RESET_NOTIFICATION 0x00000001 |
| 424 | #define GLFW_OPENGL_LOSE_CONTEXT_ON_RESET 0x00000002 |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 425 | |
Camilla Berglund | 20662dd | 2010-11-15 21:40:43 +0100 | [diff] [blame] | 426 | /* GLFW_OPENGL_PROFILE bit tokens */ |
Camilla Berglund | e2c58b0 | 2011-09-19 21:00:29 +0200 | [diff] [blame] | 427 | #define GLFW_OPENGL_NO_PROFILE 0x00000000 |
Camilla Berglund | 20662dd | 2010-11-15 21:40:43 +0100 | [diff] [blame] | 428 | #define GLFW_OPENGL_CORE_PROFILE 0x00000001 |
| 429 | #define GLFW_OPENGL_COMPAT_PROFILE 0x00000002 |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 430 | |
Camilla Berglund | ce288a8 | 2012-02-04 00:51:35 +0100 | [diff] [blame] | 431 | /* glfwGetInputMode/glfwSetInputMode tokens */ |
| 432 | #define GLFW_CURSOR_MODE 0x00030001 |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 433 | #define GLFW_STICKY_KEYS 0x00030002 |
| 434 | #define GLFW_STICKY_MOUSE_BUTTONS 0x00030003 |
| 435 | #define GLFW_SYSTEM_KEYS 0x00030004 |
| 436 | #define GLFW_KEY_REPEAT 0x00030005 |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 437 | |
Camilla Berglund | ce288a8 | 2012-02-04 00:51:35 +0100 | [diff] [blame] | 438 | /* GLFW_CURSOR_MODE values */ |
Camilla Berglund | b1656d7 | 2011-09-06 13:55:29 +0200 | [diff] [blame] | 439 | #define GLFW_CURSOR_NORMAL 0x00040001 |
| 440 | #define GLFW_CURSOR_HIDDEN 0x00040002 |
| 441 | #define GLFW_CURSOR_CAPTURED 0x00040003 |
| 442 | |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 443 | /* glfwGetJoystickParam tokens */ |
| 444 | #define GLFW_PRESENT 0x00050001 |
| 445 | #define GLFW_AXES 0x00050002 |
| 446 | #define GLFW_BUTTONS 0x00050003 |
| 447 | |
Camilla Berglund | e28543c | 2010-09-09 21:08:50 +0200 | [diff] [blame] | 448 | /* glfwGetError/glfwErrorString tokens */ |
| 449 | #define GLFW_NO_ERROR 0 |
| 450 | #define GLFW_NOT_INITIALIZED 0x00070001 |
Camilla Berglund | 957ecdc | 2012-08-02 15:36:15 +0200 | [diff] [blame] | 451 | #define GLFW_NO_CURRENT_CONTEXT 0x00070002 |
Camilla Berglund | 5254617 | 2010-10-05 00:08:19 +0200 | [diff] [blame] | 452 | #define GLFW_INVALID_ENUM 0x00070003 |
| 453 | #define GLFW_INVALID_VALUE 0x00070004 |
| 454 | #define GLFW_OUT_OF_MEMORY 0x00070005 |
| 455 | #define GLFW_OPENGL_UNAVAILABLE 0x00070006 |
| 456 | #define GLFW_VERSION_UNAVAILABLE 0x00070007 |
| 457 | #define GLFW_PLATFORM_ERROR 0x00070008 |
Camilla Berglund | b1656d7 | 2011-09-06 13:55:29 +0200 | [diff] [blame] | 458 | #define GLFW_WINDOW_NOT_ACTIVE 0x00070009 |
Camilla Berglund | 7044ed6 | 2012-04-09 15:54:36 +0200 | [diff] [blame] | 459 | #define GLFW_FORMAT_UNAVAILABLE 0x0007000A |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 460 | |
Camilla Berglund | 2630d49 | 2010-10-13 04:04:43 +0200 | [diff] [blame] | 461 | /* Gamma ramps */ |
| 462 | #define GLFW_GAMMA_RAMP_SIZE 256 |
Camilla Berglund | 2c09157 | 2010-09-09 21:09:11 +0200 | [diff] [blame] | 463 | |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 464 | /************************************************************************* |
| 465 | * Typedefs |
| 466 | *************************************************************************/ |
| 467 | |
Camilla Berglund | bf42c3c | 2012-06-05 00:16:40 +0200 | [diff] [blame] | 468 | /* OpenGL function pointer type */ |
| 469 | typedef void (*GLFWglproc)(void); |
| 470 | |
Camilla Berglund | 8d8eb0c | 2010-09-16 06:05:50 +0200 | [diff] [blame] | 471 | /* Window handle type */ |
Camilla Berglund | a66a4cd | 2011-02-09 12:37:42 +0100 | [diff] [blame] | 472 | typedef void* GLFWwindow; |
Camilla Berglund | 135194a | 2010-09-09 18:15:32 +0200 | [diff] [blame] | 473 | |
Camilla Berglund | 897558f | 2011-03-07 13:34:58 +0100 | [diff] [blame] | 474 | /* Function pointer types */ |
| 475 | typedef void (* GLFWerrorfun)(int,const char*); |
| 476 | typedef void (* GLFWwindowsizefun)(GLFWwindow,int,int); |
| 477 | typedef int (* GLFWwindowclosefun)(GLFWwindow); |
| 478 | typedef void (* GLFWwindowrefreshfun)(GLFWwindow); |
| 479 | typedef void (* GLFWwindowfocusfun)(GLFWwindow,int); |
| 480 | typedef void (* GLFWwindowiconifyfun)(GLFWwindow,int); |
| 481 | typedef void (* GLFWmousebuttonfun)(GLFWwindow,int,int); |
Camilla Berglund | cef9dea | 2012-06-22 13:53:02 +0200 | [diff] [blame] | 482 | typedef void (* GLFWcursorposfun)(GLFWwindow,int,int); |
Camilla Berglund | c4806b9 | 2012-01-30 22:59:38 +0100 | [diff] [blame] | 483 | typedef void (* GLFWcursorenterfun)(GLFWwindow,int); |
Camilla Berglund | 4ef9aec | 2012-03-28 21:54:09 +0200 | [diff] [blame] | 484 | typedef void (* GLFWscrollfun)(GLFWwindow,double,double); |
Camilla Berglund | 897558f | 2011-03-07 13:34:58 +0100 | [diff] [blame] | 485 | typedef void (* GLFWkeyfun)(GLFWwindow,int,int); |
| 486 | typedef void (* GLFWcharfun)(GLFWwindow,int); |
| 487 | |
Camilla Berglund | 8d8eb0c | 2010-09-16 06:05:50 +0200 | [diff] [blame] | 488 | /* The video mode structure used by glfwGetVideoModes */ |
Camilla Berglund | 5fd3fc7 | 2010-09-09 19:44:43 +0200 | [diff] [blame] | 489 | typedef struct |
| 490 | { |
| 491 | int width; |
| 492 | int height; |
| 493 | int redBits; |
| 494 | int blueBits; |
| 495 | int greenBits; |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 496 | } GLFWvidmode; |
| 497 | |
Camilla Berglund | 2630d49 | 2010-10-13 04:04:43 +0200 | [diff] [blame] | 498 | /* Gamma ramp */ |
| 499 | typedef struct |
| 500 | { |
| 501 | unsigned short red[GLFW_GAMMA_RAMP_SIZE]; |
| 502 | unsigned short green[GLFW_GAMMA_RAMP_SIZE]; |
| 503 | unsigned short blue[GLFW_GAMMA_RAMP_SIZE]; |
| 504 | } GLFWgammaramp; |
| 505 | |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 506 | |
| 507 | /************************************************************************* |
| 508 | * Prototypes |
| 509 | *************************************************************************/ |
| 510 | |
Camilla Berglund | 16cf53b | 2010-09-20 00:38:06 +0200 | [diff] [blame] | 511 | /* Initialization, termination and version querying */ |
Camilla Berglund | 9a71669 | 2010-09-08 16:40:43 +0200 | [diff] [blame] | 512 | GLFWAPI int glfwInit(void); |
| 513 | GLFWAPI void glfwTerminate(void); |
| 514 | GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev); |
Camilla Berglund | d6fe447 | 2010-09-13 18:05:59 +0200 | [diff] [blame] | 515 | GLFWAPI const char* glfwGetVersionString(void); |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 516 | |
Camilla Berglund | f5d74c4 | 2010-09-09 21:06:59 +0200 | [diff] [blame] | 517 | /* Error handling */ |
| 518 | GLFWAPI int glfwGetError(void); |
| 519 | GLFWAPI const char* glfwErrorString(int error); |
Camilla Berglund | f1e7d7c | 2010-11-23 17:45:23 +0100 | [diff] [blame] | 520 | GLFWAPI void glfwSetErrorCallback(GLFWerrorfun cbfun); |
Camilla Berglund | f5d74c4 | 2010-09-09 21:06:59 +0200 | [diff] [blame] | 521 | |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 522 | /* Video mode functions */ |
Camilla Berglund | 871e1a7 | 2012-08-02 18:03:43 +0200 | [diff] [blame] | 523 | GLFWAPI GLFWvidmode* glfwGetVideoModes(int* count); |
Camilla Berglund | 9a71669 | 2010-09-08 16:40:43 +0200 | [diff] [blame] | 524 | GLFWAPI void glfwGetDesktopMode(GLFWvidmode* mode); |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 525 | |
Camilla Berglund | 2630d49 | 2010-10-13 04:04:43 +0200 | [diff] [blame] | 526 | /* Gamma ramp functions */ |
Camilla Berglund | ca0dbdb | 2011-09-06 15:43:31 +0200 | [diff] [blame] | 527 | GLFWAPI void glfwSetGamma(float gamma); |
Camilla Berglund | 2630d49 | 2010-10-13 04:04:43 +0200 | [diff] [blame] | 528 | GLFWAPI void glfwGetGammaRamp(GLFWgammaramp* ramp); |
| 529 | GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp); |
| 530 | |
Camilla Berglund | 135194a | 2010-09-09 18:15:32 +0200 | [diff] [blame] | 531 | /* Window handling */ |
Camilla Berglund | 5df4df6 | 2012-10-22 02:59:05 +0200 | [diff] [blame^] | 532 | GLFWAPI void glfwDefaultWindowHints(void); |
Camilla Berglund | aff30d0 | 2012-08-06 17:56:41 +0200 | [diff] [blame] | 533 | GLFWAPI void glfwWindowHint(int target, int hint); |
Camilla Berglund | 2212cd9 | 2012-08-10 13:29:45 +0200 | [diff] [blame] | 534 | GLFWAPI GLFWwindow glfwCreateWindow(int width, int height, int mode, const char* title, GLFWwindow share); |
Camilla Berglund | aff30d0 | 2012-08-06 17:56:41 +0200 | [diff] [blame] | 535 | GLFWAPI void glfwDestroyWindow(GLFWwindow window); |
Camilla Berglund | a339098 | 2012-09-02 15:22:56 +0200 | [diff] [blame] | 536 | GLFWAPI void glfwSetWindowTitle(GLFWwindow window, const char* title); |
| 537 | GLFWAPI void glfwGetWindowSize(GLFWwindow window, int* width, int* height); |
| 538 | GLFWAPI void glfwSetWindowSize(GLFWwindow window, int width, int height); |
| 539 | GLFWAPI void glfwGetWindowPos(GLFWwindow window, int* xpos, int* ypos); |
| 540 | GLFWAPI void glfwSetWindowPos(GLFWwindow window, int xpos, int ypos); |
Camilla Berglund | 135194a | 2010-09-09 18:15:32 +0200 | [diff] [blame] | 541 | GLFWAPI void glfwIconifyWindow(GLFWwindow window); |
| 542 | GLFWAPI void glfwRestoreWindow(GLFWwindow window); |
Riku Salminen | 596132c | 2012-08-21 21:01:57 +0300 | [diff] [blame] | 543 | GLFWAPI void glfwShowWindow(GLFWwindow window); |
| 544 | GLFWAPI void glfwHideWindow(GLFWwindow window); |
Camilla Berglund | 135194a | 2010-09-09 18:15:32 +0200 | [diff] [blame] | 545 | GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param); |
Camilla Berglund | 48f5a7e | 2010-09-09 22:44:38 +0200 | [diff] [blame] | 546 | GLFWAPI void glfwSetWindowUserPointer(GLFWwindow window, void* pointer); |
| 547 | GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow window); |
Camilla Berglund | 4044c2d | 2010-10-24 18:28:55 +0200 | [diff] [blame] | 548 | GLFWAPI void glfwSetWindowSizeCallback(GLFWwindowsizefun cbfun); |
| 549 | GLFWAPI void glfwSetWindowCloseCallback(GLFWwindowclosefun cbfun); |
| 550 | GLFWAPI void glfwSetWindowRefreshCallback(GLFWwindowrefreshfun cbfun); |
| 551 | GLFWAPI void glfwSetWindowFocusCallback(GLFWwindowfocusfun cbfun); |
| 552 | GLFWAPI void glfwSetWindowIconifyCallback(GLFWwindowiconifyfun cbfun); |
Camilla Berglund | 135194a | 2010-09-09 18:15:32 +0200 | [diff] [blame] | 553 | |
| 554 | /* Event handling */ |
Camilla Berglund | 9a71669 | 2010-09-08 16:40:43 +0200 | [diff] [blame] | 555 | GLFWAPI void glfwPollEvents(void); |
| 556 | GLFWAPI void glfwWaitEvents(void); |
Camilla Berglund | 135194a | 2010-09-09 18:15:32 +0200 | [diff] [blame] | 557 | |
| 558 | /* Input handling */ |
Camilla Berglund | 609c008 | 2012-02-04 01:34:12 +0100 | [diff] [blame] | 559 | GLFWAPI int glfwGetInputMode(GLFWwindow window, int mode); |
| 560 | GLFWAPI void glfwSetInputMode(GLFWwindow window, int mode, int value); |
Camilla Berglund | 135194a | 2010-09-09 18:15:32 +0200 | [diff] [blame] | 561 | GLFWAPI int glfwGetKey(GLFWwindow window, int key); |
| 562 | GLFWAPI int glfwGetMouseButton(GLFWwindow window, int button); |
Camilla Berglund | cef9dea | 2012-06-22 13:53:02 +0200 | [diff] [blame] | 563 | GLFWAPI void glfwGetCursorPos(GLFWwindow window, int* xpos, int* ypos); |
| 564 | GLFWAPI void glfwSetCursorPos(GLFWwindow window, int xpos, int ypos); |
Camilla Berglund | 4ef9aec | 2012-03-28 21:54:09 +0200 | [diff] [blame] | 565 | GLFWAPI void glfwGetScrollOffset(GLFWwindow window, double* xoffset, double* yoffset); |
Camilla Berglund | 4044c2d | 2010-10-24 18:28:55 +0200 | [diff] [blame] | 566 | GLFWAPI void glfwSetKeyCallback(GLFWkeyfun cbfun); |
| 567 | GLFWAPI void glfwSetCharCallback(GLFWcharfun cbfun); |
| 568 | GLFWAPI void glfwSetMouseButtonCallback(GLFWmousebuttonfun cbfun); |
Camilla Berglund | cef9dea | 2012-06-22 13:53:02 +0200 | [diff] [blame] | 569 | GLFWAPI void glfwSetCursorPosCallback(GLFWcursorposfun cbfun); |
Hanmac | 0b752b8 | 2012-01-30 22:18:05 +0100 | [diff] [blame] | 570 | GLFWAPI void glfwSetCursorEnterCallback(GLFWcursorenterfun cbfun); |
Camilla Berglund | 4044c2d | 2010-10-24 18:28:55 +0200 | [diff] [blame] | 571 | GLFWAPI void glfwSetScrollCallback(GLFWscrollfun cbfun); |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 572 | |
| 573 | /* Joystick input */ |
Camilla Berglund | 9a71669 | 2010-09-08 16:40:43 +0200 | [diff] [blame] | 574 | GLFWAPI int glfwGetJoystickParam(int joy, int param); |
Camilla Berglund | 2502e4d | 2012-08-29 18:31:12 +0200 | [diff] [blame] | 575 | GLFWAPI int glfwGetJoystickAxes(int joy, float* axes, int numaxes); |
Camilla Berglund | 9a71669 | 2010-09-08 16:40:43 +0200 | [diff] [blame] | 576 | GLFWAPI int glfwGetJoystickButtons(int joy, unsigned char* buttons, int numbuttons); |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 577 | |
Ralph Eastwood | 31c9154 | 2011-09-21 10:09:47 +0100 | [diff] [blame] | 578 | /* Clipboard */ |
Camilla Berglund | 1214fa1 | 2012-04-09 16:03:14 +0200 | [diff] [blame] | 579 | GLFWAPI void glfwSetClipboardString(GLFWwindow window, const char* string); |
Camilla Berglund | f868712 | 2012-04-12 00:51:58 +0200 | [diff] [blame] | 580 | GLFWAPI const char* glfwGetClipboardString(GLFWwindow window); |
Ralph Eastwood | 31c9154 | 2011-09-21 10:09:47 +0100 | [diff] [blame] | 581 | |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 582 | /* Time */ |
Camilla Berglund | 9a71669 | 2010-09-08 16:40:43 +0200 | [diff] [blame] | 583 | GLFWAPI double glfwGetTime(void); |
| 584 | GLFWAPI void glfwSetTime(double time); |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 585 | |
Camilla Berglund | 135194a | 2010-09-09 18:15:32 +0200 | [diff] [blame] | 586 | /* OpenGL support */ |
Camilla Berglund | c1ab73b | 2011-07-27 16:01:27 +0200 | [diff] [blame] | 587 | GLFWAPI void glfwMakeContextCurrent(GLFWwindow window); |
| 588 | GLFWAPI GLFWwindow glfwGetCurrentContext(void); |
Camilla Berglund | 585a840 | 2012-08-06 18:13:37 +0200 | [diff] [blame] | 589 | GLFWAPI void glfwSwapBuffers(GLFWwindow window); |
Camilla Berglund | 135194a | 2010-09-09 18:15:32 +0200 | [diff] [blame] | 590 | GLFWAPI void glfwSwapInterval(int interval); |
Camilla Berglund | 9a71669 | 2010-09-08 16:40:43 +0200 | [diff] [blame] | 591 | GLFWAPI int glfwExtensionSupported(const char* extension); |
Camilla Berglund | bf42c3c | 2012-06-05 00:16:40 +0200 | [diff] [blame] | 592 | GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname); |
Camilla Berglund | c1ab73b | 2011-07-27 16:01:27 +0200 | [diff] [blame] | 593 | GLFWAPI void glfwCopyContext(GLFWwindow src, GLFWwindow dst, unsigned long mask); |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 594 | |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 595 | |
Camilla Berglund | 4afc67c | 2011-07-27 17:09:17 +0200 | [diff] [blame] | 596 | /************************************************************************* |
| 597 | * Global definition cleanup |
| 598 | *************************************************************************/ |
| 599 | |
| 600 | /* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */ |
| 601 | |
Camilla Berglund | 4afc67c | 2011-07-27 17:09:17 +0200 | [diff] [blame] | 602 | #ifdef GLFW_WINGDIAPI_DEFINED |
| 603 | #undef WINGDIAPI |
| 604 | #undef GLFW_WINGDIAPI_DEFINED |
| 605 | #endif |
| 606 | |
| 607 | #ifdef GLFW_CALLBACK_DEFINED |
| 608 | #undef CALLBACK |
| 609 | #undef GLFW_CALLBACK_DEFINED |
| 610 | #endif |
| 611 | |
| 612 | /* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ |
| 613 | |
| 614 | |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 615 | #ifdef __cplusplus |
| 616 | } |
| 617 | #endif |
| 618 | |
Camilla Berglund | 36e5409 | 2010-11-09 02:58:35 +0100 | [diff] [blame] | 619 | #endif /* __glfw3_h__ */ |
Camilla Berglund | 3249f81 | 2010-09-07 17:34:51 +0200 | [diff] [blame] | 620 | |