Package org.lwjgl.util.opus
Class OpusFileCallbacks
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct OpusFileCallbacks {
op_read_func read;
op_seek_func seek;
op_tell_func tell;
op_close_func close;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionOpusFileCallbacks(ByteBuffer container) Creates aOpusFileCallbacksinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpusFileCallbackscalloc()Returns a newOpusFileCallbacksinstance allocated withmemCalloc.static OpusFileCallbacks.Buffercalloc(int capacity) Returns a newOpusFileCallbacks.Bufferinstance allocated withmemCalloc.static OpusFileCallbacks.Buffercalloc(int capacity, MemoryStack stack) Returns a newOpusFileCallbacks.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OpusFileCallbackscalloc(MemoryStack stack) Returns a newOpusFileCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.@Nullable OPCloseFuncclose$()close$(@Nullable OPCloseFuncI value) Sets the specified value to theclosefield.static OpusFileCallbackscreate()Returns a newOpusFileCallbacksinstance allocated withBufferUtils.static OpusFileCallbacks.Buffercreate(int capacity) Returns a newOpusFileCallbacks.Bufferinstance allocated withBufferUtils.static OpusFileCallbackscreate(long address) Returns a newOpusFileCallbacksinstance for the specified memory address.static OpusFileCallbacks.Buffercreate(long address, int capacity) Create aOpusFileCallbacks.Bufferinstance at the specified memory.static @Nullable OpusFileCallbackscreateSafe(long address) static @Nullable OpusFileCallbacks.BuffercreateSafe(long address, int capacity) static OpusFileCallbacksmalloc()Returns a newOpusFileCallbacksinstance allocated withmemAlloc.static OpusFileCallbacks.Buffermalloc(int capacity) Returns a newOpusFileCallbacks.Bufferinstance allocated withmemAlloc.static OpusFileCallbacks.Buffermalloc(int capacity, MemoryStack stack) Returns a newOpusFileCallbacks.Bufferinstance allocated on the specifiedMemoryStack.static OpusFileCallbacksmalloc(MemoryStack stack) Returns a newOpusFileCallbacksinstance allocated on the specifiedMemoryStack.static @Nullable OPCloseFuncnclose$(long struct) Unsafe version ofclose$().static voidnclose$(long struct, @Nullable OPCloseFuncI value) Unsafe version ofclose$.static OPReadFuncnread(long struct) Unsafe version ofread().static voidnread(long struct, OPReadFuncI value) Unsafe version ofread.static @Nullable OPSeekFuncnseek(long struct) Unsafe version ofseek().static voidnseek(long struct, @Nullable OPSeekFuncI value) Unsafe version ofseek.static @Nullable OPTellFuncntell(long struct) Unsafe version oftell().static voidntell(long struct, @Nullable OPTellFuncI value) Unsafe version oftell.read()read(OPReadFuncI value) Sets the specified value to thereadfield.@Nullable OPSeekFuncseek()seek(@Nullable OPSeekFuncI value) Sets the specified value to theseekfield.set(OPReadFuncI read, OPSeekFuncI seek, OPTellFuncI tell, OPCloseFuncI close$) Initializes this struct with the specified values.set(OpusFileCallbacks src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).@Nullable OPTellFunctell()tell(@Nullable OPTellFuncI value) Sets the specified value to thetellfield.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
READ
public static final int READThe struct member offsets. -
SEEK
public static final int SEEKThe struct member offsets. -
TELL
public static final int TELLThe struct member offsets. -
CLOSE
public static final int CLOSEThe struct member offsets.
-
-
Constructor Details
-
OpusFileCallbacks
Creates aOpusFileCallbacksinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<OpusFileCallbacks>
-
read
- Returns:
- the value of the
readfield.
-
seek
- Returns:
- the value of the
seekfield.
-
tell
- Returns:
- the value of the
tellfield.
-
close$
- Returns:
- the value of the
closefield.
-
read
Sets the specified value to thereadfield. -
seek
Sets the specified value to theseekfield. -
tell
Sets the specified value to thetellfield. -
close$
Sets the specified value to theclosefield. -
set
public OpusFileCallbacks set(OPReadFuncI read, OPSeekFuncI seek, OPTellFuncI tell, OPCloseFuncI close$) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newOpusFileCallbacksinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newOpusFileCallbacksinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newOpusFileCallbacksinstance allocated withBufferUtils. -
create
Returns a newOpusFileCallbacksinstance for the specified memory address. -
createSafe
-
malloc
Returns a newOpusFileCallbacks.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newOpusFileCallbacks.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newOpusFileCallbacks.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aOpusFileCallbacks.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newOpusFileCallbacksinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newOpusFileCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newOpusFileCallbacks.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newOpusFileCallbacks.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nread
Unsafe version ofread(). -
nseek
Unsafe version ofseek(). -
ntell
Unsafe version oftell(). -
nclose$
Unsafe version ofclose$(). -
nread
Unsafe version ofread. -
nseek
Unsafe version ofseek. -
ntell
Unsafe version oftell. -
nclose$
Unsafe version ofclose$. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-