Record Class STBI_IoCallbacks
java.lang.Object
java.lang.Record
club.doki7.stb.image.datatype.STBI_IoCallbacks
- All Implemented Interfaces:
IPointer,ISTBI_IoCallbacks
@ValueBasedCandidate
@UnsafeConstructor
public record STBI_IoCallbacks(@NotNull MemorySegment segment)
extends Record
implements ISTBI_IoCallbacks
Represents a pointer to a stbi_io_callbacks structure in native memory.
Structure
typedef struct stbi_io_callbacks {
PFN_stbi_io_callbacks_read read;
PFN_stbi_io_callbacks_skip skip;
PFN_stbi_io_callbacks_eof eof;
} stbi_io_callbacks;
Contracts
The property segment() should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to
LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java
null instead. See the documentation of IPointer.segment() for more details.
The constructor of this class is marked as UnsafeConstructor, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSTBI_IoCallbacks(@NotNull MemorySegment segment) Creates an instance of aSTBI_IoCallbacksrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBI_IoCallbacksstatic STBI_IoCallbacks.Ptrstatic STBI_IoCallbacksclone(Arena arena, STBI_IoCallbacks src) @NotNull MemorySegmenteof()eof(@NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_eof value) eof(@NotNull Arena arena, @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_eof value) eof(@NotNull MemorySegment value) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull MemorySegmentread()read(@NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_read value) read(@NotNull Arena arena, @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_read value) read(@NotNull MemorySegment value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.@NotNull MemorySegmentskip()skip(@NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_skip value) skip(@NotNull Arena arena, @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_skip value) skip(@NotNull MemorySegment value) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$read
-
PATH$skip
-
PATH$eof
-
LAYOUT$read
-
LAYOUT$skip
-
LAYOUT$eof
-
SIZE$read
public static final long SIZE$read -
SIZE$skip
public static final long SIZE$skip -
SIZE$eof
public static final long SIZE$eof -
OFFSET$read
public static final long OFFSET$read -
OFFSET$skip
public static final long OFFSET$skip -
OFFSET$eof
public static final long OFFSET$eof
-
-
Constructor Details
-
STBI_IoCallbacks
Creates an instance of aSTBI_IoCallbacksrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
read
-
read
public STBI_IoCallbacks read(@Pointer(comment="PFN_stbi_io_callbacks_read") @NotNull @NotNull MemorySegment value) -
read
-
read
public STBI_IoCallbacks read(@NotNull @NotNull Arena arena, @NotNull @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_read value) -
read
-
skip
-
skip
public STBI_IoCallbacks skip(@Pointer(comment="PFN_stbi_io_callbacks_skip") @NotNull @NotNull MemorySegment value) -
skip
-
skip
public STBI_IoCallbacks skip(@NotNull @NotNull Arena arena, @NotNull @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_skip value) -
skip
-
eof
-
eof
public STBI_IoCallbacks eof(@Pointer(comment="PFN_stbi_io_callbacks_eof") @NotNull @NotNull MemorySegment value) -
eof
-
eof
public STBI_IoCallbacks eof(@NotNull @NotNull Arena arena, @NotNull @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_eof value) -
eof
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
segment
Returns the value of thesegmentrecord component.
-