Top Description Interfaces Classes
module lwjgl.glfw

Package org.lwjgl.glfw

Annotations
@NonnullDefault

Contains bindings to the GLFW library.

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

Modifier and TypeInterface and Description
public interface
GLFWAllocateCallbackI

The function pointer type for memory allocation callbacks.

public interface
GLFWCharCallbackI

Instances of this interface may be passed to the SetCharCallback method.

public interface
GLFWCharModsCallbackI

Instances of this interface may be passed to the SetCharModsCallback method.

public interface
GLFWCursorEnterCallbackI

Instances of this interface may be passed to the SetCursorEnterCallback method.

public interface
GLFWCursorPosCallbackI

Instances of this interface may be passed to the SetCursorPosCallback method.

public interface
GLFWDeallocateCallbackI

The function pointer type for memory deallocation callbacks.

public interface
GLFWDropCallbackI

Instances of this interface may be passed to the SetDropCallback method.

public interface
GLFWErrorCallbackI

Instances of this interface may be passed to the SetErrorCallback method.

public interface
GLFWFramebufferSizeCallbackI

Instances of this interface may be passed to the SetFramebufferSizeCallback method.

public interface
GLFWJoystickCallbackI

Instances of this interface may be passed to the SetJoystickCallback method.

public interface
GLFWKeyCallbackI

Instances of this interface may be passed to the SetKeyCallback method.

public interface
GLFWMonitorCallbackI

Instances of this interface may be passed to the SetMonitorCallback method.

public interface
GLFWMouseButtonCallbackI

Instances of this interface may be passed to the SetMouseButtonCallback method.

public interface
GLFWReallocateCallbackI

The function pointer type for memory reallocation callbacks.

public interface
GLFWScrollCallbackI

Instances of this interface may be passed to the SetScrollCallback method.

public interface
GLFWWindowCloseCallbackI

Instances of this interface may be passed to the SetWindowCloseCallback method.

public interface
GLFWWindowContentScaleCallbackI

Instances of this interface may be passed to the SetWindowContentScaleCallback method.

public interface
GLFWWindowFocusCallbackI

Instances of this interface may be passed to the SetWindowFocusCallback method.

public interface
GLFWWindowIconifyCallbackI

Instances of this interface may be passed to the SetWindowIconifyCallback method.

public interface
GLFWWindowMaximizeCallbackI

Instances of this interface may be passed to the SetWindowMaximizeCallback method.

public interface
GLFWWindowPosCallbackI

Instances of this interface may be passed to the SetWindowPosCallback method.

public interface
GLFWWindowRefreshCallbackI

Instances of this interface may be passed to the SetWindowRefreshCallback method.

public interface
GLFWWindowSizeCallbackI

Instances of this interface may be passed to the SetWindowSizeCallback method.

Class Summary

Modifier and TypeClass and Description
public class
Callbacks

Utility class for GLFW callbacks.

pack-priv class
EventLoop

Contains checks for the event loop issues on OS X.

public class
GLFW

Native bindings to the GLFW library.

public abstract class
GLFWAllocateCallback

The function pointer type for memory allocation callbacks.

public class
GLFWAllocator

A custom memory allocator that can be set with InitAllocator.

public abstract class
GLFWCharCallback

Instances of this class may be passed to the SetCharCallback method.

public abstract class
GLFWCharModsCallback

Instances of this class may be passed to the SetCharModsCallback method.

public abstract class
GLFWCursorEnterCallback

Instances of this class may be passed to the SetCursorEnterCallback method.

public abstract class
GLFWCursorPosCallback

Instances of this class may be passed to the SetCursorPosCallback method.

public abstract class
GLFWDeallocateCallback

The function pointer type for memory deallocation callbacks.

public abstract class
GLFWDropCallback

Instances of this class may be passed to the SetDropCallback method.

public abstract class
GLFWErrorCallback

Instances of this class may be passed to the SetErrorCallback method.

public abstract class
GLFWFramebufferSizeCallback

Instances of this class may be passed to the SetFramebufferSizeCallback method.

public class
GLFWGamepadState

Describes the input state of a gamepad.

public class
GLFWGammaRamp

Describes the gamma ramp for a monitor.

public class
GLFWImage

Image data.

public abstract class
GLFWJoystickCallback

Instances of this class may be passed to the SetJoystickCallback method.

public abstract class
GLFWKeyCallback

Instances of this class may be passed to the SetKeyCallback method.

public abstract class
GLFWMonitorCallback

Instances of this class may be passed to the SetMonitorCallback method.

public abstract class
GLFWMouseButtonCallback

Instances of this class may be passed to the SetMouseButtonCallback method.

public class
GLFWNativeCocoa

Native bindings to the GLFW library's Cocoa native access functions.

public class
GLFWNativeEGL

Native bindings to the GLFW library's EGL native access functions.

public class
GLFWNativeGLX

Native bindings to the GLFW library's GLX native access functions.

public class
GLFWNativeNSGL

Native bindings to the GLFW library's NSGL native access functions.

public class
GLFWNativeOSMesa

Native bindings to the GLFW library's GLX native access functions.

public class
GLFWNativeWayland

Native bindings to the GLFW library's Wayland native access functions.

public class
GLFWNativeWGL

Native bindings to the GLFW library's WGL native access functions.

public class
GLFWNativeWin32

Native bindings to the GLFW library's Win32 native access functions.

public class
GLFWNativeX11

Native bindings to the GLFW library's X11 native access functions.

public abstract class
GLFWReallocateCallback

The function pointer type for memory reallocation callbacks.

public abstract class
GLFWScrollCallback

Instances of this class may be passed to the SetScrollCallback method.

public class
GLFWVidMode

Describes a single video mode.

public class
GLFWVulkan

Native bindings to the GLFW library's Vulkan functions.

public abstract class
GLFWWindowCloseCallback

Instances of this class may be passed to the SetWindowCloseCallback method.

public abstract class
GLFWWindowContentScaleCallback

Instances of this class may be passed to the SetWindowContentScaleCallback method.

public abstract class
GLFWWindowFocusCallback

Instances of this class may be passed to the SetWindowFocusCallback method.

public abstract class
GLFWWindowIconifyCallback

Instances of this class may be passed to the SetWindowIconifyCallback method.

public abstract class
GLFWWindowMaximizeCallback

Instances of this class may be passed to the SetWindowMaximizeCallback method.

public abstract class
GLFWWindowPosCallback

Instances of this class may be passed to the SetWindowPosCallback method.

public abstract class
GLFWWindowRefreshCallback

Instances of this class may be passed to the SetWindowRefreshCallback method.

public abstract class
GLFWWindowSizeCallback

Instances of this class may be passed to the SetWindowSizeCallback method.