@NonnullDefault
Package org.lwjgl.glfw
GLFW comes with extensive documentation, which you can read online here. The Frequently Asked Questions are also useful.
Using GLFW on macOS
On macOS the JVM must be started with the -XstartOnFirstThread
argument for GLFW to work. This is necessary because most GLFW functions must be
called on the main thread and the Cocoa API requires that thread to be the first thread in the process. GLFW windows and the GLFW event loop are
incompatible with other window toolkits (such as AWT/Swing or JavaFX).
Applications that cannot function with the above limitation may set GLFW_LIBRARY_NAME
to the
value "glfw_async"
. This will instruct LWJGL to load an alternative GLFW build that dispatches Cocoa calls to the main thread in blocking mode.
The other window toolkit must be initialized (e.g. with AWT's Toolkit.getDefaultToolkit()
) before Init
is called.
-
Interface Summary Interface Description GLFWAllocateCallbackI The function pointer type for memory allocation callbacks.GLFWCharCallbackI Instances of this interface may be passed to theSetCharCallback
method.GLFWCharModsCallbackI Instances of this interface may be passed to theSetCharModsCallback
method.GLFWCursorEnterCallbackI Instances of this interface may be passed to theSetCursorEnterCallback
method.GLFWCursorPosCallbackI Instances of this interface may be passed to theSetCursorPosCallback
method.GLFWDeallocateCallbackI The function pointer type for memory deallocation callbacks.GLFWDropCallbackI Instances of this interface may be passed to theSetDropCallback
method.GLFWErrorCallbackI Instances of this interface may be passed to theSetErrorCallback
method.GLFWFramebufferSizeCallbackI Instances of this interface may be passed to theSetFramebufferSizeCallback
method.GLFWJoystickCallbackI Instances of this interface may be passed to theSetJoystickCallback
method.GLFWKeyCallbackI Instances of this interface may be passed to theSetKeyCallback
method.GLFWMonitorCallbackI Instances of this interface may be passed to theSetMonitorCallback
method.GLFWMouseButtonCallbackI Instances of this interface may be passed to theSetMouseButtonCallback
method.GLFWReallocateCallbackI The function pointer type for memory reallocation callbacks.GLFWScrollCallbackI Instances of this interface may be passed to theSetScrollCallback
method.GLFWWindowCloseCallbackI Instances of this interface may be passed to theSetWindowCloseCallback
method.GLFWWindowContentScaleCallbackI Instances of this interface may be passed to theSetWindowContentScaleCallback
method.GLFWWindowFocusCallbackI Instances of this interface may be passed to theSetWindowFocusCallback
method.GLFWWindowIconifyCallbackI Instances of this interface may be passed to theSetWindowIconifyCallback
method.GLFWWindowMaximizeCallbackI Instances of this interface may be passed to theSetWindowMaximizeCallback
method.GLFWWindowPosCallbackI Instances of this interface may be passed to theSetWindowPosCallback
method.GLFWWindowRefreshCallbackI Instances of this interface may be passed to theSetWindowRefreshCallback
method.GLFWWindowSizeCallbackI Instances of this interface may be passed to theSetWindowSizeCallback
method. -
Class Summary Class Description GLFW Native bindings to the GLFW library.GLFW.Functions Contains the function pointers loaded from the glfwSharedLibrary
.GLFWAllocateCallback The function pointer type for memory allocation callbacks.GLFWAllocator A custom memory allocator that can be set withInitAllocator
.GLFWAllocator.Buffer An array ofGLFWAllocator
structs.GLFWCharCallback Instances of this class may be passed to theSetCharCallback
method.GLFWCharModsCallback Instances of this class may be passed to theSetCharModsCallback
method.GLFWCursorEnterCallback Instances of this class may be passed to theSetCursorEnterCallback
method.GLFWCursorPosCallback Instances of this class may be passed to theSetCursorPosCallback
method.GLFWDeallocateCallback The function pointer type for memory deallocation callbacks.GLFWDropCallback Instances of this class may be passed to theSetDropCallback
method.GLFWErrorCallback Instances of this class may be passed to theSetErrorCallback
method.GLFWFramebufferSizeCallback Instances of this class may be passed to theSetFramebufferSizeCallback
method.GLFWGamepadState Describes the input state of a gamepad.GLFWGamepadState.Buffer An array ofGLFWGamepadState
structs.GLFWGammaRamp Describes the gamma ramp for a monitor.GLFWGammaRamp.Buffer An array ofGLFWGammaRamp
structs.GLFWImage Image data.GLFWImage.Buffer An array ofGLFWImage
structs.GLFWJoystickCallback Instances of this class may be passed to theSetJoystickCallback
method.GLFWKeyCallback Instances of this class may be passed to theSetKeyCallback
method.GLFWMonitorCallback Instances of this class may be passed to theSetMonitorCallback
method.GLFWMouseButtonCallback Instances of this class may be passed to theSetMouseButtonCallback
method.GLFWNativeCocoa Native bindings to the GLFW library's Cocoa native access functions.GLFWNativeCocoa.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWNativeEGL Native bindings to the GLFW library's EGL native access functions.GLFWNativeEGL.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWNativeGLX Native bindings to the GLFW library's GLX native access functions.GLFWNativeGLX.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWNativeNSGL Native bindings to the GLFW library's NSGL native access functions.GLFWNativeNSGL.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWNativeOSMesa Native bindings to the GLFW library's GLX native access functions.GLFWNativeOSMesa.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWNativeWayland Native bindings to the GLFW library's Wayland native access functions.GLFWNativeWayland.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWNativeWGL Native bindings to the GLFW library's WGL native access functions.GLFWNativeWGL.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWNativeWin32 Native bindings to the GLFW library's Win32 native access functions.GLFWNativeWin32.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWNativeX11 Native bindings to the GLFW library's X11 native access functions.GLFWNativeX11.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWReallocateCallback The function pointer type for memory reallocation callbacks.GLFWScrollCallback Instances of this class may be passed to theSetScrollCallback
method.GLFWVidMode Describes a single video mode.GLFWVidMode.Buffer An array ofGLFWVidMode
structs.GLFWVulkan Native bindings to the GLFW library's Vulkan functions.GLFWVulkan.Functions Contains the function pointers loaded fromGLFW.getLibrary()
.GLFWWindowCloseCallback Instances of this class may be passed to theSetWindowCloseCallback
method.GLFWWindowContentScaleCallback Instances of this class may be passed to theSetWindowContentScaleCallback
method.GLFWWindowFocusCallback Instances of this class may be passed to theSetWindowFocusCallback
method.GLFWWindowIconifyCallback Instances of this class may be passed to theSetWindowIconifyCallback
method.GLFWWindowMaximizeCallback Instances of this class may be passed to theSetWindowMaximizeCallback
method.GLFWWindowPosCallback Instances of this class may be passed to theSetWindowPosCallback
method.GLFWWindowRefreshCallback Instances of this class may be passed to theSetWindowRefreshCallback
method.GLFWWindowSizeCallback Instances of this class may be passed to theSetWindowSizeCallback
method.