Package org.lwjgl.stb

Class STBIWriteCallback

java.lang.Object
org.lwjgl.system.Callback
org.lwjgl.stb.STBIWriteCallback
All Implemented Interfaces:
AutoCloseable, STBIWriteCallbackI, CallbackI, NativeResource, Pointer

public abstract class STBIWriteCallback extends Callback implements STBIWriteCallbackI
Instances of this class may be used with the STBImageWrite write_type_to_func functions.

Type


 void (*STBIWriteCallbackI.invoke(long, long, int)) (
     void *context,
     void *data,
     int size
 )
  • Method Details

    • create

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

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

      public static STBIWriteCallback create(STBIWriteCallbackI instance)
      Creates a STBIWriteCallback instance that delegates to the specified STBIWriteCallbackI instance.
    • getData

      public static ByteBuffer getData(long data, int size)
      Converts the specified STBIWriteCallback arguments to a ByteBuffer.

      This method may only be used inside a STBIWriteCallback invocation.

      Parameters:
      data - the STBIWriteCallback data argument
      size - the STBIWriteCallback size argument
      Returns:
      the data as a ByteBuffer