Top Description Inners Fields Constructors Methods
org.lwjgl.glfw

public Class GLFW

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Native bindings to the GLFW library.

GLFW is a free, Open Source, multi-platform library for opening a window, creating an OpenGL context and managing input. It is easy to integrate into existing applications and does not lay claim to the main loop.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
GLFW.Functions

Contains the function pointers loaded from the glfw SharedLibrary.

Field Summary

Modifier and TypeField and Description
private static final SharedLibrary
public static final int
GLFW_ACCUM_ALPHA_BITS

PixelFormat hints.

public static final int
GLFW_ACCUM_BLUE_BITS

PixelFormat hints.

public static final int
GLFW_ACCUM_GREEN_BITS

PixelFormat hints.

public static final int
GLFW_ACCUM_RED_BITS

PixelFormat hints.

public static final int
GLFW_ALPHA_BITS

PixelFormat hints.

public static final int
GLFW_ANGLE_PLATFORM_TYPE

ANGLE rendering backend init hint.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
GLFW_ANY_PLATFORM

Hint value for PLATFORM that enables automatic platform selection.

public static final int
public static final int
public static final int
public static final int
GLFW_ARROW_CURSOR

The regular arrow cursor shape.

public static final int
GLFW_AUTO_ICONIFY

Window attributes.

public static final int
GLFW_AUX_BUFFERS

PixelFormat hints.

public static final int
GLFW_BLUE_BITS

PixelFormat hints.

public static final int
GLFW_CENTER_CURSOR

Window attributes.

public static final int
GLFW_CLIENT_API

Client API hints.

public static final int
GLFW_COCOA_CHDIR_RESOURCES

macOS specific init hint.

public static final int
GLFW_COCOA_FRAME_NAME

Specifies the UTF-8 encoded name to use for autosaving the window frame, or if empty disables frame autosaving for the window.

public static final int
GLFW_COCOA_GRAPHICS_SWITCHING

Specifies whether to enable Automatic Graphics Switching, i.e. to allow the system to choose the integrated GPU for the OpenGL context and move it between GPUs if necessary or whether to force it to always run on the discrete GPU.

public static final int
GLFW_COCOA_MENUBAR

macOS specific init hint.

public static final int
GLFW_COCOA_RETINA_FRAMEBUFFER

Specifies whether to use full resolution framebuffers on Retina displays.

public static final int
GLFW_CONNECTED

Monitor events.

public static final int
GLFW_CONTEXT_CREATION_API

Client API hints.

public static final int
GLFW_CONTEXT_DEBUG

Client API hints.

public static final int
GLFW_CONTEXT_NO_ERROR

Client API hints.

public static final int
public static final int
GLFW_CONTEXT_REVISION

Client API hints.

public static final int
GLFW_CONTEXT_ROBUSTNESS

Client API hints.

public static final int
GLFW_CONTEXT_VERSION_MAJOR

Client API hints.

public static final int
GLFW_CONTEXT_VERSION_MINOR

Client API hints.

public static final int
GLFW_CROSSHAIR_CURSOR

The crosshair cursor shape.

public static final int
GLFW_CURSOR

Input options.

public static final int
GLFW_CURSOR_CAPTURED

Cursor state.

public static final int
GLFW_CURSOR_DISABLED

Cursor state.

public static final int
GLFW_CURSOR_HIDDEN

Cursor state.

public static final int
GLFW_CURSOR_NORMAL

Cursor state.

public static final int
public static final int
GLFW_DECORATED

Window attributes.

public static final int
GLFW_DEPTH_BITS

PixelFormat hints.

public static final int
GLFW_DISCONNECTED

Monitor events.

public static final int
GLFW_DONT_CARE

Don't care value.

public static final int
GLFW_DOUBLEBUFFER

PixelFormat hints.

public static final int
public static final int
GLFW_FALSE

Boolean values.

public static final int
public static final int
public static final int
GLFW_FLOATING

Window attributes.

public static final int
GLFW_FOCUS_ON_SHOW

Window attributes.

public static final int
GLFW_FOCUSED

Window attributes.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
GLFW_GAMEPAD_BUTTON_A

Gamepad buttons.

public static final int
GLFW_GAMEPAD_BUTTON_B

Gamepad buttons.

public static final int
GLFW_GAMEPAD_BUTTON_BACK

Gamepad buttons.

public static final int
public static final int
GLFW_GAMEPAD_BUTTON_CROSS

Gamepad buttons.

public static final int
public static final int
public static final int
public static final int
public static final int
GLFW_GAMEPAD_BUTTON_GUIDE

Gamepad buttons.

public static final int
GLFW_GAMEPAD_BUTTON_LAST

Gamepad buttons.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
GLFW_GAMEPAD_BUTTON_START

Gamepad buttons.

public static final int
public static final int
GLFW_GAMEPAD_BUTTON_X

Gamepad buttons.

public static final int
GLFW_GAMEPAD_BUTTON_Y

Gamepad buttons.

public static final int
GLFW_GREEN_BITS

PixelFormat hints.

public static final int
GLFW_HAND_CURSOR

Legacy name for compatibility.

public static final int
GLFW_HAT_CENTERED

Joystick hat states.

public static final int
GLFW_HAT_DOWN

Joystick hat states.

public static final int
GLFW_HAT_LEFT

Joystick hat states.

public static final int
GLFW_HAT_LEFT_DOWN

Joystick hat states.

public static final int
GLFW_HAT_LEFT_UP

Joystick hat states.

public static final int
GLFW_HAT_RIGHT

Joystick hat states.

public static final int
GLFW_HAT_RIGHT_DOWN

Joystick hat states.

public static final int
GLFW_HAT_RIGHT_UP

Joystick hat states.

public static final int
GLFW_HAT_UP

Joystick hat states.

public static final int
GLFW_HOVERED

Window attributes.

public static final int
GLFW_HRESIZE_CURSOR

Legacy name for compatibility.

public static final int
GLFW_IBEAM_CURSOR

The text input I-beam cursor shape.

public static final int
GLFW_ICONIFIED

Window attributes.

public static final int
GLFW_INVALID_ENUM

Error codes.

public static final int
GLFW_INVALID_VALUE

Error codes.

public static final int
GLFW_JOYSTICK_1

Joysticks.

public static final int
GLFW_JOYSTICK_10

Joysticks.

public static final int
GLFW_JOYSTICK_11

Joysticks.

public static final int
GLFW_JOYSTICK_12

Joysticks.

public static final int
GLFW_JOYSTICK_13

Joysticks.

public static final int
GLFW_JOYSTICK_14

Joysticks.

public static final int
GLFW_JOYSTICK_15

Joysticks.

public static final int
GLFW_JOYSTICK_16

Joysticks.

public static final int
GLFW_JOYSTICK_2

Joysticks.

public static final int
GLFW_JOYSTICK_3

Joysticks.

public static final int
GLFW_JOYSTICK_4

Joysticks.

public static final int
GLFW_JOYSTICK_5

Joysticks.

public static final int
GLFW_JOYSTICK_6

Joysticks.

public static final int
GLFW_JOYSTICK_7

Joysticks.

public static final int
GLFW_JOYSTICK_8

Joysticks.

public static final int
GLFW_JOYSTICK_9

