Top Description Inners Constructors Methods
org.lwjgl.glfw

public abstract Class GLFWCursorPosCallback

extends Callback
implements GLFWCursorPosCallbackI
Class Inheritance
All Implemented Interfaces
org.lwjgl.glfw.GLFWCursorPosCallbackI, org.lwjgl.system.CallbackI, org.lwjgl.system.Pointer
Known Direct Subclasses
org.lwjgl.glfw.GLFWCursorPosCallback.Container
Imports
javax.annotation.*, org.lwjgl.system.*

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

Type


void (*invoke) (
    GLFWwindow *window,
    double xpos,
    double ypos
)
Since
version 3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
protected
pack-priv
GLFWCursorPosCallback(long functionPointer)

Method Summary

Modifier and TypeMethod and Description
public static GLFWCursorPosCallback

Returns:

the new GLFWCursorPosCallback
create
(long functionPointer)

Creates a GLFWCursorPosCallback instance from the specified function pointer.

public static GLFWCursorPosCallback
create(GLFWCursorPosCallbackI instance)

Creates a GLFWCursorPosCallback instance that delegates to the specified GLFWCursorPosCallbackI instance.

public static GLFWCursorPosCallback
createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

public GLFWCursorPosCallback
set(long window)

See SetCursorPosCallback.

Inherited from org.lwjgl.system.Callback:
addressequalsfreefreegetgetSafehashCodetoString

Constructor Detail

GLFWCursorPosCallbackback to summary
protected GLFWCursorPosCallback()
GLFWCursorPosCallbackback to summary
pack-priv GLFWCursorPosCallback(long functionPointer)

Method Detail

createback to summary
public static GLFWCursorPosCallback create(long functionPointer)

Creates a GLFWCursorPosCallback instance from the specified function pointer.

Returns:GLFWCursorPosCallback

the new GLFWCursorPosCallback

createback to summary
public static GLFWCursorPosCallback create(GLFWCursorPosCallbackI instance)

Creates a GLFWCursorPosCallback instance that delegates to the specified GLFWCursorPosCallbackI instance.

createSafeback to summary
public static GLFWCursorPosCallback createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

Annotations
@Nullable
setback to summary
public GLFWCursorPosCallback set(long window)

See SetCursorPosCallback.

org.lwjgl.glfw back to summary

private final Class GLFWCursorPosCallback.Container

extends GLFWCursorPosCallback
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final GLFWCursorPosCallbackI

Constructor Summary

AccessConstructor and Description
pack-priv
Container(long functionPointer, GLFWCursorPosCallbackI delegate)

Method Summary

Modifier and TypeMethod and Description
public void
invoke(long
the window that received the event
window
,
double
the new cursor x-coordinate, relative to the left edge of the content area
xpos
,
double
the new cursor y-coordinate, relative to the top edge of the content area
ypos
)

Implements org.lwjgl.glfw.GLFWCursorPosCallbackI.invoke.

Will be called when the cursor is moved.
Inherited from org.lwjgl.glfw.GLFWCursorPosCallback:
createcreatecreateSafeset

Field Detail

delegateback to summary
private final GLFWCursorPosCallbackI delegate

Constructor Detail

Containerback to summary
pack-priv Container(long functionPointer, GLFWCursorPosCallbackI delegate)

Method Detail

invokeback to summary
public void invoke(long window, double xpos, double ypos)

Implements org.lwjgl.glfw.GLFWCursorPosCallbackI.invoke.

Doc from org.lwjgl.glfw.GLFWCursorPosCallbackI.invoke.

Will be called when the cursor is moved.

The callback function receives the cursor position, measured in screen coordinates but relative to the top-left corner of the window client area. On platforms that provide it, the full sub-pixel cursor position is passed on.

Parameters
window:long

the window that received the event

xpos:double

the new cursor x-coordinate, relative to the left edge of the content area

ypos:double

the new cursor y-coordinate, relative to the top edge of the content area

Annotations
@Override