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.
-
ClassDescriptionUtility class for GLFW callbacks.Native bindings to the GLFW library.Contains the function pointers loaded from the glfw
SharedLibrary
.The function pointer type for memory allocation callbacks.The function pointer type for memory allocation callbacks.A custom memory allocator that can be set withInitAllocator
.An array ofGLFWAllocator
structs.Instances of this class may be passed to theSetCharCallback
method.Instances of this interface may be passed to theSetCharCallback
method.Instances of this class may be passed to theSetCharModsCallback
method.Instances of this interface may be passed to theSetCharModsCallback
method.Instances of this class may be passed to theSetCursorEnterCallback
method.Instances of this interface may be passed to theSetCursorEnterCallback
method.Instances of this class may be passed to theSetCursorPosCallback
method.Instances of this interface may be passed to theSetCursorPosCallback
method.The function pointer type for memory deallocation callbacks.The function pointer type for memory deallocation callbacks.Instances of this class may be passed to theSetDropCallback
method.Instances of this interface may be passed to theSetDropCallback
method.Instances of this class may be passed to theSetErrorCallback
method.Instances of this interface may be passed to theSetErrorCallback
method.Instances of this class may be passed to theSetFramebufferSizeCallback
method.Instances of this interface may be passed to theSetFramebufferSizeCallback
method.Describes the input state of a gamepad.An array ofGLFWGamepadState
structs.Describes the gamma ramp for a monitor.An array ofGLFWGammaRamp
structs.Image data.An array ofGLFWImage
structs.Instances of this class may be passed to theSetJoystickCallback
method.Instances of this interface may be passed to theSetJoystickCallback
method.Instances of this class may be passed to theSetKeyCallback
method.Instances of this interface may be passed to theSetKeyCallback
method.Instances of this class may be passed to theSetMonitorCallback
method.Instances of this interface may be passed to theSetMonitorCallback
method.Instances of this class may be passed to theSetMouseButtonCallback
method.Instances of this interface may be passed to theSetMouseButtonCallback
method.Native bindings to the GLFW library's Cocoa native access functions.Contains the function pointers loaded fromGLFW.getLibrary()
.Native bindings to the GLFW library's EGL native access functions.Contains the function pointers loaded fromGLFW.getLibrary()
.Native bindings to the GLFW library's GLX native access functions.Contains the function pointers loaded fromGLFW.getLibrary()
.Native bindings to the GLFW library's NSGL native access functions.Contains the function pointers loaded fromGLFW.getLibrary()
.Native bindings to the GLFW library's GLX native access functions.Contains the function pointers loaded fromGLFW.getLibrary()
.Native bindings to the GLFW library's Wayland native access functions.Contains the function pointers loaded fromGLFW.getLibrary()
.Native bindings to the GLFW library's WGL native access functions.Contains the function pointers loaded fromGLFW.getLibrary()
.Native bindings to the GLFW library's Win32 native access functions.Contains the function pointers loaded fromGLFW.getLibrary()
.Native bindings to the GLFW library's X11 native access functions.Contains the function pointers loaded fromGLFW.getLibrary()
.The function pointer type for memory reallocation callbacks.The function pointer type for memory reallocation callbacks.Instances of this class may be passed to theSetScrollCallback
method.Instances of this interface may be passed to theSetScrollCallback
method.Describes a single video mode.An array ofGLFWVidMode
structs.Native bindings to the GLFW library's Vulkan functions.Contains the function pointers loaded fromGLFW.getLibrary()
.Instances of this class may be passed to theSetWindowCloseCallback
method.Instances of this interface may be passed to theSetWindowCloseCallback
method.Instances of this class may be passed to theSetWindowContentScaleCallback
method.Instances of this interface may be passed to theSetWindowContentScaleCallback
method.Instances of this class may be passed to theSetWindowFocusCallback
method.Instances of this interface may be passed to theSetWindowFocusCallback
method.Instances of this class may be passed to theSetWindowIconifyCallback
method.Instances of this interface may be passed to theSetWindowIconifyCallback
method.Instances of this class may be passed to theSetWindowMaximizeCallback
method.Instances of this interface may be passed to theSetWindowMaximizeCallback
method.Instances of this class may be passed to theSetWindowPosCallback
method.Instances of this interface may be passed to theSetWindowPosCallback
method.Instances of this class may be passed to theSetWindowRefreshCallback
method.Instances of this interface may be passed to theSetWindowRefreshCallback
method.Instances of this class may be passed to theSetWindowSizeCallback
method.Instances of this interface may be passed to theSetWindowSizeCallback
method.