1 // Copyright 2013-2016 The GLFW-RS Developers. For a full listing of the authors, 2 // refer to the AUTHORS file at the top-level directory of this distribution. 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 16 //! Low-level function bindings and constants pertaining to the underlying 17 //! GLFW library. 18 19 #![allow(bad_style)] // yeah yeah, but it's ffi 20 21 use libc::{c_char, c_double, c_float, c_int, c_ulonglong}; 22 use libc::{c_uchar, c_uint, c_ushort, c_void}; 23 24 #[cfg(feature = "vulkan")] 25 use vk_sys::{ 26 Instance as VkInstance, 27 PhysicalDevice as VkPhysicalDevice, 28 AllocationCallbacks as VkAllocationCallbacks, 29 Result as VkResult, 30 SurfaceKHR as VkSurfaceKHR 31 }; 32 33 mod link; 34 35 pub const FALSE : c_int = 0; 36 pub const TRUE : c_int = 1; 37 38 pub const RELEASE : c_int = 0; 39 pub const PRESS : c_int = 1; 40 pub const REPEAT : c_int = 2; 41 42 pub const KEY_UNKNOWN : c_int = -1; 43 44 pub const KEY_SPACE : c_int = 32; 45 pub const KEY_APOSTROPHE : c_int = 39; 46 pub const KEY_COMMA : c_int = 44; 47 pub const KEY_MINUS : c_int = 45; 48 pub const KEY_PERIOD : c_int = 46; 49 pub const KEY_SLASH : c_int = 47; 50 pub const KEY_0 : c_int = 48; 51 pub const KEY_1 : c_int = 49; 52 pub const KEY_2 : c_int = 50; 53 pub const KEY_3 : c_int = 51; 54 pub const KEY_4 : c_int = 52; 55 pub const KEY_5 : c_int = 53; 56 pub const KEY_6 : c_int = 54; 57 pub const KEY_7 : c_int = 55; 58 pub const KEY_8 : c_int = 56; 59 pub const KEY_9 : c_int = 57; 60 pub const KEY_SEMICOLON : c_int = 59; 61 pub const KEY_EQUAL : c_int = 61; 62 pub const KEY_A : c_int = 65; 63 pub const KEY_B : c_int = 66; 64 pub const KEY_C : c_int = 67; 65 pub const KEY_D : c_int = 68; 66 pub const KEY_E : c_int = 69; 67 pub const KEY_F : c_int = 70; 68 pub const KEY_G : c_int = 71; 69 pub const KEY_H : c_int = 72; 70 pub const KEY_I : c_int = 73; 71 pub const KEY_J : c_int = 74; 72 pub const KEY_K : c_int = 75; 73 pub const KEY_L : c_int = 76; 74 pub const KEY_M : c_int = 77; 75 pub const KEY_N : c_int = 78; 76 pub const KEY_O : c_int = 79; 77 pub const KEY_P : c_int = 80; 78 pub const KEY_Q : c_int = 81; 79 pub const KEY_R : c_int = 82; 80 pub const KEY_S : c_int = 83; 81 pub const KEY_T : c_int = 84; 82 pub const KEY_U : c_int = 85; 83 pub const KEY_V : c_int = 86; 84 pub const KEY_W : c_int = 87; 85 pub const KEY_X : c_int = 88; 86 pub const KEY_Y : c_int = 89; 87 pub const KEY_Z : c_int = 90; 88 pub const KEY_LEFT_BRACKET : c_int = 91; 89 pub const KEY_BACKSLASH : c_int = 92; 90 pub const KEY_RIGHT_BRACKET : c_int = 93; 91 pub const KEY_GRAVE_ACCENT : c_int = 96; 92 pub const KEY_WORLD_1 : c_int = 161; 93 pub const KEY_WORLD_2 : c_int = 162; 94 95 pub const KEY_ESCAPE : c_int = 256; 96 pub const KEY_ENTER : c_int = 257; 97 pub const KEY_TAB : c_int = 258; 98 pub const KEY_BACKSPACE : c_int = 259; 99 pub const KEY_INSERT : c_int = 260; 100 pub const KEY_DELETE : c_int = 261; 101 pub const KEY_RIGHT : c_int = 262; 102 pub const KEY_LEFT : c_int = 263; 103 pub const KEY_DOWN : c_int = 264; 104 pub const KEY_UP : c_int = 265; 105 pub const KEY_PAGE_UP : c_int = 266; 106 pub const KEY_PAGE_DOWN : c_int = 267; 107 pub const KEY_HOME : c_int = 268; 108 pub const KEY_END : c_int = 269; 109 pub const KEY_CAPS_LOCK : c_int = 280; 110 pub const KEY_SCROLL_LOCK : c_int = 281; 111 pub const KEY_NUM_LOCK : c_int = 282; 112 pub const KEY_PRINT_SCREEN : c_int = 283; 113 pub const KEY_PAUSE : c_int = 284; 114 pub const KEY_F1 : c_int = 290; 115 pub const KEY_F2 : c_int = 291; 116 pub const KEY_F3 : c_int = 292; 117 pub const KEY_F4 : c_int = 293; 118 pub const KEY_F5 : c_int = 294; 119 pub const KEY_F6 : c_int = 295; 120 pub const KEY_F7 : c_int = 296; 121 pub const KEY_F8 : c_int = 297; 122 pub const KEY_F9 : c_int = 298; 123 pub const KEY_F10 : c_int = 299; 124 pub const KEY_F11 : c_int = 300; 125 pub const KEY_F12 : c_int = 301; 126 pub const KEY_F13 : c_int = 302; 127 pub const KEY_F14 : c_int = 303; 128 pub const KEY_F15 : c_int = 304; 129 pub const KEY_F16 : c_int = 305; 130 pub const KEY_F17 : c_int = 306; 131 pub const KEY_F18 : c_int = 307; 132 pub const KEY_F19 : c_int = 308; 133 pub const KEY_F20 : c_int = 309; 134 pub const KEY_F21 : c_int = 310; 135 pub const KEY_F22 : c_int = 311; 136 pub const KEY_F23 : c_int = 312; 137 pub const KEY_F24 : c_int = 313; 138 pub const KEY_F25 : c_int = 314; 139 pub const KEY_KP_0 : c_int = 320; 140 pub const KEY_KP_1 : c_int = 321; 141 pub const KEY_KP_2 : c_int = 322; 142 pub const KEY_KP_3 : c_int = 323; 143 pub const KEY_KP_4 : c_int = 324; 144 pub const KEY_KP_5 : c_int = 325; 145 pub const KEY_KP_6 : c_int = 326; 146 pub const KEY_KP_7 : c_int = 327; 147 pub const KEY_KP_8 : c_int = 328; 148 pub const KEY_KP_9 : c_int = 329; 149 pub const KEY_KP_DECIMAL : c_int = 330; 150 pub const KEY_KP_DIVIDE : c_int = 331; 151 pub const KEY_KP_MULTIPLY : c_int = 332; 152 pub const KEY_KP_SUBTRACT : c_int = 333; 153 pub const KEY_KP_ADD : c_int = 334; 154 pub const KEY_KP_ENTER : c_int = 335; 155 pub const KEY_KP_EQUAL : c_int = 336; 156 pub const KEY_LEFT_SHIFT : c_int = 340; 157 pub const KEY_LEFT_CONTROL : c_int = 341; 158 pub const KEY_LEFT_ALT : c_int = 342; 159 pub const KEY_LEFT_SUPER : c_int = 343; 160 pub const KEY_RIGHT_SHIFT : c_int = 344; 161 pub const KEY_RIGHT_CONTROL : c_int = 345; 162 pub const KEY_RIGHT_ALT : c_int = 346; 163 pub const KEY_RIGHT_SUPER : c_int = 347; 164 pub const KEY_MENU : c_int = 348; 165 pub const KEY_LAST : c_int = KEY_MENU; 166 167 pub const MOD_SHIFT : c_int = 0x0001; 168 pub const MOD_CONTROL : c_int = 0x0002; 169 pub const MOD_ALT : c_int = 0x0004; 170 pub const MOD_SUPER : c_int = 0x0008; 171 pub const MOD_CAPS_LOCK : c_int = 0x0010; 172 pub const MOD_NUM_LOCK : c_int = 0x0020; 173 174 pub const JOYSTICK_1 : c_int = 0; 175 pub const JOYSTICK_2 : c_int = 1; 176 pub const JOYSTICK_3 : c_int = 2; 177 pub const JOYSTICK_4 : c_int = 3; 178 pub const JOYSTICK_5 : c_int = 4; 179 pub const JOYSTICK_6 : c_int = 5; 180 pub const JOYSTICK_7 : c_int = 6; 181 pub const JOYSTICK_8 : c_int = 7; 182 pub const JOYSTICK_9 : c_int = 8; 183 pub const JOYSTICK_10 : c_int = 9; 184 pub const JOYSTICK_11 : c_int = 10; 185 pub const JOYSTICK_12 : c_int = 11; 186 pub const JOYSTICK_13 : c_int = 12; 187 pub const JOYSTICK_14 : c_int = 13; 188 pub const JOYSTICK_15 : c_int = 14; 189 pub const JOYSTICK_16 : c_int = 15; 190 pub const JOYSTICK_LAST : c_int = JOYSTICK_16; 191 192 pub const MOUSE_BUTTON_1 : c_int = 0; 193 pub const MOUSE_BUTTON_2 : c_int = 1; 194 pub const MOUSE_BUTTON_3 : c_int = 2; 195 pub const MOUSE_BUTTON_4 : c_int = 3; 196 pub const MOUSE_BUTTON_5 : c_int = 4; 197 pub const MOUSE_BUTTON_6 : c_int = 5; 198 pub const MOUSE_BUTTON_7 : c_int = 6; 199 pub const MOUSE_BUTTON_8 : c_int = 7; 200 pub const MOUSE_BUTTON_LEFT : c_int = MOUSE_BUTTON_1; 201 pub const MOUSE_BUTTON_RIGHT : c_int = MOUSE_BUTTON_2; 202 pub const MOUSE_BUTTON_MIDDLE : c_int = MOUSE_BUTTON_3; 203 pub const MOUSE_BUTTON_LAST : c_int = MOUSE_BUTTON_8; 204 205 pub const HAT_CENTERED : c_int = 0x0000; 206 pub const HAT_UP : c_int = 0x0001; 207 pub const HAT_RIGHT : c_int = 0x0002; 208 pub const HAT_DOWN : c_int = 0x0004; 209 pub const HAT_LEFT : c_int = 0x0008; 210 pub const HAT_RIGHT_UP : c_int = HAT_RIGHT | HAT_UP; 211 pub const HAT_RIGHT_DOWN : c_int = HAT_RIGHT | HAT_DOWN; 212 pub const HAT_LEFT_UP : c_int = HAT_LEFT | HAT_UP; 213 pub const HAT_LEFT_DOWN : c_int = HAT_LEFT | HAT_DOWN; 214 215 pub const GAMEPAD_BUTTON_A : c_int = 0; 216 pub const GAMEPAD_BUTTON_B : c_int = 1; 217 pub const GAMEPAD_BUTTON_X : c_int = 2; 218 pub const GAMEPAD_BUTTON_Y : c_int = 3; 219 pub const GAMEPAD_BUTTON_LEFT_BUMPER : c_int = 4; 220 pub const GAMEPAD_BUTTON_RIGHT_BUMPER : c_int = 5; 221 pub const GAMEPAD_BUTTON_BACK : c_int = 6; 222 pub const GAMEPAD_BUTTON_START : c_int = 7; 223 pub const GAMEPAD_BUTTON_GUIDE : c_int = 8; 224 pub const GAMEPAD_BUTTON_LEFT_THUMB : c_int = 9; 225 pub const GAMEPAD_BUTTON_RIGHT_THUMB : c_int = 10; 226 pub const GAMEPAD_BUTTON_DPAD_UP : c_int = 11; 227 pub const GAMEPAD_BUTTON_DPAD_RIGHT : c_int = 12; 228 pub const GAMEPAD_BUTTON_DPAD_DOWN : c_int = 13; 229 pub const GAMEPAD_BUTTON_DPAD_LEFT : c_int = 14; 230 pub const GAMEPAD_BUTTON_LAST : c_int = GAMEPAD_BUTTON_DPAD_LEFT; 231 pub const GAMEPAD_BUTTON_CROSS : c_int = GAMEPAD_BUTTON_A; 232 pub const GAMEPAD_BUTTON_CIRCLE : c_int = GAMEPAD_BUTTON_B; 233 pub const GAMEPAD_BUTTON_SQUARE : c_int = GAMEPAD_BUTTON_X; 234 pub const GAMEPAD_BUTTON_TRIANGLE : c_int = GAMEPAD_BUTTON_Y; 235 236 pub const GAMEPAD_AXIS_LEFT_X : c_int = 0; 237 pub const GAMEPAD_AXIS_LEFT_Y : c_int = 1; 238 pub const GAMEPAD_AXIS_RIGHT_X : c_int = 2; 239 pub const GAMEPAD_AXIS_RIGHT_Y : c_int = 3; 240 pub const GAMEPAD_AXIS_LEFT_TRIGGER : c_int = 4; 241 pub const GAMEPAD_AXIS_RIGHT_TRIGGER : c_int = 5; 242 pub const GAMEPAD_AXIS_LAST : c_int = GAMEPAD_AXIS_RIGHT_TRIGGER; 243 244 pub const NO_ERROR : c_int = 0; 245 pub const NOT_INITIALIZED : c_int = 0x00010001; 246 pub const NO_CURRENT_CONTEXT : c_int = 0x00010002; 247 pub const INVALID_ENUM : c_int = 0x00010003; 248 pub const INVALID_VALUE : c_int = 0x00010004; 249 pub const OUT_OF_MEMORY : c_int = 0x00010005; 250 pub const API_UNAVAILABLE : c_int = 0x00010006; 251 pub const VERSION_UNAVAILABLE : c_int = 0x00010007; 252 pub const PLATFORM_ERROR : c_int = 0x00010008; 253 pub const FORMAT_UNAVAILABLE : c_int = 0x00010009; 254 pub const NO_WINDOW_CONTEXT : c_int = 0x0001000A; 255 256 pub const FOCUSED : c_int = 0x00020001; 257 pub const ICONIFIED : c_int = 0x00020002; 258 pub const RESIZABLE : c_int = 0x00020003; 259 pub const VISIBLE : c_int = 0x00020004; 260 pub const DECORATED : c_int = 0x00020005; 261 pub const AUTO_ICONIFY : c_int = 0x00020006; 262 pub const FLOATING : c_int = 0x00020007; 263 pub const MAXIMIZED : c_int = 0x00020008; 264 pub const CENTER_CURSOR : c_int = 0x00020009; 265 pub const TRANSPARENT_FRAMEBUFFER : c_int = 0x0002000A; 266 pub const HOVERED : c_int = 0x0002000B; 267 pub const FOCUS_ON_SHOW : c_int = 0x0002000C; 268 269 pub const RED_BITS : c_int = 0x00021001; 270 pub const GREEN_BITS : c_int = 0x00021002; 271 pub const BLUE_BITS : c_int = 0x00021003; 272 pub const ALPHA_BITS : c_int = 0x00021004; 273 pub const DEPTH_BITS : c_int = 0x00021005; 274 pub const STENCIL_BITS : c_int = 0x00021006; 275 pub const ACCUM_RED_BITS : c_int = 0x00021007; 276 pub const ACCUM_GREEN_BITS : c_int = 0x00021008; 277 pub const ACCUM_BLUE_BITS : c_int = 0x00021009; 278 pub const ACCUM_ALPHA_BITS : c_int = 0x0002100A; 279 pub const AUX_BUFFERS : c_int = 0x0002100B; 280 pub const STEREO : c_int = 0x0002100C; 281 pub const SAMPLES : c_int = 0x0002100D; 282 pub const SRGB_CAPABLE : c_int = 0x0002100E; 283 pub const REFRESH_RATE : c_int = 0x0002100F; 284 pub const DOUBLEBUFFER : c_int = 0x00021010; 285 286 pub const CLIENT_API : c_int = 0x00022001; 287 pub const CONTEXT_VERSION_MAJOR : c_int = 0x00022002; 288 pub const CONTEXT_VERSION_MINOR : c_int = 0x00022003; 289 pub const CONTEXT_REVISION : c_int = 0x00022004; 290 pub const CONTEXT_ROBUSTNESS : c_int = 0x00022005; 291 pub const OPENGL_FORWARD_COMPAT : c_int = 0x00022006; 292 pub const OPENGL_DEBUG_CONTEXT : c_int = 0x00022007; 293 pub const OPENGL_PROFILE : c_int = 0x00022008; 294 pub const CONTEXT_RELEASE_BEHAVIOR : c_int = 0x00022009; 295 pub const CONTEXT_NO_ERROR : c_int = 0x0002200A; 296 pub const CONTEXT_CREATION_API : c_int = 0x0002200B; 297 pub const SCALE_TO_MONITOR : c_int = 0x0002200C; 298 299 pub const COCOA_RETINA_FRAMEBUFFER : c_int = 0x00023001; 300 pub const COCOA_FRAME_NAME : c_int = 0x00023002; 301 pub const COCOA_GRAPHICS_SWITCHING : c_int = 0x00023003; 302 303 pub const X11_CLASS_NAME : c_int = 0x00024001; 304 pub const X11_INSTANCE_NAME : c_int = 0x00024002; 305 306 pub const NO_API : c_int = 0x00000000; 307 pub const OPENGL_API : c_int = 0x00030001; 308 pub const OPENGL_ES_API : c_int = 0x00030002; 309 310 pub const NO_ROBUSTNESS : c_int = 0x00000000; 311 pub const NO_RESET_NOTIFICATION : c_int = 0x00031001; 312 pub const LOSE_CONTEXT_ON_RESET : c_int = 0x00031002; 313 314 pub const OPENGL_ANY_PROFILE : c_int = 0x00000000; 315 pub const OPENGL_CORE_PROFILE : c_int = 0x00032001; 316 pub const OPENGL_COMPAT_PROFILE : c_int = 0x00032002; 317 318 pub const CURSOR : c_int = 0x00033001; 319 pub const STICKY_KEYS : c_int = 0x00033002; 320 pub const STICKY_MOUSE_BUTTONS : c_int = 0x00033003; 321 pub const LOCK_KEY_MODS : c_int = 0x00033004; 322 pub const RAW_MOUSE_MOTION : c_int = 0x00033005; 323 324 pub const CURSOR_NORMAL : c_int = 0x00034001; 325 pub const CURSOR_HIDDEN : c_int = 0x00034002; 326 pub const CURSOR_DISABLED : c_int = 0x00034003; 327 328 pub const ANY_RELEASE_BEHAVIOR : c_int = 0; 329 pub const RELEASE_BEHAVIOR_FLUSH : c_int = 0x00035001; 330 pub const RELEASE_BEHAVIOR_NONE : c_int = 0x00035002; 331 332 pub const NATIVE_CONTEXT_API : c_int = 0x00036001; 333 pub const EGL_CONTEXT_API : c_int = 0x00036002; 334 pub const OSMESA_CONTEXT_API : c_int = 0x00036003; 335 336 pub const ARROW_CURSOR : c_int = 0x00036001; 337 pub const IBEAM_CURSOR : c_int = 0x00036002; 338 pub const CROSSHAIR_CURSOR : c_int = 0x00036003; 339 pub const HAND_CURSOR : c_int = 0x00036004; 340 pub const HRESIZE_CURSOR : c_int = 0x00036005; 341 pub const VRESIZE_CURSOR : c_int = 0x00036006; 342 343 pub const CONNECTED : c_int = 0x00040001; 344 pub const DISCONNECTED : c_int = 0x00040002; 345 346 pub const DONT_CARE : c_int = -1; //negative one is the correct value 347 348 pub const JOYSTICK_HAT_BUTTONS : c_int = 0x00050001; 349 pub const COCOA_CHDIR_RESOURCES : c_int = 0x00051001; 350 pub const COCOA_MENUBAR : c_int = 0x00051002; 351 352 pub type GLFWglproc = *const c_void; 353 354 #[cfg(feature = "vulkan")] 355 pub type GLFWvkproc = *const c_void; 356 357 pub type GLFWerrorfun = extern "C" fn(c_int, *const c_char); 358 pub type GLFWwindowposfun = extern "C" fn(*mut GLFWwindow, c_int, c_int); 359 pub type GLFWwindowsizefun = extern "C" fn(*mut GLFWwindow, c_int, c_int); 360 pub type GLFWwindowclosefun = extern "C" fn(*mut GLFWwindow); 361 pub type GLFWwindowrefreshfun = extern "C" fn(*mut GLFWwindow); 362 pub type GLFWwindowfocusfun = extern "C" fn(*mut GLFWwindow, c_int); 363 pub type GLFWwindowiconifyfun = extern "C" fn(*mut GLFWwindow, c_int); 364 pub type GLFWframebuffersizefun = extern "C" fn(*mut GLFWwindow, c_int, c_int); 365 pub type GLFWmousebuttonfun = extern "C" fn(*mut GLFWwindow, c_int, c_int, c_int); 366 pub type GLFWcursorposfun = extern "C" fn(*mut GLFWwindow, c_double, c_double); 367 pub type GLFWcursorenterfun = extern "C" fn(*mut GLFWwindow, c_int); 368 pub type GLFWscrollfun = extern "C" fn(*mut GLFWwindow, c_double, c_double); 369 pub type GLFWkeyfun = extern "C" fn(*mut GLFWwindow, c_int, c_int, c_int, c_int); 370 pub type GLFWcharfun = extern "C" fn(*mut GLFWwindow, c_uint); 371 pub type GLFWcharmodsfun = extern "C" fn(*mut GLFWwindow, c_uint, c_int); // TODO: Not yet exposed 372 pub type GLFWdropfun = extern "C" fn(*mut GLFWwindow, c_int, *mut *const c_char); // TODO: Not yet exposed 373 pub type GLFWmonitorfun = extern "C" fn(*mut GLFWmonitor, c_int); 374 pub type GLFWjoystickfun = extern "C" fn(c_int, c_int); 375 pub type GLFWwindowmaximizefun = extern "C" fn(*mut GLFWwindow, c_int); 376 pub type GLFWwindowcontentscalefun = extern "C" fn(*mut GLFWwindow, c_float, c_float); 377 378 #[allow(missing_copy_implementations)] 379 pub enum GLFWmonitor {} 380 381 #[allow(missing_copy_implementations)] 382 pub enum GLFWwindow {} 383 384 #[allow(missing_copy_implementations)] 385 pub enum GLFWcursor {} 386 387 #[derive(Copy, Clone)] 388 #[repr(C)] 389 pub struct GLFWgammaramp { 390 pub red: *mut c_ushort, 391 pub green: *mut c_ushort, 392 pub blue: *mut c_ushort, 393 pub size: c_uint, 394 } 395 396 #[allow(missing_copy_implementations)] 397 #[repr(C)] 398 pub struct GLFWvidmode { 399 pub width: c_int, 400 pub height: c_int, 401 pub redBits: c_int, 402 pub greenBits: c_int, 403 pub blueBits: c_int, 404 pub refreshRate: c_int, 405 } 406 407 /// Pixels are 4-bytes each, RGBA 408 #[allow(missing_copy_implementations)] 409 #[repr(C)] 410 pub struct GLFWimage { 411 pub width: c_int, 412 pub height: c_int, 413 pub pixels: *const c_uchar, 414 } 415 416 #[allow(missing_copy_implementations)] 417 #[repr(C)] 418 pub struct GLFWgamepadstate { 419 pub buttons: [c_uchar; (GAMEPAD_BUTTON_LAST + 1) as usize], 420 pub axes: [c_float; (GAMEPAD_AXIS_LAST + 1) as usize], 421 } 422 423 // C function bindings 424 425 extern "C" { glfwInit() -> c_int426 pub fn glfwInit() -> c_int; glfwTerminate()427 pub fn glfwTerminate(); glfwGetVersion(major: *mut c_int, minor: *mut c_int, rev: *mut c_int)428 pub fn glfwGetVersion(major: *mut c_int, minor: *mut c_int, rev: *mut c_int); glfwGetVersionString() -> *const c_char429 pub fn glfwGetVersionString() -> *const c_char; 430 glfwSetErrorCallback(cbfun: Option<GLFWerrorfun>) -> Option<GLFWerrorfun>431 pub fn glfwSetErrorCallback(cbfun: Option<GLFWerrorfun>) -> Option<GLFWerrorfun>; 432 glfwGetMonitors(count: *mut c_int) -> *mut *mut GLFWmonitor433 pub fn glfwGetMonitors(count: *mut c_int) -> *mut *mut GLFWmonitor; glfwGetPrimaryMonitor() -> *mut GLFWmonitor434 pub fn glfwGetPrimaryMonitor() -> *mut GLFWmonitor; glfwGetMonitorPos(monitor: *mut GLFWmonitor, xpos: *mut c_int, ypos: *mut c_int)435 pub fn glfwGetMonitorPos(monitor: *mut GLFWmonitor, xpos: *mut c_int, ypos: *mut c_int); glfwGetMonitorPhysicalSize(monitor: *mut GLFWmonitor, width: *mut c_int, height: *mut c_int)436 pub fn glfwGetMonitorPhysicalSize(monitor: *mut GLFWmonitor, width: *mut c_int, height: *mut c_int); glfwGetMonitorName(monitor: *mut GLFWmonitor) -> *const c_char437 pub fn glfwGetMonitorName(monitor: *mut GLFWmonitor) -> *const c_char; glfwSetMonitorCallback(cbfun: Option<GLFWmonitorfun>) -> Option<GLFWmonitorfun>438 pub fn glfwSetMonitorCallback(cbfun: Option<GLFWmonitorfun>) -> Option<GLFWmonitorfun>; glfwGetVideoModes(monitor: *mut GLFWmonitor, count: *mut c_int) -> *const GLFWvidmode439 pub fn glfwGetVideoModes(monitor: *mut GLFWmonitor, count: *mut c_int) -> *const GLFWvidmode; glfwGetVideoMode(monitor: *mut GLFWmonitor) -> *const GLFWvidmode440 pub fn glfwGetVideoMode(monitor: *mut GLFWmonitor) -> *const GLFWvidmode; glfwSetGamma(monitor: *mut GLFWmonitor, gamma: c_float)441 pub fn glfwSetGamma(monitor: *mut GLFWmonitor, gamma: c_float); glfwGetGammaRamp(monitor: *mut GLFWmonitor) -> *const GLFWgammaramp442 pub fn glfwGetGammaRamp(monitor: *mut GLFWmonitor) -> *const GLFWgammaramp; glfwSetGammaRamp(monitor: *mut GLFWmonitor, ramp: *const GLFWgammaramp)443 pub fn glfwSetGammaRamp(monitor: *mut GLFWmonitor, ramp: *const GLFWgammaramp); 444 glfwDefaultWindowHints()445 pub fn glfwDefaultWindowHints(); glfwWindowHint(target: c_int, hint: c_int)446 pub fn glfwWindowHint(target: c_int, hint: c_int); glfwCreateWindow(width: c_int, height: c_int, title: *const c_char, monitor: *mut GLFWmonitor, share: *mut GLFWwindow) -> *mut GLFWwindow447 pub fn glfwCreateWindow(width: c_int, height: c_int, title: *const c_char, monitor: *mut GLFWmonitor, share: *mut GLFWwindow) -> *mut GLFWwindow; glfwDestroyWindow(window: *mut GLFWwindow)448 pub fn glfwDestroyWindow(window: *mut GLFWwindow); glfwWindowShouldClose(window: *mut GLFWwindow) -> c_int449 pub fn glfwWindowShouldClose(window: *mut GLFWwindow) -> c_int; glfwSetWindowShouldClose(window: *mut GLFWwindow, value: c_int)450 pub fn glfwSetWindowShouldClose(window: *mut GLFWwindow, value: c_int); glfwSetWindowTitle(window: *mut GLFWwindow, title: *const c_char)451 pub fn glfwSetWindowTitle(window: *mut GLFWwindow, title: *const c_char); glfwGetWindowPos(window: *mut GLFWwindow, xpos: *mut c_int, ypos: *mut c_int)452 pub fn glfwGetWindowPos(window: *mut GLFWwindow, xpos: *mut c_int, ypos: *mut c_int); glfwSetWindowPos(window: *mut GLFWwindow, xpos: c_int, ypos: c_int)453 pub fn glfwSetWindowPos(window: *mut GLFWwindow, xpos: c_int, ypos: c_int); glfwGetWindowSize(window: *mut GLFWwindow, width: *mut c_int, height: *mut c_int)454 pub fn glfwGetWindowSize(window: *mut GLFWwindow, width: *mut c_int, height: *mut c_int); glfwSetWindowSize(window: *mut GLFWwindow, width: c_int, height: c_int)455 pub fn glfwSetWindowSize(window: *mut GLFWwindow, width: c_int, height: c_int); glfwGetFramebufferSize(window: *mut GLFWwindow, width: *mut c_int, height: *mut c_int)456 pub fn glfwGetFramebufferSize(window: *mut GLFWwindow, width: *mut c_int, height: *mut c_int); glfwIconifyWindow(window: *mut GLFWwindow)457 pub fn glfwIconifyWindow(window: *mut GLFWwindow); glfwRestoreWindow(window: *mut GLFWwindow)458 pub fn glfwRestoreWindow(window: *mut GLFWwindow); glfwShowWindow(window: *mut GLFWwindow)459 pub fn glfwShowWindow(window: *mut GLFWwindow); glfwHideWindow(window: *mut GLFWwindow)460 pub fn glfwHideWindow(window: *mut GLFWwindow); glfwGetWindowMonitor(window: *mut GLFWwindow) -> *mut GLFWmonitor461 pub fn glfwGetWindowMonitor(window: *mut GLFWwindow) -> *mut GLFWmonitor; glfwGetWindowAttrib(window: *mut GLFWwindow, attrib: c_int) -> c_int462 pub fn glfwGetWindowAttrib(window: *mut GLFWwindow, attrib: c_int) -> c_int; glfwGetWindowFrameSize(window: *mut GLFWwindow, left: *mut c_int, top: *mut c_int, right: *mut c_int, bottom: *mut c_int)463 pub fn glfwGetWindowFrameSize(window: *mut GLFWwindow, left: *mut c_int, top: *mut c_int, right: *mut c_int, bottom: *mut c_int); glfwSetWindowUserPointer(window: *mut GLFWwindow, pointer: *mut c_void)464 pub fn glfwSetWindowUserPointer(window: *mut GLFWwindow, pointer: *mut c_void); glfwGetWindowUserPointer(window: *mut GLFWwindow) -> *mut c_void465 pub fn glfwGetWindowUserPointer(window: *mut GLFWwindow) -> *mut c_void; glfwSetWindowPosCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowposfun>) -> Option<GLFWwindowposfun>466 pub fn glfwSetWindowPosCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowposfun>) -> Option<GLFWwindowposfun>; glfwSetWindowSizeCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowsizefun>) -> Option<GLFWwindowsizefun>467 pub fn glfwSetWindowSizeCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowsizefun>) -> Option<GLFWwindowsizefun>; glfwSetWindowCloseCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowclosefun>) -> Option<GLFWwindowclosefun>468 pub fn glfwSetWindowCloseCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowclosefun>) -> Option<GLFWwindowclosefun>; glfwSetWindowRefreshCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowrefreshfun>) -> Option<GLFWwindowrefreshfun>469 pub fn glfwSetWindowRefreshCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowrefreshfun>) -> Option<GLFWwindowrefreshfun>; glfwSetWindowFocusCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowfocusfun>) -> Option<GLFWwindowfocusfun>470 pub fn glfwSetWindowFocusCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowfocusfun>) -> Option<GLFWwindowfocusfun>; glfwSetWindowIconifyCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowiconifyfun>) -> Option<GLFWwindowiconifyfun>471 pub fn glfwSetWindowIconifyCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowiconifyfun>) -> Option<GLFWwindowiconifyfun>; glfwSetFramebufferSizeCallback(window: *mut GLFWwindow, cbfun: Option<GLFWframebuffersizefun>) -> Option<GLFWframebuffersizefun>472 pub fn glfwSetFramebufferSizeCallback(window: *mut GLFWwindow, cbfun: Option<GLFWframebuffersizefun>) -> Option<GLFWframebuffersizefun>; 473 glfwPollEvents()474 pub fn glfwPollEvents(); glfwWaitEvents()475 pub fn glfwWaitEvents(); glfwWaitEventsTimeout(timeout: c_double)476 pub fn glfwWaitEventsTimeout(timeout: c_double); glfwPostEmptyEvent()477 pub fn glfwPostEmptyEvent(); 478 glfwGetInputMode(window: *mut GLFWwindow, mode: c_int) -> c_int479 pub fn glfwGetInputMode(window: *mut GLFWwindow, mode: c_int) -> c_int; glfwSetInputMode(window: *mut GLFWwindow, mode: c_int, value: c_int)480 pub fn glfwSetInputMode(window: *mut GLFWwindow, mode: c_int, value: c_int); glfwGetKey(window: *mut GLFWwindow, key: c_int) -> c_int481 pub fn glfwGetKey(window: *mut GLFWwindow, key: c_int) -> c_int; glfwGetMouseButton(window: *mut GLFWwindow, button: c_int) -> c_int482 pub fn glfwGetMouseButton(window: *mut GLFWwindow, button: c_int) -> c_int; glfwGetCursorPos(window: *mut GLFWwindow, xpos: *mut c_double, ypos: *mut c_double)483 pub fn glfwGetCursorPos(window: *mut GLFWwindow, xpos: *mut c_double, ypos: *mut c_double); glfwSetCursorPos(window: *mut GLFWwindow, xpos: c_double, ypos: c_double)484 pub fn glfwSetCursorPos(window: *mut GLFWwindow, xpos: c_double, ypos: c_double); glfwCreateCursor(image: *const GLFWimage, xhot: c_int, yhot: c_int) -> *mut GLFWcursor485 pub fn glfwCreateCursor(image: *const GLFWimage, xhot: c_int, yhot: c_int) -> *mut GLFWcursor; glfwCreateStandardCursor(shape: c_int) -> *mut GLFWcursor486 pub fn glfwCreateStandardCursor(shape: c_int) -> *mut GLFWcursor; glfwDestroyCursor(cursor: *mut GLFWcursor)487 pub fn glfwDestroyCursor(cursor: *mut GLFWcursor); glfwSetCursor(window: *mut GLFWwindow, cursor: *mut GLFWcursor)488 pub fn glfwSetCursor(window: *mut GLFWwindow, cursor: *mut GLFWcursor); glfwSetKeyCallback(window: *mut GLFWwindow, cbfun: Option<GLFWkeyfun>) -> Option<GLFWkeyfun>489 pub fn glfwSetKeyCallback(window: *mut GLFWwindow, cbfun: Option<GLFWkeyfun>) -> Option<GLFWkeyfun>; glfwSetCharCallback(window: *mut GLFWwindow, cbfun: Option<GLFWcharfun>) -> Option<GLFWcharfun>490 pub fn glfwSetCharCallback(window: *mut GLFWwindow, cbfun: Option<GLFWcharfun>) -> Option<GLFWcharfun>; glfwSetCharModsCallback(window: *mut GLFWwindow, cbfun: Option<GLFWcharmodsfun>) -> Option<GLFWcharmodsfun>491 pub fn glfwSetCharModsCallback(window: *mut GLFWwindow, cbfun: Option<GLFWcharmodsfun>) -> Option<GLFWcharmodsfun>; // TODO: Not yet exposed glfwSetMouseButtonCallback(window: *mut GLFWwindow, cbfun: Option<GLFWmousebuttonfun>) -> Option<GLFWmousebuttonfun>492 pub fn glfwSetMouseButtonCallback(window: *mut GLFWwindow, cbfun: Option<GLFWmousebuttonfun>) -> Option<GLFWmousebuttonfun>; glfwSetCursorPosCallback(window: *mut GLFWwindow, cbfun: Option<GLFWcursorposfun>) -> Option<GLFWcursorposfun>493 pub fn glfwSetCursorPosCallback(window: *mut GLFWwindow, cbfun: Option<GLFWcursorposfun>) -> Option<GLFWcursorposfun>; glfwSetCursorEnterCallback(window: *mut GLFWwindow, cbfun: Option<GLFWcursorenterfun>) -> Option<GLFWcursorenterfun>494 pub fn glfwSetCursorEnterCallback(window: *mut GLFWwindow, cbfun: Option<GLFWcursorenterfun>) -> Option<GLFWcursorenterfun>; glfwSetScrollCallback(window: *mut GLFWwindow, cbfun: Option<GLFWscrollfun>) -> Option<GLFWscrollfun>495 pub fn glfwSetScrollCallback(window: *mut GLFWwindow, cbfun: Option<GLFWscrollfun>) -> Option<GLFWscrollfun>; glfwSetDropCallback(window: *mut GLFWwindow, cbfun: Option<GLFWdropfun>) -> Option<GLFWdropfun>496 pub fn glfwSetDropCallback(window: *mut GLFWwindow, cbfun: Option<GLFWdropfun>) -> Option<GLFWdropfun>; // TODO: Not yet exposed 497 glfwJoystickPresent(joy: c_int) -> c_int498 pub fn glfwJoystickPresent(joy: c_int) -> c_int; glfwGetJoystickAxes(joy: c_int, count: *mut c_int) -> *const c_float499 pub fn glfwGetJoystickAxes(joy: c_int, count: *mut c_int) -> *const c_float; glfwGetJoystickButtons(joy: c_int, count: *mut c_int) -> *const c_uchar500 pub fn glfwGetJoystickButtons(joy: c_int, count: *mut c_int) -> *const c_uchar; glfwGetJoystickName(joy: c_int) -> *const c_char501 pub fn glfwGetJoystickName(joy: c_int) -> *const c_char; 502 glfwSetClipboardString(window: *mut GLFWwindow, string: *const c_char)503 pub fn glfwSetClipboardString(window: *mut GLFWwindow, string: *const c_char); glfwGetClipboardString(window: *mut GLFWwindow) -> *const c_char504 pub fn glfwGetClipboardString(window: *mut GLFWwindow) -> *const c_char; 505 glfwGetTime() -> c_double506 pub fn glfwGetTime() -> c_double; glfwSetTime(time: c_double)507 pub fn glfwSetTime(time: c_double); 508 glfwMakeContextCurrent(window: *mut GLFWwindow)509 pub fn glfwMakeContextCurrent(window: *mut GLFWwindow); glfwGetCurrentContext() -> *mut GLFWwindow510 pub fn glfwGetCurrentContext() -> *mut GLFWwindow; glfwSwapBuffers(window: *mut GLFWwindow)511 pub fn glfwSwapBuffers(window: *mut GLFWwindow); glfwSwapInterval(interval: c_int)512 pub fn glfwSwapInterval(interval: c_int); glfwExtensionSupported(extension: *const c_char) -> c_int513 pub fn glfwExtensionSupported(extension: *const c_char) -> c_int; glfwGetProcAddress(procname: *const c_char) -> GLFWglproc514 pub fn glfwGetProcAddress(procname: *const c_char) -> GLFWglproc; 515 516 // Added in 3.2 517 glfwSetWindowAspectRatio(window: *mut GLFWwindow, numer: c_int, denum: c_int)518 pub fn glfwSetWindowAspectRatio(window: *mut GLFWwindow, numer: c_int, denum: c_int); glfwSetWindowSizeLimits(window: *mut GLFWwindow, minwidth: c_int, minheight: c_int, maxwidth: c_int, maxheight: c_int)519 pub fn glfwSetWindowSizeLimits(window: *mut GLFWwindow, minwidth: c_int, minheight: c_int, maxwidth: c_int, maxheight: c_int); glfwFocusWindow(window: *mut GLFWwindow)520 pub fn glfwFocusWindow(window: *mut GLFWwindow); glfwMaximizeWindow(window: *mut GLFWwindow)521 pub fn glfwMaximizeWindow(window: *mut GLFWwindow); glfwSetWindowMonitor(window: *mut GLFWwindow, monitor: *mut GLFWmonitor, xpos: c_int, ypos: c_int, width: c_int, height: c_int, refresh_rate: c_int)522 pub fn glfwSetWindowMonitor(window: *mut GLFWwindow, monitor: *mut GLFWmonitor, xpos: c_int, ypos: c_int, width: c_int, height: c_int, refresh_rate: c_int); glfwSetWindowIcon(window: *mut GLFWwindow, count: c_int, images: *const GLFWimage)523 pub fn glfwSetWindowIcon(window: *mut GLFWwindow, count: c_int, images: *const GLFWimage); glfwGetKeyName(key: c_int, scancode: c_int) -> *const c_char524 pub fn glfwGetKeyName(key: c_int, scancode: c_int) -> *const c_char; glfwGetTimerValue() -> c_ulonglong525 pub fn glfwGetTimerValue() -> c_ulonglong; //uint64_t glfwGetTimerFrequency() -> c_ulonglong526 pub fn glfwGetTimerFrequency() -> c_ulonglong; //uint64_t glfwSetJoystickCallback(cbjoy: Option<GLFWjoystickfun>) -> Option<GLFWjoystickfun>527 pub fn glfwSetJoystickCallback(cbjoy: Option<GLFWjoystickfun>) -> Option<GLFWjoystickfun>; 528 529 // Added in 3.3 530 glfwInitHint(hint: c_int, value: c_int)531 pub fn glfwInitHint(hint: c_int, value: c_int); glfwGetError(description: *mut *const c_char) -> c_int532 pub fn glfwGetError(description: *mut *const c_char) -> c_int; // TODO glfwGetMonitorWorkarea(monitor: *mut GLFWmonitor, xpos: *mut c_int, ypos: *mut c_int, width: *mut c_int, height: *mut c_int)533 pub fn glfwGetMonitorWorkarea(monitor: *mut GLFWmonitor, xpos: *mut c_int, ypos: *mut c_int, width: *mut c_int, height: *mut c_int); glfwGetMonitorContentScale(monitor: *mut GLFWmonitor, xscale: *mut c_float, yscale: *mut c_float)534 pub fn glfwGetMonitorContentScale(monitor: *mut GLFWmonitor, xscale: *mut c_float, yscale: *mut c_float); glfwGetMonitorUserPointer(monitor: *mut GLFWmonitor) -> *mut c_void535 pub fn glfwGetMonitorUserPointer(monitor: *mut GLFWmonitor) -> *mut c_void; // TODO glfwSetMonitorUserPointer(monitor: *mut GLFWmonitor, pointer: *mut c_void)536 pub fn glfwSetMonitorUserPointer(monitor: *mut GLFWmonitor, pointer: *mut c_void); // TODO glfwWindowHintString(hint: c_int, value: *const c_char)537 pub fn glfwWindowHintString(hint: c_int, value: *const c_char); glfwGetWindowContentScale(window: *mut GLFWwindow, xscale: *mut c_float, yscale: *mut c_float)538 pub fn glfwGetWindowContentScale(window: *mut GLFWwindow, xscale: *mut c_float, yscale: *mut c_float); glfwGetWindowOpacity(window: *mut GLFWwindow) -> c_float539 pub fn glfwGetWindowOpacity(window: *mut GLFWwindow) -> c_float; glfwSetWindowOpacity(window: *mut GLFWwindow, opacity: c_float)540 pub fn glfwSetWindowOpacity(window: *mut GLFWwindow, opacity: c_float); glfwRequestWindowAttention(window: *mut GLFWwindow)541 pub fn glfwRequestWindowAttention(window: *mut GLFWwindow); glfwSetWindowAttrib(window: *mut GLFWwindow, attrib: c_int, value: c_int)542 pub fn glfwSetWindowAttrib(window: *mut GLFWwindow, attrib: c_int, value: c_int); glfwSetWindowMaximizeCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowmaximizefun>) -> Option<GLFWwindowmaximizefun>543 pub fn glfwSetWindowMaximizeCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowmaximizefun>) -> Option<GLFWwindowmaximizefun>; glfwSetWindowContentScaleCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowcontentscalefun>) -> Option<GLFWwindowcontentscalefun>544 pub fn glfwSetWindowContentScaleCallback(window: *mut GLFWwindow, cbfun: Option<GLFWwindowcontentscalefun>) -> Option<GLFWwindowcontentscalefun>; glfwRawMouseMotionSupported() -> c_int545 pub fn glfwRawMouseMotionSupported() -> c_int; glfwGetKeyScancode(key: c_int) -> c_int546 pub fn glfwGetKeyScancode(key: c_int) -> c_int; glfwGetJoystickHats(jid: c_int, count: *mut c_int) -> *const c_uchar547 pub fn glfwGetJoystickHats(jid: c_int, count: *mut c_int) -> *const c_uchar; glfwGetJoystickGUID(jid: c_int) -> *const c_char548 pub fn glfwGetJoystickGUID(jid: c_int) -> *const c_char; glfwGetJoystickUserPointer(jid: c_int) -> *mut c_void549 pub fn glfwGetJoystickUserPointer(jid: c_int) -> *mut c_void; // TODO glfwSetJoystickUserPointer(jid: c_int, pointer: *mut c_void)550 pub fn glfwSetJoystickUserPointer(jid: c_int, pointer: *mut c_void); // TODO glfwJoystickIsGamepad(jid: c_int) -> c_int551 pub fn glfwJoystickIsGamepad(jid: c_int) -> c_int; glfwUpdateGamepadMappings(string: *const c_char) -> c_int552 pub fn glfwUpdateGamepadMappings(string: *const c_char) -> c_int; glfwGetGamepadName(jid: c_int) -> *const c_char553 pub fn glfwGetGamepadName(jid: c_int) -> *const c_char; glfwGetGamepadState(jid: c_int, state: *mut GLFWgamepadstate) -> c_int554 pub fn glfwGetGamepadState(jid: c_int, state: *mut GLFWgamepadstate) -> c_int; 555 556 // Vulkan support 557 558 #[cfg(feature = "vulkan")] glfwVulkanSupported() -> c_int559 pub fn glfwVulkanSupported() -> c_int; 560 #[cfg(feature = "vulkan")] glfwGetRequiredInstanceExtensions(count: *mut c_uint) -> *const *const c_char561 pub fn glfwGetRequiredInstanceExtensions(count: *mut c_uint) -> *const *const c_char; 562 #[cfg(feature = "vulkan")] glfwGetInstanceProcAddress(instance: VkInstance, procname: *const c_char) -> GLFWvkproc563 pub fn glfwGetInstanceProcAddress(instance: VkInstance, procname: *const c_char) -> GLFWvkproc; 564 #[cfg(feature = "vulkan")] glfwGetPhysicalDevicePresentationSupport(instance: VkInstance, device: VkPhysicalDevice, queuefamily: c_uint) -> c_int565 pub fn glfwGetPhysicalDevicePresentationSupport(instance: VkInstance, device: VkPhysicalDevice, queuefamily: c_uint) -> c_int; 566 #[cfg(feature = "vulkan")] glfwCreateWindowSurface(instance: VkInstance, window: *mut GLFWwindow, allocator: *const VkAllocationCallbacks, surface: *mut VkSurfaceKHR) -> VkResult567 pub fn glfwCreateWindowSurface(instance: VkInstance, window: *mut GLFWwindow, allocator: *const VkAllocationCallbacks, surface: *mut VkSurfaceKHR) -> VkResult; 568 569 // native APIs 570 glfwGetWin32Window(window: *mut GLFWwindow) -> *mut c_void571 #[cfg(target_os="windows")] pub fn glfwGetWin32Window(window: *mut GLFWwindow) -> *mut c_void; glfwGetWGLContext(window: *mut GLFWwindow) -> *mut c_void572 #[cfg(target_os="windows")] pub fn glfwGetWGLContext(window: *mut GLFWwindow) -> *mut c_void; 573 glfwGetCocoaWindow(window: *mut GLFWwindow) -> *mut c_void574 #[cfg(target_os="macos")] pub fn glfwGetCocoaWindow(window: *mut GLFWwindow) -> *mut c_void; glfwGetNSGLContext(window: *mut GLFWwindow) -> *mut c_void575 #[cfg(target_os="macos")] pub fn glfwGetNSGLContext(window: *mut GLFWwindow) -> *mut c_void; 576 glfwGetX11Window(window: *mut GLFWwindow) -> *mut c_void577 #[cfg(target_os="dragonfly")] pub fn glfwGetX11Window(window: *mut GLFWwindow) -> *mut c_void; glfwGetX11Display() -> *mut c_void578 #[cfg(target_os="dragonfly")] pub fn glfwGetX11Display() -> *mut c_void; glfwGetGLXContext(window: *mut GLFWwindow) -> *mut c_void579 #[cfg(target_os="dragonfly")] pub fn glfwGetGLXContext(window: *mut GLFWwindow) -> *mut c_void; 580 } 581