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 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 AddressLayoutstatic final ValueLayout.OfLongstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionWGPUSurfaceCapabilities(@NotNull MemorySegment segment) Creates an instance of aWGPUSurfaceCapabilitiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WGPUSurfaceCapabilitiesstatic WGPUSurfaceCapabilities.PtrlongalphaModeCount(long value) @Nullable IntPtrNote: the returnedIntPtrdoes not have correctIntPtr.size()property.alphaModes(@Nullable IntPtr value) @NotNull MemorySegmentvoidalphaModesRaw(@NotNull MemorySegment value) static WGPUSurfaceCapabilitiesclone(Arena arena, WGPUSurfaceCapabilities src) final booleanIndicates whether some other object is "equal to" this one.longformatCount(long value) @Nullable IntPtrformats()Note: the returnedIntPtrdoes not have correctIntPtr.size()property.@NotNull MemorySegmentvoidformatsRaw(@NotNull MemorySegment value) final inthashCode()Returns a hash code value for this object.@Nullable WGPUChainedStructnextInChain(int assumedCount) nextInChain(@Nullable IWGPUChainedStruct value) @NotNull MemorySegmentvoidnextInChainRaw(@NotNull MemorySegment value) longpresentModeCount(long value) @Nullable IntPtrNote: the returnedIntPtrdoes not have correctIntPtr.size()property.presentModes(@Nullable IntPtr value) @NotNull MemorySegmentvoidpresentModesRaw(@NotNull MemorySegment value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()Returns a string representation of this record class.longusages()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 aWGPUSurfaceCapabilitiesrecord class.- Parameters:
segment- the value for thesegmentrecord 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 returnedIntPtrdoes 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 returnedIntPtrdoes 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 returnedIntPtrdoes 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 thesegmentrecord component.
-