Record Class WGPUSurfaceCapabilities
java.lang.Object
java.lang.Record
club.doki7.webgpu.datatype.WGPUSurfaceCapabilities
- All Implemented Interfaces:
IPointer
,IWGPUSurfaceCapabilities
@ValueBasedCandidate
@UnsafeConstructor
public record WGPUSurfaceCapabilities(@NotNull MemorySegment segment)
extends Record
implements IWGPUSurfaceCapabilities
Represents a pointer to a WGPUSurfaceCapabilities
structure in native memory.
Structure
typedef struct WGPUSurfaceCapabilities {
WGPUChainedStruct
const* nextInChain
; // optional
WGPUTextureUsage
usages
;
size_t formatCount
;
WGPUTextureFormat
const* formats
;
size_t presentModeCount
;
WGPUPresentMode
const* presentModes
;
size_t alphaModeCount
;
WGPUCompositeAlphaMode
const* alphaModes
;
} WGPUSurfaceCapabilities;
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 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 AddressLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final ValueLayout.OfLong
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionWGPUSurfaceCapabilities
(@NotNull MemorySegment segment) Creates an instance of aWGPUSurfaceCapabilities
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WGPUSurfaceCapabilities
static WGPUSurfaceCapabilities.Ptr
long
alphaModeCount
(long value) @Nullable IntPtr
Note: the returnedIntPtr
does not have correctIntPtr.size()
property.alphaModes
(@Nullable IntPtr value) @NotNull MemorySegment
void
alphaModesRaw
(@NotNull MemorySegment value) static WGPUSurfaceCapabilities
clone
(Arena arena, WGPUSurfaceCapabilities src) final boolean
Indicates whether some other object is "equal to" this one.long
formatCount
(long value) @Nullable IntPtr
formats()
Note: the returnedIntPtr
does not have correctIntPtr.size()
property.@NotNull MemorySegment
void
formatsRaw
(@NotNull MemorySegment value) final int
hashCode()
Returns a hash code value for this object.@Nullable WGPUChainedStruct
nextInChain
(int assumedCount) nextInChain
(@Nullable IWGPUChainedStruct value) @NotNull MemorySegment
void
nextInChainRaw
(@NotNull MemorySegment value) long
presentModeCount
(long value) @Nullable IntPtr
Note: the returnedIntPtr
does not have correctIntPtr.size()
property.presentModes
(@Nullable IntPtr value) @NotNull MemorySegment
void
presentModesRaw
(@NotNull MemorySegment value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
Returns a string representation of this record class.long
usages()
usages
(long value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$nextInChain
-
PATH$usages
-
PATH$formatCount
-
PATH$formats
-
PATH$presentModeCount
-
PATH$presentModes
-
PATH$alphaModeCount
-
PATH$alphaModes
-
LAYOUT$nextInChain
-
LAYOUT$usages
-
LAYOUT$formats
-
LAYOUT$presentModes
-
LAYOUT$alphaModes
-
SIZE$nextInChain
public static final long SIZE$nextInChain -
SIZE$usages
public static final long SIZE$usages -
SIZE$formatCount
public static final long SIZE$formatCount -
SIZE$formats
public static final long SIZE$formats -
SIZE$presentModeCount
public static final long SIZE$presentModeCount -
SIZE$presentModes
public static final long SIZE$presentModes -
SIZE$alphaModeCount
public static final long SIZE$alphaModeCount -
SIZE$alphaModes
public static final long SIZE$alphaModes -
OFFSET$nextInChain
public static final long OFFSET$nextInChain -
OFFSET$usages
public static final long OFFSET$usages -
OFFSET$formatCount
public static final long OFFSET$formatCount -
OFFSET$formats
public static final long OFFSET$formats -
OFFSET$presentModeCount
public static final long OFFSET$presentModeCount -
OFFSET$presentModes
public static final long OFFSET$presentModes -
OFFSET$alphaModeCount
public static final long OFFSET$alphaModeCount -
OFFSET$alphaModes
public static final long OFFSET$alphaModes
-
-
Constructor Details
-
WGPUSurfaceCapabilities
Creates an instance of aWGPUSurfaceCapabilities
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
nextInChain
-
nextInChain
-
nextInChain
-
nextInChainRaw
-
nextInChainRaw
public void nextInChainRaw(@Pointer(target=WGPUChainedStruct.class) @NotNull @NotNull MemorySegment value) -
usages
-
usages
-
formatCount
-
formatCount
-
formats
Note: the returnedIntPtr
does not have correctIntPtr.size()
property. It's up to user to track the size of the buffer, and useIntPtr.reinterpret(long)
to set the size before actually reading fro or writing to the buffer. -
formats
public WGPUSurfaceCapabilities formats(@Nullable @EnumType(WGPUTextureFormat.class) @Nullable IntPtr value) -
formatsRaw
-
formatsRaw
public void formatsRaw(@Pointer(target=WGPUTextureFormat.class) @NotNull @NotNull MemorySegment value) -
presentModeCount
-
presentModeCount
-
presentModes
Note: the returnedIntPtr
does not have correctIntPtr.size()
property. It's up to user to track the size of the buffer, and useIntPtr.reinterpret(long)
to set the size before actually reading fro or writing to the buffer. -
presentModes
public WGPUSurfaceCapabilities presentModes(@Nullable @EnumType(WGPUPresentMode.class) @Nullable IntPtr value) -
presentModesRaw
-
presentModesRaw
public void presentModesRaw(@Pointer(target=WGPUPresentMode.class) @NotNull @NotNull MemorySegment value) -
alphaModeCount
-
alphaModeCount
-
alphaModes
Note: the returnedIntPtr
does not have correctIntPtr.size()
property. It's up to user to track the size of the buffer, and useIntPtr.reinterpret(long)
to set the size before actually reading fro or writing to the buffer. -
alphaModes
public WGPUSurfaceCapabilities alphaModes(@Nullable @EnumType(WGPUCompositeAlphaMode.class) @Nullable IntPtr value) -
alphaModesRaw
@Pointer(target=WGPUCompositeAlphaMode.class) @NotNull public @NotNull MemorySegment alphaModesRaw() -
alphaModesRaw
public void alphaModesRaw(@Pointer(target=WGPUCompositeAlphaMode.class) @NotNull @NotNull MemorySegment value) -
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.
-