Crate glfw_sys

Crate glfw_sys 

Source
Expand description

§Glfw + Rust

This repo contains glfw-sys crate that provides FFI bindings to glfw. You are not really supposed to use this crate directly, but rather use glfw crate instead.

§Design

This library has two main purposes:

  1. provide FFI bindings to glfw: pre-generated (fast compile times) and build-time generation (slower).
  2. link to glfw library: system builds (using pkg-config), source builds (using cmake) and pre-built official glfw libs (only for windows and mac).

For normal applications, you only need to care about 2 features:

  1. src-build - if you want to build from source. adds around 10 seconds of build time. It will also build from source if pkg-config fails (regardless of this feature).
  2. static-link - if you want to link statically. On linux, this requires src-build too, so prefer dynamic linking during development for faster compile times.

§Features

§Building And Linking

NOTE: For emscripten, none of these features apply. We just pass the necessary flags like -sUSE_GLFW=3 to linker and simply let emscripten take care of things.

  • static-link - statically link glfw. If disabled, we will dynamically link glfw.

We try to build glfw in this order:

  • src-build - If enabled, build glfw from source (sources are included with crate). Ensure cmake is installed and any other required dependencies.
  • prebuilt-libs (only for windows/macos. ignored on other platforms) - If enabled, we download and link pre-built glfw libs from https://github.com/glfw/glfw/releases/.

NOTE: We use curl + tar (unzip on macos) to download and extract pre-built libs. mac/win10+ will have these by default.

Finally, if neither src-build nor prebuilt-libs feature is enabled, we will try to use pkg-config to find and link to system glfw libs.

§Platform Backends (non-mac and non-windows only)
  • x11 and wayland - enables support for x11/wayland. Enable both and you can choose which one to use during initialization. x11/wayland are ignored on windows/macos platforms.
§Vulkan
  • vulkan enables some vulkan convenience functions (eg: glfwVulkanSupported).
  • Only enable this if you need vulkan support.
§Native Handles

These features expose native “HWND”/“NSWindow”/“X11Connection” etc.. handles. Unless you are using wgpu-like libs that need raw-window-handles, these features can be ignored.

  • native-handles - enable APIs to get platform specific window handles or display connections or monitor ids. useful for raw-window-handle support.
  • native-gl - enable APIs for getting platform specific gl contexts (wgl, egl, glx, nsgl etc..). Most users should ignore this.
  • native-egl - enable egl API even for x11 builds, if you plan to use egl contexts with x11 windows. Most users should ignore this.
§Miscellaneous
  • osmesa - I have no idea. Ignore this unless you know what you are doing.
  • bindgen - generate glfw FFI bindings at build time from headers. See Below

§Pre-Generated bindings

We generate FFI bindings at src/sys/pregenerated.rs and include them with the crate to keep the compile times fast. These are used when bindgen feature is disabled.

This contains core bindings, but skips platform specific bindings (eg: window handles or other platform specific API). Because generating them requires platform headers (eg: windows.h) and we can’t provide headers for all platforms at once.

So, platform specific bindings are manually maintained by hand in src/sys/manual.rs.

§Bindgen

When bindgen feature is turned on, we generate bindings with bindgen during build time. This is a fallback, when pre-generated bindings have any mistakes in them (eg: wrong types or missing functions). But this may add significant compile-time overhead.

These features will influence the bindings generated.

  • native-handles, native-egl, native-gl - This generates bindings by including system headers for specific types (eg: HWND from windows.h) and may bloat compile times a lot (25+ seconds on windows) due to inclusion of huge platform-specific headers.
  • vulkan - includes vulkan header for vk related types (eg: vkInstance).

§Release Check List

  • When updating glfw version, make sure to checkout the submodule and commit it.
  • When updating glfw version, don’t forget to change the url link in build.rs to download the pre-built libs of the correct version.
  • When updating glfw version, don’t forget to update the pkg-config atleast_version argument.
  • Check that the bindings generated are the same on all platforms by checking the CI logs for the gen_bindings.sh step.

