@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 theSetCharCallbackmethod.GLFWCharModsCallbackI Instances of this interface may be passed to theSetCharModsCallbackmethod.GLFWCursorEnterCallbackI Instances of this interface may be passed to theSetCursorEnterCallbackmethod.GLFWCursorPosCallbackI Instances of this interface may be passed to theSetCursorPosCallbackmethod.GLFWDeallocateCallbackI The function pointer type for memory deallocation callbacks.GLFWDropCallbackI Instances of this interface may be passed to theSetDropCallbackmethod.GLFWErrorCallbackI Instances of this interface may be passed to theSetErrorCallbackmethod.GLFWFramebufferSizeCallbackI Instances of this interface may be passed to theSetFramebufferSizeCallbackmethod.GLFWJoystickCallbackI Instances of this interface may be passed to theSetJoystickCallbackmethod.GLFWKeyCallbackI Instances of this interface may be passed to theSetKeyCallbackmethod.GLFWMonitorCallbackI Instances of this interface may be passed to theSetMonitorCallbackmethod.GLFWMouseButtonCallbackI Instances of this interface may be passed to theSetMouseButtonCallbackmethod.GLFWReallocateCallbackI The function pointer type for memory reallocation callbacks.GLFWScrollCallbackI Instances of this interface may be passed to theSetScrollCallbackmethod.GLFWWindowCloseCallbackI Instances of this interface may be passed to theSetWindowCloseCallbackmethod.GLFWWindowContentScaleCallbackI Instances of this interface may be passed to theSetWindowContentScaleCallbackmethod.GLFWWindowFocusCallbackI Instances of this interface may be passed to theSetWindowFocusCallbackmethod.GLFWWindowIconifyCallbackI Instances of this interface may be passed to theSetWindowIconifyCallbackmethod.GLFWWindowMaximizeCallbackI Instances of this interface may be passed to theSetWindowMaximizeCallbackmethod.GLFWWindowPosCallbackI Instances of this interface may be passed to theSetWindowPosCallbackmethod.GLFWWindowRefreshCallbackI Instances of this interface may be passed to theSetWindowRefreshCallbackmethod.GLFWWindowSizeCallbackI Instances of this interface may be passed to theSetWindowSizeCallbackmethod. -
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 ofGLFWAllocatorstructs.GLFWCharCallback Instances of this class may be passed to theSetCharCallbackmethod.GLFWCharModsCallback Instances of this class may be passed to theSetCharModsCallbackmethod.GLFWCursorEnterCallback Instances of this class may be passed to theSetCursorEnterCallbackmethod.GLFWCursorPosCallback Instances of this class may be passed to theSetCursorPosCallbackmethod.GLFWDeallocateCallback The function pointer type for memory deallocation callbacks.GLFWDropCallback Instances of this class may be passed to theSetDropCallbackmethod.GLFWErrorCallback Instances of this class may be passed to theSetErrorCallbackmethod.GLFWFramebufferSizeCallback Instances of this class may be passed to theSetFramebufferSizeCallbackmethod.GLFWGamepadState Describes the input state of a gamepad.GLFWGamepadState.Buffer An array ofGLFWGamepadStatestructs.GLFWGammaRamp Describes the gamma ramp for a monitor.GLFWGammaRamp.Buffer An array ofGLFWGammaRampstructs.GLFWImage Image data.GLFWImage.Buffer An array ofGLFWImagestructs.GLFWJoystickCallback Instances of this class may be passed to theSetJoystickCallbackmethod.GLFWKeyCallback Instances of this class may be passed to theSetKeyCallbackmethod.GLFWMonitorCallback Instances of this class may be passed to theSetMonitorCallbackmethod.GLFWMouseButtonCallback Instances of this class may be passed to theSetMouseButtonCallbackmethod.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 theSetScrollCallbackmethod.GLFWVidMode Describes a single video mode.GLFWVidMode.Buffer An array ofGLFWVidModestructs.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 theSetWindowCloseCallbackmethod.GLFWWindowContentScaleCallback Instances of this class may be passed to theSetWindowContentScaleCallbackmethod.GLFWWindowFocusCallback Instances of this class may be passed to theSetWindowFocusCallbackmethod.GLFWWindowIconifyCallback Instances of this class may be passed to theSetWindowIconifyCallbackmethod.GLFWWindowMaximizeCallback Instances of this class may be passed to theSetWindowMaximizeCallbackmethod.GLFWWindowPosCallback Instances of this class may be passed to theSetWindowPosCallbackmethod.GLFWWindowRefreshCallback Instances of this class may be passed to theSetWindowRefreshCallbackmethod.GLFWWindowSizeCallback Instances of this class may be passed to theSetWindowSizeCallbackmethod.