Class GLFWErrorCallback

java.lang.Object
org.lwjgl.system.Callback
org.lwjgl.glfw.GLFWErrorCallback
All Implemented Interfaces:
AutoCloseable, GLFWErrorCallbackI, CallbackI, NativeResource, Pointer

public abstract class GLFWErrorCallback extends Callback implements GLFWErrorCallbackI
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
  • Method Details

    • create

      public static GLFWErrorCallback create(long functionPointer)
      Creates a GLFWErrorCallback instance from the specified function pointer.
      Returns:
      the new GLFWErrorCallback
    • createSafe

      @Nullable public static GLFWErrorCallback createSafe(long functionPointer)
      Like create, but returns null if functionPointer is NULL.
    • create

      public static GLFWErrorCallback create(GLFWErrorCallbackI instance)
      Creates a GLFWErrorCallback instance that delegates to the specified GLFWErrorCallbackI instance.
    • getDescription

      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 - pointer to the UTF-8 encoded description string
      Returns:
      the description as a String
    • createPrint

      public static GLFWErrorCallback createPrint()
      Returns a GLFWErrorCallback instance that prints the error to the APIUtil.DEBUG_STREAM.
      Returns:
      the GLFWerrorCallback
    • createPrint

      public static GLFWErrorCallback createPrint(PrintStream stream)
      Returns a GLFWErrorCallback instance that prints the error in the specified PrintStream.
      Parameters:
      stream - the PrintStream to use
      Returns:
      the GLFWerrorCallback
    • createThrow

      public static GLFWErrorCallback createThrow()
      Returns a GLFWErrorCallback instance that throws an IllegalStateException when an error occurs.
      Returns:
      the GLFWerrorCallback
    • set

      public GLFWErrorCallback set()