Structs§

GLFWallocator
@brief Custom heap memory allocator.
GLFWcursor
GLFWgamepadstate
@brief Gamepad input state
GLFWgammaramp
@brief Gamma ramp.
GLFWimage
@brief Image data.
GLFWmonitor
GLFWvidmode
@brief Video mode type.
GLFWwindow
VkAllocationCallbacks
VkInstance_T
VkPhysicalDevice_T
VkSurfaceKHR_T

Constants§

GLFW_ACCUM_ALPHA_BITS
GLFW_ACCUM_BLUE_BITS
GLFW_ACCUM_GREEN_BITS
GLFW_ACCUM_RED_BITS
GLFW_ALPHA_BITS
GLFW_ANGLE_PLATFORM_TYPE
GLFW_ANGLE_PLATFORM_TYPE_D3D9
GLFW_ANGLE_PLATFORM_TYPE_D3D11
GLFW_ANGLE_PLATFORM_TYPE_METAL
GLFW_ANGLE_PLATFORM_TYPE_NONE
GLFW_ANGLE_PLATFORM_TYPE_OPENGL
GLFW_ANGLE_PLATFORM_TYPE_OPENGLES
GLFW_ANGLE_PLATFORM_TYPE_VULKAN
GLFW_ANY_PLATFORM
GLFW_ANY_POSITION
GLFW_ANY_RELEASE_BEHAVIOR
GLFW_API_UNAVAILABLE
GLFW_ARROW_CURSOR
GLFW_AUTO_ICONIFY
GLFW_AUX_BUFFERS
GLFW_BLUE_BITS
GLFW_CENTER_CURSOR
GLFW_CLIENT_API
GLFW_COCOA_CHDIR_RESOURCES
GLFW_COCOA_FRAME_NAME
GLFW_COCOA_GRAPHICS_SWITCHING
GLFW_COCOA_MENUBAR
GLFW_COCOA_RETINA_FRAMEBUFFER
GLFW_CONNECTED
GLFW_CONTEXT_CREATION_API
GLFW_CONTEXT_DEBUG
GLFW_CONTEXT_NO_ERROR
GLFW_CONTEXT_RELEASE_BEHAVIOR
GLFW_CONTEXT_REVISION
GLFW_CONTEXT_ROBUSTNESS
GLFW_CONTEXT_VERSION_MAJOR
GLFW_CONTEXT_VERSION_MINOR
GLFW_CROSSHAIR_CURSOR
GLFW_CURSOR
GLFW_CURSOR_CAPTURED
GLFW_CURSOR_DISABLED
GLFW_CURSOR_HIDDEN
GLFW_CURSOR_NORMAL
GLFW_CURSOR_UNAVAILABLE
GLFW_DECORATED
GLFW_DEPTH_BITS
GLFW_DISCONNECTED
GLFW_DONT_CARE
GLFW_DOUBLEBUFFER
GLFW_EGL_CONTEXT_API
GLFW_FALSE
GLFW_FEATURE_UNAVAILABLE
GLFW_FEATURE_UNIMPLEMENTED
GLFW_FLOATING
GLFW_FOCUSED
GLFW_FOCUS_ON_SHOW
GLFW_FORMAT_UNAVAILABLE
GLFW_GAMEPAD_AXIS_LAST
GLFW_GAMEPAD_AXIS_LEFT_TRIGGER
GLFW_GAMEPAD_AXIS_LEFT_X
GLFW_GAMEPAD_AXIS_LEFT_Y
GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER
GLFW_GAMEPAD_AXIS_RIGHT_X
GLFW_GAMEPAD_AXIS_RIGHT_Y
GLFW_GAMEPAD_B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_BUTTON_LEFT
GLFW_MOUSE_BUTTON_MIDDLE
GLFW_MOUSE_BUTTON_RIGHT
GLFW_MOUSE_PASSTHROUGH
GLFW_NATIVE_CONTEXT_API
GLFW_NOT_ALLOWED_CURSOR
GLFW_NOT_INITIALIZED
GLFW_NO_API
GLFW_NO_CURRENT_CONTEXT
GLFW_NO_ERROR
GLFW_NO_RESET_NOTIFICATION
GLFW_NO_ROBUSTNESS
GLFW_NO_WINDOW_CONTEXT
GLFW_OPENGL_ANY_PROFILE
GLFW_OPENGL_API
GLFW_OPENGL_COMPAT_PROFILE
GLFW_OPENGL_CORE_PROFILE
GLFW_OPENGL_DEBUG_CONTEXT
GLFW_OPENGL_ES_API
GLFW_OPENGL_FORWARD_COMPAT
GLFW_OPENGL_PROFILE
GLFW_OSMESA_CONTEXT_API
GLFW_OUT_OF_MEMORY
GLFW_PLATFORM
GLFW_PLATFORM_COCOA
GLFW_PLATFORM_ERROR
GLFW_PLATFORM_NULL
GLFW_PLATFORM_UNAVAILABLE
GLFW_PLATFORM_WAYLAND
GLFW_PLATFORM_WIN32
GLFW_PLATFORM_X11
GLFW_POINTING_HAND_CURSOR
GLFW_POSITION_X
GLFW_POSITION_Y
GLFW_PRESS
GLFW_RAW_MOUSE_MOTION
GLFW_RED_BITS
GLFW_REFRESH_RATE
GLFW_RELEASE
GLFW_RELEASE_BEHAVIOR_FLUSH
GLFW_RELEASE_BEHAVIOR_NONE
GLFW_REPEAT
GLFW_RESIZABLE
GLFW_RESIZE_ALL_CURSOR
GLFW_RESIZE_EW_CURSOR
GLFW_RESIZE_NESW_CURSOR
GLFW_RESIZE_NS_CURSOR
GLFW_RESIZE_NWSE_CURSOR
GLFW_SAMPLES
GLFW_SCALE_FRAMEBUFFER
GLFW_SCALE_TO_MONITOR
GLFW_SRGB_CAPABLE
GLFW_STENCIL_BITS
GLFW_STEREO
GLFW_STICKY_KEYS
GLFW_STICKY_MOUSE_BUTTONS
GLFW_TRANSPARENT_FRAMEBUFFER
GLFW_TRUE
GLFW_VERSION_MAJOR
GLFW_VERSION_MINOR
GLFW_VERSION_REVISION
GLFW_VERSION_UNAVAILABLE
GLFW_VISIBLE
GLFW_VRESIZE_CURSOR
GLFW_WAYLAND_APP_ID
GLFW_WAYLAND_DISABLE_LIBDECOR
GLFW_WAYLAND_LIBDECOR
GLFW_WAYLAND_PREFER_LIBDECOR
GLFW_WIN32_KEYBOARD_MENU
GLFW_WIN32_SHOWDEFAULT
GLFW_X11_CLASS_NAME
GLFW_X11_INSTANCE_NAME
GLFW_X11_XCB_VULKAN_SURFACE
VkInternalAllocationType_VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE
VkInternalAllocationType_VK_INTERNAL_ALLOCATION_TYPE_MAX_ENUM
VkResult_VK_ERROR_COMPRESSION_EXHAUSTED_EXT
VkResult_VK_ERROR_DEVICE_LOST
VkResult_VK_ERROR_EXTENSION_NOT_PRESENT
VkResult_VK_ERROR_FEATURE_NOT_PRESENT
VkResult_VK_ERROR_FORMAT_NOT_SUPPORTED
VkResult_VK_ERROR_FRAGMENTATION
VkResult_VK_ERROR_FRAGMENTATION_EXT
VkResult_VK_ERROR_FRAGMENTED_POOL
VkResult_VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT
VkResult_VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR
VkResult_VK_ERROR_INCOMPATIBLE_DISPLAY_KHR
VkResult_VK_ERROR_INCOMPATIBLE_DRIVER
VkResult_VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT
VkResult_VK_ERROR_INITIALIZATION_FAILED
VkResult_VK_ERROR_INVALID_DEVICE_ADDRESS_EXT
VkResult_VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT
VkResult_VK_ERROR_INVALID_EXTERNAL_HANDLE
VkResult_VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR
VkResult_VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS
VkResult_VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR
VkResult_VK_ERROR_INVALID_SHADER_NV
VkResult_VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR
VkResult_VK_ERROR_LAYER_NOT_PRESENT
VkResult_VK_ERROR_MEMORY_MAP_FAILED
VkResult_VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
VkResult_VK_ERROR_NOT_ENOUGH_SPACE_KHR
VkResult_VK_ERROR_NOT_PERMITTED
VkResult_VK_ERROR_NOT_PERMITTED_EXT
VkResult_VK_ERROR_NOT_PERMITTED_KHR
VkResult_VK_ERROR_OUT_OF_DATE_KHR
VkResult_VK_ERROR_OUT_OF_DEVICE_MEMORY
VkResult_VK_ERROR_OUT_OF_HOST_MEMORY
VkResult_VK_ERROR_OUT_OF_POOL_MEMORY
VkResult_VK_ERROR_OUT_OF_POOL_MEMORY_KHR
VkResult_VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT
VkResult_VK_ERROR_SURFACE_LOST_KHR
VkResult_VK_ERROR_TOO_MANY_OBJECTS
VkResult_VK_ERROR_UNKNOWN
VkResult_VK_ERROR_VALIDATION_FAILED_EXT
VkResult_VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR
VkResult_VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR
VkResult_VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR
VkResult_VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR
VkResult_VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR
VkResult_VK_EVENT_RESET
VkResult_VK_EVENT_SET
VkResult_VK_INCOMPATIBLE_SHADER_BINARY_EXT
VkResult_VK_INCOMPLETE
VkResult_VK_NOT_READY
VkResult_VK_OPERATION_DEFERRED_KHR
VkResult_VK_OPERATION_NOT_DEFERRED_KHR
VkResult_VK_PIPELINE_BINARY_MISSING_KHR
VkResult_VK_PIPELINE_COMPILE_REQUIRED
VkResult_VK_PIPELINE_COMPILE_REQUIRED_EXT
VkResult_VK_RESULT_MAX_ENUM
VkResult_VK_SUBOPTIMAL_KHR
VkResult_VK_SUCCESS
VkResult_VK_THREAD_DONE_KHR
VkResult_VK_THREAD_IDLE_KHR
VkResult_VK_TIMEOUT
VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_CACHE
VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_COMMAND
VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_DEVICE
VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE
VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_MAX_ENUM
VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_OBJECT

