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.
-
ClassDescriptionNative 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.Custom heap memory allocator.An array ofGLFWAllocatorstructs.Instances of this class may be passed to theSetCharCallbackmethod.Instances of this interface may be passed to theSetCharCallbackmethod.Instances of this class may be passed to theSetCharModsCallbackmethod.Instances of this interface may be passed to theSetCharModsCallbackmethod.Instances of this class may be passed to theSetCursorEnterCallbackmethod.Instances of this interface may be passed to theSetCursorEnterCallbackmethod.Instances of this class may be passed to theSetCursorPosCallbackmethod.Instances of this interface may be passed to theSetCursorPosCallbackmethod.The function pointer type for memory deallocation callbacks.The function pointer type for memory deallocation callbacks.Instances of this class may be passed to theSetDropCallbackmethod.Instances of this interface may be passed to theSetDropCallbackmethod.Instances of this class may be passed to theSetErrorCallbackmethod.Instances of this interface may be passed to theSetErrorCallbackmethod.Instances of this class may be passed to theSetFramebufferSizeCallbackmethod.Instances of this interface may be passed to theSetFramebufferSizeCallbackmethod.Describes the input state of a gamepad.An array ofGLFWGamepadStatestructs.Describes the gamma ramp for a monitor.An array ofGLFWGammaRampstructs.Image data.An array ofGLFWImagestructs.Instances of this class may be passed to theSetIMEStatusCallbackmethod.Instances of this interface may be passed to theSetIMEStatusCallbackmethod.Instances of this class may be passed to theSetJoystickCallbackmethod.Instances of this interface may be passed to theSetJoystickCallbackmethod.Instances of this class may be passed to theSetKeyCallbackmethod.Instances of this interface may be passed to theSetKeyCallbackmethod.Instances of this class may be passed to theSetMonitorCallbackmethod.Instances of this interface may be passed to theSetMonitorCallbackmethod.Instances of this class may be passed to theSetMouseButtonCallbackmethod.Instances of this interface may be passed to theSetMouseButtonCallbackmethod.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().Instances of this class may be passed to theSetPreeditCallbackmethod.Instances of this interface may be passed to theSetPreeditCallbackmethod.Instances of this class may be passed to theSetPreeditCandidateCallbackmethod.Instances of this interface may be passed to theSetPreeditCandidateCallbackmethod.The function pointer type for memory reallocation callbacks.The function pointer type for memory reallocation callbacks.Instances of this class may be passed to theSetScrollCallbackmethod.Instances of this interface may be passed to theSetScrollCallbackmethod.Describes a single video mode.An array ofGLFWVidModestructs.Native bindings to the GLFW library's Vulkan functions.Contains the function pointers loaded fromGLFW.getLibrary().Instances of this class may be passed to theSetWindowCloseCallbackmethod.Instances of this interface may be passed to theSetWindowCloseCallbackmethod.Instances of this class may be passed to theSetWindowContentScaleCallbackmethod.Instances of this interface may be passed to theSetWindowContentScaleCallbackmethod.Instances of this class may be passed to theSetWindowFocusCallbackmethod.Instances of this interface may be passed to theSetWindowFocusCallbackmethod.Instances of this class may be passed to theSetWindowIconifyCallbackmethod.Instances of this interface may be passed to theSetWindowIconifyCallbackmethod.Instances of this class may be passed to theSetWindowMaximizeCallbackmethod.Instances of this interface may be passed to theSetWindowMaximizeCallbackmethod.Instances of this class may be passed to theSetWindowPosCallbackmethod.Instances of this interface may be passed to theSetWindowPosCallbackmethod.Instances of this class may be passed to theSetWindowRefreshCallbackmethod.Instances of this interface may be passed to theSetWindowRefreshCallbackmethod.Instances of this class may be passed to theSetWindowSizeCallbackmethod.Instances of this interface may be passed to theSetWindowSizeCallbackmethod.