Joysticks.

public static final int
GLFW_JOYSTICK_HAT_BUTTONS

Joystick hat buttons init hint.

public static final int
public static final int
GLFW_KEY_0

Printable keys.

public static final int
GLFW_KEY_1

Printable keys.

public static final int
GLFW_KEY_2

Printable keys.

public static final int
GLFW_KEY_3

Printable keys.

public static final int
GLFW_KEY_4

Printable keys.

public static final int
GLFW_KEY_5

Printable keys.

public static final int
GLFW_KEY_6

Printable keys.

public static final int
GLFW_KEY_7

Printable keys.

public static final int
GLFW_KEY_8

Printable keys.

public static final int
GLFW_KEY_9

Printable keys.

public static final int
GLFW_KEY_A

Printable keys.

public static final int
GLFW_KEY_APOSTROPHE

Printable keys.

public static final int
GLFW_KEY_B

Printable keys.

public static final int
GLFW_KEY_BACKSLASH

Printable keys.

public static final int
GLFW_KEY_BACKSPACE

Function keys.

public static final int
GLFW_KEY_C

Printable keys.

public static final int
GLFW_KEY_CAPS_LOCK

Function keys.

public static final int
GLFW_KEY_COMMA

Printable keys.

public static final int
GLFW_KEY_D

Printable keys.

public static final int
GLFW_KEY_DELETE

Function keys.

public static final int
GLFW_KEY_DOWN

Function keys.

public static final int
GLFW_KEY_E

Printable keys.

public static final int
GLFW_KEY_END

Function keys.

public static final int
GLFW_KEY_ENTER

Function keys.

public static final int
GLFW_KEY_EQUAL

Printable keys.

public static final int
GLFW_KEY_ESCAPE

Function keys.

public static final int
GLFW_KEY_F

Printable keys.

public static final int
GLFW_KEY_F1

Function keys.

public static final int
GLFW_KEY_F10

Function keys.

public static final int
GLFW_KEY_F11

Function keys.

public static final int
GLFW_KEY_F12

Function keys.

public static final int
GLFW_KEY_F13

Function keys.

public static final int
GLFW_KEY_F14

Function keys.

public static final int
GLFW_KEY_F15

Function keys.

public static final int
GLFW_KEY_F16

Function keys.

public static final int
GLFW_KEY_F17

Function keys.

public static final int
GLFW_KEY_F18

Function keys.

public static final int
GLFW_KEY_F19

Function keys.

public static final int
GLFW_KEY_F2

Function keys.

public static final int
GLFW_KEY_F20

Function keys.

public static final int
GLFW_KEY_F21

Function keys.

public static final int
GLFW_KEY_F22

Function keys.

public static final int
GLFW_KEY_F23

Function keys.

public static final int
GLFW_KEY_F24

Function keys.

public static final int
GLFW_KEY_F25

Function keys.

public static final int
GLFW_KEY_F3

Function keys.

public static final int
GLFW_KEY_F4

Function keys.

public static final int
GLFW_KEY_F5

Function keys.

public static final int
GLFW_KEY_F6

Function keys.

public static final int
GLFW_KEY_F7

Function keys.

public static final int
GLFW_KEY_F8

Function keys.

public static final int
GLFW_KEY_F9

Function keys.

public static final int
GLFW_KEY_G

Printable keys.

public static final int
GLFW_KEY_GRAVE_ACCENT

Printable keys.

public static final int
GLFW_KEY_H

Printable keys.

public static final int
GLFW_KEY_HOME

Function keys.

public static final int
GLFW_KEY_I

Printable keys.

public static final int
GLFW_KEY_INSERT

Function keys.

public static final int
GLFW_KEY_J

Printable keys.

public static final int
GLFW_KEY_K

Printable keys.

public static final int
GLFW_KEY_KP_0

Function keys.

public static final int
GLFW_KEY_KP_1

Function keys.

public static final int
GLFW_KEY_KP_2

Function keys.

public static final int
GLFW_KEY_KP_3

Function keys.

public static final int
GLFW_KEY_KP_4

Function keys.

public static final int
GLFW_KEY_KP_5

Function keys.

public static final int
GLFW_KEY_KP_6

Function keys.

public static final int
GLFW_KEY_KP_7

Function keys.

public static final int
GLFW_KEY_KP_8

Function keys.

public static final int
GLFW_KEY_KP_9

Function keys.

public static final int
GLFW_KEY_KP_ADD

Function keys.

public static final int
GLFW_KEY_KP_DECIMAL

Function keys.

public static final int
GLFW_KEY_KP_DIVIDE

Function keys.

public static final int
GLFW_KEY_KP_ENTER

Function keys.

public static final int
GLFW_KEY_KP_EQUAL

Function keys.

public static final int
GLFW_KEY_KP_MULTIPLY

Function keys.

public static final int
GLFW_KEY_KP_SUBTRACT

Function keys.

public static final int
GLFW_KEY_L

Printable keys.

public static final int
GLFW_KEY_LAST

Function keys.

public static final int
GLFW_KEY_LEFT

Function keys.

public static final int
GLFW_KEY_LEFT_ALT

Function keys.

public static final int
GLFW_KEY_LEFT_BRACKET

Printable keys.

public static final int
GLFW_KEY_LEFT_CONTROL

Function keys.

public static final int
GLFW_KEY_LEFT_SHIFT

Function keys.

public static final int
GLFW_KEY_LEFT_SUPER

Function keys.

public static final int
GLFW_KEY_M

Printable keys.

public static final int
GLFW_KEY_MENU

Function keys.

public static final int
GLFW_KEY_MINUS

Printable keys.

public static final int
GLFW_KEY_N

Printable keys.

public static final int
GLFW_KEY_NUM_LOCK

Function keys.

public static final int
GLFW_KEY_O

Printable keys.

public static final int
GLFW_KEY_P

Printable keys.

public static final int
GLFW_KEY_PAGE_DOWN

Function keys.

public static final int
GLFW_KEY_PAGE_UP

Function keys.

public static final int
GLFW_KEY_PAUSE

Function keys.

public static final int
GLFW_KEY_PERIOD

Printable keys.

public static final int
GLFW_KEY_PRINT_SCREEN

Function keys.

public static final int
GLFW_KEY_Q

Printable keys.

public static final int
GLFW_KEY_R

Printable keys.

public static final int
GLFW_KEY_RIGHT

Function keys.

public static final int
GLFW_KEY_RIGHT_ALT

Function keys.

public static final int
GLFW_KEY_RIGHT_BRACKET

Printable keys.

public static final int
GLFW_KEY_RIGHT_CONTROL

Function keys.

public static final int
GLFW_KEY_RIGHT_SHIFT

Function keys.

public static final int
GLFW_KEY_RIGHT_SUPER

Function keys.

public static final int
GLFW_KEY_S

Printable keys.

public static final int
GLFW_KEY_SCROLL_LOCK

Function keys.

public static final int
GLFW_KEY_SEMICOLON

Printable keys.

public static final int
GLFW_KEY_SLASH

Printable keys.

public static final int
GLFW_KEY_SPACE

Printable keys.

public static final int
GLFW_KEY_T

Printable keys.

public static final int
GLFW_KEY_TAB