Functions§

glfwCreateCursor
@brief Creates a custom cursor.
glfwCreateStandardCursor
@brief Creates a cursor with a standard shape.
glfwCreateWindow
@brief Creates a window and its associated context.
glfwCreateWindowSurface
@brief Creates a Vulkan surface for the specified window.
glfwDefaultWindowHints
@brief Resets all window hints to their default values.
glfwDestroyCursor
@brief Destroys a cursor.
glfwDestroyWindow
@brief Destroys the specified window and its context.
glfwExtensionSupported
@brief Returns whether the specified extension is available.
glfwFocusWindow
@brief Brings the specified window to front and sets input focus.
glfwGetClipboardString
@brief Returns the contents of the clipboard as a string.
glfwGetCurrentContext
@brief Returns the window whose context is current on the calling thread.
glfwGetCursorPos
@brief Retrieves the position of the cursor relative to the content area of the window.
glfwGetEGLContext
@brief Returns the EGLContext of the specified window.
glfwGetEGLDisplay
@brief Returns the EGLDisplay used by GLFW.
glfwGetEGLSurface
@brief Returns the EGLSurface of the specified window.
glfwGetError
@brief Returns and clears the last error for the calling thread.
glfwGetFramebufferSize
@brief Retrieves the size of the framebuffer of the specified window.
glfwGetGLXContext
@brief Returns the GLXContext of the specified window.
glfwGetGLXWindow
@brief Returns the GLXWindow of the specified window.
glfwGetGamepadName
@brief Returns the human-readable gamepad name for the specified joystick.
glfwGetGamepadState
@brief Retrieves the state of the specified joystick remapped as a gamepad.
glfwGetGammaRamp
@brief Returns the current gamma ramp for the specified monitor.
glfwGetInputMode
@brief Returns the value of an input option for the specified window.
glfwGetInstanceProcAddress
@brief Returns the address of the specified Vulkan instance function.
glfwGetJoystickAxes
@brief Returns the values of all axes of the specified joystick.
glfwGetJoystickButtons
@brief Returns the state of all buttons of the specified joystick.
glfwGetJoystickGUID
@brief Returns the SDL compatible GUID of the specified joystick.
glfwGetJoystickHats
@brief Returns the state of all hats of the specified joystick.
glfwGetJoystickName
@brief Returns the name of the specified joystick.
glfwGetJoystickUserPointer
@brief Returns the user pointer of the specified joystick.
glfwGetKey
@brief Returns the last reported state of a keyboard key for the specified window.
glfwGetKeyName
@brief Returns the layout-specific name of the specified printable key.
glfwGetKeyScancode
@brief Returns the platform-specific scancode of the specified key.
glfwGetMonitorContentScale
@brief Retrieves the content scale for the specified monitor.
glfwGetMonitorName
@brief Returns the name of the specified monitor.
glfwGetMonitorPhysicalSize
@brief Returns the physical size of the monitor.
glfwGetMonitorPos
@brief Returns the position of the monitor’s viewport on the virtual screen.
glfwGetMonitorUserPointer
@brief Returns the user pointer of the specified monitor.
glfwGetMonitorWorkarea
@brief Retrieves the work area of the monitor.
glfwGetMonitors
@brief Returns the currently connected monitors.
glfwGetMouseButton
@brief Returns the last reported state of a mouse button for the specified window.
glfwGetPhysicalDevicePresentationSupport
@brief Returns whether the specified queue family can present images.
glfwGetPlatform
@brief Returns the currently selected platform.
glfwGetPrimaryMonitor
@brief Returns the primary monitor.
glfwGetProcAddress
@brief Returns the address of the specified function for the current context.
glfwGetRequiredInstanceExtensions
@brief Returns the Vulkan instance extensions required by GLFW.
glfwGetTime
@brief Returns the GLFW time.
glfwGetTimerFrequency
@brief Returns the frequency, in Hz, of the raw timer.
glfwGetTimerValue
@brief Returns the current value of the raw timer.
glfwGetVersion
@brief Retrieves the version of the GLFW library.
glfwGetVersionString
@brief Returns a string describing the compile-time configuration.
glfwGetVideoMode
@brief Returns the current mode of the specified monitor.
glfwGetVideoModes
@brief Returns the available video modes for the specified monitor.
glfwGetWaylandDisplay
@brief Returns the struct wl_display* used by GLFW.
glfwGetWaylandMonitor
@brief Returns the struct wl_output* of the specified monitor.
glfwGetWaylandWindow
@brief Returns the main struct wl_surface* of the specified window.
glfwGetWindowAttrib
@brief Returns an attribute of the specified window.
glfwGetWindowContentScale
@brief Retrieves the content scale for the specified window.
glfwGetWindowFrameSize
@brief Retrieves the size of the frame of the window.
glfwGetWindowMonitor
@brief Returns the monitor that the window uses for full screen mode.
glfwGetWindowOpacity
@brief Returns the opacity of the whole window.
glfwGetWindowPos
@brief Retrieves the position of the content area of the specified window.
glfwGetWindowSize
@brief Retrieves the size of the content area of the specified window.
glfwGetWindowTitle
@brief Returns the title of the specified window.
glfwGetWindowUserPointer
@brief Returns the user pointer of the specified window.
glfwGetX11Adapter
@brief Returns the RRCrtc of the specified monitor.
glfwGetX11Display
@brief Returns the Display used by GLFW.
glfwGetX11Monitor
glfwGetX11SelectionString
@brief Returns the contents of the current primary selection as a string.
glfwGetX11Window
@brief Returns the Window of the specified window.
glfwHideWindow
@brief Hides the specified window.
glfwIconifyWindow
@brief Iconifies the specified window.
glfwInit
@brief Initializes the GLFW library.
glfwInitAllocator
@brief Sets the init allocator to the desired value.
glfwInitHint
@brief Sets the specified init hint to the desired value.
glfwInitVulkanLoader
@brief Sets the desired Vulkan vkGetInstanceProcAddr function.
glfwJoystickIsGamepad
@brief Returns whether the specified joystick has a gamepad mapping.
glfwJoystickPresent
@brief Returns whether the specified joystick is present.
glfwMakeContextCurrent
@brief Makes the context of the specified window current for the calling thread.
glfwMaximizeWindow
@brief Maximizes the specified window.
glfwPlatformSupported
@brief Returns whether the library includes support for the specified platform.
glfwPollEvents
@brief Processes all pending events.
glfwPostEmptyEvent
@brief Posts an empty event to the event queue.
glfwRawMouseMotionSupported
@brief Returns whether raw mouse motion is supported.
glfwRequestWindowAttention
@brief Requests user attention to the specified window.
glfwRestoreWindow
@brief Restores the specified window.
glfwSetCharCallback
@brief Sets the Unicode character callback.
glfwSetCharModsCallback
@brief Sets the Unicode character with modifiers callback.
glfwSetClipboardString
@brief Sets the clipboard to the specified string.
glfwSetCursor
@brief Sets the cursor for the window.
glfwSetCursorEnterCallback
@brief Sets the cursor enter/leave callback.
glfwSetCursorPos
@brief Sets the position of the cursor, relative to the content area of the window.
glfwSetCursorPosCallback
@brief Sets the cursor position callback.
glfwSetDropCallback
@brief Sets the path drop callback.
glfwSetErrorCallback
@brief Sets the error callback.
glfwSetFramebufferSizeCallback
@brief Sets the framebuffer resize callback for the specified window.
glfwSetGamma
@brief Generates a gamma ramp and sets it for the specified monitor.
glfwSetGammaRamp
@brief Sets the current gamma ramp for the specified monitor.
glfwSetInputMode
@brief Sets an input option for the specified window.
glfwSetJoystickCallback
@brief Sets the joystick configuration callback.
glfwSetJoystickUserPointer
@brief Sets the user pointer of the specified joystick.
glfwSetKeyCallback
@brief Sets the key callback.
glfwSetMonitorCallback
@brief Sets the monitor configuration callback.
glfwSetMonitorUserPointer
@brief Sets the user pointer of the specified monitor.
glfwSetMouseButtonCallback
@brief Sets the mouse button callback.
glfwSetScrollCallback
@brief Sets the scroll callback.
glfwSetTime
@brief Sets the GLFW time.
glfwSetWindowAspectRatio
@brief Sets the aspect ratio of the specified window.
glfwSetWindowAttrib
@brief Sets an attribute of the specified window.
glfwSetWindowCloseCallback
@brief Sets the close callback for the specified window.
glfwSetWindowContentScaleCallback
@brief Sets the window content scale callback for the specified window.
glfwSetWindowFocusCallback
@brief Sets the focus callback for the specified window.
glfwSetWindowIcon
@brief Sets the icon for the specified window.
glfwSetWindowIconifyCallback
@brief Sets the iconify callback for the specified window.
glfwSetWindowMaximizeCallback
@brief Sets the maximize callback for the specified window.
glfwSetWindowMonitor
@brief Sets the mode, monitor, video mode and placement of a window.
glfwSetWindowOpacity
@brief Sets the opacity of the whole window.
glfwSetWindowPos
@brief Sets the position of the content area of the specified window.
glfwSetWindowPosCallback
@brief Sets the position callback for the specified window.
glfwSetWindowRefreshCallback
@brief Sets the refresh callback for the specified window.
glfwSetWindowShouldClose
@brief Sets the close flag of the specified window.
glfwSetWindowSize
@brief Sets the size of the content area of the specified window.
glfwSetWindowSizeCallback
@brief Sets the size callback for the specified window.
glfwSetWindowSizeLimits
@brief Sets the size limits of the specified window.
glfwSetWindowTitle
@brief Sets the title of the specified window.
glfwSetWindowUserPointer
@brief Sets the user pointer of the specified window.
glfwSetX11SelectionString
@brief Sets the current primary selection to the specified string.
glfwShowWindow
@brief Makes the specified window visible.
glfwSwapBuffers
@brief Swaps the front and back buffers of the specified window.
glfwSwapInterval
@brief Sets the swap interval for the current context.
glfwTerminate
@brief Terminates the GLFW library.
glfwUpdateGamepadMappings
@brief Adds the specified SDL_GameControllerDB gamepad mappings.
glfwVulkanSupported
@brief Returns whether the Vulkan loader and an ICD have been found.
glfwWaitEvents
@brief Waits until events are queued and processes them.
glfwWaitEventsTimeout
@brief Waits with timeout until events are queued and processes them.
glfwWindowHint
@brief Sets the specified window hint to the desired value.
glfwWindowHintString
@brief Sets the specified window hint to the desired value.
glfwWindowShouldClose
@brief Checks the close flag of the specified window.

