Class GLFWErrorCallback

  • All Implemented Interfaces:
    java.lang.AutoCloseable, GLFWErrorCallbackI, org.lwjgl.system.CallbackI, org.lwjgl.system.CallbackI.V, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public abstract class GLFWErrorCallback
    extends org.lwjgl.system.Callback
    implements GLFWErrorCallbackI
    Instances of this class may be passed to the SetErrorCallback method.

    Type

    
     void (*) (
         int error,
         char *description
     )
    Since:
    version 3.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.lwjgl.system.CallbackI

        org.lwjgl.system.CallbackI.B, org.lwjgl.system.CallbackI.D, org.lwjgl.system.CallbackI.F, org.lwjgl.system.CallbackI.I, org.lwjgl.system.CallbackI.J, org.lwjgl.system.CallbackI.N, org.lwjgl.system.CallbackI.P, org.lwjgl.system.CallbackI.S, org.lwjgl.system.CallbackI.V, org.lwjgl.system.CallbackI.Z
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Method Detail

      • 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 java.lang.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​(java.io.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