Function keys.

public static final int
GLFW_KEY_U

Printable keys.

public static final int
GLFW_KEY_UNKNOWN

The unknown key.

public static final int
GLFW_KEY_UP

Function keys.

public static final int
GLFW_KEY_V

Printable keys.

public static final int
GLFW_KEY_W

Printable keys.

public static final int
GLFW_KEY_WORLD_1

Printable keys.

public static final int
GLFW_KEY_WORLD_2

Printable keys.

public static final int
GLFW_KEY_X

Printable keys.

public static final int
GLFW_KEY_Y

Printable keys.

public static final int
GLFW_KEY_Z

Printable keys.

public static final int
GLFW_LOCK_KEY_MODS

Input options.

public static final int
public static final int
GLFW_MAXIMIZED

Window attributes.

public static final int
GLFW_MOD_ALT

If this bit is set one or more Alt keys were held down.

public static final int
GLFW_MOD_CAPS_LOCK

If this bit is set the Caps Lock key is enabled and the LOCK_KEY_MODS input mode is set.

public static final int
GLFW_MOD_CONTROL

If this bit is set one or more Control keys were held down.

public static final int
GLFW_MOD_NUM_LOCK

If this bit is set the Num Lock key is enabled and the LOCK_KEY_MODS input mode is set.

public static final int
GLFW_MOD_SHIFT

If this bit is set one or more Shift keys were held down.

public static final int
GLFW_MOD_SUPER

If this bit is set one or more Super keys were held down.

public static final int
GLFW_MOUSE_BUTTON_1

Mouse buttons.

public static final int
GLFW_MOUSE_BUTTON_2

Mouse buttons.

public static final int
GLFW_MOUSE_BUTTON_3

Mouse buttons.

public static final int
GLFW_MOUSE_BUTTON_4

Mouse buttons.

public static final int
GLFW_MOUSE_BUTTON_5

Mouse buttons.

public static final int
GLFW_MOUSE_BUTTON_6

Mouse buttons.

public static final int
GLFW_MOUSE_BUTTON_7

Mouse buttons.

public static final int
GLFW_MOUSE_BUTTON_8

Mouse buttons.

public static final int
GLFW_MOUSE_BUTTON_LAST

Mouse buttons.

public static final int
GLFW_MOUSE_BUTTON_LEFT

Mouse buttons.

public static final int
public static final int
public static final int
GLFW_MOUSE_PASSTHROUGH

Window attributes.

public static final int
public static final int
GLFW_NO_API

Values for the CLIENT_API hint.

public static final int
public static final int
GLFW_NO_ERROR

Error codes.

public static final int
public static final int
public static final int
public static final int
GLFW_NOT_ALLOWED_CURSOR

The operation-not-allowed shape.

public static final int
public static final int
public static final int
GLFW_OPENGL_API

Values for the CLIENT_API hint.

public static final int
public static final int
public static final int
GLFW_OPENGL_DEBUG_CONTEXT

Client API hints.

public static final int
GLFW_OPENGL_ES_API

Values for the CLIENT_API hint.

public static final int
GLFW_OPENGL_FORWARD_COMPAT

Client API hints.

public static final int
GLFW_OPENGL_PROFILE

Client API hints.

public static final int
public static final int
GLFW_OUT_OF_MEMORY

Error codes.

public static final int
GLFW_PLATFORM

Platform selection init hint.

public static final int
GLFW_PLATFORM_COCOA

Hint value for PLATFORM that enables automatic platform selection.

public static final int
GLFW_PLATFORM_ERROR

Error codes.

public static final int
GLFW_PLATFORM_NULL

Hint value for PLATFORM that enables automatic platform selection.

public static final int
public static final int
GLFW_PLATFORM_WAYLAND

Hint value for PLATFORM that enables automatic platform selection.

public static final int
GLFW_PLATFORM_WIN32

Hint value for PLATFORM that enables automatic platform selection.

public static final int
GLFW_PLATFORM_X11

Hint value for PLATFORM that enables automatic platform selection.

public static final int
GLFW_POINTING_HAND_CURSOR

The pointing hand cursor shape.

public static final int
GLFW_POSITION_X

Window attributes.

public static final int
GLFW_POSITION_Y

Window attributes.

public static final int
GLFW_PRESS

The key or button was pressed.

public static final int
GLFW_RAW_MOUSE_MOTION

Input options.

public static final int
GLFW_RED_BITS

PixelFormat hints.

public static final int
GLFW_REFRESH_RATE

PixelFormat hints.

public static final int
GLFW_RELEASE

The key or button was released.

public static final int
public static final int
public static final int
GLFW_REPEAT

The key was held down until it repeated.

public static final int
GLFW_RESIZABLE

Window attributes.

public static final int
GLFW_RESIZE_ALL_CURSOR

The omni-directional resize cursor/move shape.

public static final int
GLFW_RESIZE_EW_CURSOR

The horizontal resize/move arrow shape.

public static final int
GLFW_RESIZE_NESW_CURSOR

The top-right to bottom-left diagonal resize/move shape.

public static final int
GLFW_RESIZE_NS_CURSOR

The vertical resize/move shape.

public static final int
GLFW_RESIZE_NWSE_CURSOR

The top-left to bottom-right diagonal resize/move shape.

public static final int
GLFW_SAMPLES

PixelFormat hints.

public static final int
GLFW_SCALE_TO_MONITOR

Client API hints.

public static final int
GLFW_SRGB_CAPABLE

PixelFormat hints.

public static final int
GLFW_STENCIL_BITS

PixelFormat hints.

public static final int
GLFW_STEREO

PixelFormat hints.

public static final int
GLFW_STICKY_KEYS

Input options.

public static final int
public static final int
GLFW_TRANSPARENT_FRAMEBUFFER

Window attributes.

public static final int
GLFW_TRUE

Boolean values.

public static final int
GLFW_VERSION_MAJOR

The major version number of the GLFW header.

public static final int
GLFW_VERSION_MINOR

The minor version number of the GLFW header.

public static final int
GLFW_VERSION_REVISION

The revision number of the GLFW header.

public static final int
public static final int
GLFW_VISIBLE

Window attributes.

public static final int
GLFW_VRESIZE_CURSOR

Legacy name for compatibility.

public static final int
GLFW_WAYLAND_APP_ID

Allows specification of the Wayland app_id.

public static final int
public static final int
GLFW_WAYLAND_LIBDECOR

Wayland specific init hint.

public static final int
public static final int
GLFW_WIN32_KEYBOARD_MENU

Specifies whether to allow access to the window menu via the Alt+Space and Alt-and-then-Space keyboard shortcuts.

public static final int
GLFW_X11_CLASS_NAME

The desired ASCII encoded class and instance parts of the ICCCM WM_CLASS window property.

public static final int
GLFW_X11_INSTANCE_NAME

The desired ASCII encoded class and instance parts of the ICCCM WM_CLASS window property.

public static final int
GLFW_X11_XCB_VULKAN_SURFACE

X11 specific init hint.

Constructor Summary

AccessConstructor and Description
protected
GLFW()

Method Summary

Modifier and TypeMethod and Description
public static SharedLibrary
getLibrary()

Returns the glfw SharedLibrary.

public static long

Returns:

the handle of the created cursor, or NULL if an error occurred
glfwCreateCursor
(GLFWImage
the desired cursor image
image
,
int
the desired x-coordinate, in pixels, of the cursor hotspot
xhot
,
int
the desired y-coordinate, in pixels, of the cursor hotspot
yhot
)

Creates a new custom cursor image that can be set for a window with SetCursor.

public static long

Returns:

a new cursor ready to use or NULL if an error occurred. Possible errors include NOT_INITIALIZED, INVALID_ENUM, CURSOR_UNAVAILABLE and PLATFORM_ERROR.
glfwCreateStandardCursor
(int shape)

Returns a cursor with a standard shape, that can be set for a window with SetCursor.

public static long

Returns:

the handle of the created window, or NULL if an error occurred
glfwCreateWindow
(int
the desired width, in screen coordinates, of the window
width
,
int
the desired height, in screen coordinates, of the window
height
,
ByteBuffer
initial, UTF-8 encoded window title
title
,
long
the monitor to use for fullscreen mode, or NULL for windowed mode
monitor
,
long
the window whose context to share resources with, or NULL to not share resources
share
)

Creates a window and its associated OpenGL or OpenGL ES context.

public static long

Returns:

the handle of the created window, or NULL if an error occurred
glfwCreateWindow
(int
the desired width, in screen coordinates, of the window
width
,
int
the desired height, in screen coordinates, of the window
height
,
CharSequence
initial, UTF-8 encoded window title
title
,
long
the monitor to use for fullscreen mode, or NULL for windowed mode
monitor
,
long
the window whose context to share resources with, or NULL to not share resources
share
)

Creates a window and its associated OpenGL or OpenGL ES context.

public static void
glfwDefaultWindowHints()

Resets all window hints to their default values.

public static void
glfwDestroyCursor(long
the cursor object to destroy
cursor
)

Destroys a cursor previously created with CreateCursor.

public static void
glfwDestroyWindow(long
the window to destroy
window
)

Destroys the specified window and its context.

public static boolean

Returns:

TRUE if the extension is available, or FALSE otherwise
glfwExtensionSupported
(ByteBuffer
the ASCII encoded name of the extension
extension
)

Returns whether the specified API extension is supported by the current OpenGL or OpenGL ES context.

public static boolean

Returns:

TRUE if the extension is available, or FALSE otherwise
glfwExtensionSupported
(CharSequence
the ASCII encoded name of the extension
extension
)

Returns whether the specified API extension is supported by the current OpenGL or OpenGL ES context.

public static void
glfwFocusWindow(long
the window to give input focus
window
)

Brings the specified window to front and sets input focus.

public static String

Returns:

the contents of the clipboard as a UTF-8 encoded string, or NULL if an error occurred
glfwGetClipboardString
(long
deprecated, any valid window or NULL.
window
)

Returns the contents of the system clipboard, if it contains or is convertible to a UTF-8 encoded string.

public static long

Returns:

the window whose context is current, or NULL if no window's context is current
glfwGetCurrentContext
()

Returns the window whose OpenGL or OpenGL ES context is current on the calling thread.

public static void
glfwGetCursorPos(long
the desired window
window
,
DoubleBuffer
where to store the cursor x-coordinate, relative to the left edge of the content area, or NULL
xpos
,
DoubleBuffer
where to store the cursor y-coordinate, relative to the to top edge of the content area, or NULL.
ypos
)

Returns the position of the cursor, in screen coordinates, relative to the upper-left corner of the content area of the specified window.

public static void
glfwGetCursorPos(long window, double[] xpos, double[] ypos)

Array version of: GetCursorPos

public static int

Returns:

the last error code for the calling thread, or NO_ERROR (zero)
glfwGetError
(PointerBuffer
where to store the error description pointer, or NULL
description
)

Returns and clears the last error for the calling thread.

public static void
glfwGetFramebufferSize(long
the window whose framebuffer to query
window
,
IntBuffer
where to store the width, in pixels, of the framebuffer, or NULL
width
,
IntBuffer
where to store the height, in pixels, of the framebuffer, or NULL
height
)

Retrieves the size, in pixels, of the framebuffer of the specified window.

public static void
glfwGetFramebufferSize(long window, int[] width, int[] height)

Array version of: GetFramebufferSize

public static String

Returns:

the UTF-8 encoded name of the gamepad, or NULL if the joystick is not present, does not have a mapping or an error occurred
glfwGetGamepadName
(int
the joystick to query
jid
)

Returns the human-readable name of the gamepad from the gamepad mapping assigned to the specified joystick.

public static boolean

Returns:

true if successful, or false if no joystick is connected, it has no gamepad mapping or an error occurred
glfwGetGamepadState
(int
the joystick to query
jid
,
GLFWGamepadState
the gamepad input state of the joystick
state
)

Retrieves the state of the specified joystick remapped to an Xbox-like gamepad.

public static GLFWGammaRamp

Returns:

the current gamma ramp, or NULL if an error occurred
glfwGetGammaRamp
(long
the monitor to query
monitor
)

Returns the current gamma ramp of the specified monitor.

public static int

Returns:

the input mode value
glfwGetInputMode
(long
the window to query
window
,
int
the input mode whose value to return. One of:
CURSORSTICKY_KEYSSTICKY_MOUSE_BUTTONSLOCK_KEY_MODSRAW_MOUSE_MOTION
mode
)

Returns the value of an input option for the specified window.

public static FloatBuffer

Returns:

an array of axis values, or NULL if the joystick is not present
glfwGetJoystickAxes
(int
the joystick to query
jid
)

Returns the values of all axes of the specified joystick.

public static ByteBuffer

Returns:

an array of button states, or NULL if the joystick is not present
glfwGetJoystickButtons
(int
the joystick to query
jid
)

Returns the state of all buttons of the specified joystick.

public static String

Returns:

the UTF-8 encoded GUID of the joystick, or NULL if the joystick is not present or an error occurred
glfwGetJoystickGUID
(int
the joystick to query
jid
)

Returns the SDL compatible GUID, as a UTF-8 encoded hexadecimal string, of the specified joystick.

public static ByteBuffer

Returns:

an array of hat states, or NULL if the joystick is not present or an error occurred
glfwGetJoystickHats
(int
the joystick to query
jid
)

Returns the state of all hats of the specified joystick.

public static String

Returns:

the UTF-8 encoded name of the joystick, or NULL if the joystick is not present
glfwGetJoystickName
(int
the joystick to query
jid
)

Returns the name, encoded as UTF-8, of the specified joystick.

public static long
glfwGetJoystickUserPointer(int
the joystick whose pointer to set
jid
)

Returns the user pointer of the specified joystick.

public static int

Returns:

one of PRESS or RELEASE
glfwGetKey
(long
the desired window
window
,
int
the desired keyboard key
key
)

Returns the last state reported for the specified key to the specified window.

public static String

Returns:

the UTF-8 encoded, layout-specific name of the key, or NULL
glfwGetKeyName
(int
the key to query, or KEY_UNKNOWN
key
,
int
the scancode of the key to query
scancode
)

Returns the layout-specific name of the specified printable key.

public static int

Returns:

the platform dependent scancode for the key, or -1 if an errror occurred
glfwGetKeyScancode
(int
the key to query, or KEY_UNKNOWN
key
)

Returns the platform dependent scancode of the specified key.

public static void
glfwGetMonitorContentScale(long
the monitor to query
monitor
,
FloatBuffer
where to store the x-axis content scale, or NULL
xscale
,
FloatBuffer
where to store the y-axis content scale, or NULL
yscale
)

Retrieves the content scale for the specified monitor.

public static void
glfwGetMonitorContentScale(long monitor, float[] xscale, float[] yscale)

Array version of: GetMonitorContentScale

public static String

Returns:

the UTF-8 encoded name of the monitor, or NULL if an error occurred
glfwGetMonitorName
(long
the monitor to query
monitor
)

Returns a human-readable name, encoded as UTF-8, of the specified monitor.

public static void
glfwGetMonitorPhysicalSize(long
the monitor to query
monitor
,
IntBuffer
where to store the width, in millimetres, of the monitor's display area, or NULL
widthMM
,
IntBuffer
where to store the height, in millimetres, of the monitor's display area, or NULL
heightMM
)

Returns the size, in millimetres, of the display area of the specified monitor.

public static void
glfwGetMonitorPhysicalSize(long monitor, int[] widthMM, int[] heightMM)

Array version of: GetMonitorPhysicalSize

public static void
glfwGetMonitorPos(long
the monitor to query
monitor
,
IntBuffer
where to store the monitor x-coordinate, or NULL
xpos
,
IntBuffer
where to store the monitor y-coordinate, or NULL
ypos
)

Returns the position, in screen coordinates, of the upper-left corner of the specified monitor.

public static void
glfwGetMonitorPos(long monitor, int[] xpos, int[] ypos)

Array version of: GetMonitorPos

public static PointerBuffer

Returns:

an array of monitor handlers, or NULL if no monitors were found or if an error occurred
glfwGetMonitors
()

Returns an array of handles for all currently connected monitors.

public static long
glfwGetMonitorUserPointer(long
the monitor whose pointer to return
monitor
)

Returns the user pointer of the specified monitor.

public static void
glfwGetMonitorWorkarea(long
the monitor to query
monitor
,
IntBuffer
where to store the working area x-coordinate, or NULL
xpos
,
IntBuffer
where to store the working area y-coordinate, or NULL
ypos
,
IntBuffer
where to store the working area width, or NULL
width
,
IntBuffer
where to store the working area height, or NULL
height
)

Retrieves the work area of the monitor.

public static void
glfwGetMonitorWorkarea(long monitor, int[] xpos, int[] ypos, int[] width, int[] height)

Array version of: GetMonitorWorkarea

public static int

Returns:

one of PRESS or RELEASE
glfwGetMouseButton
(long
the desired window
window
,
int
the desired mouse button
button
)

Returns the last state reported for the specified mouse button to the specified window.

public static int

Returns:

the currently selected platform, or zero if an error occurred.

Possible errors include NOT_INITIALIZED.

glfwGetPlatform
()

Returns the currently selected platform.

public static long

Returns:

the primary monitor, or NULL if no monitors were found or if an error occurred
glfwGetPrimaryMonitor
()

Returns the primary monitor.

public static long

Returns:

the address of the function, or NULL if an error occurred
glfwGetProcAddress
(ByteBuffer
the ASCII encoded name of the function
procname
)

Returns the address of the specified OpenGL or OpenGL ES core or extension function, if it is supported by the current context.

public static long

Returns:

the address of the function, or NULL if an error occurred
glfwGetProcAddress
(CharSequence
the ASCII encoded name of the function
procname
)

Returns the address of the specified OpenGL or OpenGL ES core or extension function, if it is supported by the current context.

public static double

Returns:

the current value, in seconds, or zero if an error occurred
glfwGetTime
()

Returns the value of the GLFW timer.

public static long

Returns:

the frequency of the timer, in Hz, or zero if an error occurred
glfwGetTimerFrequency
()

Returns the frequency, in Hz, of the raw timer.

public static long

Returns:

the value of the timer, or zero if an error occurred
glfwGetTimerValue
()

Returns the current value of the raw timer.

public static void
glfwGetVersion(IntBuffer
where to store the major version number, or NULL
major
,
IntBuffer
where to store the minor version number, or NULL
minor
,
IntBuffer
where to store the revision number, or NULL
rev
)

Retrieves the major, minor and revision numbers of the GLFW library.

public static void
glfwGetVersion(int[] major, int[] minor, int[] rev)

Array version of: GetVersion

public static String

Returns:

the ASCII encoded GLFW version string
glfwGetVersionString
()

Returns the compile-time generated version string of the GLFW library binary.

public static GLFWVidMode

Returns:

the current mode of the monitor, or NULL if an error occurred
glfwGetVideoMode
(long
the monitor to query
monitor
)

Returns the current video mode of the specified monitor.

public static GLFWVidMode.Buffer

Returns:

an array of video modes, or NULL if an error occurred
glfwGetVideoModes
(long
the monitor to query
monitor
)

Returns an array of all video modes supported by the specified monitor.

public static int
public static void
glfwGetWindowContentScale(long
the window to query
window
,
FloatBuffer
where to store the x-axis content scale, or NULL
xscale
,
FloatBuffer
where to store the y-axis content scale, or NULL
yscale
)

Retrieves the content scale for the specified window.

public static void
glfwGetWindowContentScale(long window, float[] xscale, float[] yscale)

Array version of: GetWindowContentScale

public static void
glfwGetWindowFrameSize(long
the window whose frame size to query
window
,
IntBuffer
where to store the size, in screen coordinates, of the left edge of the window frame, or NULL
left
,
IntBuffer
where to store the size, in screen coordinates, of the top edge of the window frame, or NULL
top
,
IntBuffer
where to store the size, in screen coordinates, of the right edge of the window frame, or NULL
right
,
IntBuffer
where to store the size, in screen coordinates, of the bottom edge of the window frame, or NULL
bottom
)

Retrieves the size, in screen coordinates, of each edge of the frame of the specified window.

public static void
glfwGetWindowFrameSize(long window, int[] left, int[] top, int[] right, int[] bottom)

Array version of: GetWindowFrameSize

public static long

Returns:

the monitor, or NULL if the window is in windowed mode or an error occurred
glfwGetWindowMonitor
(long
the window to query
window
)

Returns the handle of the monitor that the specified window is in full screen on.

public static float

Returns:

the opacity value of the specified window
glfwGetWindowOpacity
(long
the window to query
window
)

Returns the opacity of the whole window.

public static void
glfwGetWindowPos(long
the window to query
window
,
IntBuffer
where to store the x-coordinate of the upper-left corner of the content area, or NULL
xpos
,
IntBuffer
where to store the y-coordinate of the upper-left corner of the content area, or NULL
ypos
)

Retrieves the position, in screen coordinates, of the upper-left corner of the content area of the specified window.

public static void
glfwGetWindowPos(long window, int[] xpos, int[] ypos)

Array version of: GetWindowPos

public static void
glfwGetWindowSize(long
the window whose size to retrieve
window
,
IntBuffer
where to store the width, in screen coordinates, of the content area, or NULL
width
,
IntBuffer
where to store the height, in screen coordinates, of the content area, or NULL
height
)