Type Aliases§

GLFWallocatefun
@brief The function pointer type for memory allocation callbacks.
GLFWcharfun
@brief The function pointer type for Unicode character callbacks.
GLFWcharmodsfun
@brief The function pointer type for Unicode character with modifiers callbacks.
GLFWcursorenterfun
@brief The function pointer type for cursor enter/leave callbacks.
GLFWcursorposfun
@brief The function pointer type for cursor position callbacks.
GLFWdeallocatefun
@brief The function pointer type for memory deallocation callbacks.
GLFWdropfun
@brief The function pointer type for path drop callbacks.
GLFWerrorfun
@brief The function pointer type for error callbacks.
GLFWframebuffersizefun
@brief The function pointer type for framebuffer size callbacks.
GLFWglproc
@brief Client API function pointer type.
GLFWjoystickfun
@brief The function pointer type for joystick configuration callbacks.
GLFWkeyfun
@brief The function pointer type for keyboard key callbacks.
GLFWmonitorfun
@brief The function pointer type for monitor configuration callbacks.
GLFWmousebuttonfun
@brief The function pointer type for mouse button callbacks.
GLFWreallocatefun
@brief The function pointer type for memory reallocation callbacks.
GLFWscrollfun
@brief The function pointer type for scroll callbacks.
GLFWvkproc
@brief Vulkan API function pointer type.
GLFWwindowclosefun
@brief The function pointer type for window close callbacks.
GLFWwindowcontentscalefun
@brief The function pointer type for window content scale callbacks.
GLFWwindowfocusfun
@brief The function pointer type for window focus callbacks.
GLFWwindowiconifyfun
@brief The function pointer type for window iconify callbacks.
GLFWwindowmaximizefun
@brief The function pointer type for window maximize callbacks.
GLFWwindowposfun
@brief The function pointer type for window position callbacks.
GLFWwindowrefreshfun
@brief The function pointer type for window content refresh callbacks.
GLFWwindowsizefun
@brief The function pointer type for window size callbacks.
PFN_vkAllocationFunction
PFN_vkFreeFunction
PFN_vkGetInstanceProcAddr
PFN_vkInternalAllocationNotification
PFN_vkInternalFreeNotification
PFN_vkReallocationFunction
PFN_vkVoidFunction
VkInstance
VkInternalAllocationType
VkPhysicalDevice
VkResult
VkSurfaceKHR
VkSystemAllocationScope