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 recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final ValueLayout.OfIntstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionGLFWimage(@NotNull MemorySegment segment) Creates an instance of aGLFWimagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic GLFWimagestatic GLFWimage.Ptrstatic GLFWimagefinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()height(int value) @Nullable BytePtrpixels()Note: the returnedBytePtrdoes not have correctBytePtr.size()property.@NotNull MemorySegmentvoidpixelsRaw(@NotNull MemorySegment value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()Returns a string representation of this record class.intwidth()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 aGLFWimagerecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
width
public int width() -
width
-
height
public int height() -
height
-
pixels
Note: the returnedBytePtrdoes 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 thesegmentrecord component.
-