Record Class GLFWimage
java.lang.Object
java.lang.Record
club.doki7.glfw.datatype.GLFWimage
- All Implemented Interfaces:
IPointer
,IGLFWimage
@ValueBasedCandidate
@UnsafeConstructor
public record GLFWimage(@NotNull MemorySegment segment)
extends Record
implements IGLFWimage
- Since:
- Added in version 2.1.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final ValueLayout.OfInt
static final AddressLayout
static final ValueLayout.OfInt
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionGLFWimage
(@NotNull MemorySegment segment) Creates an instance of aGLFWimage
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic GLFWimage
static GLFWimage.Ptr
static GLFWimage
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
height()
height
(int value) @Nullable BytePtr
pixels()
Note: the returnedBytePtr
does not have correctBytePtr.size()
property.void
pixelsRaw
(MemorySegment value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
Returns a string representation of this record class.int
width()
width
(int value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$width
-
PATH$height
-
PATH$pixels
-
LAYOUT$width
-
LAYOUT$height
-
LAYOUT$pixels
-
SIZE$width
public static final long SIZE$width -
SIZE$height
public static final long SIZE$height -
SIZE$pixels
public static final long SIZE$pixels -
OFFSET$width
public static final long OFFSET$width -
OFFSET$height
public static final long OFFSET$height -
OFFSET$pixels
public static final long OFFSET$pixels
-
-
Constructor Details
-
GLFWimage
Creates an instance of aGLFWimage
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
width
public int width() -
width
-
height
public int height() -
height
-
pixels
Note: the returnedBytePtr
does not have correctBytePtr.size()
property. It's up to user to track the size of the buffer, and useBytePtr.reinterpret(long)
to set the size before actually reading from or writing to the buffer. -
pixels
-
pixelsRaw
-
pixelsRaw
-
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 thesegment
record component.
-