Package org.lwjgl.glfw
Class GLFWErrorCallback
java.lang.Object
org.lwjgl.system.Callback
org.lwjgl.glfw.GLFWErrorCallback
- All Implemented Interfaces:
AutoCloseable
,GLFWErrorCallbackI
,CallbackI
,NativeResource
,Pointer
Instances of this class may be passed to the
SetErrorCallback
method.
Type
void (*GLFWErrorCallbackI.invoke(int, long)
) (
int error,
char *description
)
- Since:
- version 3.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Fields inherited from interface org.lwjgl.glfw.GLFWErrorCallbackI
CIF
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionstatic GLFWErrorCallback
create
(long functionPointer) Creates aGLFWErrorCallback
instance from the specified function pointer.static GLFWErrorCallback
create
(GLFWErrorCallbackI instance) Creates aGLFWErrorCallback
instance that delegates to the specifiedGLFWErrorCallbackI
instance.static GLFWErrorCallback
Returns aGLFWErrorCallback
instance that prints the error to theAPIUtil.DEBUG_STREAM
.static GLFWErrorCallback
createPrint
(PrintStream stream) Returns aGLFWErrorCallback
instance that prints the error in the specifiedPrintStream
.static GLFWErrorCallback
createSafe
(long functionPointer) static GLFWErrorCallback
Returns aGLFWErrorCallback
instance that throws anIllegalStateException
when an error occurs.static String
getDescription
(long description) Converts the specifiedGLFWErrorCallback
argument to a String.set()
SeeSetErrorCallback
.Methods inherited from class org.lwjgl.system.Callback
address, equals, free, free, get, getSafe, hashCode, toString
Methods inherited from interface org.lwjgl.glfw.GLFWErrorCallbackI
callback, getCallInterface, invoke
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
Method Details
-
create
Creates aGLFWErrorCallback
instance from the specified function pointer.- Returns:
- the new
GLFWErrorCallback
-
createSafe
-
create
Creates aGLFWErrorCallback
instance that delegates to the specifiedGLFWErrorCallbackI
instance. -
getDescription
Converts the specifiedGLFWErrorCallback
argument to a String.This method may only be used inside a GLFWErrorCallback invocation.
- Parameters:
description
- pointer to the UTF-8 encoded description string- Returns:
- the description as a String
-
createPrint
Returns aGLFWErrorCallback
instance that prints the error to theAPIUtil.DEBUG_STREAM
.- Returns:
- the GLFWerrorCallback
-
createPrint
Returns aGLFWErrorCallback
instance that prints the error in the specifiedPrintStream
.- Parameters:
stream
- the PrintStream to use- Returns:
- the GLFWerrorCallback
-
createThrow
Returns aGLFWErrorCallback
instance that throws anIllegalStateException
when an error occurs.- Returns:
- the GLFWerrorCallback
-
set
SeeSetErrorCallback
.
-