1#![allow(unused)]
4#![allow(non_upper_case_globals)]
5#![allow(non_camel_case_types)]
6#![allow(non_snake_case)]
7#![allow(rustdoc::invalid_codeblock_attributes)]
8#![allow(rustdoc::invalid_rust_codeblocks)]
9#![allow(rustdoc::broken_intra_doc_links)]
10
11pub const GLFW_VERSION_MAJOR: i32 = 3;
12pub const GLFW_VERSION_MINOR: i32 = 4;
13pub const GLFW_VERSION_REVISION: i32 = 0;
14pub const GLFW_TRUE: i32 = 1;
15pub const GLFW_FALSE: i32 = 0;
16pub const GLFW_RELEASE: i32 = 0;
17pub const GLFW_PRESS: i32 = 1;
18pub const GLFW_REPEAT: i32 = 2;
19pub const GLFW_HAT_CENTERED: i32 = 0;
20pub const GLFW_HAT_UP: i32 = 1;
21pub const GLFW_HAT_RIGHT: i32 = 2;
22pub const GLFW_HAT_DOWN: i32 = 4;
23pub const GLFW_HAT_LEFT: i32 = 8;
24pub const GLFW_HAT_RIGHT_UP: i32 = 3;
25pub const GLFW_HAT_RIGHT_DOWN: i32 = 6;
26pub const GLFW_HAT_LEFT_UP: i32 = 9;
27pub const GLFW_HAT_LEFT_DOWN: i32 = 12;
28pub const GLFW_KEY_UNKNOWN: i32 = -1;
29pub const GLFW_KEY_SPACE: i32 = 32;
30pub const GLFW_KEY_APOSTROPHE: i32 = 39;
31pub const GLFW_KEY_COMMA: i32 = 44;
32pub const GLFW_KEY_MINUS: i32 = 45;
33pub const GLFW_KEY_PERIOD: i32 = 46;
34pub const GLFW_KEY_SLASH: i32 = 47;
35pub const GLFW_KEY_0: i32 = 48;
36pub const GLFW_KEY_1: i32 = 49;
37pub const GLFW_KEY_2: i32 = 50;
38pub const GLFW_KEY_3: i32 = 51;
39pub const GLFW_KEY_4: i32 = 52;
40pub const GLFW_KEY_5: i32 = 53;
41pub const GLFW_KEY_6: i32 = 54;
42pub const GLFW_KEY_7: i32 = 55;
43pub const GLFW_KEY_8: i32 = 56;
44pub const GLFW_KEY_9: i32 = 57;
45pub const GLFW_KEY_SEMICOLON: i32 = 59;
46pub const GLFW_KEY_EQUAL: i32 = 61;
47pub const GLFW_KEY_A: i32 = 65;
48pub const GLFW_KEY_B: i32 = 66;
49pub const GLFW_KEY_C: i32 = 67;
50pub const GLFW_KEY_D: i32 = 68;
51pub const GLFW_KEY_E: i32 = 69;
52pub const GLFW_KEY_F: i32 = 70;
53pub const GLFW_KEY_G: i32 = 71;
54pub const GLFW_KEY_H: i32 = 72;
55pub const GLFW_KEY_I: i32 = 73;
56pub const GLFW_KEY_J: i32 = 74;
57pub const GLFW_KEY_K: i32 = 75;
58pub const GLFW_KEY_L: i32 = 76;
59pub const GLFW_KEY_M: i32 = 77;
60pub const GLFW_KEY_N: i32 = 78;
61pub const GLFW_KEY_O: i32 = 79;
62pub const GLFW_KEY_P: i32 = 80;
63pub const GLFW_KEY_Q: i32 = 81;
64pub const GLFW_KEY_R: i32 = 82;
65pub const GLFW_KEY_S: i32 = 83;
66pub const GLFW_KEY_T: i32 = 84;
67pub const GLFW_KEY_U: i32 = 85;
68pub const GLFW_KEY_V: i32 = 86;
69pub const GLFW_KEY_W: i32 = 87;
70pub const GLFW_KEY_X: i32 = 88;
71pub const GLFW_KEY_Y: i32 = 89;
72pub const GLFW_KEY_Z: i32 = 90;
73pub const GLFW_KEY_LEFT_BRACKET: i32 = 91;
74pub const GLFW_KEY_BACKSLASH: i32 = 92;
75pub const GLFW_KEY_RIGHT_BRACKET: i32 = 93;
76pub const GLFW_KEY_GRAVE_ACCENT: i32 = 96;
77pub const GLFW_KEY_WORLD_1: i32 = 161;
78pub const GLFW_KEY_WORLD_2: i32 = 162;
79pub const GLFW_KEY_ESCAPE: i32 = 256;
80pub const GLFW_KEY_ENTER: i32 = 257;
81pub const GLFW_KEY_TAB: i32 = 258;
82pub const GLFW_KEY_BACKSPACE: i32 = 259;
83pub const GLFW_KEY_INSERT: i32 = 260;
84pub const GLFW_KEY_DELETE: i32 = 261;
85pub const GLFW_KEY_RIGHT: i32 = 262;
86pub const GLFW_KEY_LEFT: i32 = 263;
87pub const GLFW_KEY_DOWN: i32 = 264;
88pub const GLFW_KEY_UP: i32 = 265;
89pub const GLFW_KEY_PAGE_UP: i32 = 266;
90pub const GLFW_KEY_PAGE_DOWN: i32 = 267;
91pub const GLFW_KEY_HOME: i32 = 268;
92pub const GLFW_KEY_END: i32 = 269;
93pub const GLFW_KEY_CAPS_LOCK: i32 = 280;
94pub const GLFW_KEY_SCROLL_LOCK: i32 = 281;
95pub const GLFW_KEY_NUM_LOCK: i32 = 282;
96pub const GLFW_KEY_PRINT_SCREEN: i32 = 283;
97pub const GLFW_KEY_PAUSE: i32 = 284;
98pub const GLFW_KEY_F1: i32 = 290;
99pub const GLFW_KEY_F2: i32 = 291;
100pub const GLFW_KEY_F3: i32 = 292;
101pub const GLFW_KEY_F4: i32 = 293;
102pub const GLFW_KEY_F5: i32 = 294;
103pub const GLFW_KEY_F6: i32 = 295;
104pub const GLFW_KEY_F7: i32 = 296;
105pub const GLFW_KEY_F8: i32 = 297;
106pub const GLFW_KEY_F9: i32 = 298;
107pub const GLFW_KEY_F10: i32 = 299;
108pub const GLFW_KEY_F11: i32 = 300;
109pub const GLFW_KEY_F12: i32 = 301;
110pub const GLFW_KEY_F13: i32 = 302;
111pub const GLFW_KEY_F14: i32 = 303;
112pub const GLFW_KEY_F15: i32 = 304;
113pub const GLFW_KEY_F16: i32 = 305;
114pub const GLFW_KEY_F17: i32 = 306;
115pub const GLFW_KEY_F18: i32 = 307;
116pub const GLFW_KEY_F19: i32 = 308;
117pub const GLFW_KEY_F20: i32 = 309;
118pub const GLFW_KEY_F21: i32 = 310;
119pub const GLFW_KEY_F22: i32 = 311;
120pub const GLFW_KEY_F23: i32 = 312;
121pub const GLFW_KEY_F24: i32 = 313;
122pub const GLFW_KEY_F25: i32 = 314;
123pub const GLFW_KEY_KP_0: i32 = 320;
124pub const GLFW_KEY_KP_1: i32 = 321;
125pub const GLFW_KEY_KP_2: i32 = 322;
126pub const GLFW_KEY_KP_3: i32 = 323;
127pub const GLFW_KEY_KP_4: i32 = 324;
128pub const GLFW_KEY_KP_5: i32 = 325;
129pub const GLFW_KEY_KP_6: i32 = 326;
130pub const GLFW_KEY_KP_7: i32 = 327;
131pub const GLFW_KEY_KP_8: i32 = 328;
132pub const GLFW_KEY_KP_9: i32 = 329;
133pub const GLFW_KEY_KP_DECIMAL: i32 = 330;
134pub const GLFW_KEY_KP_DIVIDE: i32 = 331;
135pub const GLFW_KEY_KP_MULTIPLY: i32 = 332;
136pub const GLFW_KEY_KP_SUBTRACT: i32 = 333;
137pub const GLFW_KEY_KP_ADD: i32 = 334;
138pub const GLFW_KEY_KP_ENTER: i32 = 335;
139pub const GLFW_KEY_KP_EQUAL: i32 = 336;
140pub const GLFW_KEY_LEFT_SHIFT: i32 = 340;
141pub const GLFW_KEY_LEFT_CONTROL: i32 = 341;
142pub const GLFW_KEY_LEFT_ALT: i32 = 342;
143pub const GLFW_KEY_LEFT_SUPER: i32 = 343;
144pub const GLFW_KEY_RIGHT_SHIFT: i32 = 344;
145pub const GLFW_KEY_RIGHT_CONTROL: i32 = 345;
146pub const GLFW_KEY_RIGHT_ALT: i32 = 346;
147pub const GLFW_KEY_RIGHT_SUPER: i32 = 347;
148pub const GLFW_KEY_MENU: i32 = 348;
149pub const GLFW_KEY_LAST: i32 = 348;
150pub const GLFW_MOD_SHIFT: i32 = 1;
151pub const GLFW_MOD_CONTROL: i32 = 2;
152pub const GLFW_MOD_ALT: i32 = 4;
153pub const GLFW_MOD_SUPER: i32 = 8;
154pub const GLFW_MOD_CAPS_LOCK: i32 = 16;
155pub const GLFW_MOD_NUM_LOCK: i32 = 32;
156pub const GLFW_MOUSE_BUTTON_1: i32 = 0;
157pub const GLFW_MOUSE_BUTTON_2: i32 = 1;
158pub const GLFW_MOUSE_BUTTON_3: i32 = 2;
159pub const GLFW_MOUSE_BUTTON_4: i32 = 3;
160pub const GLFW_MOUSE_BUTTON_5: i32 = 4;
161pub const GLFW_MOUSE_BUTTON_6: i32 = 5;
162pub const GLFW_MOUSE_BUTTON_7: i32 = 6;
163pub const GLFW_MOUSE_BUTTON_8: i32 = 7;
164pub const GLFW_MOUSE_BUTTON_LAST: i32 = 7;
165pub const GLFW_MOUSE_BUTTON_LEFT: i32 = 0;
166pub const GLFW_MOUSE_BUTTON_RIGHT: i32 = 1;
167pub const GLFW_MOUSE_BUTTON_MIDDLE: i32 = 2;
168pub const GLFW_JOYSTICK_1: i32 = 0;
169pub const GLFW_JOYSTICK_2: i32 = 1;
170pub const GLFW_JOYSTICK_3: i32 = 2;
171pub const GLFW_JOYSTICK_4: i32 = 3;
172pub const GLFW_JOYSTICK_5: i32 = 4;
173pub const GLFW_JOYSTICK_6: i32 = 5;
174pub const GLFW_JOYSTICK_7: i32 = 6;
175pub const GLFW_JOYSTICK_8: i32 = 7;
176pub const GLFW_JOYSTICK_9: i32 = 8;
177pub const GLFW_JOYSTICK_10: i32 = 9;
178pub const GLFW_JOYSTICK_11: i32 = 10;
179pub const GLFW_JOYSTICK_12: i32 = 11;
180pub const GLFW_JOYSTICK_13: i32 = 12;
181pub const GLFW_JOYSTICK_14: i32 = 13;
182pub const GLFW_JOYSTICK_15: i32 = 14;
183pub const GLFW_JOYSTICK_16: i32 = 15;
184pub const GLFW_JOYSTICK_LAST: i32 = 15;
185pub const GLFW_GAMEPAD_BUTTON_A: i32 = 0;
186pub const GLFW_GAMEPAD_BUTTON_B: i32 = 1;
187pub const GLFW_GAMEPAD_BUTTON_X: i32 = 2;
188pub const GLFW_GAMEPAD_BUTTON_Y: i32 = 3;
189pub const GLFW_GAMEPAD_BUTTON_LEFT_BUMPER: i32 = 4;
190pub const GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER: i32 = 5;
191pub const GLFW_GAMEPAD_BUTTON_BACK: i32 = 6;
192pub const GLFW_GAMEPAD_BUTTON_START: i32 = 7;
193pub const GLFW_GAMEPAD_BUTTON_GUIDE: i32 = 8;
194pub const GLFW_GAMEPAD_BUTTON_LEFT_THUMB: i32 = 9;
195pub const GLFW_GAMEPAD_BUTTON_RIGHT_THUMB: i32 = 10;
196pub const GLFW_GAMEPAD_BUTTON_DPAD_UP: i32 = 11;
197pub const GLFW_GAMEPAD_BUTTON_DPAD_RIGHT: i32 = 12;
198pub const GLFW_GAMEPAD_BUTTON_DPAD_DOWN: i32 = 13;
199pub const GLFW_GAMEPAD_BUTTON_DPAD_LEFT: i32 = 14;
200pub const GLFW_GAMEPAD_BUTTON_LAST: i32 = 14;
201pub const GLFW_GAMEPAD_BUTTON_CROSS: i32 = 0;
202pub const GLFW_GAMEPAD_BUTTON_CIRCLE: i32 = 1;
203pub const GLFW_GAMEPAD_BUTTON_SQUARE: i32 = 2;
204pub const GLFW_GAMEPAD_BUTTON_TRIANGLE: i32 = 3;
205pub const GLFW_GAMEPAD_AXIS_LEFT_X: i32 = 0;
206pub const GLFW_GAMEPAD_AXIS_LEFT_Y: i32 = 1;
207pub const GLFW_GAMEPAD_AXIS_RIGHT_X: i32 = 2;
208pub const GLFW_GAMEPAD_AXIS_RIGHT_Y: i32 = 3;
209pub const GLFW_GAMEPAD_AXIS_LEFT_TRIGGER: i32 = 4;
210pub const GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER: i32 = 5;
211pub const GLFW_GAMEPAD_AXIS_LAST: i32 = 5;
212pub const GLFW_NO_ERROR: i32 = 0;
213pub const GLFW_NOT_INITIALIZED: i32 = 65537;
214pub const GLFW_NO_CURRENT_CONTEXT: i32 = 65538;
215pub const GLFW_INVALID_ENUM: i32 = 65539;
216pub const GLFW_INVALID_VALUE: i32 = 65540;
217pub const GLFW_OUT_OF_MEMORY: i32 = 65541;
218pub const GLFW_API_UNAVAILABLE: i32 = 65542;
219pub const GLFW_VERSION_UNAVAILABLE: i32 = 65543;
220pub const GLFW_PLATFORM_ERROR: i32 = 65544;
221pub const GLFW_FORMAT_UNAVAILABLE: i32 = 65545;
222pub const GLFW_NO_WINDOW_CONTEXT: i32 = 65546;
223pub const GLFW_CURSOR_UNAVAILABLE: i32 = 65547;
224pub const GLFW_FEATURE_UNAVAILABLE: i32 = 65548;
225pub const GLFW_FEATURE_UNIMPLEMENTED: i32 = 65549;
226pub const GLFW_PLATFORM_UNAVAILABLE: i32 = 65550;
227pub const GLFW_FOCUSED: i32 = 131073;
228pub const GLFW_ICONIFIED: i32 = 131074;
229pub const GLFW_RESIZABLE: i32 = 131075;
230pub const GLFW_VISIBLE: i32 = 131076;
231pub const GLFW_DECORATED: i32 = 131077;
232pub const GLFW_AUTO_ICONIFY: i32 = 131078;
233pub const GLFW_FLOATING: i32 = 131079;
234pub const GLFW_MAXIMIZED: i32 = 131080;
235pub const GLFW_CENTER_CURSOR: i32 = 131081;
236pub const GLFW_TRANSPARENT_FRAMEBUFFER: i32 = 131082;
237pub const GLFW_HOVERED: i32 = 131083;
238pub const GLFW_FOCUS_ON_SHOW: i32 = 131084;
239pub const GLFW_MOUSE_PASSTHROUGH: i32 = 131085;
240pub const GLFW_POSITION_X: i32 = 131086;
241pub const GLFW_POSITION_Y: i32 = 131087;
242pub const GLFW_RED_BITS: i32 = 135169;
243pub const GLFW_GREEN_BITS: i32 = 135170;
244pub const GLFW_BLUE_BITS: i32 = 135171;
245pub const GLFW_ALPHA_BITS: i32 = 135172;
246pub const GLFW_DEPTH_BITS: i32 = 135173;
247pub const GLFW_STENCIL_BITS: i32 = 135174;
248pub const GLFW_ACCUM_RED_BITS: i32 = 135175;
249pub const GLFW_ACCUM_GREEN_BITS: i32 = 135176;
250pub const GLFW_ACCUM_BLUE_BITS: i32 = 135177;
251pub const GLFW_ACCUM_ALPHA_BITS: i32 = 135178;
252pub const GLFW_AUX_BUFFERS: i32 = 135179;
253pub const GLFW_STEREO: i32 = 135180;
254pub const GLFW_SAMPLES: i32 = 135181;
255pub const GLFW_SRGB_CAPABLE: i32 = 135182;
256pub const GLFW_REFRESH_RATE: i32 = 135183;
257pub const GLFW_DOUBLEBUFFER: i32 = 135184;
258pub const GLFW_CLIENT_API: i32 = 139265;
259pub const GLFW_CONTEXT_VERSION_MAJOR: i32 = 139266;
260pub const GLFW_CONTEXT_VERSION_MINOR: i32 = 139267;
261pub const GLFW_CONTEXT_REVISION: i32 = 139268;
262pub const GLFW_CONTEXT_ROBUSTNESS: i32 = 139269;
263pub const GLFW_OPENGL_FORWARD_COMPAT: i32 = 139270;
264pub const GLFW_CONTEXT_DEBUG: i32 = 139271;
265pub const GLFW_OPENGL_DEBUG_CONTEXT: i32 = 139271;
266pub const GLFW_OPENGL_PROFILE: i32 = 139272;
267pub const GLFW_CONTEXT_RELEASE_BEHAVIOR: i32 = 139273;
268pub const GLFW_CONTEXT_NO_ERROR: i32 = 139274;
269pub const GLFW_CONTEXT_CREATION_API: i32 = 139275;
270pub const GLFW_SCALE_TO_MONITOR: i32 = 139276;
271pub const GLFW_SCALE_FRAMEBUFFER: i32 = 139277;
272pub const GLFW_COCOA_RETINA_FRAMEBUFFER: i32 = 143361;
273pub const GLFW_COCOA_FRAME_NAME: i32 = 143362;
274pub const GLFW_COCOA_GRAPHICS_SWITCHING: i32 = 143363;
275pub const GLFW_X11_CLASS_NAME: i32 = 147457;
276pub const GLFW_X11_INSTANCE_NAME: i32 = 147458;
277pub const GLFW_WIN32_KEYBOARD_MENU: i32 = 151553;
278pub const GLFW_WIN32_SHOWDEFAULT: i32 = 151554;
279pub const GLFW_WAYLAND_APP_ID: i32 = 155649;
280pub const GLFW_NO_API: i32 = 0;
281pub const GLFW_OPENGL_API: i32 = 196609;
282pub const GLFW_OPENGL_ES_API: i32 = 196610;
283pub const GLFW_NO_ROBUSTNESS: i32 = 0;
284pub const GLFW_NO_RESET_NOTIFICATION: i32 = 200705;
285pub const GLFW_LOSE_CONTEXT_ON_RESET: i32 = 200706;
286pub const GLFW_OPENGL_ANY_PROFILE: i32 = 0;
287pub const GLFW_OPENGL_CORE_PROFILE: i32 = 204801;
288pub const GLFW_OPENGL_COMPAT_PROFILE: i32 = 204802;
289pub const GLFW_CURSOR: i32 = 208897;
290pub const GLFW_STICKY_KEYS: i32 = 208898;
291pub const GLFW_STICKY_MOUSE_BUTTONS: i32 = 208899;
292pub const GLFW_LOCK_KEY_MODS: i32 = 208900;
293pub const GLFW_RAW_MOUSE_MOTION: i32 = 208901;
294pub const GLFW_CURSOR_NORMAL: i32 = 212993;
295pub const GLFW_CURSOR_HIDDEN: i32 = 212994;
296pub const GLFW_CURSOR_DISABLED: i32 = 212995;
297pub const GLFW_CURSOR_CAPTURED: i32 = 212996;
298pub const GLFW_ANY_RELEASE_BEHAVIOR: i32 = 0;
299pub const GLFW_RELEASE_BEHAVIOR_FLUSH: i32 = 217089;
300pub const GLFW_RELEASE_BEHAVIOR_NONE: i32 = 217090;
301pub const GLFW_NATIVE_CONTEXT_API: i32 = 221185;
302pub const GLFW_EGL_CONTEXT_API: i32 = 221186;
303pub const GLFW_OSMESA_CONTEXT_API: i32 = 221187;
304pub const GLFW_ANGLE_PLATFORM_TYPE_NONE: i32 = 225281;
305pub const GLFW_ANGLE_PLATFORM_TYPE_OPENGL: i32 = 225282;
306pub const GLFW_ANGLE_PLATFORM_TYPE_OPENGLES: i32 = 225283;
307pub const GLFW_ANGLE_PLATFORM_TYPE_D3D9: i32 = 225284;
308pub const GLFW_ANGLE_PLATFORM_TYPE_D3D11: i32 = 225285;
309pub const GLFW_ANGLE_PLATFORM_TYPE_VULKAN: i32 = 225287;
310pub const GLFW_ANGLE_PLATFORM_TYPE_METAL: i32 = 225288;
311pub const GLFW_WAYLAND_PREFER_LIBDECOR: i32 = 229377;
312pub const GLFW_WAYLAND_DISABLE_LIBDECOR: i32 = 229378;
313pub const GLFW_ANY_POSITION: i64 = 2147483648;
314pub const GLFW_ARROW_CURSOR: i32 = 221185;
315pub const GLFW_IBEAM_CURSOR: i32 = 221186;
316pub const GLFW_CROSSHAIR_CURSOR: i32 = 221187;
317pub const GLFW_POINTING_HAND_CURSOR: i32 = 221188;
318pub const GLFW_RESIZE_EW_CURSOR: i32 = 221189;
319pub const GLFW_RESIZE_NS_CURSOR: i32 = 221190;
320pub const GLFW_RESIZE_NWSE_CURSOR: i32 = 221191;
321pub const GLFW_RESIZE_NESW_CURSOR: i32 = 221192;
322pub const GLFW_RESIZE_ALL_CURSOR: i32 = 221193;
323pub const GLFW_NOT_ALLOWED_CURSOR: i32 = 221194;
324pub const GLFW_HRESIZE_CURSOR: i32 = 221189;
325pub const GLFW_VRESIZE_CURSOR: i32 = 221190;
326pub const GLFW_HAND_CURSOR: i32 = 221188;
327pub const GLFW_CONNECTED: i32 = 262145;
328pub const GLFW_DISCONNECTED: i32 = 262146;
329pub const GLFW_JOYSTICK_HAT_BUTTONS: i32 = 327681;
330pub const GLFW_ANGLE_PLATFORM_TYPE: i32 = 327682;
331pub const GLFW_PLATFORM: i32 = 327683;
332pub const GLFW_COCOA_CHDIR_RESOURCES: i32 = 331777;
333pub const GLFW_COCOA_MENUBAR: i32 = 331778;
334pub const GLFW_X11_XCB_VULKAN_SURFACE: i32 = 335873;
335pub const GLFW_WAYLAND_LIBDECOR: i32 = 339969;
336pub const GLFW_ANY_PLATFORM: i32 = 393216;
337pub const GLFW_PLATFORM_WIN32: i32 = 393217;
338pub const GLFW_PLATFORM_COCOA: i32 = 393218;
339pub const GLFW_PLATFORM_WAYLAND: i32 = 393219;
340pub const GLFW_PLATFORM_X11: i32 = 393220;
341pub const GLFW_PLATFORM_NULL: i32 = 393221;
342pub const GLFW_DONT_CARE: i32 = -1;
343#[repr(C)]
344#[derive(Debug, Copy, Clone)]
345pub struct VkInstance_T {
346 _unused: [u8; 0],
347}
348pub type VkInstance = *mut VkInstance_T;
349#[repr(C)]
350#[derive(Debug, Copy, Clone)]
351pub struct VkPhysicalDevice_T {
352 _unused: [u8; 0],
353}
354pub type VkPhysicalDevice = *mut VkPhysicalDevice_T;
355pub const VkResult_VK_SUCCESS: VkResult = 0;
356pub const VkResult_VK_NOT_READY: VkResult = 1;
357pub const VkResult_VK_TIMEOUT: VkResult = 2;
358pub const VkResult_VK_EVENT_SET: VkResult = 3;
359pub const VkResult_VK_EVENT_RESET: VkResult = 4;
360pub const VkResult_VK_INCOMPLETE: VkResult = 5;
361pub const VkResult_VK_ERROR_OUT_OF_HOST_MEMORY: VkResult = -1;
362pub const VkResult_VK_ERROR_OUT_OF_DEVICE_MEMORY: VkResult = -2;
363pub const VkResult_VK_ERROR_INITIALIZATION_FAILED: VkResult = -3;
364pub const VkResult_VK_ERROR_DEVICE_LOST: VkResult = -4;
365pub const VkResult_VK_ERROR_MEMORY_MAP_FAILED: VkResult = -5;
366pub const VkResult_VK_ERROR_LAYER_NOT_PRESENT: VkResult = -6;
367pub const VkResult_VK_ERROR_EXTENSION_NOT_PRESENT: VkResult = -7;
368pub const VkResult_VK_ERROR_FEATURE_NOT_PRESENT: VkResult = -8;
369pub const VkResult_VK_ERROR_INCOMPATIBLE_DRIVER: VkResult = -9;
370pub const VkResult_VK_ERROR_TOO_MANY_OBJECTS: VkResult = -10;
371pub const VkResult_VK_ERROR_FORMAT_NOT_SUPPORTED: VkResult = -11;
372pub const VkResult_VK_ERROR_FRAGMENTED_POOL: VkResult = -12;
373pub const VkResult_VK_ERROR_UNKNOWN: VkResult = -13;
374pub const VkResult_VK_ERROR_OUT_OF_POOL_MEMORY: VkResult = -1000069000;
375pub const VkResult_VK_ERROR_INVALID_EXTERNAL_HANDLE: VkResult = -1000072003;
376pub const VkResult_VK_ERROR_FRAGMENTATION: VkResult = -1000161000;
377pub const VkResult_VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS: VkResult = -1000257000;
378pub const VkResult_VK_PIPELINE_COMPILE_REQUIRED: VkResult = 1000297000;
379pub const VkResult_VK_ERROR_NOT_PERMITTED: VkResult = -1000174001;
380pub const VkResult_VK_ERROR_SURFACE_LOST_KHR: VkResult = -1000000000;
381pub const VkResult_VK_ERROR_NATIVE_WINDOW_IN_USE_KHR: VkResult = -1000000001;
382pub const VkResult_VK_SUBOPTIMAL_KHR: VkResult = 1000001003;
383pub const VkResult_VK_ERROR_OUT_OF_DATE_KHR: VkResult = -1000001004;
384pub const VkResult_VK_ERROR_INCOMPATIBLE_DISPLAY_KHR: VkResult = -1000003001;
385pub const VkResult_VK_ERROR_VALIDATION_FAILED_EXT: VkResult = -1000011001;
386pub const VkResult_VK_ERROR_INVALID_SHADER_NV: VkResult = -1000012000;
387pub const VkResult_VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR: VkResult = -1000023000;
388pub const VkResult_VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR: VkResult = -1000023001;
389pub const VkResult_VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR: VkResult = -1000023002;
390pub const VkResult_VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR: VkResult = -1000023003;
391pub const VkResult_VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR: VkResult = -1000023004;
392pub const VkResult_VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR: VkResult = -1000023005;
393pub const VkResult_VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT: VkResult = -1000158000;
394pub const VkResult_VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT: VkResult = -1000255000;
395pub const VkResult_VK_THREAD_IDLE_KHR: VkResult = 1000268000;
396pub const VkResult_VK_THREAD_DONE_KHR: VkResult = 1000268001;
397pub const VkResult_VK_OPERATION_DEFERRED_KHR: VkResult = 1000268002;
398pub const VkResult_VK_OPERATION_NOT_DEFERRED_KHR: VkResult = 1000268003;
399pub const VkResult_VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR: VkResult = -1000299000;
400pub const VkResult_VK_ERROR_COMPRESSION_EXHAUSTED_EXT: VkResult = -1000338000;
401pub const VkResult_VK_INCOMPATIBLE_SHADER_BINARY_EXT: VkResult = 1000482000;
402pub const VkResult_VK_PIPELINE_BINARY_MISSING_KHR: VkResult = 1000483000;
403pub const VkResult_VK_ERROR_NOT_ENOUGH_SPACE_KHR: VkResult = -1000483000;
404pub const VkResult_VK_ERROR_OUT_OF_POOL_MEMORY_KHR: VkResult = -1000069000;
405pub const VkResult_VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR: VkResult = -1000072003;
406pub const VkResult_VK_ERROR_FRAGMENTATION_EXT: VkResult = -1000161000;
407pub const VkResult_VK_ERROR_NOT_PERMITTED_EXT: VkResult = -1000174001;
408pub const VkResult_VK_ERROR_NOT_PERMITTED_KHR: VkResult = -1000174001;
409pub const VkResult_VK_ERROR_INVALID_DEVICE_ADDRESS_EXT: VkResult = -1000257000;
410pub const VkResult_VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR: VkResult = -1000257000;
411pub const VkResult_VK_PIPELINE_COMPILE_REQUIRED_EXT: VkResult = 1000297000;
412pub const VkResult_VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT: VkResult = 1000297000;
413pub const VkResult_VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT: VkResult = 1000482000;
414pub const VkResult_VK_RESULT_MAX_ENUM: VkResult = 2147483647;
415pub type VkResult = ::std::os::raw::c_int;
416pub const VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_COMMAND: VkSystemAllocationScope = 0;
417pub const VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_OBJECT: VkSystemAllocationScope = 1;
418pub const VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_CACHE: VkSystemAllocationScope = 2;
419pub const VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_DEVICE: VkSystemAllocationScope = 3;
420pub const VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE: VkSystemAllocationScope = 4;
421pub const VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_MAX_ENUM: VkSystemAllocationScope =
422 2147483647;
423pub type VkSystemAllocationScope = ::std::os::raw::c_uint;
424pub const VkInternalAllocationType_VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE:
425 VkInternalAllocationType = 0;
426pub const VkInternalAllocationType_VK_INTERNAL_ALLOCATION_TYPE_MAX_ENUM: VkInternalAllocationType =
427 2147483647;
428pub type VkInternalAllocationType = ::std::os::raw::c_uint;
429pub type PFN_vkAllocationFunction = ::std::option::Option<
430 unsafe extern "C" fn(
431 pUserData: *mut ::std::os::raw::c_void,
432 size: usize,
433 alignment: usize,
434 allocationScope: VkSystemAllocationScope,
435 ) -> *mut ::std::os::raw::c_void,
436>;
437pub type PFN_vkFreeFunction = ::std::option::Option<
438 unsafe extern "C" fn(
439 pUserData: *mut ::std::os::raw::c_void,
440 pMemory: *mut ::std::os::raw::c_void,
441 ),
442>;
443pub type PFN_vkInternalAllocationNotification = ::std::option::Option<
444 unsafe extern "C" fn(
445 pUserData: *mut ::std::os::raw::c_void,
446 size: usize,
447 allocationType: VkInternalAllocationType,
448 allocationScope: VkSystemAllocationScope,
449 ),
450>;
451pub type PFN_vkInternalFreeNotification = ::std::option::Option<
452 unsafe extern "C" fn(
453 pUserData: *mut ::std::os::raw::c_void,
454 size: usize,
455 allocationType: VkInternalAllocationType,
456 allocationScope: VkSystemAllocationScope,
457 ),
458>;
459pub type PFN_vkReallocationFunction = ::std::option::Option<
460 unsafe extern "C" fn(
461 pUserData: *mut ::std::os::raw::c_void,
462 pOriginal: *mut ::std::os::raw::c_void,
463 size: usize,
464 alignment: usize,
465 allocationScope: VkSystemAllocationScope,
466 ) -> *mut ::std::os::raw::c_void,
467>;
468pub type PFN_vkVoidFunction = ::std::option::Option<unsafe extern "C" fn()>;
469#[repr(C)]
470#[derive(Debug, Copy, Clone)]
471pub struct VkAllocationCallbacks {
472 pub pUserData: *mut ::std::os::raw::c_void,
473 pub pfnAllocation: PFN_vkAllocationFunction,
474 pub pfnReallocation: PFN_vkReallocationFunction,
475 pub pfnFree: PFN_vkFreeFunction,
476 pub pfnInternalAllocation: PFN_vkInternalAllocationNotification,
477 pub pfnInternalFree: PFN_vkInternalFreeNotification,
478}
479pub type PFN_vkGetInstanceProcAddr = ::std::option::Option<
480 unsafe extern "C" fn(
481 instance: VkInstance,
482 pName: *const ::std::os::raw::c_char,
483 ) -> PFN_vkVoidFunction,
484>;
485#[repr(C)]
486#[derive(Debug, Copy, Clone)]
487pub struct VkSurfaceKHR_T {
488 _unused: [u8; 0],
489}
490pub type VkSurfaceKHR = *mut VkSurfaceKHR_T;
491#[doc = " @brief Client API function pointer type.\n\n Generic function pointer used for returning client API function pointers\n without forcing a cast from a regular pointer.\n\n @sa @ref context_glext\n @sa @ref glfwGetProcAddress\n\n @since Added in version 3.0.\n\n @ingroup context"]
492pub type GLFWglproc = ::std::option::Option<unsafe extern "C" fn()>;
493#[doc = " @brief Vulkan API function pointer type.\n\n Generic function pointer used for returning Vulkan API function pointers\n without forcing a cast from a regular pointer.\n\n @sa @ref vulkan_proc\n @sa @ref glfwGetInstanceProcAddress\n\n @since Added in version 3.2.\n\n @ingroup vulkan"]
494pub type GLFWvkproc = ::std::option::Option<unsafe extern "C" fn()>;
495#[repr(C)]
496#[derive(Debug, Copy, Clone)]
497pub struct GLFWmonitor {
498 _unused: [u8; 0],
499}
500#[repr(C)]
501#[derive(Debug, Copy, Clone)]
502pub struct GLFWwindow {
503 _unused: [u8; 0],
504}
505#[repr(C)]
506#[derive(Debug, Copy, Clone)]
507pub struct GLFWcursor {
508 _unused: [u8; 0],
509}
510#[doc = " @brief The function pointer type for memory allocation callbacks.\n\n This is the function pointer type for memory allocation callbacks. A memory\n allocation callback function has the following signature:\n @code\n void* function_name(size_t size, void* user)\n @endcode\n\n This function must return either a memory block at least `size` bytes long,\n or `NULL` if allocation failed. Note that not all parts of GLFW handle allocation\n failures gracefully yet.\n\n This function must support being called during @ref glfwInit but before the library is\n flagged as initialized, as well as during @ref glfwTerminate after the library is no\n longer flagged as initialized.\n\n Any memory allocated via this function will be deallocated via the same allocator\n during library termination or earlier.\n\n Any memory allocated via this function must be suitably aligned for any object type.\n If you are using C99 or earlier, this alignment is platform-dependent but will be the\n same as what `malloc` provides. If you are using C11 or later, this is the value of\n `alignof(max_align_t)`.\n\n The size will always be greater than zero. Allocations of size zero are filtered out\n before reaching the custom allocator.\n\n If this function returns `NULL`, GLFW will emit @ref GLFW_OUT_OF_MEMORY.\n\n This function must not call any GLFW function.\n\n @param[in] size The minimum size, in bytes, of the memory block.\n @param[in] user The user-defined pointer from the allocator.\n @return The address of the newly allocated memory block, or `NULL` if an\n error occurred.\n\n @pointer_lifetime The returned memory block must be valid at least until it\n is deallocated.\n\n @reentrancy This function should not call any GLFW function.\n\n @thread_safety This function must support being called from any thread that calls GLFW\n functions.\n\n @sa @ref init_allocator\n @sa @ref GLFWallocator\n\n @since Added in version 3.4.\n\n @ingroup init"]
511pub type GLFWallocatefun = ::std::option::Option<
512 unsafe extern "C" fn(
513 size: usize,
514 user: *mut ::std::os::raw::c_void,
515 ) -> *mut ::std::os::raw::c_void,
516>;
517#[doc = " @brief The function pointer type for memory reallocation callbacks.\n\n This is the function pointer type for memory reallocation callbacks.\n A memory reallocation callback function has the following signature:\n @code\n void* function_name(void* block, size_t size, void* user)\n @endcode\n\n This function must return a memory block at least `size` bytes long, or\n `NULL` if allocation failed. Note that not all parts of GLFW handle allocation\n failures gracefully yet.\n\n This function must support being called during @ref glfwInit but before the library is\n flagged as initialized, as well as during @ref glfwTerminate after the library is no\n longer flagged as initialized.\n\n Any memory allocated via this function will be deallocated via the same allocator\n during library termination or earlier.\n\n Any memory allocated via this function must be suitably aligned for any object type.\n If you are using C99 or earlier, this alignment is platform-dependent but will be the\n same as what `realloc` provides. If you are using C11 or later, this is the value of\n `alignof(max_align_t)`.\n\n The block address will never be `NULL` and the size will always be greater than zero.\n Reallocations of a block to size zero are converted into deallocations before reaching\n the custom allocator. Reallocations of `NULL` to a non-zero size are converted into\n regular allocations before reaching the custom allocator.\n\n If this function returns `NULL`, GLFW will emit @ref GLFW_OUT_OF_MEMORY.\n\n This function must not call any GLFW function.\n\n @param[in] block The address of the memory block to reallocate.\n @param[in] size The new minimum size, in bytes, of the memory block.\n @param[in] user The user-defined pointer from the allocator.\n @return The address of the newly allocated or resized memory block, or\n `NULL` if an error occurred.\n\n @pointer_lifetime The returned memory block must be valid at least until it\n is deallocated.\n\n @reentrancy This function should not call any GLFW function.\n\n @thread_safety This function must support being called from any thread that calls GLFW\n functions.\n\n @sa @ref init_allocator\n @sa @ref GLFWallocator\n\n @since Added in version 3.4.\n\n @ingroup init"]
518pub type GLFWreallocatefun = ::std::option::Option<
519 unsafe extern "C" fn(
520 block: *mut ::std::os::raw::c_void,
521 size: usize,
522 user: *mut ::std::os::raw::c_void,
523 ) -> *mut ::std::os::raw::c_void,
524>;
525#[doc = " @brief The function pointer type for memory deallocation callbacks.\n\n This is the function pointer type for memory deallocation callbacks.\n A memory deallocation callback function has the following signature:\n @code\n void function_name(void* block, void* user)\n @endcode\n\n This function may deallocate the specified memory block. This memory block\n will have been allocated with the same allocator.\n\n This function must support being called during @ref glfwInit but before the library is\n flagged as initialized, as well as during @ref glfwTerminate after the library is no\n longer flagged as initialized.\n\n The block address will never be `NULL`. Deallocations of `NULL` are filtered out\n before reaching the custom allocator.\n\n If this function returns `NULL`, GLFW will emit @ref GLFW_OUT_OF_MEMORY.\n\n This function must not call any GLFW function.\n\n @param[in] block The address of the memory block to deallocate.\n @param[in] user The user-defined pointer from the allocator.\n\n @pointer_lifetime The specified memory block will not be accessed by GLFW\n after this function is called.\n\n @reentrancy This function should not call any GLFW function.\n\n @thread_safety This function must support being called from any thread that calls GLFW\n functions.\n\n @sa @ref init_allocator\n @sa @ref GLFWallocator\n\n @since Added in version 3.4.\n\n @ingroup init"]
526pub type GLFWdeallocatefun = ::std::option::Option<
527 unsafe extern "C" fn(block: *mut ::std::os::raw::c_void, user: *mut ::std::os::raw::c_void),
528>;
529#[doc = " @brief The function pointer type for error callbacks.\n\n This is the function pointer type for error callbacks. An error callback\n function has the following signature:\n @code\n void callback_name(int error_code, const char* description)\n @endcode\n\n @param[in] error_code An [error code](@ref errors). Future releases may add\n more error codes.\n @param[in] description A UTF-8 encoded string describing the error.\n\n @pointer_lifetime The error description string is valid until the callback\n function returns.\n\n @sa @ref error_handling\n @sa @ref glfwSetErrorCallback\n\n @since Added in version 3.0.\n\n @ingroup init"]
530pub type GLFWerrorfun = ::std::option::Option<
531 unsafe extern "C" fn(
532 error_code: ::std::os::raw::c_int,
533 description: *const ::std::os::raw::c_char,
534 ),
535>;
536#[doc = " @brief The function pointer type for window position callbacks.\n\n This is the function pointer type for window position callbacks. A window\n position callback function has the following signature:\n @code\n void callback_name(GLFWwindow* window, int xpos, int ypos)\n @endcode\n\n @param[in] window The window that was moved.\n @param[in] xpos The new x-coordinate, in screen coordinates, of the\n upper-left corner of the content area of the window.\n @param[in] ypos The new y-coordinate, in screen coordinates, of the\n upper-left corner of the content area of the window.\n\n @sa @ref window_pos\n @sa @ref glfwSetWindowPosCallback\n\n @since Added in version 3.0.\n\n @ingroup window"]
537pub type GLFWwindowposfun = ::std::option::Option<
538 unsafe extern "C" fn(
539 window: *mut GLFWwindow,
540 xpos: ::std::os::raw::c_int,
541 ypos: ::std::os::raw::c_int,
542 ),
543>;
544#[doc = " @brief The function pointer type for window size callbacks.\n\n This is the function pointer type for window size callbacks. A window size\n callback function has the following signature:\n @code\n void callback_name(GLFWwindow* window, int width, int height)\n @endcode\n\n @param[in] window The window that was resized.\n @param[in] width The new width, in screen coordinates, of the window.\n @param[in] height The new height, in screen coordinates, of the window.\n\n @sa @ref window_size\n @sa @ref glfwSetWindowSizeCallback\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
545pub type GLFWwindowsizefun = ::std::option::Option<
546 unsafe extern "C" fn(
547 window: *mut GLFWwindow,
548 width: ::std::os::raw::c_int,
549 height: ::std::os::raw::c_int,
550 ),
551>;
552#[doc = " @brief The function pointer type for window close callbacks.\n\n This is the function pointer type for window close callbacks. A window\n close callback function has the following signature:\n @code\n void function_name(GLFWwindow* window)\n @endcode\n\n @param[in] window The window that the user attempted to close.\n\n @sa @ref window_close\n @sa @ref glfwSetWindowCloseCallback\n\n @since Added in version 2.5.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
553pub type GLFWwindowclosefun = ::std::option::Option<unsafe extern "C" fn(window: *mut GLFWwindow)>;
554#[doc = " @brief The function pointer type for window content refresh callbacks.\n\n This is the function pointer type for window content refresh callbacks.\n A window content refresh callback function has the following signature:\n @code\n void function_name(GLFWwindow* window);\n @endcode\n\n @param[in] window The window whose content needs to be refreshed.\n\n @sa @ref window_refresh\n @sa @ref glfwSetWindowRefreshCallback\n\n @since Added in version 2.5.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
555pub type GLFWwindowrefreshfun =
556 ::std::option::Option<unsafe extern "C" fn(window: *mut GLFWwindow)>;
557#[doc = " @brief The function pointer type for window focus callbacks.\n\n This is the function pointer type for window focus callbacks. A window\n focus callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, int focused)\n @endcode\n\n @param[in] window The window that gained or lost input focus.\n @param[in] focused `GLFW_TRUE` if the window was given input focus, or\n `GLFW_FALSE` if it lost it.\n\n @sa @ref window_focus\n @sa @ref glfwSetWindowFocusCallback\n\n @since Added in version 3.0.\n\n @ingroup window"]
558pub type GLFWwindowfocusfun = ::std::option::Option<
559 unsafe extern "C" fn(window: *mut GLFWwindow, focused: ::std::os::raw::c_int),
560>;
561#[doc = " @brief The function pointer type for window iconify callbacks.\n\n This is the function pointer type for window iconify callbacks. A window\n iconify callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, int iconified)\n @endcode\n\n @param[in] window The window that was iconified or restored.\n @param[in] iconified `GLFW_TRUE` if the window was iconified, or\n `GLFW_FALSE` if it was restored.\n\n @sa @ref window_iconify\n @sa @ref glfwSetWindowIconifyCallback\n\n @since Added in version 3.0.\n\n @ingroup window"]
562pub type GLFWwindowiconifyfun = ::std::option::Option<
563 unsafe extern "C" fn(window: *mut GLFWwindow, iconified: ::std::os::raw::c_int),
564>;
565#[doc = " @brief The function pointer type for window maximize callbacks.\n\n This is the function pointer type for window maximize callbacks. A window\n maximize callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, int maximized)\n @endcode\n\n @param[in] window The window that was maximized or restored.\n @param[in] maximized `GLFW_TRUE` if the window was maximized, or\n `GLFW_FALSE` if it was restored.\n\n @sa @ref window_maximize\n @sa glfwSetWindowMaximizeCallback\n\n @since Added in version 3.3.\n\n @ingroup window"]
566pub type GLFWwindowmaximizefun = ::std::option::Option<
567 unsafe extern "C" fn(window: *mut GLFWwindow, maximized: ::std::os::raw::c_int),
568>;
569#[doc = " @brief The function pointer type for framebuffer size callbacks.\n\n This is the function pointer type for framebuffer size callbacks.\n A framebuffer size callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, int width, int height)\n @endcode\n\n @param[in] window The window whose framebuffer was resized.\n @param[in] width The new width, in pixels, of the framebuffer.\n @param[in] height The new height, in pixels, of the framebuffer.\n\n @sa @ref window_fbsize\n @sa @ref glfwSetFramebufferSizeCallback\n\n @since Added in version 3.0.\n\n @ingroup window"]
570pub type GLFWframebuffersizefun = ::std::option::Option<
571 unsafe extern "C" fn(
572 window: *mut GLFWwindow,
573 width: ::std::os::raw::c_int,
574 height: ::std::os::raw::c_int,
575 ),
576>;
577#[doc = " @brief The function pointer type for window content scale callbacks.\n\n This is the function pointer type for window content scale callbacks.\n A window content scale callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, float xscale, float yscale)\n @endcode\n\n @param[in] window The window whose content scale changed.\n @param[in] xscale The new x-axis content scale of the window.\n @param[in] yscale The new y-axis content scale of the window.\n\n @sa @ref window_scale\n @sa @ref glfwSetWindowContentScaleCallback\n\n @since Added in version 3.3.\n\n @ingroup window"]
578pub type GLFWwindowcontentscalefun =
579 ::std::option::Option<unsafe extern "C" fn(window: *mut GLFWwindow, xscale: f32, yscale: f32)>;
580#[doc = " @brief The function pointer type for mouse button callbacks.\n\n This is the function pointer type for mouse button callback functions.\n A mouse button callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, int button, int action, int mods)\n @endcode\n\n @param[in] window The window that received the event.\n @param[in] button The [mouse button](@ref buttons) that was pressed or\n released.\n @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`. Future releases\n may add more actions.\n @param[in] mods Bit field describing which [modifier keys](@ref mods) were\n held down.\n\n @sa @ref input_mouse_button\n @sa @ref glfwSetMouseButtonCallback\n\n @since Added in version 1.0.\n @glfw3 Added window handle and modifier mask parameters.\n\n @ingroup input"]
581pub type GLFWmousebuttonfun = ::std::option::Option<
582 unsafe extern "C" fn(
583 window: *mut GLFWwindow,
584 button: ::std::os::raw::c_int,
585 action: ::std::os::raw::c_int,
586 mods: ::std::os::raw::c_int,
587 ),
588>;
589#[doc = " @brief The function pointer type for cursor position callbacks.\n\n This is the function pointer type for cursor position callbacks. A cursor\n position callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, double xpos, double ypos);\n @endcode\n\n @param[in] window The window that received the event.\n @param[in] xpos The new cursor x-coordinate, relative to the left edge of\n the content area.\n @param[in] ypos The new cursor y-coordinate, relative to the top edge of the\n content area.\n\n @sa @ref cursor_pos\n @sa @ref glfwSetCursorPosCallback\n\n @since Added in version 3.0. Replaces `GLFWmouseposfun`.\n\n @ingroup input"]
590pub type GLFWcursorposfun =
591 ::std::option::Option<unsafe extern "C" fn(window: *mut GLFWwindow, xpos: f64, ypos: f64)>;
592#[doc = " @brief The function pointer type for cursor enter/leave callbacks.\n\n This is the function pointer type for cursor enter/leave callbacks.\n A cursor enter/leave callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, int entered)\n @endcode\n\n @param[in] window The window that received the event.\n @param[in] entered `GLFW_TRUE` if the cursor entered the window's content\n area, or `GLFW_FALSE` if it left it.\n\n @sa @ref cursor_enter\n @sa @ref glfwSetCursorEnterCallback\n\n @since Added in version 3.0.\n\n @ingroup input"]
593pub type GLFWcursorenterfun = ::std::option::Option<
594 unsafe extern "C" fn(window: *mut GLFWwindow, entered: ::std::os::raw::c_int),
595>;
596#[doc = " @brief The function pointer type for scroll callbacks.\n\n This is the function pointer type for scroll callbacks. A scroll callback\n function has the following signature:\n @code\n void function_name(GLFWwindow* window, double xoffset, double yoffset)\n @endcode\n\n @param[in] window The window that received the event.\n @param[in] xoffset The scroll offset along the x-axis.\n @param[in] yoffset The scroll offset along the y-axis.\n\n @sa @ref scrolling\n @sa @ref glfwSetScrollCallback\n\n @since Added in version 3.0. Replaces `GLFWmousewheelfun`.\n\n @ingroup input"]
597pub type GLFWscrollfun = ::std::option::Option<
598 unsafe extern "C" fn(window: *mut GLFWwindow, xoffset: f64, yoffset: f64),
599>;
600#[doc = " @brief The function pointer type for keyboard key callbacks.\n\n This is the function pointer type for keyboard key callbacks. A keyboard\n key callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)\n @endcode\n\n @param[in] window The window that received the event.\n @param[in] key The [keyboard key](@ref keys) that was pressed or released.\n @param[in] scancode The platform-specific scancode of the key.\n @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`. Future\n releases may add more actions.\n @param[in] mods Bit field describing which [modifier keys](@ref mods) were\n held down.\n\n @sa @ref input_key\n @sa @ref glfwSetKeyCallback\n\n @since Added in version 1.0.\n @glfw3 Added window handle, scancode and modifier mask parameters.\n\n @ingroup input"]
601pub type GLFWkeyfun = ::std::option::Option<
602 unsafe extern "C" fn(
603 window: *mut GLFWwindow,
604 key: ::std::os::raw::c_int,
605 scancode: ::std::os::raw::c_int,
606 action: ::std::os::raw::c_int,
607 mods: ::std::os::raw::c_int,
608 ),
609>;
610#[doc = " @brief The function pointer type for Unicode character callbacks.\n\n This is the function pointer type for Unicode character callbacks.\n A Unicode character callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, unsigned int codepoint)\n @endcode\n\n @param[in] window The window that received the event.\n @param[in] codepoint The Unicode code point of the character.\n\n @sa @ref input_char\n @sa @ref glfwSetCharCallback\n\n @since Added in version 2.4.\n @glfw3 Added window handle parameter.\n\n @ingroup input"]
611pub type GLFWcharfun = ::std::option::Option<
612 unsafe extern "C" fn(window: *mut GLFWwindow, codepoint: ::std::os::raw::c_uint),
613>;
614#[doc = " @brief The function pointer type for Unicode character with modifiers\n callbacks.\n\n This is the function pointer type for Unicode character with modifiers\n callbacks. It is called for each input character, regardless of what\n modifier keys are held down. A Unicode character with modifiers callback\n function has the following signature:\n @code\n void function_name(GLFWwindow* window, unsigned int codepoint, int mods)\n @endcode\n\n @param[in] window The window that received the event.\n @param[in] codepoint The Unicode code point of the character.\n @param[in] mods Bit field describing which [modifier keys](@ref mods) were\n held down.\n\n @sa @ref input_char\n @sa @ref glfwSetCharModsCallback\n\n @deprecated Scheduled for removal in version 4.0.\n\n @since Added in version 3.1.\n\n @ingroup input"]
615pub type GLFWcharmodsfun = ::std::option::Option<
616 unsafe extern "C" fn(
617 window: *mut GLFWwindow,
618 codepoint: ::std::os::raw::c_uint,
619 mods: ::std::os::raw::c_int,
620 ),
621>;
622#[doc = " @brief The function pointer type for path drop callbacks.\n\n This is the function pointer type for path drop callbacks. A path drop\n callback function has the following signature:\n @code\n void function_name(GLFWwindow* window, int path_count, const char* paths[])\n @endcode\n\n @param[in] window The window that received the event.\n @param[in] path_count The number of dropped paths.\n @param[in] paths The UTF-8 encoded file and/or directory path names.\n\n @pointer_lifetime The path array and its strings are valid until the\n callback function returns.\n\n @sa @ref path_drop\n @sa @ref glfwSetDropCallback\n\n @since Added in version 3.1.\n\n @ingroup input"]
623pub type GLFWdropfun = ::std::option::Option<
624 unsafe extern "C" fn(
625 window: *mut GLFWwindow,
626 path_count: ::std::os::raw::c_int,
627 paths: *mut *const ::std::os::raw::c_char,
628 ),
629>;
630#[doc = " @brief The function pointer type for monitor configuration callbacks.\n\n This is the function pointer type for monitor configuration callbacks.\n A monitor callback function has the following signature:\n @code\n void function_name(GLFWmonitor* monitor, int event)\n @endcode\n\n @param[in] monitor The monitor that was connected or disconnected.\n @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Future\n releases may add more events.\n\n @sa @ref monitor_event\n @sa @ref glfwSetMonitorCallback\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
631pub type GLFWmonitorfun = ::std::option::Option<
632 unsafe extern "C" fn(monitor: *mut GLFWmonitor, event: ::std::os::raw::c_int),
633>;
634#[doc = " @brief The function pointer type for joystick configuration callbacks.\n\n This is the function pointer type for joystick configuration callbacks.\n A joystick configuration callback function has the following signature:\n @code\n void function_name(int jid, int event)\n @endcode\n\n @param[in] jid The joystick that was connected or disconnected.\n @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Future\n releases may add more events.\n\n @sa @ref joystick_event\n @sa @ref glfwSetJoystickCallback\n\n @since Added in version 3.2.\n\n @ingroup input"]
635pub type GLFWjoystickfun = ::std::option::Option<
636 unsafe extern "C" fn(jid: ::std::os::raw::c_int, event: ::std::os::raw::c_int),
637>;
638#[doc = " @brief Video mode type.\n\n This describes a single video mode.\n\n @sa @ref monitor_modes\n @sa @ref glfwGetVideoMode\n @sa @ref glfwGetVideoModes\n\n @since Added in version 1.0.\n @glfw3 Added refresh rate member.\n\n @ingroup monitor"]
639#[repr(C)]
640#[derive(Debug, Copy, Clone)]
641pub struct GLFWvidmode {
642 #[doc = " The width, in screen coordinates, of the video mode."]
643 pub width: ::std::os::raw::c_int,
644 #[doc = " The height, in screen coordinates, of the video mode."]
645 pub height: ::std::os::raw::c_int,
646 #[doc = " The bit depth of the red channel of the video mode."]
647 pub redBits: ::std::os::raw::c_int,
648 #[doc = " The bit depth of the green channel of the video mode."]
649 pub greenBits: ::std::os::raw::c_int,
650 #[doc = " The bit depth of the blue channel of the video mode."]
651 pub blueBits: ::std::os::raw::c_int,
652 #[doc = " The refresh rate, in Hz, of the video mode."]
653 pub refreshRate: ::std::os::raw::c_int,
654}
655#[doc = " @brief Gamma ramp.\n\n This describes the gamma ramp for a monitor.\n\n @sa @ref monitor_gamma\n @sa @ref glfwGetGammaRamp\n @sa @ref glfwSetGammaRamp\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
656#[repr(C)]
657#[derive(Debug, Copy, Clone)]
658pub struct GLFWgammaramp {
659 #[doc = " An array of value describing the response of the red channel."]
660 pub red: *mut ::std::os::raw::c_ushort,
661 #[doc = " An array of value describing the response of the green channel."]
662 pub green: *mut ::std::os::raw::c_ushort,
663 #[doc = " An array of value describing the response of the blue channel."]
664 pub blue: *mut ::std::os::raw::c_ushort,
665 #[doc = " The number of elements in each array."]
666 pub size: ::std::os::raw::c_uint,
667}
668#[doc = " @brief Image data.\n\n This describes a single 2D image. See the documentation for each related\n function what the expected pixel format is.\n\n @sa @ref cursor_custom\n @sa @ref window_icon\n\n @since Added in version 2.1.\n @glfw3 Removed format and bytes-per-pixel members.\n\n @ingroup window"]
669#[repr(C)]
670#[derive(Debug, Copy, Clone)]
671pub struct GLFWimage {
672 #[doc = " The width, in pixels, of this image."]
673 pub width: ::std::os::raw::c_int,
674 #[doc = " The height, in pixels, of this image."]
675 pub height: ::std::os::raw::c_int,
676 #[doc = " The pixel data of this image, arranged left-to-right, top-to-bottom."]
677 pub pixels: *mut ::std::os::raw::c_uchar,
678}
679#[doc = " @brief Gamepad input state\n\n This describes the input state of a gamepad.\n\n @sa @ref gamepad\n @sa @ref glfwGetGamepadState\n\n @since Added in version 3.3.\n\n @ingroup input"]
680#[repr(C)]
681#[derive(Debug, Copy, Clone)]
682pub struct GLFWgamepadstate {
683 #[doc = " The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS`\n or `GLFW_RELEASE`."]
684 pub buttons: [::std::os::raw::c_uchar; 15usize],
685 #[doc = " The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0\n to 1.0 inclusive."]
686 pub axes: [f32; 6usize],
687}
688#[doc = " @brief Custom heap memory allocator.\n\n This describes a custom heap memory allocator for GLFW. To set an allocator, pass it\n to @ref glfwInitAllocator before initializing the library.\n\n @sa @ref init_allocator\n @sa @ref glfwInitAllocator\n\n @since Added in version 3.4.\n\n @ingroup init"]
689#[repr(C)]
690#[derive(Debug, Copy, Clone)]
691pub struct GLFWallocator {
692 #[doc = " The memory allocation function. See @ref GLFWallocatefun for details about\n allocation function."]
693 pub allocate: GLFWallocatefun,
694 #[doc = " The memory reallocation function. See @ref GLFWreallocatefun for details about\n reallocation function."]
695 pub reallocate: GLFWreallocatefun,
696 #[doc = " The memory deallocation function. See @ref GLFWdeallocatefun for details about\n deallocation function."]
697 pub deallocate: GLFWdeallocatefun,
698 #[doc = " The user pointer for this custom allocator. This value will be passed to the\n allocator functions."]
699 pub user: *mut ::std::os::raw::c_void,
700}
701unsafe extern "C" {
702 #[doc = " @brief Initializes the GLFW library.\n\n This function initializes the GLFW library. Before most GLFW functions can\n be used, GLFW must be initialized, and before an application terminates GLFW\n should be terminated in order to free any resources allocated during or\n after initialization.\n\n If this function fails, it calls @ref glfwTerminate before returning. If it\n succeeds, you should call @ref glfwTerminate before the application exits.\n\n Additional calls to this function after successful initialization but before\n termination will return `GLFW_TRUE` immediately.\n\n The @ref GLFW_PLATFORM init hint controls which platforms are considered during\n initialization. This also depends on which platforms the library was compiled to\n support.\n\n @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_PLATFORM_UNAVAILABLE and @ref\n GLFW_PLATFORM_ERROR.\n\n @remark @macos This function will change the current directory of the\n application to the `Contents/Resources` subdirectory of the application's\n bundle, if present. This can be disabled with the @ref\n GLFW_COCOA_CHDIR_RESOURCES init hint.\n\n @remark @macos This function will create the main menu and dock icon for the\n application. If GLFW finds a `MainMenu.nib` it is loaded and assumed to\n contain a menu bar. Otherwise a minimal menu bar is created manually with\n common commands like Hide, Quit and About. The About entry opens a minimal\n about dialog with information from the application's bundle. The menu bar\n and dock icon can be disabled entirely with the @ref GLFW_COCOA_MENUBAR init\n hint.\n\n @remark __Wayland, X11:__ If the library was compiled with support for both\n Wayland and X11, and the @ref GLFW_PLATFORM init hint is set to\n `GLFW_ANY_PLATFORM`, the `XDG_SESSION_TYPE` environment variable affects\n which platform is picked. If the environment variable is not set, or is set\n to something other than `wayland` or `x11`, the regular detection mechanism\n will be used instead.\n\n @remark @x11 This function will set the `LC_CTYPE` category of the\n application locale according to the current environment if that category is\n still \"C\". This is because the \"C\" locale breaks Unicode text input.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref intro_init\n @sa @ref glfwInitHint\n @sa @ref glfwInitAllocator\n @sa @ref glfwTerminate\n\n @since Added in version 1.0.\n\n @ingroup init"]
703 pub fn glfwInit() -> ::std::os::raw::c_int;
704 #[doc = " @brief Terminates the GLFW library.\n\n This function destroys all remaining windows and cursors, restores any\n modified gamma ramps and frees any other allocated resources. Once this\n function is called, you must again call @ref glfwInit successfully before\n you will be able to use most GLFW functions.\n\n If GLFW has been successfully initialized, this function should be called\n before the application exits. If initialization fails, there is no need to\n call this function, as it is called by @ref glfwInit before it returns\n failure.\n\n This function has no effect if GLFW is not initialized.\n\n @errors Possible errors include @ref GLFW_PLATFORM_ERROR.\n\n @remark This function may be called before @ref glfwInit.\n\n @warning The contexts of any remaining windows must not be current on any\n other thread when this function is called.\n\n @reentrancy This function must not be called from a callback.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref intro_init\n @sa @ref glfwInit\n\n @since Added in version 1.0.\n\n @ingroup init"]
705 pub fn glfwTerminate();
706 #[doc = " @brief Sets the specified init hint to the desired value.\n\n This function sets hints for the next initialization of GLFW.\n\n The values you set hints to are never reset by GLFW, but they only take\n effect during initialization. Once GLFW has been initialized, any values\n you set will be ignored until the library is terminated and initialized\n again.\n\n Some hints are platform specific. These may be set on any platform but they\n will only affect their specific platform. Other platforms will ignore them.\n Setting these hints requires no platform specific headers or functions.\n\n @param[in] hint The [init hint](@ref init_hints) to set.\n @param[in] value The new value of the init hint.\n\n @errors Possible errors include @ref GLFW_INVALID_ENUM and @ref\n GLFW_INVALID_VALUE.\n\n @remarks This function may be called before @ref glfwInit.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa init_hints\n @sa glfwInit\n\n @since Added in version 3.3.\n\n @ingroup init"]
707 pub fn glfwInitHint(hint: ::std::os::raw::c_int, value: ::std::os::raw::c_int);
708 #[doc = " @brief Sets the init allocator to the desired value.\n\n To use the default allocator, call this function with a `NULL` argument.\n\n If you specify an allocator struct, every member must be a valid function\n pointer. If any member is `NULL`, this function will emit @ref\n GLFW_INVALID_VALUE and the init allocator will be unchanged.\n\n The functions in the allocator must fulfil a number of requirements. See the\n documentation for @ref GLFWallocatefun, @ref GLFWreallocatefun and @ref\n GLFWdeallocatefun for details.\n\n @param[in] allocator The allocator to use at the next initialization, or\n `NULL` to use the default one.\n\n @errors Possible errors include @ref GLFW_INVALID_VALUE.\n\n @pointer_lifetime The specified allocator is copied before this function\n returns.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref init_allocator\n @sa @ref glfwInit\n\n @since Added in version 3.4.\n\n @ingroup init"]
709 pub fn glfwInitAllocator(allocator: *const GLFWallocator);
710 #[doc = " @brief Sets the desired Vulkan `vkGetInstanceProcAddr` function.\n\n This function sets the `vkGetInstanceProcAddr` function that GLFW will use for all\n Vulkan related entry point queries.\n\n This feature is mostly useful on macOS, if your copy of the Vulkan loader is in\n a location where GLFW cannot find it through dynamic loading, or if you are still\n using the static library version of the loader.\n\n If set to `NULL`, GLFW will try to load the Vulkan loader dynamically by its standard\n name and get this function from there. This is the default behavior.\n\n The standard name of the loader is `vulkan-1.dll` on Windows, `libvulkan.so.1` on\n Linux and other Unix-like systems and `libvulkan.1.dylib` on macOS. If your code is\n also loading it via these names then you probably don't need to use this function.\n\n The function address you set is never reset by GLFW, but it only takes effect during\n initialization. Once GLFW has been initialized, any updates will be ignored until the\n library is terminated and initialized again.\n\n @param[in] loader The address of the function to use, or `NULL`.\n\n @par Loader function signature\n @code\n PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance instance, const char* name)\n @endcode\n For more information about this function, see the\n [Vulkan Registry](https://www.khronos.org/registry/vulkan/).\n\n @errors None.\n\n @remark This function may be called before @ref glfwInit.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref vulkan_loader\n @sa @ref glfwInit\n\n @since Added in version 3.4.\n\n @ingroup init"]
711 pub fn glfwInitVulkanLoader(loader: PFN_vkGetInstanceProcAddr);
712 #[doc = " @brief Retrieves the version of the GLFW library.\n\n This function retrieves the major, minor and revision numbers of the GLFW\n library. It is intended for when you are using GLFW as a shared library and\n want to ensure that you are using the minimum required version.\n\n Any or all of the version arguments may be `NULL`.\n\n @param[out] major Where to store the major version number, or `NULL`.\n @param[out] minor Where to store the minor version number, or `NULL`.\n @param[out] rev Where to store the revision number, or `NULL`.\n\n @errors None.\n\n @remark This function may be called before @ref glfwInit.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref intro_version\n @sa @ref glfwGetVersionString\n\n @since Added in version 1.0.\n\n @ingroup init"]
713 pub fn glfwGetVersion(
714 major: *mut ::std::os::raw::c_int,
715 minor: *mut ::std::os::raw::c_int,
716 rev: *mut ::std::os::raw::c_int,
717 );
718 #[doc = " @brief Returns a string describing the compile-time configuration.\n\n This function returns the compile-time generated\n [version string](@ref intro_version_string) of the GLFW library binary. It describes\n the version, platforms, compiler and any platform or operating system specific\n compile-time options. It should not be confused with the OpenGL or OpenGL ES version\n string, queried with `glGetString`.\n\n __Do not use the version string__ to parse the GLFW library version. The\n @ref glfwGetVersion function provides the version of the running library\n binary in numerical format.\n\n __Do not use the version string__ to parse what platforms are supported. The @ref\n glfwPlatformSupported function lets you query platform support.\n\n @return The ASCII encoded GLFW version string.\n\n @errors None.\n\n @remark This function may be called before @ref glfwInit.\n\n @pointer_lifetime The returned string is static and compile-time generated.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref intro_version\n @sa @ref glfwGetVersion\n\n @since Added in version 3.0.\n\n @ingroup init"]
719 pub fn glfwGetVersionString() -> *const ::std::os::raw::c_char;
720 #[doc = " @brief Returns and clears the last error for the calling thread.\n\n This function returns and clears the [error code](@ref errors) of the last\n error that occurred on the calling thread, and optionally a UTF-8 encoded\n human-readable description of it. If no error has occurred since the last\n call, it returns @ref GLFW_NO_ERROR (zero) and the description pointer is\n set to `NULL`.\n\n @param[in] description Where to store the error description pointer, or `NULL`.\n @return The last error code for the calling thread, or @ref GLFW_NO_ERROR\n (zero).\n\n @errors None.\n\n @pointer_lifetime The returned string is allocated and freed by GLFW. You\n should not free it yourself. It is guaranteed to be valid only until the\n next error occurs or the library is terminated.\n\n @remark This function may be called before @ref glfwInit.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref error_handling\n @sa @ref glfwSetErrorCallback\n\n @since Added in version 3.3.\n\n @ingroup init"]
721 pub fn glfwGetError(description: *mut *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
722 #[doc = " @brief Sets the error callback.\n\n This function sets the error callback, which is called with an error code\n and a human-readable description each time a GLFW error occurs.\n\n The error code is set before the callback is called. Calling @ref\n glfwGetError from the error callback will return the same value as the error\n code argument.\n\n The error callback is called on the thread where the error occurred. If you\n are using GLFW from multiple threads, your error callback needs to be\n written accordingly.\n\n Because the description string may have been generated specifically for that\n error, it is not guaranteed to be valid after the callback has returned. If\n you wish to use it after the callback returns, you need to make a copy.\n\n Once set, the error callback remains set even after the library has been\n terminated.\n\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set.\n\n @callback_signature\n @code\n void callback_name(int error_code, const char* description)\n @endcode\n For more information about the callback parameters, see the\n [callback pointer type](@ref GLFWerrorfun).\n\n @errors None.\n\n @remark This function may be called before @ref glfwInit.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref error_handling\n @sa @ref glfwGetError\n\n @since Added in version 3.0.\n\n @ingroup init"]
723 pub fn glfwSetErrorCallback(callback: GLFWerrorfun) -> GLFWerrorfun;
724 #[doc = " @brief Returns the currently selected platform.\n\n This function returns the platform that was selected during initialization. The\n returned value will be one of `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`,\n `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` or `GLFW_PLATFORM_NULL`.\n\n @return The currently selected platform, or zero if an error occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref platform\n @sa @ref glfwPlatformSupported\n\n @since Added in version 3.4.\n\n @ingroup init"]
725 pub fn glfwGetPlatform() -> ::std::os::raw::c_int;
726 #[doc = " @brief Returns whether the library includes support for the specified platform.\n\n This function returns whether the library was compiled with support for the specified\n platform. The platform must be one of `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`,\n `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` or `GLFW_PLATFORM_NULL`.\n\n @param[in] platform The platform to query.\n @return `GLFW_TRUE` if the platform is supported, or `GLFW_FALSE` otherwise.\n\n @errors Possible errors include @ref GLFW_INVALID_ENUM.\n\n @remark This function may be called before @ref glfwInit.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref platform\n @sa @ref glfwGetPlatform\n\n @since Added in version 3.4.\n\n @ingroup init"]
727 pub fn glfwPlatformSupported(platform: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
728 #[doc = " @brief Returns the currently connected monitors.\n\n This function returns an array of handles for all currently connected\n monitors. The primary monitor is always first in the returned array. If no\n monitors were found, this function returns `NULL`.\n\n @param[out] count Where to store the number of monitors in the returned\n array. This is set to zero if an error occurred.\n @return An array of monitor handles, or `NULL` if no monitors were found or\n if an [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @pointer_lifetime The returned array is allocated and freed by GLFW. You\n should not free it yourself. It is guaranteed to be valid only until the\n monitor configuration changes or the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_monitors\n @sa @ref monitor_event\n @sa @ref glfwGetPrimaryMonitor\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
729 pub fn glfwGetMonitors(count: *mut ::std::os::raw::c_int) -> *mut *mut GLFWmonitor;
730 #[doc = " @brief Returns the primary monitor.\n\n This function returns the primary monitor. This is usually the monitor\n where elements like the task bar or global menu bar are located.\n\n @return The primary monitor, or `NULL` if no monitors were found or if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @remark The primary monitor is always first in the array returned by @ref\n glfwGetMonitors.\n\n @sa @ref monitor_monitors\n @sa @ref glfwGetMonitors\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
731 pub fn glfwGetPrimaryMonitor() -> *mut GLFWmonitor;
732 #[doc = " @brief Returns the position of the monitor's viewport on the virtual screen.\n\n This function returns the position, in screen coordinates, of the upper-left\n corner of the specified monitor.\n\n Any or all of the position arguments may be `NULL`. If an error occurs, all\n non-`NULL` position arguments will be set to zero.\n\n @param[in] monitor The monitor to query.\n @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.\n @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_properties\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
733 pub fn glfwGetMonitorPos(
734 monitor: *mut GLFWmonitor,
735 xpos: *mut ::std::os::raw::c_int,
736 ypos: *mut ::std::os::raw::c_int,
737 );
738 #[doc = " @brief Retrieves the work area of the monitor.\n\n This function returns the position, in screen coordinates, of the upper-left\n corner of the work area of the specified monitor along with the work area\n size in screen coordinates. The work area is defined as the area of the\n monitor not occluded by the window system task bar where present. If no\n task bar exists then the work area is the monitor resolution in screen\n coordinates.\n\n Any or all of the position and size arguments may be `NULL`. If an error\n occurs, all non-`NULL` position and size arguments will be set to zero.\n\n @param[in] monitor The monitor to query.\n @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.\n @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.\n @param[out] width Where to store the monitor width, or `NULL`.\n @param[out] height Where to store the monitor height, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_workarea\n\n @since Added in version 3.3.\n\n @ingroup monitor"]
739 pub fn glfwGetMonitorWorkarea(
740 monitor: *mut GLFWmonitor,
741 xpos: *mut ::std::os::raw::c_int,
742 ypos: *mut ::std::os::raw::c_int,
743 width: *mut ::std::os::raw::c_int,
744 height: *mut ::std::os::raw::c_int,
745 );
746 #[doc = " @brief Returns the physical size of the monitor.\n\n This function returns the size, in millimetres, of the display area of the\n specified monitor.\n\n Some platforms do not provide accurate monitor size information, either\n because the monitor [EDID][] data is incorrect or because the driver does\n not report it accurately.\n\n [EDID]: https://en.wikipedia.org/wiki/Extended_display_identification_data\n\n Any or all of the size arguments may be `NULL`. If an error occurs, all\n non-`NULL` size arguments will be set to zero.\n\n @param[in] monitor The monitor to query.\n @param[out] widthMM Where to store the width, in millimetres, of the\n monitor's display area, or `NULL`.\n @param[out] heightMM Where to store the height, in millimetres, of the\n monitor's display area, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @remark @win32 On Windows 8 and earlier the physical size is calculated from\n the current resolution and system DPI instead of querying the monitor EDID data.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_properties\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
747 pub fn glfwGetMonitorPhysicalSize(
748 monitor: *mut GLFWmonitor,
749 widthMM: *mut ::std::os::raw::c_int,
750 heightMM: *mut ::std::os::raw::c_int,
751 );
752 #[doc = " @brief Retrieves the content scale for the specified monitor.\n\n This function retrieves the content scale for the specified monitor. The\n content scale is the ratio between the current DPI and the platform's\n default DPI. This is especially important for text and any UI elements. If\n the pixel dimensions of your UI scaled by this look appropriate on your\n machine then it should appear at a reasonable size on other machines\n regardless of their DPI and scaling settings. This relies on the system DPI\n and scaling settings being somewhat correct.\n\n The content scale may depend on both the monitor resolution and pixel\n density and on user settings. It may be very different from the raw DPI\n calculated from the physical size and current resolution.\n\n @param[in] monitor The monitor to query.\n @param[out] xscale Where to store the x-axis content scale, or `NULL`.\n @param[out] yscale Where to store the y-axis content scale, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @remark @wayland Fractional scaling information is not yet available for\n monitors, so this function only returns integer content scales.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_scale\n @sa @ref glfwGetWindowContentScale\n\n @since Added in version 3.3.\n\n @ingroup monitor"]
753 pub fn glfwGetMonitorContentScale(
754 monitor: *mut GLFWmonitor,
755 xscale: *mut f32,
756 yscale: *mut f32,
757 );
758 #[doc = " @brief Returns the name of the specified monitor.\n\n This function returns a human-readable name, encoded as UTF-8, of the\n specified monitor. The name typically reflects the make and model of the\n monitor and is not guaranteed to be unique among the connected monitors.\n\n @param[in] monitor The monitor to query.\n @return The UTF-8 encoded name of the monitor, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @pointer_lifetime The returned string is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the specified monitor is\n disconnected or the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_properties\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
759 pub fn glfwGetMonitorName(monitor: *mut GLFWmonitor) -> *const ::std::os::raw::c_char;
760 #[doc = " @brief Sets the user pointer of the specified monitor.\n\n This function sets the user-defined pointer of the specified monitor. The\n current value is retained until the monitor is disconnected. The initial\n value is `NULL`.\n\n This function may be called from the monitor callback, even for a monitor\n that is being disconnected.\n\n @param[in] monitor The monitor whose pointer to set.\n @param[in] pointer The new value.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread. Access is not\n synchronized.\n\n @sa @ref monitor_userptr\n @sa @ref glfwGetMonitorUserPointer\n\n @since Added in version 3.3.\n\n @ingroup monitor"]
761 pub fn glfwSetMonitorUserPointer(
762 monitor: *mut GLFWmonitor,
763 pointer: *mut ::std::os::raw::c_void,
764 );
765 #[doc = " @brief Returns the user pointer of the specified monitor.\n\n This function returns the current value of the user-defined pointer of the\n specified monitor. The initial value is `NULL`.\n\n This function may be called from the monitor callback, even for a monitor\n that is being disconnected.\n\n @param[in] monitor The monitor whose pointer to return.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread. Access is not\n synchronized.\n\n @sa @ref monitor_userptr\n @sa @ref glfwSetMonitorUserPointer\n\n @since Added in version 3.3.\n\n @ingroup monitor"]
766 pub fn glfwGetMonitorUserPointer(monitor: *mut GLFWmonitor) -> *mut ::std::os::raw::c_void;
767 #[doc = " @brief Sets the monitor configuration callback.\n\n This function sets the monitor configuration callback, or removes the\n currently set callback. This is called when a monitor is connected to or\n disconnected from the system.\n\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWmonitor* monitor, int event)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWmonitorfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_event\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
768 pub fn glfwSetMonitorCallback(callback: GLFWmonitorfun) -> GLFWmonitorfun;
769 #[doc = " @brief Returns the available video modes for the specified monitor.\n\n This function returns an array of all video modes supported by the specified\n monitor. The returned array is sorted in ascending order, first by color\n bit depth (the sum of all channel depths), then by resolution area (the\n product of width and height), then resolution width and finally by refresh\n rate.\n\n @param[in] monitor The monitor to query.\n @param[out] count Where to store the number of video modes in the returned\n array. This is set to zero if an error occurred.\n @return An array of video modes, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @pointer_lifetime The returned array is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the specified monitor is\n disconnected, this function is called again for that monitor or the library\n is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_modes\n @sa @ref glfwGetVideoMode\n\n @since Added in version 1.0.\n @glfw3 Changed to return an array of modes for a specific monitor.\n\n @ingroup monitor"]
770 pub fn glfwGetVideoModes(
771 monitor: *mut GLFWmonitor,
772 count: *mut ::std::os::raw::c_int,
773 ) -> *const GLFWvidmode;
774 #[doc = " @brief Returns the current mode of the specified monitor.\n\n This function returns the current video mode of the specified monitor. If\n you have created a full screen window for that monitor, the return value\n will depend on whether that window is iconified.\n\n @param[in] monitor The monitor to query.\n @return The current mode of the monitor, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @pointer_lifetime The returned array is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the specified monitor is\n disconnected or the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_modes\n @sa @ref glfwGetVideoModes\n\n @since Added in version 3.0. Replaces `glfwGetDesktopMode`.\n\n @ingroup monitor"]
775 pub fn glfwGetVideoMode(monitor: *mut GLFWmonitor) -> *const GLFWvidmode;
776 #[doc = " @brief Generates a gamma ramp and sets it for the specified monitor.\n\n This function generates an appropriately sized gamma ramp from the specified\n exponent and then calls @ref glfwSetGammaRamp with it. The value must be\n a finite number greater than zero.\n\n The software controlled gamma ramp is applied _in addition_ to the hardware\n gamma correction, which today is usually an approximation of sRGB gamma.\n This means that setting a perfectly linear ramp, or gamma 1.0, will produce\n the default (usually sRGB-like) behavior.\n\n For gamma correct rendering with OpenGL or OpenGL ES, see the @ref\n GLFW_SRGB_CAPABLE hint.\n\n @param[in] monitor The monitor whose gamma ramp to set.\n @param[in] gamma The desired exponent.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_INVALID_VALUE,\n @ref GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).\n\n @remark @wayland Gamma handling is a privileged protocol, this function\n will thus never be implemented and emits @ref GLFW_FEATURE_UNAVAILABLE.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_gamma\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
777 pub fn glfwSetGamma(monitor: *mut GLFWmonitor, gamma: f32);
778 #[doc = " @brief Returns the current gamma ramp for the specified monitor.\n\n This function returns the current gamma ramp of the specified monitor.\n\n @param[in] monitor The monitor to query.\n @return The current gamma ramp, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_PLATFORM_ERROR\n and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).\n\n @remark @wayland Gamma handling is a privileged protocol, this function\n will thus never be implemented and emits @ref GLFW_FEATURE_UNAVAILABLE while\n returning `NULL`.\n\n @pointer_lifetime The returned structure and its arrays are allocated and\n freed by GLFW. You should not free them yourself. They are valid until the\n specified monitor is disconnected, this function is called again for that\n monitor or the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_gamma\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
779 pub fn glfwGetGammaRamp(monitor: *mut GLFWmonitor) -> *const GLFWgammaramp;
780 #[doc = " @brief Sets the current gamma ramp for the specified monitor.\n\n This function sets the current gamma ramp for the specified monitor. The\n original gamma ramp for that monitor is saved by GLFW the first time this\n function is called and is restored by @ref glfwTerminate.\n\n The software controlled gamma ramp is applied _in addition_ to the hardware\n gamma correction, which today is usually an approximation of sRGB gamma.\n This means that setting a perfectly linear ramp, or gamma 1.0, will produce\n the default (usually sRGB-like) behavior.\n\n For gamma correct rendering with OpenGL or OpenGL ES, see the @ref\n GLFW_SRGB_CAPABLE hint.\n\n @param[in] monitor The monitor whose gamma ramp to set.\n @param[in] ramp The gamma ramp to use.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_PLATFORM_ERROR\n and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).\n\n @remark The size of the specified gamma ramp should match the size of the\n current ramp for that monitor.\n\n @remark @win32 The gamma ramp size must be 256.\n\n @remark @wayland Gamma handling is a privileged protocol, this function\n will thus never be implemented and emits @ref GLFW_FEATURE_UNAVAILABLE.\n\n @pointer_lifetime The specified gamma ramp is copied before this function\n returns.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref monitor_gamma\n\n @since Added in version 3.0.\n\n @ingroup monitor"]
781 pub fn glfwSetGammaRamp(monitor: *mut GLFWmonitor, ramp: *const GLFWgammaramp);
782 #[doc = " @brief Resets all window hints to their default values.\n\n This function resets all window hints to their\n [default values](@ref window_hints_values).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_hints\n @sa @ref glfwWindowHint\n @sa @ref glfwWindowHintString\n\n @since Added in version 3.0.\n\n @ingroup window"]
783 pub fn glfwDefaultWindowHints();
784 #[doc = " @brief Sets the specified window hint to the desired value.\n\n This function sets hints for the next call to @ref glfwCreateWindow. The\n hints, once set, retain their values until changed by a call to this\n function or @ref glfwDefaultWindowHints, or until the library is terminated.\n\n Only integer value hints can be set with this function. String value hints\n are set with @ref glfwWindowHintString.\n\n This function does not check whether the specified hint values are valid.\n If you set hints to invalid values this will instead be reported by the next\n call to @ref glfwCreateWindow.\n\n Some hints are platform specific. These may be set on any platform but they\n will only affect their specific platform. Other platforms will ignore them.\n Setting these hints requires no platform specific headers or functions.\n\n @param[in] hint The [window hint](@ref window_hints) to set.\n @param[in] value The new value of the window hint.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_ENUM.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_hints\n @sa @ref glfwWindowHintString\n @sa @ref glfwDefaultWindowHints\n\n @since Added in version 3.0. Replaces `glfwOpenWindowHint`.\n\n @ingroup window"]
785 pub fn glfwWindowHint(hint: ::std::os::raw::c_int, value: ::std::os::raw::c_int);
786 #[doc = " @brief Sets the specified window hint to the desired value.\n\n This function sets hints for the next call to @ref glfwCreateWindow. The\n hints, once set, retain their values until changed by a call to this\n function or @ref glfwDefaultWindowHints, or until the library is terminated.\n\n Only string type hints can be set with this function. Integer value hints\n are set with @ref glfwWindowHint.\n\n This function does not check whether the specified hint values are valid.\n If you set hints to invalid values this will instead be reported by the next\n call to @ref glfwCreateWindow.\n\n Some hints are platform specific. These may be set on any platform but they\n will only affect their specific platform. Other platforms will ignore them.\n Setting these hints requires no platform specific headers or functions.\n\n @param[in] hint The [window hint](@ref window_hints) to set.\n @param[in] value The new value of the window hint.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_ENUM.\n\n @pointer_lifetime The specified string is copied before this function\n returns.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_hints\n @sa @ref glfwWindowHint\n @sa @ref glfwDefaultWindowHints\n\n @since Added in version 3.3.\n\n @ingroup window"]
787 pub fn glfwWindowHintString(hint: ::std::os::raw::c_int, value: *const ::std::os::raw::c_char);
788 #[doc = " @brief Creates a window and its associated context.\n\n This function creates a window and its associated OpenGL or OpenGL ES\n context. Most of the options controlling how the window and its context\n should be created are specified with [window hints](@ref window_hints).\n\n Successful creation does not change which context is current. Before you\n can use the newly created context, you need to\n [make it current](@ref context_current). For information about the `share`\n parameter, see @ref context_sharing.\n\n The created window, framebuffer and context may differ from what you\n requested, as not all parameters and hints are\n [hard constraints](@ref window_hints_hard). This includes the size of the\n window, especially for full screen windows. To query the actual attributes\n of the created window, framebuffer and context, see @ref\n glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize.\n\n To create a full screen window, you need to specify the monitor the window\n will cover. If no monitor is specified, the window will be windowed mode.\n Unless you have a way for the user to choose a specific monitor, it is\n recommended that you pick the primary monitor. For more information on how\n to query connected monitors, see @ref monitor_monitors.\n\n For full screen windows, the specified size becomes the resolution of the\n window's _desired video mode_. As long as a full screen window is not\n iconified, the supported video mode most closely matching the desired video\n mode is set for the specified monitor. For more information about full\n screen windows, including the creation of so called _windowed full screen_\n or _borderless full screen_ windows, see @ref window_windowed_full_screen.\n\n Once you have created the window, you can switch it between windowed and\n full screen mode with @ref glfwSetWindowMonitor. This will not affect its\n OpenGL or OpenGL ES context.\n\n By default, newly created windows use the placement recommended by the\n window system. To create the window at a specific position, set the @ref\n GLFW_POSITION_X and @ref GLFW_POSITION_Y window hints before creation. To\n restore the default behavior, set either or both hints back to\n `GLFW_ANY_POSITION`.\n\n As long as at least one full screen window is not iconified, the screensaver\n is prohibited from starting.\n\n Window systems put limits on window sizes. Very large or very small window\n dimensions may be overridden by the window system on creation. Check the\n actual [size](@ref window_size) after creation.\n\n The [swap interval](@ref buffer_swap) is not set during window creation and\n the initial value may vary depending on driver settings and defaults.\n\n @param[in] width The desired width, in screen coordinates, of the window.\n This must be greater than zero.\n @param[in] height The desired height, in screen coordinates, of the window.\n This must be greater than zero.\n @param[in] title The initial, UTF-8 encoded window title.\n @param[in] monitor The monitor to use for full screen mode, or `NULL` for\n windowed mode.\n @param[in] share The window whose context to share resources with, or `NULL`\n to not share resources.\n @return The handle of the created window, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref\n GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE, @ref\n GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.\n\n @remark @win32 Window creation will fail if the Microsoft GDI software\n OpenGL implementation is the only one available.\n\n @remark @win32 If the executable has an icon resource named `GLFW_ICON,` it\n will be set as the initial icon for the window. If no such icon is present,\n the `IDI_APPLICATION` icon will be used instead. To set a different icon,\n see @ref glfwSetWindowIcon.\n\n @remark @win32 The context to share resources with must not be current on\n any other thread.\n\n @remark @macos The OS only supports core profile contexts for OpenGL\n versions 3.2 and later. Before creating an OpenGL context of version 3.2 or\n later you must set the [GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint)\n hint accordingly. OpenGL 3.0 and 3.1 contexts are not supported at all\n on macOS.\n\n @remark @macos The GLFW window has no icon, as it is not a document\n window, but the dock icon will be the same as the application bundle's icon.\n For more information on bundles, see the\n [Bundle Programming Guide][bundle-guide] in the Mac Developer Library.\n\n [bundle-guide]: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/\n\n @remark @macos On OS X 10.10 and later the window frame will not be rendered\n at full resolution on Retina displays unless the\n [GLFW_SCALE_FRAMEBUFFER](@ref GLFW_SCALE_FRAMEBUFFER_hint)\n hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the\n application bundle's `Info.plist`. For more information, see\n [High Resolution Guidelines for OS X][hidpi-guide] in the Mac Developer\n Library. The GLFW test and example programs use a custom `Info.plist`\n template for this, which can be found as `CMake/Info.plist.in` in the source\n tree.\n\n [hidpi-guide]: https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html\n\n @remark @macos When activating frame autosaving with\n [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified\n window size and position may be overridden by previously saved values.\n\n @remark @wayland GLFW uses [libdecor][] where available to create its window\n decorations. This in turn uses server-side XDG decorations where available\n and provides high quality client-side decorations on compositors like GNOME.\n If both XDG decorations and libdecor are unavailable, GLFW falls back to\n a very simple set of window decorations that only support moving, resizing\n and the window manager's right-click menu.\n\n [libdecor]: https://gitlab.freedesktop.org/libdecor/libdecor\n\n @remark @x11 Some window managers will not respect the placement of\n initially hidden windows.\n\n @remark @x11 Due to the asynchronous nature of X11, it may take a moment for\n a window to reach its requested state. This means you may not be able to\n query the final size, position or other attributes directly after window\n creation.\n\n @remark @x11 The class part of the `WM_CLASS` window property will by\n default be set to the window title passed to this function. The instance\n part will use the contents of the `RESOURCE_NAME` environment variable, if\n present and not empty, or fall back to the window title. Set the\n [GLFW_X11_CLASS_NAME](@ref GLFW_X11_CLASS_NAME_hint) and\n [GLFW_X11_INSTANCE_NAME](@ref GLFW_X11_INSTANCE_NAME_hint) window hints to\n override this.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_creation\n @sa @ref glfwDestroyWindow\n\n @since Added in version 3.0. Replaces `glfwOpenWindow`.\n\n @ingroup window"]
789 pub fn glfwCreateWindow(
790 width: ::std::os::raw::c_int,
791 height: ::std::os::raw::c_int,
792 title: *const ::std::os::raw::c_char,
793 monitor: *mut GLFWmonitor,
794 share: *mut GLFWwindow,
795 ) -> *mut GLFWwindow;
796 #[doc = " @brief Destroys the specified window and its context.\n\n This function destroys the specified window and its context. On calling\n this function, no further callbacks will be called for that window.\n\n If the context of the specified window is current on the main thread, it is\n detached before being destroyed.\n\n @param[in] window The window to destroy.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @note The context of the specified window must not be current on any other\n thread when this function is called.\n\n @reentrancy This function must not be called from a callback.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_creation\n @sa @ref glfwCreateWindow\n\n @since Added in version 3.0. Replaces `glfwCloseWindow`.\n\n @ingroup window"]
797 pub fn glfwDestroyWindow(window: *mut GLFWwindow);
798 #[doc = " @brief Checks the close flag of the specified window.\n\n This function returns the value of the close flag of the specified window.\n\n @param[in] window The window to query.\n @return The value of the close flag.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread. Access is not\n synchronized.\n\n @sa @ref window_close\n\n @since Added in version 3.0.\n\n @ingroup window"]
799 pub fn glfwWindowShouldClose(window: *mut GLFWwindow) -> ::std::os::raw::c_int;
800 #[doc = " @brief Sets the close flag of the specified window.\n\n This function sets the value of the close flag of the specified window.\n This can be used to override the user's attempt to close the window, or\n to signal that it should be closed.\n\n @param[in] window The window whose flag to change.\n @param[in] value The new value.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread. Access is not\n synchronized.\n\n @sa @ref window_close\n\n @since Added in version 3.0.\n\n @ingroup window"]
801 pub fn glfwSetWindowShouldClose(window: *mut GLFWwindow, value: ::std::os::raw::c_int);
802 #[doc = " @brief Returns the title of the specified window.\n\n This function returns the window title, encoded as UTF-8, of the specified\n window. This is the title set previously by @ref glfwCreateWindow\n or @ref glfwSetWindowTitle.\n\n @param[in] window The window to query.\n @return The UTF-8 encoded window title, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @remark The returned title is currently a copy of the title last set by @ref\n glfwCreateWindow or @ref glfwSetWindowTitle. It does not include any\n additional text which may be appended by the platform or another program.\n\n @pointer_lifetime The returned string is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the next call to @ref\n glfwGetWindowTitle or @ref glfwSetWindowTitle, or until the library is\n terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_title\n @sa @ref glfwSetWindowTitle\n\n @since Added in version 3.4.\n\n @ingroup window"]
803 pub fn glfwGetWindowTitle(window: *mut GLFWwindow) -> *const ::std::os::raw::c_char;
804 #[doc = " @brief Sets the title of the specified window.\n\n This function sets the window title, encoded as UTF-8, of the specified\n window.\n\n @param[in] window The window whose title to change.\n @param[in] title The UTF-8 encoded window title.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @remark @macos The window title will not be updated until the next time you\n process events.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_title\n @sa @ref glfwGetWindowTitle\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
805 pub fn glfwSetWindowTitle(window: *mut GLFWwindow, title: *const ::std::os::raw::c_char);
806 #[doc = " @brief Sets the icon for the specified window.\n\n This function sets the icon of the specified window. If passed an array of\n candidate images, those of or closest to the sizes desired by the system are\n selected. If no images are specified, the window reverts to its default\n icon.\n\n The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight\n bits per channel with the red channel first. They are arranged canonically\n as packed sequential rows, starting from the top-left corner.\n\n The desired image sizes varies depending on platform and system settings.\n The selected images will be rescaled as needed. Good sizes include 16x16,\n 32x32 and 48x48.\n\n @param[in] window The window whose icon to set.\n @param[in] count The number of images in the specified array, or zero to\n revert to the default window icon.\n @param[in] images The images to create the icon from. This is ignored if\n count is zero.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_VALUE, @ref GLFW_PLATFORM_ERROR and @ref\n GLFW_FEATURE_UNAVAILABLE (see remarks).\n\n @pointer_lifetime The specified image data is copied before this function\n returns.\n\n @remark @macos Regular windows do not have icons on macOS. This function\n will emit @ref GLFW_FEATURE_UNAVAILABLE. The dock icon will be the same as\n the application bundle's icon. For more information on bundles, see the\n [Bundle Programming Guide][bundle-guide] in the Mac Developer Library.\n\n [bundle-guide]: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/\n\n @remark @wayland There is no existing protocol to change an icon, the\n window will thus inherit the one defined in the application's desktop file.\n This function will emit @ref GLFW_FEATURE_UNAVAILABLE.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_icon\n\n @since Added in version 3.2.\n\n @ingroup window"]
807 pub fn glfwSetWindowIcon(
808 window: *mut GLFWwindow,
809 count: ::std::os::raw::c_int,
810 images: *const GLFWimage,
811 );
812 #[doc = " @brief Retrieves the position of the content area of the specified window.\n\n This function retrieves the position, in screen coordinates, of the\n upper-left corner of the content area of the specified window.\n\n Any or all of the position arguments may be `NULL`. If an error occurs, all\n non-`NULL` position arguments will be set to zero.\n\n @param[in] window The window to query.\n @param[out] xpos Where to store the x-coordinate of the upper-left corner of\n the content area, or `NULL`.\n @param[out] ypos Where to store the y-coordinate of the upper-left corner of\n the content area, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).\n\n @remark @wayland There is no way for an application to retrieve the global\n position of its windows. This function will emit @ref\n GLFW_FEATURE_UNAVAILABLE.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_pos\n @sa @ref glfwSetWindowPos\n\n @since Added in version 3.0.\n\n @ingroup window"]
813 pub fn glfwGetWindowPos(
814 window: *mut GLFWwindow,
815 xpos: *mut ::std::os::raw::c_int,
816 ypos: *mut ::std::os::raw::c_int,
817 );
818 #[doc = " @brief Sets the position of the content area of the specified window.\n\n This function sets the position, in screen coordinates, of the upper-left\n corner of the content area of the specified windowed mode window. If the\n window is a full screen window, this function does nothing.\n\n __Do not use this function__ to move an already visible window unless you\n have very good reasons for doing so, as it will confuse and annoy the user.\n\n The window manager may put limits on what positions are allowed. GLFW\n cannot and should not override these limits.\n\n @param[in] window The window to query.\n @param[in] xpos The x-coordinate of the upper-left corner of the content area.\n @param[in] ypos The y-coordinate of the upper-left corner of the content area.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).\n\n @remark @wayland There is no way for an application to set the global\n position of its windows. This function will emit @ref\n GLFW_FEATURE_UNAVAILABLE.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_pos\n @sa @ref glfwGetWindowPos\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
819 pub fn glfwSetWindowPos(
820 window: *mut GLFWwindow,
821 xpos: ::std::os::raw::c_int,
822 ypos: ::std::os::raw::c_int,
823 );
824 #[doc = " @brief Retrieves the size of the content area of the specified window.\n\n This function retrieves the size, in screen coordinates, of the content area\n of the specified window. If you wish to retrieve the size of the\n framebuffer of the window in pixels, see @ref glfwGetFramebufferSize.\n\n Any or all of the size arguments may be `NULL`. If an error occurs, all\n non-`NULL` size arguments will be set to zero.\n\n @param[in] window The window whose size to retrieve.\n @param[out] width Where to store the width, in screen coordinates, of the\n content area, or `NULL`.\n @param[out] height Where to store the height, in screen coordinates, of the\n content area, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_size\n @sa @ref glfwSetWindowSize\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
825 pub fn glfwGetWindowSize(
826 window: *mut GLFWwindow,
827 width: *mut ::std::os::raw::c_int,
828 height: *mut ::std::os::raw::c_int,
829 );
830 #[doc = " @brief Sets the size limits of the specified window.\n\n This function sets the size limits of the content area of the specified\n window. If the window is full screen, the size limits only take effect\n once it is made windowed. If the window is not resizable, this function\n does nothing.\n\n The size limits are applied immediately to a windowed mode window and may\n cause it to be resized.\n\n The maximum dimensions must be greater than or equal to the minimum\n dimensions and all must be greater than or equal to zero.\n\n @param[in] window The window to set limits for.\n @param[in] minwidth The minimum width, in screen coordinates, of the content\n area, or `GLFW_DONT_CARE`.\n @param[in] minheight The minimum height, in screen coordinates, of the\n content area, or `GLFW_DONT_CARE`.\n @param[in] maxwidth The maximum width, in screen coordinates, of the content\n area, or `GLFW_DONT_CARE`.\n @param[in] maxheight The maximum height, in screen coordinates, of the\n content area, or `GLFW_DONT_CARE`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.\n\n @remark If you set size limits and an aspect ratio that conflict, the\n results are undefined.\n\n @remark @wayland The size limits will not be applied until the window is\n actually resized, either by the user or by the compositor.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_sizelimits\n @sa @ref glfwSetWindowAspectRatio\n\n @since Added in version 3.2.\n\n @ingroup window"]
831 pub fn glfwSetWindowSizeLimits(
832 window: *mut GLFWwindow,
833 minwidth: ::std::os::raw::c_int,
834 minheight: ::std::os::raw::c_int,
835 maxwidth: ::std::os::raw::c_int,
836 maxheight: ::std::os::raw::c_int,
837 );
838 #[doc = " @brief Sets the aspect ratio of the specified window.\n\n This function sets the required aspect ratio of the content area of the\n specified window. If the window is full screen, the aspect ratio only takes\n effect once it is made windowed. If the window is not resizable, this\n function does nothing.\n\n The aspect ratio is specified as a numerator and a denominator and both\n values must be greater than zero. For example, the common 16:9 aspect ratio\n is specified as 16 and 9, respectively.\n\n If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect\n ratio limit is disabled.\n\n The aspect ratio is applied immediately to a windowed mode window and may\n cause it to be resized.\n\n @param[in] window The window to set limits for.\n @param[in] numer The numerator of the desired aspect ratio, or\n `GLFW_DONT_CARE`.\n @param[in] denom The denominator of the desired aspect ratio, or\n `GLFW_DONT_CARE`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.\n\n @remark If you set size limits and an aspect ratio that conflict, the\n results are undefined.\n\n @remark @wayland The aspect ratio will not be applied until the window is\n actually resized, either by the user or by the compositor.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_sizelimits\n @sa @ref glfwSetWindowSizeLimits\n\n @since Added in version 3.2.\n\n @ingroup window"]
839 pub fn glfwSetWindowAspectRatio(
840 window: *mut GLFWwindow,
841 numer: ::std::os::raw::c_int,
842 denom: ::std::os::raw::c_int,
843 );
844 #[doc = " @brief Sets the size of the content area of the specified window.\n\n This function sets the size, in screen coordinates, of the content area of\n the specified window.\n\n For full screen windows, this function updates the resolution of its desired\n video mode and switches to the video mode closest to it, without affecting\n the window's context. As the context is unaffected, the bit depths of the\n framebuffer remain unchanged.\n\n If you wish to update the refresh rate of the desired video mode in addition\n to its resolution, see @ref glfwSetWindowMonitor.\n\n The window manager may put limits on what sizes are allowed. GLFW cannot\n and should not override these limits.\n\n @param[in] window The window to resize.\n @param[in] width The desired width, in screen coordinates, of the window\n content area.\n @param[in] height The desired height, in screen coordinates, of the window\n content area.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_size\n @sa @ref glfwGetWindowSize\n @sa @ref glfwSetWindowMonitor\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
845 pub fn glfwSetWindowSize(
846 window: *mut GLFWwindow,
847 width: ::std::os::raw::c_int,
848 height: ::std::os::raw::c_int,
849 );
850 #[doc = " @brief Retrieves the size of the framebuffer of the specified window.\n\n This function retrieves the size, in pixels, of the framebuffer of the\n specified window. If you wish to retrieve the size of the window in screen\n coordinates, see @ref glfwGetWindowSize.\n\n Any or all of the size arguments may be `NULL`. If an error occurs, all\n non-`NULL` size arguments will be set to zero.\n\n @param[in] window The window whose framebuffer to query.\n @param[out] width Where to store the width, in pixels, of the framebuffer,\n or `NULL`.\n @param[out] height Where to store the height, in pixels, of the framebuffer,\n or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_fbsize\n @sa @ref glfwSetFramebufferSizeCallback\n\n @since Added in version 3.0.\n\n @ingroup window"]
851 pub fn glfwGetFramebufferSize(
852 window: *mut GLFWwindow,
853 width: *mut ::std::os::raw::c_int,
854 height: *mut ::std::os::raw::c_int,
855 );
856 #[doc = " @brief Retrieves the size of the frame of the window.\n\n This function retrieves the size, in screen coordinates, of each edge of the\n frame of the specified window. This size includes the title bar, if the\n window has one. The size of the frame may vary depending on the\n [window-related hints](@ref window_hints_wnd) used to create it.\n\n Because this function retrieves the size of each window frame edge and not\n the offset along a particular coordinate axis, the retrieved values will\n always be zero or positive.\n\n Any or all of the size arguments may be `NULL`. If an error occurs, all\n non-`NULL` size arguments will be set to zero.\n\n @param[in] window The window whose frame size to query.\n @param[out] left Where to store the size, in screen coordinates, of the left\n edge of the window frame, or `NULL`.\n @param[out] top Where to store the size, in screen coordinates, of the top\n edge of the window frame, or `NULL`.\n @param[out] right Where to store the size, in screen coordinates, of the\n right edge of the window frame, or `NULL`.\n @param[out] bottom Where to store the size, in screen coordinates, of the\n bottom edge of the window frame, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_size\n\n @since Added in version 3.1.\n\n @ingroup window"]
857 pub fn glfwGetWindowFrameSize(
858 window: *mut GLFWwindow,
859 left: *mut ::std::os::raw::c_int,
860 top: *mut ::std::os::raw::c_int,
861 right: *mut ::std::os::raw::c_int,
862 bottom: *mut ::std::os::raw::c_int,
863 );
864 #[doc = " @brief Retrieves the content scale for the specified window.\n\n This function retrieves the content scale for the specified window. The\n content scale is the ratio between the current DPI and the platform's\n default DPI. This is especially important for text and any UI elements. If\n the pixel dimensions of your UI scaled by this look appropriate on your\n machine then it should appear at a reasonable size on other machines\n regardless of their DPI and scaling settings. This relies on the system DPI\n and scaling settings being somewhat correct.\n\n On platforms where each monitors can have its own content scale, the window\n content scale will depend on which monitor the system considers the window\n to be on.\n\n @param[in] window The window to query.\n @param[out] xscale Where to store the x-axis content scale, or `NULL`.\n @param[out] yscale Where to store the y-axis content scale, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_scale\n @sa @ref glfwSetWindowContentScaleCallback\n @sa @ref glfwGetMonitorContentScale\n\n @since Added in version 3.3.\n\n @ingroup window"]
865 pub fn glfwGetWindowContentScale(window: *mut GLFWwindow, xscale: *mut f32, yscale: *mut f32);
866 #[doc = " @brief Returns the opacity of the whole window.\n\n This function returns the opacity of the window, including any decorations.\n\n The opacity (or alpha) value is a positive finite number between zero and\n one, where zero is fully transparent and one is fully opaque. If the system\n does not support whole window transparency, this function always returns one.\n\n The initial opacity value for newly created windows is one.\n\n @param[in] window The window to query.\n @return The opacity value of the specified window.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_transparency\n @sa @ref glfwSetWindowOpacity\n\n @since Added in version 3.3.\n\n @ingroup window"]
867 pub fn glfwGetWindowOpacity(window: *mut GLFWwindow) -> f32;
868 #[doc = " @brief Sets the opacity of the whole window.\n\n This function sets the opacity of the window, including any decorations.\n\n The opacity (or alpha) value is a positive finite number between zero and\n one, where zero is fully transparent and one is fully opaque.\n\n The initial opacity value for newly created windows is one.\n\n A window created with framebuffer transparency may not use whole window\n transparency. The results of doing this are undefined.\n\n @param[in] window The window to set the opacity for.\n @param[in] opacity The desired opacity of the specified window.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).\n\n @remark @wayland There is no way to set an opacity factor for a window.\n This function will emit @ref GLFW_FEATURE_UNAVAILABLE.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_transparency\n @sa @ref glfwGetWindowOpacity\n\n @since Added in version 3.3.\n\n @ingroup window"]
869 pub fn glfwSetWindowOpacity(window: *mut GLFWwindow, opacity: f32);
870 #[doc = " @brief Iconifies the specified window.\n\n This function iconifies (minimizes) the specified window if it was\n previously restored. If the window is already iconified, this function does\n nothing.\n\n If the specified window is a full screen window, GLFW restores the original\n video mode of the monitor. The window's desired video mode is set again\n when the window is restored.\n\n @param[in] window The window to iconify.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @remark @wayland Once a window is iconified, @ref glfwRestoreWindow won’t\n be able to restore it. This is a design decision of the xdg-shell\n protocol.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_iconify\n @sa @ref glfwRestoreWindow\n @sa @ref glfwMaximizeWindow\n\n @since Added in version 2.1.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
871 pub fn glfwIconifyWindow(window: *mut GLFWwindow);
872 #[doc = " @brief Restores the specified window.\n\n This function restores the specified window if it was previously iconified\n (minimized) or maximized. If the window is already restored, this function\n does nothing.\n\n If the specified window is an iconified full screen window, its desired\n video mode is set again for its monitor when the window is restored.\n\n @param[in] window The window to restore.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_iconify\n @sa @ref glfwIconifyWindow\n @sa @ref glfwMaximizeWindow\n\n @since Added in version 2.1.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
873 pub fn glfwRestoreWindow(window: *mut GLFWwindow);
874 #[doc = " @brief Maximizes the specified window.\n\n This function maximizes the specified window if it was previously not\n maximized. If the window is already maximized, this function does nothing.\n\n If the specified window is a full screen window, this function does nothing.\n\n @param[in] window The window to maximize.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @par Thread Safety\n This function may only be called from the main thread.\n\n @sa @ref window_iconify\n @sa @ref glfwIconifyWindow\n @sa @ref glfwRestoreWindow\n\n @since Added in GLFW 3.2.\n\n @ingroup window"]
875 pub fn glfwMaximizeWindow(window: *mut GLFWwindow);
876 #[doc = " @brief Makes the specified window visible.\n\n This function makes the specified window visible if it was previously\n hidden. If the window is already visible or is in full screen mode, this\n function does nothing.\n\n By default, windowed mode windows are focused when shown\n Set the [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint\n to change this behavior for all newly created windows, or change the\n behavior for an existing window with @ref glfwSetWindowAttrib.\n\n @param[in] window The window to make visible.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @remark @wayland Because Wayland wants every frame of the desktop to be\n complete, this function does not immediately make the window visible.\n Instead it will become visible the next time the window framebuffer is\n updated after this call.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_hide\n @sa @ref glfwHideWindow\n\n @since Added in version 3.0.\n\n @ingroup window"]
877 pub fn glfwShowWindow(window: *mut GLFWwindow);
878 #[doc = " @brief Hides the specified window.\n\n This function hides the specified window if it was previously visible. If\n the window is already hidden or is in full screen mode, this function does\n nothing.\n\n @param[in] window The window to hide.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_hide\n @sa @ref glfwShowWindow\n\n @since Added in version 3.0.\n\n @ingroup window"]
879 pub fn glfwHideWindow(window: *mut GLFWwindow);
880 #[doc = " @brief Brings the specified window to front and sets input focus.\n\n This function brings the specified window to front and sets input focus.\n The window should already be visible and not iconified.\n\n By default, both windowed and full screen mode windows are focused when\n initially created. Set the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) to\n disable this behavior.\n\n Also by default, windowed mode windows are focused when shown\n with @ref glfwShowWindow. Set the\n [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) to disable this behavior.\n\n __Do not use this function__ to steal focus from other applications unless\n you are certain that is what the user wants. Focus stealing can be\n extremely disruptive.\n\n For a less disruptive way of getting the user's attention, see\n [attention requests](@ref window_attention).\n\n @param[in] window The window to give input focus.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @remark @wayland The compositor will likely ignore focus requests unless\n another window created by the same application already has input focus.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_focus\n @sa @ref window_attention\n\n @since Added in version 3.2.\n\n @ingroup window"]
881 pub fn glfwFocusWindow(window: *mut GLFWwindow);
882 #[doc = " @brief Requests user attention to the specified window.\n\n This function requests user attention to the specified window. On\n platforms where this is not supported, attention is requested to the\n application as a whole.\n\n Once the user has given attention, usually by focusing the window or\n application, the system will end the request automatically.\n\n @param[in] window The window to request attention to.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @remark @macos Attention is requested to the application as a whole, not the\n specific window.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_attention\n\n @since Added in version 3.3.\n\n @ingroup window"]
883 pub fn glfwRequestWindowAttention(window: *mut GLFWwindow);
884 #[doc = " @brief Returns the monitor that the window uses for full screen mode.\n\n This function returns the handle of the monitor that the specified window is\n in full screen on.\n\n @param[in] window The window to query.\n @return The monitor, or `NULL` if the window is in windowed mode or an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_monitor\n @sa @ref glfwSetWindowMonitor\n\n @since Added in version 3.0.\n\n @ingroup window"]
885 pub fn glfwGetWindowMonitor(window: *mut GLFWwindow) -> *mut GLFWmonitor;
886 #[doc = " @brief Sets the mode, monitor, video mode and placement of a window.\n\n This function sets the monitor that the window uses for full screen mode or,\n if the monitor is `NULL`, makes it windowed mode.\n\n When setting a monitor, this function updates the width, height and refresh\n rate of the desired video mode and switches to the video mode closest to it.\n The window position is ignored when setting a monitor.\n\n When the monitor is `NULL`, the position, width and height are used to\n place the window content area. The refresh rate is ignored when no monitor\n is specified.\n\n If you only wish to update the resolution of a full screen window or the\n size of a windowed mode window, see @ref glfwSetWindowSize.\n\n When a window transitions from full screen to windowed mode, this function\n restores any previous window settings such as whether it is decorated,\n floating, resizable, has size or aspect ratio limits, etc.\n\n @param[in] window The window whose monitor, size or video mode to set.\n @param[in] monitor The desired monitor, or `NULL` to set windowed mode.\n @param[in] xpos The desired x-coordinate of the upper-left corner of the\n content area.\n @param[in] ypos The desired y-coordinate of the upper-left corner of the\n content area.\n @param[in] width The desired with, in screen coordinates, of the content\n area or video mode.\n @param[in] height The desired height, in screen coordinates, of the content\n area or video mode.\n @param[in] refreshRate The desired refresh rate, in Hz, of the video mode,\n or `GLFW_DONT_CARE`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @remark The OpenGL or OpenGL ES context will not be destroyed or otherwise\n affected by any resizing or mode switching, although you may need to update\n your viewport if the framebuffer size has changed.\n\n @remark @wayland The desired window position is ignored, as there is no way\n for an application to set this property.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_monitor\n @sa @ref window_full_screen\n @sa @ref glfwGetWindowMonitor\n @sa @ref glfwSetWindowSize\n\n @since Added in version 3.2.\n\n @ingroup window"]
887 pub fn glfwSetWindowMonitor(
888 window: *mut GLFWwindow,
889 monitor: *mut GLFWmonitor,
890 xpos: ::std::os::raw::c_int,
891 ypos: ::std::os::raw::c_int,
892 width: ::std::os::raw::c_int,
893 height: ::std::os::raw::c_int,
894 refreshRate: ::std::os::raw::c_int,
895 );
896 #[doc = " @brief Returns an attribute of the specified window.\n\n This function returns the value of an attribute of the specified window or\n its OpenGL or OpenGL ES context.\n\n @param[in] window The window to query.\n @param[in] attrib The [window attribute](@ref window_attribs) whose value to\n return.\n @return The value of the attribute, or zero if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n\n @remark Framebuffer related hints are not window attributes. See @ref\n window_attribs_fb for more information.\n\n @remark Zero is a valid value for many window and context related\n attributes so you cannot use a return value of zero as an indication of\n errors. However, this function should not fail as long as it is passed\n valid arguments and the library has been [initialized](@ref intro_init).\n\n @remark @wayland The Wayland protocol provides no way to check whether a\n window is iconfied, so @ref GLFW_ICONIFIED always returns `GLFW_FALSE`.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_attribs\n @sa @ref glfwSetWindowAttrib\n\n @since Added in version 3.0. Replaces `glfwGetWindowParam` and\n `glfwGetGLVersion`.\n\n @ingroup window"]
897 pub fn glfwGetWindowAttrib(
898 window: *mut GLFWwindow,
899 attrib: ::std::os::raw::c_int,
900 ) -> ::std::os::raw::c_int;
901 #[doc = " @brief Sets an attribute of the specified window.\n\n This function sets the value of an attribute of the specified window.\n\n The supported attributes are [GLFW_DECORATED](@ref GLFW_DECORATED_attrib),\n [GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib),\n [GLFW_FLOATING](@ref GLFW_FLOATING_attrib),\n [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and\n [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib).\n [GLFW_MOUSE_PASSTHROUGH](@ref GLFW_MOUSE_PASSTHROUGH_attrib)\n\n Some of these attributes are ignored for full screen windows. The new\n value will take effect if the window is later made windowed.\n\n Some of these attributes are ignored for windowed mode windows. The new\n value will take effect if the window is later made full screen.\n\n @param[in] window The window to set the attribute for.\n @param[in] attrib A supported window attribute.\n @param[in] value `GLFW_TRUE` or `GLFW_FALSE`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_PLATFORM_ERROR and @ref\n GLFW_FEATURE_UNAVAILABLE (see remarks).\n\n @remark Calling @ref glfwGetWindowAttrib will always return the latest\n value, even if that value is ignored by the current mode of the window.\n\n @remark @wayland The [GLFW_FLOATING](@ref GLFW_FLOATING_attrib) window attribute is\n not supported. Setting this will emit @ref GLFW_FEATURE_UNAVAILABLE.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_attribs\n @sa @ref glfwGetWindowAttrib\n\n @since Added in version 3.3.\n\n @ingroup window"]
902 pub fn glfwSetWindowAttrib(
903 window: *mut GLFWwindow,
904 attrib: ::std::os::raw::c_int,
905 value: ::std::os::raw::c_int,
906 );
907 #[doc = " @brief Sets the user pointer of the specified window.\n\n This function sets the user-defined pointer of the specified window. The\n current value is retained until the window is destroyed. The initial value\n is `NULL`.\n\n @param[in] window The window whose pointer to set.\n @param[in] pointer The new value.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread. Access is not\n synchronized.\n\n @sa @ref window_userptr\n @sa @ref glfwGetWindowUserPointer\n\n @since Added in version 3.0.\n\n @ingroup window"]
908 pub fn glfwSetWindowUserPointer(window: *mut GLFWwindow, pointer: *mut ::std::os::raw::c_void);
909 #[doc = " @brief Returns the user pointer of the specified window.\n\n This function returns the current value of the user-defined pointer of the\n specified window. The initial value is `NULL`.\n\n @param[in] window The window whose pointer to return.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread. Access is not\n synchronized.\n\n @sa @ref window_userptr\n @sa @ref glfwSetWindowUserPointer\n\n @since Added in version 3.0.\n\n @ingroup window"]
910 pub fn glfwGetWindowUserPointer(window: *mut GLFWwindow) -> *mut ::std::os::raw::c_void;
911 #[doc = " @brief Sets the position callback for the specified window.\n\n This function sets the position callback of the specified window, which is\n called when the window is moved. The callback is provided with the\n position, in screen coordinates, of the upper-left corner of the content\n area of the window.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int xpos, int ypos)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWwindowposfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @remark @wayland This callback will never be called, as there is no way for\n an application to know its global position.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_pos\n\n @since Added in version 3.0.\n\n @ingroup window"]
912 pub fn glfwSetWindowPosCallback(
913 window: *mut GLFWwindow,
914 callback: GLFWwindowposfun,
915 ) -> GLFWwindowposfun;
916 #[doc = " @brief Sets the size callback for the specified window.\n\n This function sets the size callback of the specified window, which is\n called when the window is resized. The callback is provided with the size,\n in screen coordinates, of the content area of the window.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int width, int height)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWwindowsizefun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_size\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter and return value.\n\n @ingroup window"]
917 pub fn glfwSetWindowSizeCallback(
918 window: *mut GLFWwindow,
919 callback: GLFWwindowsizefun,
920 ) -> GLFWwindowsizefun;
921 #[doc = " @brief Sets the close callback for the specified window.\n\n This function sets the close callback of the specified window, which is\n called when the user attempts to close the window, for example by clicking\n the close widget in the title bar.\n\n The close flag is set before this callback is called, but you can modify it\n at any time with @ref glfwSetWindowShouldClose.\n\n The close callback is not triggered by @ref glfwDestroyWindow.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWwindowclosefun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @remark @macos Selecting Quit from the application menu will trigger the\n close callback for all windows.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_close\n\n @since Added in version 2.5.\n @glfw3 Added window handle parameter and return value.\n\n @ingroup window"]
922 pub fn glfwSetWindowCloseCallback(
923 window: *mut GLFWwindow,
924 callback: GLFWwindowclosefun,
925 ) -> GLFWwindowclosefun;
926 #[doc = " @brief Sets the refresh callback for the specified window.\n\n This function sets the refresh callback of the specified window, which is\n called when the content area of the window needs to be redrawn, for example\n if the window has been exposed after having been covered by another window.\n\n On compositing window systems such as Aero, Compiz, Aqua or Wayland, where\n the window contents are saved off-screen, this callback may be called only\n very infrequently or never at all.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window);\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWwindowrefreshfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_refresh\n\n @since Added in version 2.5.\n @glfw3 Added window handle parameter and return value.\n\n @ingroup window"]
927 pub fn glfwSetWindowRefreshCallback(
928 window: *mut GLFWwindow,
929 callback: GLFWwindowrefreshfun,
930 ) -> GLFWwindowrefreshfun;
931 #[doc = " @brief Sets the focus callback for the specified window.\n\n This function sets the focus callback of the specified window, which is\n called when the window gains or loses input focus.\n\n After the focus callback is called for a window that lost input focus,\n synthetic key and mouse button release events will be generated for all such\n that had been pressed. For more information, see @ref glfwSetKeyCallback\n and @ref glfwSetMouseButtonCallback.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int focused)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWwindowfocusfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_focus\n\n @since Added in version 3.0.\n\n @ingroup window"]
932 pub fn glfwSetWindowFocusCallback(
933 window: *mut GLFWwindow,
934 callback: GLFWwindowfocusfun,
935 ) -> GLFWwindowfocusfun;
936 #[doc = " @brief Sets the iconify callback for the specified window.\n\n This function sets the iconification callback of the specified window, which\n is called when the window is iconified or restored.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int iconified)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWwindowiconifyfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_iconify\n\n @since Added in version 3.0.\n\n @ingroup window"]
937 pub fn glfwSetWindowIconifyCallback(
938 window: *mut GLFWwindow,
939 callback: GLFWwindowiconifyfun,
940 ) -> GLFWwindowiconifyfun;
941 #[doc = " @brief Sets the maximize callback for the specified window.\n\n This function sets the maximization callback of the specified window, which\n is called when the window is maximized or restored.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int maximized)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWwindowmaximizefun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_maximize\n\n @since Added in version 3.3.\n\n @ingroup window"]
942 pub fn glfwSetWindowMaximizeCallback(
943 window: *mut GLFWwindow,
944 callback: GLFWwindowmaximizefun,
945 ) -> GLFWwindowmaximizefun;
946 #[doc = " @brief Sets the framebuffer resize callback for the specified window.\n\n This function sets the framebuffer resize callback of the specified window,\n which is called when the framebuffer of the specified window is resized.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int width, int height)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWframebuffersizefun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_fbsize\n\n @since Added in version 3.0.\n\n @ingroup window"]
947 pub fn glfwSetFramebufferSizeCallback(
948 window: *mut GLFWwindow,
949 callback: GLFWframebuffersizefun,
950 ) -> GLFWframebuffersizefun;
951 #[doc = " @brief Sets the window content scale callback for the specified window.\n\n This function sets the window content scale callback of the specified window,\n which is called when the content scale of the specified window changes.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, float xscale, float yscale)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWwindowcontentscalefun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref window_scale\n @sa @ref glfwGetWindowContentScale\n\n @since Added in version 3.3.\n\n @ingroup window"]
952 pub fn glfwSetWindowContentScaleCallback(
953 window: *mut GLFWwindow,
954 callback: GLFWwindowcontentscalefun,
955 ) -> GLFWwindowcontentscalefun;
956 #[doc = " @brief Processes all pending events.\n\n This function processes only those events that are already in the event\n queue and then returns immediately. Processing events will cause the window\n and input callbacks associated with those events to be called.\n\n On some platforms, a window move, resize or menu operation will cause event\n processing to block. This is due to how event processing is designed on\n those platforms. You can use the\n [window refresh callback](@ref window_refresh) to redraw the contents of\n your window when necessary during such operations.\n\n Do not assume that callbacks you set will _only_ be called in response to\n event processing functions like this one. While it is necessary to poll for\n events, window systems that require GLFW to register callbacks of its own\n can pass events to GLFW in response to many window system function calls.\n GLFW will pass those events on to the application callbacks before\n returning.\n\n Event processing is not required for joystick input to work.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @reentrancy This function must not be called from a callback.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref events\n @sa @ref glfwWaitEvents\n @sa @ref glfwWaitEventsTimeout\n\n @since Added in version 1.0.\n\n @ingroup window"]
957 pub fn glfwPollEvents();
958 #[doc = " @brief Waits until events are queued and processes them.\n\n This function puts the calling thread to sleep until at least one event is\n available in the event queue. Once one or more events are available,\n it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue\n are processed and the function then returns immediately. Processing events\n will cause the window and input callbacks associated with those events to be\n called.\n\n Since not all events are associated with callbacks, this function may return\n without a callback having been called even if you are monitoring all\n callbacks.\n\n On some platforms, a window move, resize or menu operation will cause event\n processing to block. This is due to how event processing is designed on\n those platforms. You can use the\n [window refresh callback](@ref window_refresh) to redraw the contents of\n your window when necessary during such operations.\n\n Do not assume that callbacks you set will _only_ be called in response to\n event processing functions like this one. While it is necessary to poll for\n events, window systems that require GLFW to register callbacks of its own\n can pass events to GLFW in response to many window system function calls.\n GLFW will pass those events on to the application callbacks before\n returning.\n\n Event processing is not required for joystick input to work.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @reentrancy This function must not be called from a callback.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref events\n @sa @ref glfwPollEvents\n @sa @ref glfwWaitEventsTimeout\n\n @since Added in version 2.5.\n\n @ingroup window"]
959 pub fn glfwWaitEvents();
960 #[doc = " @brief Waits with timeout until events are queued and processes them.\n\n This function puts the calling thread to sleep until at least one event is\n available in the event queue, or until the specified timeout is reached. If\n one or more events are available, it behaves exactly like @ref\n glfwPollEvents, i.e. the events in the queue are processed and the function\n then returns immediately. Processing events will cause the window and input\n callbacks associated with those events to be called.\n\n The timeout value must be a positive finite number.\n\n Since not all events are associated with callbacks, this function may return\n without a callback having been called even if you are monitoring all\n callbacks.\n\n On some platforms, a window move, resize or menu operation will cause event\n processing to block. This is due to how event processing is designed on\n those platforms. You can use the\n [window refresh callback](@ref window_refresh) to redraw the contents of\n your window when necessary during such operations.\n\n Do not assume that callbacks you set will _only_ be called in response to\n event processing functions like this one. While it is necessary to poll for\n events, window systems that require GLFW to register callbacks of its own\n can pass events to GLFW in response to many window system function calls.\n GLFW will pass those events on to the application callbacks before\n returning.\n\n Event processing is not required for joystick input to work.\n\n @param[in] timeout The maximum amount of time, in seconds, to wait.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.\n\n @reentrancy This function must not be called from a callback.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref events\n @sa @ref glfwPollEvents\n @sa @ref glfwWaitEvents\n\n @since Added in version 3.2.\n\n @ingroup window"]
961 pub fn glfwWaitEventsTimeout(timeout: f64);
962 #[doc = " @brief Posts an empty event to the event queue.\n\n This function posts an empty event from the current thread to the event\n queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref events\n @sa @ref glfwWaitEvents\n @sa @ref glfwWaitEventsTimeout\n\n @since Added in version 3.1.\n\n @ingroup window"]
963 pub fn glfwPostEmptyEvent();
964 #[doc = " @brief Returns the value of an input option for the specified window.\n\n This function returns the value of an input option for the specified window.\n The mode must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,\n @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or\n @ref GLFW_RAW_MOUSE_MOTION.\n\n @param[in] window The window to query.\n @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,\n `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or\n `GLFW_RAW_MOUSE_MOTION`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_ENUM.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref glfwSetInputMode\n\n @since Added in version 3.0.\n\n @ingroup input"]
965 pub fn glfwGetInputMode(
966 window: *mut GLFWwindow,
967 mode: ::std::os::raw::c_int,
968 ) -> ::std::os::raw::c_int;
969 #[doc = " @brief Sets an input option for the specified window.\n\n This function sets an input mode option for the specified window. The mode\n must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS,\n @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or\n @ref GLFW_RAW_MOUSE_MOTION.\n\n If the mode is `GLFW_CURSOR`, the value must be one of the following cursor\n modes:\n - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally.\n - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the\n content area of the window but does not restrict the cursor from leaving.\n - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual\n and unlimited cursor movement. This is useful for implementing for\n example 3D camera controls.\n - `GLFW_CURSOR_CAPTURED` makes the cursor visible and confines it to the\n content area of the window.\n\n If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to\n enable sticky keys, or `GLFW_FALSE` to disable it. If sticky keys are\n enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS`\n the next time it is called even if the key had been released before the\n call. This is useful when you are only interested in whether keys have been\n pressed but not when or in which order.\n\n If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either\n `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it.\n If sticky mouse buttons are enabled, a mouse button press will ensure that\n @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even\n if the mouse button had been released before the call. This is useful when\n you are only interested in whether mouse buttons have been pressed but not\n when or in which order.\n\n If the mode is `GLFW_LOCK_KEY_MODS`, the value must be either `GLFW_TRUE` to\n enable lock key modifier bits, or `GLFW_FALSE` to disable them. If enabled,\n callbacks that receive modifier bits will also have the @ref\n GLFW_MOD_CAPS_LOCK bit set when the event was generated with Caps Lock on,\n and the @ref GLFW_MOD_NUM_LOCK bit when Num Lock was on.\n\n If the mode is `GLFW_RAW_MOUSE_MOTION`, the value must be either `GLFW_TRUE`\n to enable raw (unscaled and unaccelerated) mouse motion when the cursor is\n disabled, or `GLFW_FALSE` to disable it. If raw motion is not supported,\n attempting to set this will emit @ref GLFW_FEATURE_UNAVAILABLE. Call @ref\n glfwRawMouseMotionSupported to check for support.\n\n @param[in] window The window whose input mode to set.\n @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`,\n `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or\n `GLFW_RAW_MOUSE_MOTION`.\n @param[in] value The new value of the specified input mode.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM, @ref GLFW_PLATFORM_ERROR and @ref\n GLFW_FEATURE_UNAVAILABLE (see above).\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref glfwGetInputMode\n\n @since Added in version 3.0. Replaces `glfwEnable` and `glfwDisable`.\n\n @ingroup input"]
970 pub fn glfwSetInputMode(
971 window: *mut GLFWwindow,
972 mode: ::std::os::raw::c_int,
973 value: ::std::os::raw::c_int,
974 );
975 #[doc = " @brief Returns whether raw mouse motion is supported.\n\n This function returns whether raw mouse motion is supported on the current\n system. This status does not change after GLFW has been initialized so you\n only need to check this once. If you attempt to enable raw motion on\n a system that does not support it, @ref GLFW_PLATFORM_ERROR will be emitted.\n\n Raw mouse motion is closer to the actual motion of the mouse across\n a surface. It is not affected by the scaling and acceleration applied to\n the motion of the desktop cursor. That processing is suitable for a cursor\n while raw motion is better for controlling for example a 3D camera. Because\n of this, raw mouse motion is only provided when the cursor is disabled.\n\n @return `GLFW_TRUE` if raw mouse motion is supported on the current machine,\n or `GLFW_FALSE` otherwise.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref raw_mouse_motion\n @sa @ref glfwSetInputMode\n\n @since Added in version 3.3.\n\n @ingroup input"]
976 pub fn glfwRawMouseMotionSupported() -> ::std::os::raw::c_int;
977 #[doc = " @brief Returns the layout-specific name of the specified printable key.\n\n This function returns the name of the specified printable key, encoded as\n UTF-8. This is typically the character that key would produce without any\n modifier keys, intended for displaying key bindings to the user. For dead\n keys, it is typically the diacritic it would add to a character.\n\n __Do not use this function__ for [text input](@ref input_char). You will\n break text input for many languages even if it happens to work for yours.\n\n If the key is `GLFW_KEY_UNKNOWN`, the scancode is used to identify the key,\n otherwise the scancode is ignored. If you specify a non-printable key, or\n `GLFW_KEY_UNKNOWN` and a scancode that maps to a non-printable key, this\n function returns `NULL` but does not emit an error.\n\n This behavior allows you to always pass in the arguments in the\n [key callback](@ref input_key) without modification.\n\n The printable keys are:\n - `GLFW_KEY_APOSTROPHE`\n - `GLFW_KEY_COMMA`\n - `GLFW_KEY_MINUS`\n - `GLFW_KEY_PERIOD`\n - `GLFW_KEY_SLASH`\n - `GLFW_KEY_SEMICOLON`\n - `GLFW_KEY_EQUAL`\n - `GLFW_KEY_LEFT_BRACKET`\n - `GLFW_KEY_RIGHT_BRACKET`\n - `GLFW_KEY_BACKSLASH`\n - `GLFW_KEY_WORLD_1`\n - `GLFW_KEY_WORLD_2`\n - `GLFW_KEY_0` to `GLFW_KEY_9`\n - `GLFW_KEY_A` to `GLFW_KEY_Z`\n - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9`\n - `GLFW_KEY_KP_DECIMAL`\n - `GLFW_KEY_KP_DIVIDE`\n - `GLFW_KEY_KP_MULTIPLY`\n - `GLFW_KEY_KP_SUBTRACT`\n - `GLFW_KEY_KP_ADD`\n - `GLFW_KEY_KP_EQUAL`\n\n Names for printable keys depend on keyboard layout, while names for\n non-printable keys are the same across layouts but depend on the application\n language and should be localized along with other user interface text.\n\n @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`.\n @param[in] scancode The scancode of the key to query.\n @return The UTF-8 encoded, layout-specific name of the key, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_VALUE, @ref GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n\n @remark The contents of the returned string may change when a keyboard\n layout change event is received.\n\n @pointer_lifetime The returned string is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref input_key_name\n\n @since Added in version 3.2.\n\n @ingroup input"]
978 pub fn glfwGetKeyName(
979 key: ::std::os::raw::c_int,
980 scancode: ::std::os::raw::c_int,
981 ) -> *const ::std::os::raw::c_char;
982 #[doc = " @brief Returns the platform-specific scancode of the specified key.\n\n This function returns the platform-specific scancode of the specified key.\n\n If the specified [key token](@ref keys) corresponds to a physical key not\n supported on the current platform then this method will return `-1`.\n Calling this function with anything other than a key token will return `-1`\n and generate a @ref GLFW_INVALID_ENUM error.\n\n @param[in] key Any [key token](@ref keys).\n @return The platform-specific scancode for the key, or `-1` if the key is\n not supported on the current platform or an [error](@ref error_handling)\n occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_ENUM.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref input_key\n\n @since Added in version 3.3.\n\n @ingroup input"]
983 pub fn glfwGetKeyScancode(key: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
984 #[doc = " @brief Returns the last reported state of a keyboard key for the specified\n window.\n\n This function returns the last state reported for the specified key to the\n specified window. The returned state is one of `GLFW_PRESS` or\n `GLFW_RELEASE`. The action `GLFW_REPEAT` is only reported to the key callback.\n\n If the @ref GLFW_STICKY_KEYS input mode is enabled, this function returns\n `GLFW_PRESS` the first time you call it for a key that was pressed, even if\n that key has already been released.\n\n The key functions deal with physical keys, with [key tokens](@ref keys)\n named after their use on the standard US keyboard layout. If you want to\n input text, use the Unicode character callback instead.\n\n The [modifier key bit masks](@ref mods) are not key tokens and cannot be\n used with this function.\n\n __Do not use this function__ to implement [text input](@ref input_char).\n\n @param[in] window The desired window.\n @param[in] key The desired [keyboard key](@ref keys). `GLFW_KEY_UNKNOWN` is\n not a valid key for this function.\n @return One of `GLFW_PRESS` or `GLFW_RELEASE`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_ENUM.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref input_key\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter.\n\n @ingroup input"]
985 pub fn glfwGetKey(window: *mut GLFWwindow, key: ::std::os::raw::c_int)
986 -> ::std::os::raw::c_int;
987 #[doc = " @brief Returns the last reported state of a mouse button for the specified\n window.\n\n This function returns the last state reported for the specified mouse button\n to the specified window. The returned state is one of `GLFW_PRESS` or\n `GLFW_RELEASE`.\n\n If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function\n returns `GLFW_PRESS` the first time you call it for a mouse button that was\n pressed, even if that mouse button has already been released.\n\n @param[in] window The desired window.\n @param[in] button The desired [mouse button](@ref buttons).\n @return One of `GLFW_PRESS` or `GLFW_RELEASE`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_ENUM.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref input_mouse_button\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter.\n\n @ingroup input"]
988 pub fn glfwGetMouseButton(
989 window: *mut GLFWwindow,
990 button: ::std::os::raw::c_int,
991 ) -> ::std::os::raw::c_int;
992 #[doc = " @brief Retrieves the position of the cursor relative to the content area of\n the window.\n\n This function returns the position of the cursor, in screen coordinates,\n relative to the upper-left corner of the content area of the specified\n window.\n\n If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor\n position is unbounded and limited only by the minimum and maximum values of\n a `double`.\n\n The coordinate can be converted to their integer equivalents with the\n `floor` function. Casting directly to an integer type works for positive\n coordinates, but fails for negative ones.\n\n Any or all of the position arguments may be `NULL`. If an error occurs, all\n non-`NULL` position arguments will be set to zero.\n\n @param[in] window The desired window.\n @param[out] xpos Where to store the cursor x-coordinate, relative to the\n left edge of the content area, or `NULL`.\n @param[out] ypos Where to store the cursor y-coordinate, relative to the to\n top edge of the content area, or `NULL`.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref cursor_pos\n @sa @ref glfwSetCursorPos\n\n @since Added in version 3.0. Replaces `glfwGetMousePos`.\n\n @ingroup input"]
993 pub fn glfwGetCursorPos(window: *mut GLFWwindow, xpos: *mut f64, ypos: *mut f64);
994 #[doc = " @brief Sets the position of the cursor, relative to the content area of the\n window.\n\n This function sets the position, in screen coordinates, of the cursor\n relative to the upper-left corner of the content area of the specified\n window. The window must have input focus. If the window does not have\n input focus when this function is called, it fails silently.\n\n __Do not use this function__ to implement things like camera controls. GLFW\n already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the\n cursor, transparently re-centers it and provides unconstrained cursor\n motion. See @ref glfwSetInputMode for more information.\n\n If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is\n unconstrained and limited only by the minimum and maximum values of\n a `double`.\n\n @param[in] window The desired window.\n @param[in] xpos The desired x-coordinate, relative to the left edge of the\n content area.\n @param[in] ypos The desired y-coordinate, relative to the top edge of the\n content area.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_PLATFORM_ERROR and @ref GLFW_FEATURE_UNAVAILABLE (see remarks).\n\n @remark @wayland This function will only work when the cursor mode is\n `GLFW_CURSOR_DISABLED`, otherwise it will emit @ref GLFW_FEATURE_UNAVAILABLE.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref cursor_pos\n @sa @ref glfwGetCursorPos\n\n @since Added in version 3.0. Replaces `glfwSetMousePos`.\n\n @ingroup input"]
995 pub fn glfwSetCursorPos(window: *mut GLFWwindow, xpos: f64, ypos: f64);
996 #[doc = " @brief Creates a custom cursor.\n\n Creates a new custom cursor image that can be set for a window with @ref\n glfwSetCursor. The cursor can be destroyed with @ref glfwDestroyCursor.\n Any remaining cursors are destroyed by @ref glfwTerminate.\n\n The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight\n bits per channel with the red channel first. They are arranged canonically\n as packed sequential rows, starting from the top-left corner.\n\n The cursor hotspot is specified in pixels, relative to the upper-left corner\n of the cursor image. Like all other coordinate systems in GLFW, the X-axis\n points to the right and the Y-axis points down.\n\n @param[in] image The desired cursor image.\n @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot.\n @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot.\n @return The handle of the created cursor, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.\n\n @pointer_lifetime The specified image data is copied before this function\n returns.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref cursor_object\n @sa @ref glfwDestroyCursor\n @sa @ref glfwCreateStandardCursor\n\n @since Added in version 3.1.\n\n @ingroup input"]
997 pub fn glfwCreateCursor(
998 image: *const GLFWimage,
999 xhot: ::std::os::raw::c_int,
1000 yhot: ::std::os::raw::c_int,
1001 ) -> *mut GLFWcursor;
1002 #[doc = " @brief Creates a cursor with a standard shape.\n\n Returns a cursor with a standard shape, that can be set for a window with\n @ref glfwSetCursor. The images for these cursors come from the system\n cursor theme and their exact appearance will vary between platforms.\n\n Most of these shapes are guaranteed to exist on every supported platform but\n a few may not be present. See the table below for details.\n\n Cursor shape | Windows | macOS | X11 | Wayland\n ------------------------------ | ------- | ----- | ------ | -------\n @ref GLFW_ARROW_CURSOR | Yes | Yes | Yes | Yes\n @ref GLFW_IBEAM_CURSOR | Yes | Yes | Yes | Yes\n @ref GLFW_CROSSHAIR_CURSOR | Yes | Yes | Yes | Yes\n @ref GLFW_POINTING_HAND_CURSOR | Yes | Yes | Yes | Yes\n @ref GLFW_RESIZE_EW_CURSOR | Yes | Yes | Yes | Yes\n @ref GLFW_RESIZE_NS_CURSOR | Yes | Yes | Yes | Yes\n @ref GLFW_RESIZE_NWSE_CURSOR | Yes | Yes<sup>1</sup> | Maybe<sup>2</sup> | Maybe<sup>2</sup>\n @ref GLFW_RESIZE_NESW_CURSOR | Yes | Yes<sup>1</sup> | Maybe<sup>2</sup> | Maybe<sup>2</sup>\n @ref GLFW_RESIZE_ALL_CURSOR | Yes | Yes | Yes | Yes\n @ref GLFW_NOT_ALLOWED_CURSOR | Yes | Yes | Maybe<sup>2</sup> | Maybe<sup>2</sup>\n\n 1) This uses a private system API and may fail in the future.\n\n 2) This uses a newer standard that not all cursor themes support.\n\n If the requested shape is not available, this function emits a @ref\n GLFW_CURSOR_UNAVAILABLE error and returns `NULL`.\n\n @param[in] shape One of the [standard shapes](@ref shapes).\n @return A new cursor ready to use or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM, @ref GLFW_CURSOR_UNAVAILABLE and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref cursor_standard\n @sa @ref glfwCreateCursor\n\n @since Added in version 3.1.\n\n @ingroup input"]
1003 pub fn glfwCreateStandardCursor(shape: ::std::os::raw::c_int) -> *mut GLFWcursor;
1004 #[doc = " @brief Destroys a cursor.\n\n This function destroys a cursor previously created with @ref\n glfwCreateCursor. Any remaining cursors will be destroyed by @ref\n glfwTerminate.\n\n If the specified cursor is current for any window, that window will be\n reverted to the default cursor. This does not affect the cursor mode.\n\n @param[in] cursor The cursor object to destroy.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @reentrancy This function must not be called from a callback.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref cursor_object\n @sa @ref glfwCreateCursor\n\n @since Added in version 3.1.\n\n @ingroup input"]
1005 pub fn glfwDestroyCursor(cursor: *mut GLFWcursor);
1006 #[doc = " @brief Sets the cursor for the window.\n\n This function sets the cursor image to be used when the cursor is over the\n content area of the specified window. The set cursor will only be visible\n when the [cursor mode](@ref cursor_mode) of the window is\n `GLFW_CURSOR_NORMAL`.\n\n On some platforms, the set cursor may not be visible unless the window also\n has input focus.\n\n @param[in] window The window to set the cursor for.\n @param[in] cursor The cursor to set, or `NULL` to switch back to the default\n arrow cursor.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref cursor_object\n\n @since Added in version 3.1.\n\n @ingroup input"]
1007 pub fn glfwSetCursor(window: *mut GLFWwindow, cursor: *mut GLFWcursor);
1008 #[doc = " @brief Sets the key callback.\n\n This function sets the key callback of the specified window, which is called\n when a key is pressed, repeated or released.\n\n The key functions deal with physical keys, with layout independent\n [key tokens](@ref keys) named after their values in the standard US keyboard\n layout. If you want to input text, use the\n [character callback](@ref glfwSetCharCallback) instead.\n\n When a window loses input focus, it will generate synthetic key release\n events for all pressed keys with associated key tokens. You can tell these\n events from user-generated events by the fact that the synthetic ones are\n generated after the focus loss event has been processed, i.e. after the\n [window focus callback](@ref glfwSetWindowFocusCallback) has been called.\n\n The scancode of a key is specific to that platform or sometimes even to that\n machine. Scancodes are intended to allow users to bind keys that don't have\n a GLFW key token. Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their\n state is not saved and so it cannot be queried with @ref glfwGetKey.\n\n Sometimes GLFW needs to generate synthetic key events, in which case the\n scancode may be zero.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new key callback, or `NULL` to remove the currently\n set callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int key, int scancode, int action, int mods)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWkeyfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref input_key\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter and return value.\n\n @ingroup input"]
1009 pub fn glfwSetKeyCallback(window: *mut GLFWwindow, callback: GLFWkeyfun) -> GLFWkeyfun;
1010 #[doc = " @brief Sets the Unicode character callback.\n\n This function sets the character callback of the specified window, which is\n called when a Unicode character is input.\n\n The character callback is intended for Unicode text input. As it deals with\n characters, it is keyboard layout dependent, whereas the\n [key callback](@ref glfwSetKeyCallback) is not. Characters do not map 1:1\n to physical keys, as a key may produce zero, one or more characters. If you\n want to know whether a specific physical key was pressed or released, see\n the key callback instead.\n\n The character callback behaves as system text input normally does and will\n not be called if modifier keys are held down that would prevent normal text\n input on that platform, for example a Super (Command) key on macOS or Alt key\n on Windows.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, unsigned int codepoint)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWcharfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref input_char\n\n @since Added in version 2.4.\n @glfw3 Added window handle parameter and return value.\n\n @ingroup input"]
1011 pub fn glfwSetCharCallback(window: *mut GLFWwindow, callback: GLFWcharfun) -> GLFWcharfun;
1012 #[doc = " @brief Sets the Unicode character with modifiers callback.\n\n This function sets the character with modifiers callback of the specified\n window, which is called when a Unicode character is input regardless of what\n modifier keys are used.\n\n The character with modifiers callback is intended for implementing custom\n Unicode character input. For regular Unicode text input, see the\n [character callback](@ref glfwSetCharCallback). Like the character\n callback, the character with modifiers callback deals with characters and is\n keyboard layout dependent. Characters do not map 1:1 to physical keys, as\n a key may produce zero, one or more characters. If you want to know whether\n a specific physical key was pressed or released, see the\n [key callback](@ref glfwSetKeyCallback) instead.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or an\n [error](@ref error_handling) occurred.\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, unsigned int codepoint, int mods)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWcharmodsfun).\n\n @deprecated Scheduled for removal in version 4.0.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref input_char\n\n @since Added in version 3.1.\n\n @ingroup input"]
1013 pub fn glfwSetCharModsCallback(
1014 window: *mut GLFWwindow,
1015 callback: GLFWcharmodsfun,
1016 ) -> GLFWcharmodsfun;
1017 #[doc = " @brief Sets the mouse button callback.\n\n This function sets the mouse button callback of the specified window, which\n is called when a mouse button is pressed or released.\n\n When a window loses input focus, it will generate synthetic mouse button\n release events for all pressed mouse buttons. You can tell these events\n from user-generated events by the fact that the synthetic ones are generated\n after the focus loss event has been processed, i.e. after the\n [window focus callback](@ref glfwSetWindowFocusCallback) has been called.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int button, int action, int mods)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWmousebuttonfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref input_mouse_button\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter and return value.\n\n @ingroup input"]
1018 pub fn glfwSetMouseButtonCallback(
1019 window: *mut GLFWwindow,
1020 callback: GLFWmousebuttonfun,
1021 ) -> GLFWmousebuttonfun;
1022 #[doc = " @brief Sets the cursor position callback.\n\n This function sets the cursor position callback of the specified window,\n which is called when the cursor is moved. The callback is provided with the\n position, in screen coordinates, relative to the upper-left corner of the\n content area of the window.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, double xpos, double ypos);\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWcursorposfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref cursor_pos\n\n @since Added in version 3.0. Replaces `glfwSetMousePosCallback`.\n\n @ingroup input"]
1023 pub fn glfwSetCursorPosCallback(
1024 window: *mut GLFWwindow,
1025 callback: GLFWcursorposfun,
1026 ) -> GLFWcursorposfun;
1027 #[doc = " @brief Sets the cursor enter/leave callback.\n\n This function sets the cursor boundary crossing callback of the specified\n window, which is called when the cursor enters or leaves the content area of\n the window.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int entered)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWcursorenterfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref cursor_enter\n\n @since Added in version 3.0.\n\n @ingroup input"]
1028 pub fn glfwSetCursorEnterCallback(
1029 window: *mut GLFWwindow,
1030 callback: GLFWcursorenterfun,
1031 ) -> GLFWcursorenterfun;
1032 #[doc = " @brief Sets the scroll callback.\n\n This function sets the scroll callback of the specified window, which is\n called when a scrolling device is used, such as a mouse wheel or scrolling\n area of a touchpad.\n\n The scroll callback receives all scrolling input, like that from a mouse\n wheel or a touchpad scrolling area.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new scroll callback, or `NULL` to remove the\n currently set callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, double xoffset, double yoffset)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWscrollfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref scrolling\n\n @since Added in version 3.0. Replaces `glfwSetMouseWheelCallback`.\n\n @ingroup input"]
1033 pub fn glfwSetScrollCallback(window: *mut GLFWwindow, callback: GLFWscrollfun)
1034 -> GLFWscrollfun;
1035 #[doc = " @brief Sets the path drop callback.\n\n This function sets the path drop callback of the specified window, which is\n called when one or more dragged paths are dropped on the window.\n\n Because the path array and its strings may have been generated specifically\n for that event, they are not guaranteed to be valid after the callback has\n returned. If you wish to use them after the callback returns, you need to\n make a deep copy.\n\n @param[in] window The window whose callback to set.\n @param[in] callback The new file drop callback, or `NULL` to remove the\n currently set callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(GLFWwindow* window, int path_count, const char* paths[])\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWdropfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref path_drop\n\n @since Added in version 3.1.\n\n @ingroup input"]
1036 pub fn glfwSetDropCallback(window: *mut GLFWwindow, callback: GLFWdropfun) -> GLFWdropfun;
1037 #[doc = " @brief Returns whether the specified joystick is present.\n\n This function returns whether the specified joystick is present.\n\n There is no need to call this function before other functions that accept\n a joystick ID, as they all check for presence before performing any other\n work.\n\n @param[in] jid The [joystick](@ref joysticks) to query.\n @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref joystick\n\n @since Added in version 3.0. Replaces `glfwGetJoystickParam`.\n\n @ingroup input"]
1038 pub fn glfwJoystickPresent(jid: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
1039 #[doc = " @brief Returns the values of all axes of the specified joystick.\n\n This function returns the values of all axes of the specified joystick.\n Each element in the array is a value between -1.0 and 1.0.\n\n If the specified joystick is not present this function will return `NULL`\n but will not generate an error. This can be used instead of first calling\n @ref glfwJoystickPresent.\n\n @param[in] jid The [joystick](@ref joysticks) to query.\n @param[out] count Where to store the number of axis values in the returned\n array. This is set to zero if the joystick is not present or an error\n occurred.\n @return An array of axis values, or `NULL` if the joystick is not present or\n an [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n\n @pointer_lifetime The returned array is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the specified joystick is\n disconnected or the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref joystick_axis\n\n @since Added in version 3.0. Replaces `glfwGetJoystickPos`.\n\n @ingroup input"]
1040 pub fn glfwGetJoystickAxes(
1041 jid: ::std::os::raw::c_int,
1042 count: *mut ::std::os::raw::c_int,
1043 ) -> *const f32;
1044 #[doc = " @brief Returns the state of all buttons of the specified joystick.\n\n This function returns the state of all buttons of the specified joystick.\n Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`.\n\n For backward compatibility with earlier versions that did not have @ref\n glfwGetJoystickHats, the button array also includes all hats, each\n represented as four buttons. The hats are in the same order as returned by\n __glfwGetJoystickHats__ and are in the order _up_, _right_, _down_ and\n _left_. To disable these extra buttons, set the @ref\n GLFW_JOYSTICK_HAT_BUTTONS init hint before initialization.\n\n If the specified joystick is not present this function will return `NULL`\n but will not generate an error. This can be used instead of first calling\n @ref glfwJoystickPresent.\n\n @param[in] jid The [joystick](@ref joysticks) to query.\n @param[out] count Where to store the number of button states in the returned\n array. This is set to zero if the joystick is not present or an error\n occurred.\n @return An array of button states, or `NULL` if the joystick is not present\n or an [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n\n @pointer_lifetime The returned array is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the specified joystick is\n disconnected or the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref joystick_button\n\n @since Added in version 2.2.\n @glfw3 Changed to return a dynamic array.\n\n @ingroup input"]
1045 pub fn glfwGetJoystickButtons(
1046 jid: ::std::os::raw::c_int,
1047 count: *mut ::std::os::raw::c_int,
1048 ) -> *const ::std::os::raw::c_uchar;
1049 #[doc = " @brief Returns the state of all hats of the specified joystick.\n\n This function returns the state of all hats of the specified joystick.\n Each element in the array is one of the following values:\n\n Name | Value\n ---- | -----\n `GLFW_HAT_CENTERED` | 0\n `GLFW_HAT_UP` | 1\n `GLFW_HAT_RIGHT` | 2\n `GLFW_HAT_DOWN` | 4\n `GLFW_HAT_LEFT` | 8\n `GLFW_HAT_RIGHT_UP` | `GLFW_HAT_RIGHT` \\| `GLFW_HAT_UP`\n `GLFW_HAT_RIGHT_DOWN` | `GLFW_HAT_RIGHT` \\| `GLFW_HAT_DOWN`\n `GLFW_HAT_LEFT_UP` | `GLFW_HAT_LEFT` \\| `GLFW_HAT_UP`\n `GLFW_HAT_LEFT_DOWN` | `GLFW_HAT_LEFT` \\| `GLFW_HAT_DOWN`\n\n The diagonal directions are bitwise combinations of the primary (up, right,\n down and left) directions and you can test for these individually by ANDing\n it with the corresponding direction.\n\n @code\n if (hats[2] & GLFW_HAT_RIGHT)\n {\n // State of hat 2 could be right-up, right or right-down\n }\n @endcode\n\n If the specified joystick is not present this function will return `NULL`\n but will not generate an error. This can be used instead of first calling\n @ref glfwJoystickPresent.\n\n @param[in] jid The [joystick](@ref joysticks) to query.\n @param[out] count Where to store the number of hat states in the returned\n array. This is set to zero if the joystick is not present or an error\n occurred.\n @return An array of hat states, or `NULL` if the joystick is not present\n or an [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n\n @pointer_lifetime The returned array is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the specified joystick is\n disconnected, this function is called again for that joystick or the library\n is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref joystick_hat\n\n @since Added in version 3.3.\n\n @ingroup input"]
1050 pub fn glfwGetJoystickHats(
1051 jid: ::std::os::raw::c_int,
1052 count: *mut ::std::os::raw::c_int,
1053 ) -> *const ::std::os::raw::c_uchar;
1054 #[doc = " @brief Returns the name of the specified joystick.\n\n This function returns the name, encoded as UTF-8, of the specified joystick.\n The returned string is allocated and freed by GLFW. You should not free it\n yourself.\n\n If the specified joystick is not present this function will return `NULL`\n but will not generate an error. This can be used instead of first calling\n @ref glfwJoystickPresent.\n\n @param[in] jid The [joystick](@ref joysticks) to query.\n @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick\n is not present or an [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n\n @pointer_lifetime The returned string is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the specified joystick is\n disconnected or the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref joystick_name\n\n @since Added in version 3.0.\n\n @ingroup input"]
1055 pub fn glfwGetJoystickName(jid: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
1056 #[doc = " @brief Returns the SDL compatible GUID of the specified joystick.\n\n This function returns the SDL compatible GUID, as a UTF-8 encoded\n hexadecimal string, of the specified joystick. The returned string is\n allocated and freed by GLFW. You should not free it yourself.\n\n The GUID is what connects a joystick to a gamepad mapping. A connected\n joystick will always have a GUID even if there is no gamepad mapping\n assigned to it.\n\n If the specified joystick is not present this function will return `NULL`\n but will not generate an error. This can be used instead of first calling\n @ref glfwJoystickPresent.\n\n The GUID uses the format introduced in SDL 2.0.5. This GUID tries to\n uniquely identify the make and model of a joystick but does not identify\n a specific unit, e.g. all wired Xbox 360 controllers will have the same\n GUID on that platform. The GUID for a unit may vary between platforms\n depending on what hardware information the platform specific APIs provide.\n\n @param[in] jid The [joystick](@ref joysticks) to query.\n @return The UTF-8 encoded GUID of the joystick, or `NULL` if the joystick\n is not present or an [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.\n\n @pointer_lifetime The returned string is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the specified joystick is\n disconnected or the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref gamepad\n\n @since Added in version 3.3.\n\n @ingroup input"]
1057 pub fn glfwGetJoystickGUID(jid: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
1058 #[doc = " @brief Sets the user pointer of the specified joystick.\n\n This function sets the user-defined pointer of the specified joystick. The\n current value is retained until the joystick is disconnected. The initial\n value is `NULL`.\n\n This function may be called from the joystick callback, even for a joystick\n that is being disconnected.\n\n @param[in] jid The joystick whose pointer to set.\n @param[in] pointer The new value.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread. Access is not\n synchronized.\n\n @sa @ref joystick_userptr\n @sa @ref glfwGetJoystickUserPointer\n\n @since Added in version 3.3.\n\n @ingroup input"]
1059 pub fn glfwSetJoystickUserPointer(
1060 jid: ::std::os::raw::c_int,
1061 pointer: *mut ::std::os::raw::c_void,
1062 );
1063 #[doc = " @brief Returns the user pointer of the specified joystick.\n\n This function returns the current value of the user-defined pointer of the\n specified joystick. The initial value is `NULL`.\n\n This function may be called from the joystick callback, even for a joystick\n that is being disconnected.\n\n @param[in] jid The joystick whose pointer to return.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread. Access is not\n synchronized.\n\n @sa @ref joystick_userptr\n @sa @ref glfwSetJoystickUserPointer\n\n @since Added in version 3.3.\n\n @ingroup input"]
1064 pub fn glfwGetJoystickUserPointer(jid: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void;
1065 #[doc = " @brief Returns whether the specified joystick has a gamepad mapping.\n\n This function returns whether the specified joystick is both present and has\n a gamepad mapping.\n\n If the specified joystick is present but does not have a gamepad mapping\n this function will return `GLFW_FALSE` but will not generate an error. Call\n @ref glfwJoystickPresent to check if a joystick is present regardless of\n whether it has a mapping.\n\n @param[in] jid The [joystick](@ref joysticks) to query.\n @return `GLFW_TRUE` if a joystick is both present and has a gamepad mapping,\n or `GLFW_FALSE` otherwise.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_ENUM.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref gamepad\n @sa @ref glfwGetGamepadState\n\n @since Added in version 3.3.\n\n @ingroup input"]
1066 pub fn glfwJoystickIsGamepad(jid: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
1067 #[doc = " @brief Sets the joystick configuration callback.\n\n This function sets the joystick configuration callback, or removes the\n currently set callback. This is called when a joystick is connected to or\n disconnected from the system.\n\n For joystick connection and disconnection events to be delivered on all\n platforms, you need to call one of the [event processing](@ref events)\n functions. Joystick disconnection may also be detected and the callback\n called by joystick functions. The function will then return whatever it\n returns if the joystick is not present.\n\n @param[in] callback The new callback, or `NULL` to remove the currently set\n callback.\n @return The previously set callback, or `NULL` if no callback was set or the\n library had not been [initialized](@ref intro_init).\n\n @callback_signature\n @code\n void function_name(int jid, int event)\n @endcode\n For more information about the callback parameters, see the\n [function pointer type](@ref GLFWjoystickfun).\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref joystick_event\n\n @since Added in version 3.2.\n\n @ingroup input"]
1068 pub fn glfwSetJoystickCallback(callback: GLFWjoystickfun) -> GLFWjoystickfun;
1069 #[doc = " @brief Adds the specified SDL_GameControllerDB gamepad mappings.\n\n This function parses the specified ASCII encoded string and updates the\n internal list with any gamepad mappings it finds. This string may\n contain either a single gamepad mapping or many mappings separated by\n newlines. The parser supports the full format of the `gamecontrollerdb.txt`\n source file including empty lines and comments.\n\n See @ref gamepad_mapping for a description of the format.\n\n If there is already a gamepad mapping for a given GUID in the internal list,\n it will be replaced by the one passed to this function. If the library is\n terminated and re-initialized the internal list will revert to the built-in\n default.\n\n @param[in] string The string containing the gamepad mappings.\n @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_VALUE.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref gamepad\n @sa @ref glfwJoystickIsGamepad\n @sa @ref glfwGetGamepadName\n\n @since Added in version 3.3.\n\n @ingroup input"]
1070 pub fn glfwUpdateGamepadMappings(
1071 string: *const ::std::os::raw::c_char,
1072 ) -> ::std::os::raw::c_int;
1073 #[doc = " @brief Returns the human-readable gamepad name for the specified joystick.\n\n This function returns the human-readable name of the gamepad from the\n gamepad mapping assigned to the specified joystick.\n\n If the specified joystick is not present or does not have a gamepad mapping\n this function will return `NULL` but will not generate an error. Call\n @ref glfwJoystickPresent to check whether it is present regardless of\n whether it has a mapping.\n\n @param[in] jid The [joystick](@ref joysticks) to query.\n @return The UTF-8 encoded name of the gamepad, or `NULL` if the\n joystick is not present, does not have a mapping or an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_INVALID_ENUM.\n\n @pointer_lifetime The returned string is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the specified joystick is\n disconnected, the gamepad mappings are updated or the library is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref gamepad\n @sa @ref glfwJoystickIsGamepad\n\n @since Added in version 3.3.\n\n @ingroup input"]
1074 pub fn glfwGetGamepadName(jid: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
1075 #[doc = " @brief Retrieves the state of the specified joystick remapped as a gamepad.\n\n This function retrieves the state of the specified joystick remapped to\n an Xbox-like gamepad.\n\n If the specified joystick is not present or does not have a gamepad mapping\n this function will return `GLFW_FALSE` but will not generate an error. Call\n @ref glfwJoystickPresent to check whether it is present regardless of\n whether it has a mapping.\n\n The Guide button may not be available for input as it is often hooked by the\n system or the Steam client.\n\n Not all devices have all the buttons or axes provided by @ref\n GLFWgamepadstate. Unavailable buttons and axes will always report\n `GLFW_RELEASE` and 0.0 respectively.\n\n @param[in] jid The [joystick](@ref joysticks) to query.\n @param[out] state The gamepad input state of the joystick.\n @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if no joystick is\n connected, it has no gamepad mapping or an [error](@ref error_handling)\n occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_ENUM.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref gamepad\n @sa @ref glfwUpdateGamepadMappings\n @sa @ref glfwJoystickIsGamepad\n\n @since Added in version 3.3.\n\n @ingroup input"]
1076 pub fn glfwGetGamepadState(
1077 jid: ::std::os::raw::c_int,
1078 state: *mut GLFWgamepadstate,
1079 ) -> ::std::os::raw::c_int;
1080 #[doc = " @brief Sets the clipboard to the specified string.\n\n This function sets the system clipboard to the specified, UTF-8 encoded\n string.\n\n @param[in] window Deprecated. Any valid window or `NULL`.\n @param[in] string A UTF-8 encoded string.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_PLATFORM_ERROR.\n\n @remark @win32 The clipboard on Windows has a single global lock for reading and\n writing. GLFW tries to acquire it a few times, which is almost always enough. If it\n cannot acquire the lock then this function emits @ref GLFW_PLATFORM_ERROR and returns.\n It is safe to try this multiple times.\n\n @pointer_lifetime The specified string is copied before this function\n returns.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref clipboard\n @sa @ref glfwGetClipboardString\n\n @since Added in version 3.0.\n\n @ingroup input"]
1081 pub fn glfwSetClipboardString(window: *mut GLFWwindow, string: *const ::std::os::raw::c_char);
1082 #[doc = " @brief Returns the contents of the clipboard as a string.\n\n This function returns the contents of the system clipboard, if it contains\n or is convertible to a UTF-8 encoded string. If the clipboard is empty or\n if its contents cannot be converted, `NULL` is returned and a @ref\n GLFW_FORMAT_UNAVAILABLE error is generated.\n\n @param[in] window Deprecated. Any valid window or `NULL`.\n @return The contents of the clipboard as a UTF-8 encoded string, or `NULL`\n if an [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_FORMAT_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.\n\n @remark @win32 The clipboard on Windows has a single global lock for reading and\n writing. GLFW tries to acquire it a few times, which is almost always enough. If it\n cannot acquire the lock then this function emits @ref GLFW_PLATFORM_ERROR and returns.\n It is safe to try this multiple times.\n\n @pointer_lifetime The returned string is allocated and freed by GLFW. You\n should not free it yourself. It is valid until the next call to @ref\n glfwGetClipboardString or @ref glfwSetClipboardString, or until the library\n is terminated.\n\n @thread_safety This function must only be called from the main thread.\n\n @sa @ref clipboard\n @sa @ref glfwSetClipboardString\n\n @since Added in version 3.0.\n\n @ingroup input"]
1083 pub fn glfwGetClipboardString(window: *mut GLFWwindow) -> *const ::std::os::raw::c_char;
1084 #[doc = " @brief Returns the GLFW time.\n\n This function returns the current GLFW time, in seconds. Unless the time\n has been set using @ref glfwSetTime it measures time elapsed since GLFW was\n initialized.\n\n This function and @ref glfwSetTime are helper functions on top of @ref\n glfwGetTimerFrequency and @ref glfwGetTimerValue.\n\n The resolution of the timer is system dependent, but is usually on the order\n of a few micro- or nanoseconds. It uses the highest-resolution monotonic\n time source on each operating system.\n\n @return The current time, in seconds, or zero if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread. Reading and\n writing of the internal base time is not atomic, so it needs to be\n externally synchronized with calls to @ref glfwSetTime.\n\n @sa @ref time\n\n @since Added in version 1.0.\n\n @ingroup input"]
1085 pub fn glfwGetTime() -> f64;
1086 #[doc = " @brief Sets the GLFW time.\n\n This function sets the current GLFW time, in seconds. The value must be\n a positive finite number less than or equal to 18446744073.0, which is\n approximately 584.5 years.\n\n This function and @ref glfwGetTime are helper functions on top of @ref\n glfwGetTimerFrequency and @ref glfwGetTimerValue.\n\n @param[in] time The new value, in seconds.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_INVALID_VALUE.\n\n @remark The upper limit of GLFW time is calculated as\n floor((2<sup>64</sup> - 1) / 10<sup>9</sup>) and is due to implementations\n storing nanoseconds in 64 bits. The limit may be increased in the future.\n\n @thread_safety This function may be called from any thread. Reading and\n writing of the internal base time is not atomic, so it needs to be\n externally synchronized with calls to @ref glfwGetTime.\n\n @sa @ref time\n\n @since Added in version 2.2.\n\n @ingroup input"]
1087 pub fn glfwSetTime(time: f64);
1088 #[doc = " @brief Returns the current value of the raw timer.\n\n This function returns the current value of the raw timer, measured in\n 1 / frequency seconds. To get the frequency, call @ref\n glfwGetTimerFrequency.\n\n @return The value of the timer, or zero if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref time\n @sa @ref glfwGetTimerFrequency\n\n @since Added in version 3.2.\n\n @ingroup input"]
1089 pub fn glfwGetTimerValue() -> u64;
1090 #[doc = " @brief Returns the frequency, in Hz, of the raw timer.\n\n This function returns the frequency, in Hz, of the raw timer.\n\n @return The frequency of the timer, in Hz, or zero if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref time\n @sa @ref glfwGetTimerValue\n\n @since Added in version 3.2.\n\n @ingroup input"]
1091 pub fn glfwGetTimerFrequency() -> u64;
1092 #[doc = " @brief Makes the context of the specified window current for the calling\n thread.\n\n This function makes the OpenGL or OpenGL ES context of the specified window\n current on the calling thread. It can also detach the current context from\n the calling thread without making a new one current by passing in `NULL`.\n\n A context must only be made current on a single thread at a time and each\n thread can have only a single current context at a time. Making a context\n current detaches any previously current context on the calling thread.\n\n When moving a context between threads, you must detach it (make it\n non-current) on the old thread before making it current on the new one.\n\n By default, making a context non-current implicitly forces a pipeline flush.\n On machines that support `GL_KHR_context_flush_control`, you can control\n whether a context performs this flush by setting the\n [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint)\n hint.\n\n The specified window must have an OpenGL or OpenGL ES context. Specifying\n a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT\n error.\n\n @param[in] window The window whose context to make current, or `NULL` to\n detach the current context.\n\n @remarks If the previously current context was created via a different\n context creation API than the one passed to this function, GLFW will still\n detach the previous one from its API before making the new one current.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref context_current\n @sa @ref glfwGetCurrentContext\n\n @since Added in version 3.0.\n\n @ingroup context"]
1093 pub fn glfwMakeContextCurrent(window: *mut GLFWwindow);
1094 #[doc = " @brief Returns the window whose context is current on the calling thread.\n\n This function returns the window whose OpenGL or OpenGL ES context is\n current on the calling thread.\n\n @return The window whose context is current, or `NULL` if no window's\n context is current.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref context_current\n @sa @ref glfwMakeContextCurrent\n\n @since Added in version 3.0.\n\n @ingroup context"]
1095 pub fn glfwGetCurrentContext() -> *mut GLFWwindow;
1096 #[doc = " @brief Swaps the front and back buffers of the specified window.\n\n This function swaps the front and back buffers of the specified window when\n rendering with OpenGL or OpenGL ES. If the swap interval is greater than\n zero, the GPU driver waits the specified number of screen updates before\n swapping the buffers.\n\n The specified window must have an OpenGL or OpenGL ES context. Specifying\n a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT\n error.\n\n This function does not apply to Vulkan. If you are rendering with Vulkan,\n see `vkQueuePresentKHR` instead.\n\n @param[in] window The window whose buffers to swap.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.\n\n @remark __EGL:__ The context of the specified window must be current on the\n calling thread.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref buffer_swap\n @sa @ref glfwSwapInterval\n\n @since Added in version 1.0.\n @glfw3 Added window handle parameter.\n\n @ingroup window"]
1097 pub fn glfwSwapBuffers(window: *mut GLFWwindow);
1098 #[doc = " @brief Sets the swap interval for the current context.\n\n This function sets the swap interval for the current OpenGL or OpenGL ES\n context, i.e. the number of screen updates to wait from the time @ref\n glfwSwapBuffers was called before swapping the buffers and returning. This\n is sometimes called _vertical synchronization_, _vertical retrace\n synchronization_ or just _vsync_.\n\n A context that supports either of the `WGL_EXT_swap_control_tear` and\n `GLX_EXT_swap_control_tear` extensions also accepts _negative_ swap\n intervals, which allows the driver to swap immediately even if a frame\n arrives a little bit late. You can check for these extensions with @ref\n glfwExtensionSupported.\n\n A context must be current on the calling thread. Calling this function\n without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.\n\n This function does not apply to Vulkan. If you are rendering with Vulkan,\n see the present mode of your swapchain instead.\n\n @param[in] interval The minimum number of screen updates to wait for\n until the buffers are swapped by @ref glfwSwapBuffers.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.\n\n @remark This function is not called during context creation, leaving the\n swap interval set to whatever is the default for that API. This is done\n because some swap interval extensions used by GLFW do not allow the swap\n interval to be reset to zero once it has been set to a non-zero value.\n\n @remark Some GPU drivers do not honor the requested swap interval, either\n because of a user setting that overrides the application's request or due to\n bugs in the driver.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref buffer_swap\n @sa @ref glfwSwapBuffers\n\n @since Added in version 1.0.\n\n @ingroup context"]
1099 pub fn glfwSwapInterval(interval: ::std::os::raw::c_int);
1100 #[doc = " @brief Returns whether the specified extension is available.\n\n This function returns whether the specified\n [API extension](@ref context_glext) is supported by the current OpenGL or\n OpenGL ES context. It searches both for client API extension and context\n creation API extensions.\n\n A context must be current on the calling thread. Calling this function\n without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.\n\n As this functions retrieves and searches one or more extension strings each\n call, it is recommended that you cache its results if it is going to be used\n frequently. The extension strings will not change during the lifetime of\n a context, so there is no danger in doing this.\n\n This function does not apply to Vulkan. If you are using Vulkan, see @ref\n glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties`\n and `vkEnumerateDeviceExtensionProperties` instead.\n\n @param[in] extension The ASCII encoded name of the extension.\n @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE`\n otherwise.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref\n GLFW_PLATFORM_ERROR.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref context_glext\n @sa @ref glfwGetProcAddress\n\n @since Added in version 1.0.\n\n @ingroup context"]
1101 pub fn glfwExtensionSupported(
1102 extension: *const ::std::os::raw::c_char,
1103 ) -> ::std::os::raw::c_int;
1104 #[doc = " @brief Returns the address of the specified function for the current\n context.\n\n This function returns the address of the specified OpenGL or OpenGL ES\n [core or extension function](@ref context_glext), if it is supported\n by the current context.\n\n A context must be current on the calling thread. Calling this function\n without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.\n\n This function does not apply to Vulkan. If you are rendering with Vulkan,\n see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and\n `vkGetDeviceProcAddr` instead.\n\n @param[in] procname The ASCII encoded name of the function.\n @return The address of the function, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR.\n\n @remark The address of a given function is not guaranteed to be the same\n between contexts.\n\n @remark This function may return a non-`NULL` address despite the\n associated version or extension not being available. Always check the\n context version or extension string first.\n\n @pointer_lifetime The returned function pointer is valid until the context\n is destroyed or the library is terminated.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref context_glext\n @sa @ref glfwExtensionSupported\n\n @since Added in version 1.0.\n\n @ingroup context"]
1105 pub fn glfwGetProcAddress(procname: *const ::std::os::raw::c_char) -> GLFWglproc;
1106 #[doc = " @brief Returns whether the Vulkan loader and an ICD have been found.\n\n This function returns whether the Vulkan loader and any minimally functional\n ICD have been found.\n\n The availability of a Vulkan loader and even an ICD does not by itself guarantee that\n surface creation or even instance creation is possible. Call @ref\n glfwGetRequiredInstanceExtensions to check whether the extensions necessary for Vulkan\n surface creation are available and @ref glfwGetPhysicalDevicePresentationSupport to\n check whether a queue family of a physical device supports image presentation.\n\n @return `GLFW_TRUE` if Vulkan is minimally available, or `GLFW_FALSE`\n otherwise.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref vulkan_support\n\n @since Added in version 3.2.\n\n @ingroup vulkan"]
1107 pub fn glfwVulkanSupported() -> ::std::os::raw::c_int;
1108 #[doc = " @brief Returns the Vulkan instance extensions required by GLFW.\n\n This function returns an array of names of Vulkan instance extensions required\n by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the\n list will always contain `VK_KHR_surface`, so if you don't require any\n additional extensions you can pass this list directly to the\n `VkInstanceCreateInfo` struct.\n\n If Vulkan is not available on the machine, this function returns `NULL` and\n generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported\n to check whether Vulkan is at least minimally available.\n\n If Vulkan is available but no set of extensions allowing window surface\n creation was found, this function returns `NULL`. You may still use Vulkan\n for off-screen rendering and compute work.\n\n @param[out] count Where to store the number of extensions in the returned\n array. This is set to zero if an error occurred.\n @return An array of ASCII encoded extension names, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_API_UNAVAILABLE.\n\n @remark Additional extensions may be required by future versions of GLFW.\n You should check if any extensions you wish to enable are already in the\n returned array, as it is an error to specify an extension more than once in\n the `VkInstanceCreateInfo` struct.\n\n @pointer_lifetime The returned array is allocated and freed by GLFW. You\n should not free it yourself. It is guaranteed to be valid only until the\n library is terminated.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref vulkan_ext\n @sa @ref glfwCreateWindowSurface\n\n @since Added in version 3.2.\n\n @ingroup vulkan"]
1109 pub fn glfwGetRequiredInstanceExtensions(count: *mut u32)
1110 -> *mut *const ::std::os::raw::c_char;
1111 #[doc = " @brief Returns the address of the specified Vulkan instance function.\n\n This function returns the address of the specified Vulkan core or extension\n function for the specified instance. If instance is set to `NULL` it can\n return any function exported from the Vulkan loader, including at least the\n following functions:\n\n - `vkEnumerateInstanceExtensionProperties`\n - `vkEnumerateInstanceLayerProperties`\n - `vkCreateInstance`\n - `vkGetInstanceProcAddr`\n\n If Vulkan is not available on the machine, this function returns `NULL` and\n generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported\n to check whether Vulkan is at least minimally available.\n\n This function is equivalent to calling `vkGetInstanceProcAddr` with\n a platform-specific query of the Vulkan loader as a fallback.\n\n @param[in] instance The Vulkan instance to query, or `NULL` to retrieve\n functions related to instance creation.\n @param[in] procname The ASCII encoded name of the function.\n @return The address of the function, or `NULL` if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref\n GLFW_API_UNAVAILABLE.\n\n @pointer_lifetime The returned function pointer is valid until the library\n is terminated.\n\n @thread_safety This function may be called from any thread.\n\n @sa @ref vulkan_proc\n\n @since Added in version 3.2.\n\n @ingroup vulkan"]
1112 pub fn glfwGetInstanceProcAddress(
1113 instance: VkInstance,
1114 procname: *const ::std::os::raw::c_char,
1115 ) -> GLFWvkproc;
1116 #[doc = " @brief Returns whether the specified queue family can present images.\n\n This function returns whether the specified queue family of the specified\n physical device supports presentation to the platform GLFW was built for.\n\n If Vulkan or the required window surface creation instance extensions are\n not available on the machine, or if the specified instance was not created\n with the required extensions, this function returns `GLFW_FALSE` and\n generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported\n to check whether Vulkan is at least minimally available and @ref\n glfwGetRequiredInstanceExtensions to check what instance extensions are\n required.\n\n @param[in] instance The instance that the physical device belongs to.\n @param[in] device The physical device that the queue family belongs to.\n @param[in] queuefamily The index of the queue family to query.\n @return `GLFW_TRUE` if the queue family supports presentation, or\n `GLFW_FALSE` otherwise.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.\n\n @remark @macos This function currently always returns `GLFW_TRUE`, as the\n `VK_MVK_macos_surface` and `VK_EXT_metal_surface` extensions do not provide\n a `vkGetPhysicalDevice*PresentationSupport` type function.\n\n @thread_safety This function may be called from any thread. For\n synchronization details of Vulkan objects, see the Vulkan specification.\n\n @sa @ref vulkan_present\n\n @since Added in version 3.2.\n\n @ingroup vulkan"]
1117 pub fn glfwGetPhysicalDevicePresentationSupport(
1118 instance: VkInstance,
1119 device: VkPhysicalDevice,
1120 queuefamily: u32,
1121 ) -> ::std::os::raw::c_int;
1122 #[doc = " @brief Creates a Vulkan surface for the specified window.\n\n This function creates a Vulkan surface for the specified window.\n\n If the Vulkan loader or at least one minimally functional ICD were not found,\n this function returns `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref\n GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported to check whether\n Vulkan is at least minimally available.\n\n If the required window surface creation instance extensions are not\n available or if the specified instance was not created with these extensions\n enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and\n generates a @ref GLFW_API_UNAVAILABLE error. Call @ref\n glfwGetRequiredInstanceExtensions to check what instance extensions are\n required.\n\n The window surface cannot be shared with another API so the window must\n have been created with the [client api hint](@ref GLFW_CLIENT_API_attrib)\n set to `GLFW_NO_API` otherwise it generates a @ref GLFW_INVALID_VALUE error\n and returns `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`.\n\n The window surface must be destroyed before the specified Vulkan instance.\n It is the responsibility of the caller to destroy the window surface. GLFW\n does not destroy it for you. Call `vkDestroySurfaceKHR` to destroy the\n surface.\n\n @param[in] instance The Vulkan instance to create the surface in.\n @param[in] window The window to create the surface for.\n @param[in] allocator The allocator to use, or `NULL` to use the default\n allocator.\n @param[out] surface Where to store the handle of the surface. This is set\n to `VK_NULL_HANDLE` if an error occurred.\n @return `VK_SUCCESS` if successful, or a Vulkan error code if an\n [error](@ref error_handling) occurred.\n\n @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref\n GLFW_API_UNAVAILABLE, @ref GLFW_PLATFORM_ERROR and @ref GLFW_INVALID_VALUE\n\n @remark If an error occurs before the creation call is made, GLFW returns\n the Vulkan error code most appropriate for the error. Appropriate use of\n @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should\n eliminate almost all occurrences of these errors.\n\n @remark @macos GLFW prefers the `VK_EXT_metal_surface` extension, with the\n `VK_MVK_macos_surface` extension as a fallback. The name of the selected\n extension, if any, is included in the array returned by @ref\n glfwGetRequiredInstanceExtensions.\n\n @remark @macos This function creates and sets a `CAMetalLayer` instance for\n the window content view, which is required for MoltenVK to function.\n\n @remark @x11 By default GLFW prefers the `VK_KHR_xcb_surface` extension,\n with the `VK_KHR_xlib_surface` extension as a fallback. You can make\n `VK_KHR_xlib_surface` the preferred extension by setting the\n [GLFW_X11_XCB_VULKAN_SURFACE](@ref GLFW_X11_XCB_VULKAN_SURFACE_hint) init\n hint. The name of the selected extension, if any, is included in the array\n returned by @ref glfwGetRequiredInstanceExtensions.\n\n @thread_safety This function may be called from any thread. For\n synchronization details of Vulkan objects, see the Vulkan specification.\n\n @sa @ref vulkan_surface\n @sa @ref glfwGetRequiredInstanceExtensions\n\n @since Added in version 3.2.\n\n @ingroup vulkan"]
1123 pub fn glfwCreateWindowSurface(
1124 instance: VkInstance,
1125 window: *mut GLFWwindow,
1126 allocator: *const VkAllocationCallbacks,
1127 surface: *mut VkSurfaceKHR,
1128 ) -> VkResult;
1129}