Retrieves the size, in screen coordinates, of the content area of the specified window.

public static void
glfwGetWindowSize(long window, int[] width, int[] height)

Array version of: GetWindowSize

public static long
glfwGetWindowUserPointer(long
the window whose pointer to return
window
)

Returns the current value of the user-defined pointer of the specified window.

public static void
glfwHideWindow(long
the window to hide
window
)

Hides the specified window, if it was previously visible.

public static void
glfwIconifyWindow(long
the window to iconify
window
)

Iconifies (minimizes) the specified window if it was previously restored.

public static boolean

Returns:

TRUE if successful, or FALSE if an error occurred.

Possible errors include PLATFORM_UNAVAILABLE and PLATFORM_ERROR.

glfwInit
()

Initializes the GLFW library.

public static void
glfwInitAllocator(GLFWAllocator
the allocator to use at the next initialization, or NULL to use the default one
allocator
)

Sets the init allocator to the desired value.

public static void
glfwInitHint(int hint, int
the new value of the init hint
value
)

Sets hints for the next initialization of GLFW.

public static boolean

Returns:

true if a joystick is both present and has a gamepad mapping or false otherwise
glfwJoystickIsGamepad
(int
the joystick id to query
jid
)

Returns whether the specified joystick is both present and has a gamepad mapping.

public static boolean

Returns:

TRUE if the joystick is present, or FALSE otherwise
glfwJoystickPresent
(int
joystick to query
jid
)

Returns whether the specified joystick is present.

public static void
glfwMakeContextCurrent(long
the window whose context to make current, or NULL to detach the current context
window
)

Makes the OpenGL or OpenGL ES context of the specified window current on the calling thread.

public static void
glfwMaximizeWindow(long
the window to maximize
window
)

Maximizes the specified window if it was previously not maximized.

public static boolean

Returns:

TRUE if the platform is supported, or FALSE otherwise.

Possible errors include INVALID_ENUM.

glfwPlatformSupported
(int platform)

Returns whether the library includes support for the specified platform.

public static void
glfwPollEvents()

Processes all pending events.

public static void
glfwPostEmptyEvent()

Posts an empty event from the current thread to the main thread event queue, causing WaitEvents or WaitEventsTimeout to return.

public static boolean

Returns:

TRUE if raw mouse motion is supported on the current machine, or FALSE otherwise
glfwRawMouseMotionSupported
()

Returns whether raw mouse motion is supported.

public static void
glfwRequestWindowAttention(long
the window to request attention to
window
)

Requests user attention to the specified window.

public static void
glfwRestoreWindow(long
the window to restore
window
)

Restores the specified window if it was previously iconified (minimized) or maximized.

public static GLFWCharCallback

Returns:

