Top Description Inners Constructors Methods
org.lwjgl.glfw

public abstract Class GLFWErrorCallback

extends Callback
implements GLFWErrorCallbackI
Class Inheritance
All Implemented Interfaces
org.lwjgl.glfw.GLFWErrorCallbackI, org.lwjgl.system.CallbackI, org.lwjgl.system.Pointer
Known Direct Subclasses
org.lwjgl.glfw.GLFWErrorCallback.Container
Imports
javax.annotation.*, org.lwjgl.system.*, java.io.PrintStream, java.util.Map

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

Type


void (*invoke) (
    int error,
    char *description
)
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
GLFWErrorCallback(long functionPointer)

Method Summary

Modifier and TypeMethod and Description
public static GLFWErrorCallback

Returns:

the new GLFWErrorCallback
create
(long functionPointer)

Creates a GLFWErrorCallback instance from the specified function pointer.

public static GLFWErrorCallback
create(GLFWErrorCallbackI instance)

Creates a GLFWErrorCallback instance that delegates to the specified GLFWErrorCallbackI instance.

public static GLFWErrorCallback

Returns:

the GLFWerrorCallback
createPrint
()

Returns a GLFWErrorCallback instance that prints the error to the APIUtil#DEBUG_STREAM.

public static GLFWErrorCallback

Returns:

the GLFWerrorCallback
createPrint
(PrintStream
the PrintStream to use
stream
)

Returns a GLFWErrorCallback instance that prints the error in the specified PrintStream.

public static GLFWErrorCallback
createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

public static GLFWErrorCallback

Returns:

the GLFWerrorCallback
createThrow
()

Returns a GLFWErrorCallback instance that throws an IllegalStateException when an error occurs.

public static String

Returns:

the description as a String
getDescription
(long
pointer to the UTF-8 encoded description string
description
)

Converts the specified GLFWErrorCallback argument to a String.

public GLFWErrorCallback
Inherited from org.lwjgl.system.Callback:
addressequalsfreefreegetgetSafehashCodetoString

Constructor Detail

GLFWErrorCallbackback to summary
protected GLFWErrorCallback()
GLFWErrorCallbackback to summary
pack-priv GLFWErrorCallback(long functionPointer)

Method Detail

createback to summary
public static GLFWErrorCallback create(long functionPointer)

Creates a GLFWErrorCallback instance from the specified function pointer.

Returns:GLFWErrorCallback

the new GLFWErrorCallback

createback to summary
public static GLFWErrorCallback create(GLFWErrorCallbackI instance)

Creates a GLFWErrorCallback instance that delegates to the specified GLFWErrorCallbackI instance.

createPrintback to summary
public static GLFWErrorCallback createPrint()

Returns a GLFWErrorCallback instance that prints the error to the APIUtil#DEBUG_STREAM.

Returns:GLFWErrorCallback

the GLFWerrorCallback

createPrintback to summary
public static GLFWErrorCallback createPrint(PrintStream stream)

Returns a GLFWErrorCallback instance that prints the error in the specified PrintStream.

Parameters
stream:PrintStream

the PrintStream to use

Returns:GLFWErrorCallback

the GLFWerrorCallback

createSafeback to summary
public static GLFWErrorCallback createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

Annotations
@Nullable
createThrowback to summary
public static GLFWErrorCallback createThrow()

Returns a GLFWErrorCallback instance that throws an IllegalStateException when an error occurs.

Returns:GLFWErrorCallback

the GLFWerrorCallback

getDescriptionback to summary
public static String getDescription(long description)

Converts the specified GLFWErrorCallback argument to a String.

This method may only be used inside a GLFWErrorCallback invocation.

Parameters
description:long

pointer to the UTF-8 encoded description string

Returns:String

the description as a String

setback to summary
public GLFWErrorCallback set()

See SetErrorCallback.

org.lwjgl.glfw back to summary

private final Class GLFWErrorCallback.Container

extends GLFWErrorCallback
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final GLFWErrorCallbackI

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
public void
invoke(int
the error code
error
,
long
a pointer to a UTF-8 encoded string describing the error
description
)

Implements org.lwjgl.glfw.GLFWErrorCallbackI.invoke.

Will be called with an error code and a human-readable description when a GLFW error occurs.
Inherited from org.lwjgl.glfw.GLFWErrorCallback:
createcreatecreatePrintcreatePrintcreateSafecreateThrowgetDescriptionset

Field Detail

delegateback to summary
private final GLFWErrorCallbackI delegate

Constructor Detail

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

Method Detail

invokeback to summary
public void invoke(int error, long description)

Implements org.lwjgl.glfw.GLFWErrorCallbackI.invoke.

Doc from org.lwjgl.glfw.GLFWErrorCallbackI.invoke.

Will be called with an error code and a human-readable description when a GLFW error occurs.

Parameters
error:int

the error code

description:long

a pointer to a UTF-8 encoded string describing the error

Annotations
@Override