the previously set callback, or NULL if no callback was set
glfwSetCharCallback
(long
the window whose callback to set
window
,
GLFWCharCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the character callback of the specified window, which is called when a Unicode character is input.

public static GLFWCharModsCallback

Returns:

the previously set callback, or NULL if no callback was set
glfwSetCharModsCallback
(long
the window whose callback to set
window
,
GLFWCharModsCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the character with modifiers callback of the specified window, which is called when a Unicode character is input regardless of what modifier keys are used.

public static void
glfwSetClipboardString(long
deprecated, any valid window or NULL.
window
,
ByteBuffer
a UTF-8 encoded string
string
)

Sets the system clipboard to the specified, UTF-8 encoded string.

public static void
glfwSetClipboardString(long
deprecated, any valid window or NULL.
window
,
CharSequence
a UTF-8 encoded string
string
)

Sets the system clipboard to the specified, UTF-8 encoded string.

public static void
glfwSetCursor(long
the window to set the system cursor for
window
,
long
the cursor to set, or NULL to switch back to the default arrow cursor
cursor
)

Sets the cursor image to be used when the cursor is over the content area of the specified window.

public static GLFWCursorEnterCallback

Returns:

the previously set callback, or NULL if no callback was set
glfwSetCursorEnterCallback
(long
the window whose callback to set
window
,
GLFWCursorEnterCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the cursor boundary crossing callback of the specified window, which is called when the cursor enters or leaves the content area of the window.

public static void
glfwSetCursorPos(long
the desired window
window
,
double
the desired x-coordinate, relative to the left edge of the content area
xpos
,
double
the desired y-coordinate, relative to the top edge of the content area
ypos
)

Sets the position, in screen coordinates, of the cursor relative to the upper-left corner of the content area of the specified window.

public static GLFWCursorPosCallback

Returns:

the previously set callback, or NULL if no callback was set
glfwSetCursorPosCallback
(long
the window whose callback to set
window
,
GLFWCursorPosCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the cursor position callback of the specified window, which is called when the cursor is moved.

public static GLFWDropCallback

Returns:

the previously set callback, or NULL if no callback was set
glfwSetDropCallback
(long
the window whose callback to set
window
,
GLFWDropCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the file drop callback of the specified window, which is called when one or more dragged files are dropped on the window.

public static GLFWErrorCallback

Returns:

the previously set callback, or NULL if no callback was set
glfwSetErrorCallback
(GLFWErrorCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the error callback, which is called with an error code and a human-readable description each time a GLFW error occurs.

public static GLFWFramebufferSizeCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetFramebufferSizeCallback
(long
the window whose callback to set
window
,
GLFWFramebufferSizeCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the framebuffer resize callback of the specified window, which is called when the framebuffer of the specified window is resized.

public static void
glfwSetGamma(long
the monitor whose gamma ramp to set
monitor
,
float
the desired exponent
gamma
)

Generates a gamma ramp and sets it for the specified monitor.

public static void
glfwSetGammaRamp(long
the monitor whose gamma ramp to set
monitor
,
GLFWGammaRamp
the gamma ramp to use
ramp
)

Sets the current gamma ramp for the specified monitor.

public static void
glfwSetInputMode(long
the window whose input mode to set
window
,
int
the input mode to set. One of:
CURSORSTICKY_KEYSSTICKY_MOUSE_BUTTONS
mode
,
int
the new value of the specified input mode
value
)

Sets an input option for the specified window.

public static GLFWJoystickCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetJoystickCallback
(GLFWJoystickCallbackI
the new callback, or NULL to remove the currently set callback
cbfun
)

Sets the joystick configuration callback, or removes the currently set callback.

public static void
glfwSetJoystickUserPointer(int
the joystick whose pointer to set
jid
,
long
the new value
pointer
)

Sets the user pointer of the specified joystick.

public static GLFWKeyCallback

Returns:

the previously set callback, or NULL if no callback was set
glfwSetKeyCallback
(long
the window whose callback to set
window
,
GLFWKeyCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the key callback of the specified window, which is called when a key is pressed, repeated or released.

public static GLFWMonitorCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetMonitorCallback
(GLFWMonitorCallbackI
the new callback, or NULL to remove the currently set callback
cbfun
)

Sets the monitor configuration callback, or removes the currently set callback.

public static void
glfwSetMonitorUserPointer(long
the monitor whose pointer to set
monitor
,
long
the new value
pointer
)

Sets the user pointer of the specified monitor.

public static GLFWMouseButtonCallback

Returns:

the previously set callback, or NULL if no callback was set
glfwSetMouseButtonCallback
(long
the window whose callback to set
window
,
GLFWMouseButtonCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the mouse button callback of the specified window, which is called when a mouse button is pressed or released.

public static GLFWScrollCallback

Returns:

the previously set callback, or NULL if no callback was set
glfwSetScrollCallback
(long
the window whose callback to set
window
,
GLFWScrollCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the scroll callback of the specified window, which is called when a scrolling device is used.

public static void
glfwSetTime(double
the new value, in seconds
time
)

Sets the value of the GLFW timer.

public static void
glfwSetWindowAspectRatio(long
the window to set limits for
window
,
int
the numerator of the desired aspect ratio, or DONT_CARE
numer
,
int
the denominator of the desired aspect ratio, or DONT_CARE
denom
)

Sets the required aspect ratio of the content area of the specified window.

public static void
glfwSetWindowAttrib(long
the window to set the attribute for
window
,
int
the attribute to set.

Some of these attributes are ignored for full screen windows. The new value will take effect if the window is later made windowed.

Some of these attributes are ignored for windowed mode windows. The new value will take effect if the window is later made full screen.

Calling GetWindowAttrib will always return the latest value, even if that value is ignored by the current mode of the window. One of:

DECORATEDRESIZABLEFLOATINGAUTO_ICONIFYFOCUS_ON_SHOWMOUSE_PASSTHROUGH
attrib
,
int
the value to set
value
)

Sets an attribute of the specified window.

public static GLFWWindowCloseCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetWindowCloseCallback
(long
the window whose callback to set
window
,
GLFWWindowCloseCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the close callback of the specified window, which is called when the user attempts to close the window, for example by clicking the close widget in the title bar.

public static GLFWWindowContentScaleCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetWindowContentScaleCallback
(long
the window whose callback to set
window
,
GLFWWindowContentScaleCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the window content scale callback for the specified window, which is called when the content scale of the specified window changes.

public static GLFWWindowFocusCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetWindowFocusCallback
(long
the window whose callback to set
window
,
GLFWWindowFocusCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the focus callback of the specified window, which is called when the window gains or loses input focus.

public static void
glfwSetWindowIcon(long
the window whose icon to set
window
,
GLFWImage.Buffer
the images to create the icon from. This is ignored if count is zero.
images
)

Sets the icon for the specified window.

public static GLFWWindowIconifyCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetWindowIconifyCallback
(long
the window whose callback to set
window
,
GLFWWindowIconifyCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the iconification callback of the specified window, which is called when the window is iconified or restored.

public static GLFWWindowMaximizeCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetWindowMaximizeCallback
(long
the window whose callback to set
window
,
GLFWWindowMaximizeCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the maximization callback of the specified window, which is called when the window is maximized or restored.

public static void
glfwSetWindowMonitor(long
the window whose monitor, size or video mode to set
window
,
long
the desired monitor, or NULL to set windowed mode
monitor
,
int
the desired x-coordinate of the upper-left corner of the content area
xpos
,
int
the desired y-coordinate of the upper-left corner of the content area
ypos
,
int
the desired with, in screen coordinates, of the content area or video mode
width
,
int
the desired height, in screen coordinates, of the content area or video mode
height
,
int
the desired refresh rate, in Hz, of the video mode, or DONT_CARE
refreshRate
)

Sets the mode, monitor, video mode and placement of a window.

public static void
glfwSetWindowOpacity(long
the window to set the opacity for
window
,
float
the desired opacity of the specified window
opacity
)

Sets the opacity of the whole window.

public static void
glfwSetWindowPos(long
the window to query
window
,
int
the x-coordinate of the upper-left corner of the content area
xpos
,
int
the y-coordinate of the upper-left corner of the content area
ypos
)

Sets the position, in screen coordinates, of the upper-left corner of the content area of the specified windowed mode window.

public static GLFWWindowPosCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetWindowPosCallback
(long
the window whose callback to set
window
,
GLFWWindowPosCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the position callback of the specified window, which is called when the window is moved.

public static GLFWWindowRefreshCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetWindowRefreshCallback
(long
the window whose callback to set
window
,
GLFWWindowRefreshCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the refresh callback of the specified window, which is called when the content area of the window needs to be redrawn, for example if the window has been exposed after having been covered by another window.

public static void
glfwSetWindowShouldClose(long
the window whose flag to change
window
,
boolean
the new value
value
)

Sets the value of the close flag of the specified window.

public static void
glfwSetWindowSize(long
the window to resize
window
,
int
the desired width, in screen coordinates, of the window content area
width
,
int
the desired height, in screen coordinates, of the window content area
height
)

Sets the size, in pixels, of the content area of the specified window.

public static GLFWWindowSizeCallback

Returns:

the previously set callback, or NULL if no callback was set or the library had not been initialized
glfwSetWindowSizeCallback
(long
the window whose callback to set
window
,
GLFWWindowSizeCallbackI
the new callback or NULL to remove the currently set callback
cbfun
)

Sets the size callback of the specified window, which is called when the window is resized.

public static void
glfwSetWindowSizeLimits(long
the window to set limits for
window
,
int
the minimum width, in screen coordinates, of the content area, or DONT_CARE
minwidth
,
int
the minimum height, in screen coordinates, of the content area, or DONT_CARE
minheight
,
int
the maximum width, in screen coordinates, of the content area, or DONT_CARE
maxwidth
,
int
the maximum height, in screen coordinates, of the content area, or DONT_CARE
maxheight
)

Sets the size limits of the content area of the specified window.

public static void
glfwSetWindowTitle(long
the window whose title to change
window
,
ByteBuffer
the UTF-8 encoded window title
title
)

Sets the window title, encoded as UTF-8, of the specified window.

public static void
glfwSetWindowTitle(long
the window whose title to change
window
,
CharSequence
the UTF-8 encoded window title
title
)

Sets the window title, encoded as UTF-8, of the specified window.

public static void
glfwSetWindowUserPointer(long
the window whose pointer to set
window
,
long
the new value
pointer
)

Sets the user-defined pointer of the specified window.

public static void
glfwShowWindow(long
the window to make visible
window
)

Makes the specified window visible if it was previously hidden.

public static void
glfwSwapBuffers(long
the window whose buffers to swap
window
)

Swaps the front and back buffers of the specified window when rendering with OpenGL or OpenGL ES.

public static void
glfwSwapInterval(int
the minimum number of screen updates to wait for until the buffers are swapped by SwapBuffers
interval
)

Sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of screen updates to wait from the time SwapBuffers was called before swapping the buffers and returning.

public static void
glfwTerminate()

Terminates the GLFW library.

public static boolean

Returns:

true, or false if an error occurred
glfwUpdateGamepadMappings
(ByteBuffer
the string containing the gamepad mappings
string
)

Adds the specified SDL_GameControllerDB gamepad mappings.

public static void
glfwWaitEvents()

Waits until events are queued and processes them.

public static void
glfwWaitEventsTimeout(double
the maximum amount of time, in seconds, to wait
timeout
)

Waits with timeout until events are queued and processes them.

public static void
public static void
glfwWindowHintString(int hint, ByteBuffer
the new value of the window hint. The specified string is copied before this function returns.
value
)

Sets the specified window hint to the desired value.

public static void
glfwWindowHintString(int hint, CharSequence
the new value of the window hint. The specified string is copied before this function returns.
value
)

Sets the specified window hint to the desired value.

public static boolean

Returns:

the value of the close flag
glfwWindowShouldClose
(long
the window to query
window
)

Returns the value of the close flag of the specified window.

public static long
nglfwCreateCursor(long image, int xhot, int yhot)

Unsafe version of: CreateCursor

public static long
nglfwCreateWindow(int width, int height, long title, long monitor, long share)

Unsafe version of: CreateWindow

public static int
nglfwExtensionSupported(long extension)

Unsafe version of: ExtensionSupported

public static long
nglfwGetClipboardString(long window)

Unsafe version of: GetClipboardString

public static void
nglfwGetCursorPos(long window, long xpos, long ypos)

Unsafe version of: GetCursorPos

public static int
nglfwGetError(long description)

Unsafe version of: GetError

public static void
nglfwGetFramebufferSize(long window, long width, long height)

Unsafe version of: GetFramebufferSize

public static long
nglfwGetGamepadName(int jid)

Unsafe version of: GetGamepadName

public static int
nglfwGetGamepadState(int jid, long state)

Unsafe version of: GetGamepadState

public static long
nglfwGetGammaRamp(long monitor)

Unsafe version of: GetGammaRamp

public static long
nglfwGetJoystickAxes(int jid, long
where to store the number of axis values in the returned array. This is set to zero if the joystick is not present or an error occurred.
count
)

Unsafe version of: GetJoystickAxes

public static long
nglfwGetJoystickButtons(int jid, long
where to store the number of button states in the returned array. This is set to zero if the joystick is not present or an error occurred.
count
)

Unsafe version of: GetJoystickButtons

public static long
nglfwGetJoystickGUID(int jid)

Unsafe version of: GetJoystickGUID

public static long
nglfwGetJoystickHats(int jid, long
where to store the number of hat states in the returned array. This is set to zero if the joystick is not present or an error occurred.
count
)

Unsafe version of: GetJoystickHats

public static long
nglfwGetJoystickName(int jid)

Unsafe version of: GetJoystickName

public static long
nglfwGetKeyName(int key, int scancode)

Unsafe version of: GetKeyName

public static void
nglfwGetMonitorContentScale(long monitor, long xscale, long yscale)

Unsafe version of: GetMonitorContentScale

public static long
nglfwGetMonitorName(long monitor)

Unsafe version of: GetMonitorName

public static void
nglfwGetMonitorPhysicalSize(long monitor, long widthMM, long heightMM)

Unsafe version of: GetMonitorPhysicalSize

public static void
nglfwGetMonitorPos(long monitor, long xpos, long ypos)

Unsafe version of: GetMonitorPos

public static long
nglfwGetMonitors(long
where to store the number of monitors in the returned array. This is set to zero if an error occurred.
count
)

Unsafe version of: GetMonitors

public static void
nglfwGetMonitorWorkarea(long monitor, long xpos, long ypos, long width, long height)

Unsafe version of: GetMonitorWorkarea

public static long
nglfwGetProcAddress(long procname)

Unsafe version of: GetProcAddress

public static void
nglfwGetVersion(long major, long minor, long rev)

Unsafe version of: GetVersion

public static long
public static long
nglfwGetVideoMode(long monitor)

Unsafe version of: GetVideoMode

public static long
nglfwGetVideoModes(long monitor, long
where to store the number of video modes in the returned array. This is set to zero if an error occurred.
count
)

Unsafe version of: GetVideoModes

public static void
nglfwGetWindowContentScale(long window, long xscale, long yscale)

Unsafe version of: GetWindowContentScale

public static void
nglfwGetWindowFrameSize(long window, long left, long top, long right, long bottom)

Unsafe version of: GetWindowFrameSize

public static void
nglfwGetWindowPos(long window, long xpos, long ypos)

Unsafe version of: GetWindowPos

public static void
nglfwGetWindowSize(long window, long width, long height)

Unsafe version of: GetWindowSize

public static void
nglfwInitAllocator(long allocator)

Unsafe version of: InitAllocator

public static long
nglfwSetCharCallback(long window, long cbfun)

Unsafe version of: SetCharCallback

public static long
nglfwSetCharModsCallback(long window, long cbfun)

Unsafe version of: SetCharModsCallback

public static void
nglfwSetClipboardString(long window, long string)

Unsafe version of: SetClipboardString

public static long
nglfwSetCursorEnterCallback(long window, long cbfun)

Unsafe version of: SetCursorEnterCallback

public static long
nglfwSetCursorPosCallback(long window, long cbfun)

Unsafe version of: SetCursorPosCallback

public static long
nglfwSetDropCallback(long window, long cbfun)

Unsafe version of: SetDropCallback

public static long
nglfwSetErrorCallback(long cbfun)

Unsafe version of: SetErrorCallback

public static long
nglfwSetFramebufferSizeCallback(long window, long cbfun)

Unsafe version of: SetFramebufferSizeCallback

public static void
nglfwSetGammaRamp(long monitor, long ramp)

Unsafe version of: SetGammaRamp

public static long
nglfwSetJoystickCallback(long cbfun)

Unsafe version of: SetJoystickCallback

public static long
nglfwSetKeyCallback(long window, long cbfun)

Unsafe version of: SetKeyCallback

public static long
nglfwSetMonitorCallback(long cbfun)

Unsafe version of: SetMonitorCallback

public static long
nglfwSetMouseButtonCallback(long window, long cbfun)

Unsafe version of: SetMouseButtonCallback

public static long
nglfwSetScrollCallback(long window, long cbfun)

Unsafe version of: SetScrollCallback

public static long
nglfwSetWindowCloseCallback(long window, long cbfun)

Unsafe version of: SetWindowCloseCallback

public static long
nglfwSetWindowContentScaleCallback(long window, long cbfun)

Unsafe version of: SetWindowContentScaleCallback

public static long
nglfwSetWindowFocusCallback(long window, long cbfun)

Unsafe version of: SetWindowFocusCallback

public static void
nglfwSetWindowIcon(long window, int
the number of images in the specified array, or zero to revert to the default window icon
count
,
long images)

Unsafe version of: SetWindowIcon

public static long
nglfwSetWindowIconifyCallback(long window, long cbfun)

Unsafe version of: SetWindowIconifyCallback

public static long
nglfwSetWindowMaximizeCallback(long window, long cbfun)

Unsafe version of: SetWindowMaximizeCallback

public static long
nglfwSetWindowPosCallback(long window, long cbfun)

Unsafe version of: SetWindowPosCallback

public static long
nglfwSetWindowRefreshCallback(long window, long cbfun)

Unsafe version of: SetWindowRefreshCallback

public static long
nglfwSetWindowSizeCallback(long window, long cbfun)

Unsafe version of: SetWindowSizeCallback

public static void
nglfwSetWindowTitle(long window, long title)

Unsafe version of: SetWindowTitle

public static int
nglfwUpdateGamepadMappings(long string)

Unsafe version of: UpdateGamepadMappings

public static void
nglfwWindowHintString(int hint, long value)

Unsafe version of: WindowHintString

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait