Class mln_resource_provider
java.lang.Object
org.maplibre.nativeffi.internal.c.mln_resource_provider
struct mln_resource_provider {
uint32_t size;
mln_resource_provider_callback callback;
void *user_data;
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentallocate(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()usingallocatorstatic MemorySegmentallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCountusingallocator.static MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static MemorySegmentcallback(MemorySegment struct) Getter for field:mln_resource_provider_callback callbackstatic voidcallback(MemorySegment struct, MemorySegment fieldValue) Setter for field:mln_resource_provider_callback callbackstatic final AddressLayoutLayout for field:mln_resource_provider_callback callbackstatic final longOffset for field:mln_resource_provider_callback callbackstatic final GroupLayoutlayout()The layout of this structstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static intsize(MemorySegment struct) Getter for field:uint32_t sizestatic voidsize(MemorySegment struct, int fieldValue) Setter for field:uint32_t sizestatic final ValueLayout.OfIntLayout for field:uint32_t sizestatic final longOffset for field:uint32_t sizestatic longsizeof()The size (in bytes) of this structstatic MemorySegmentuser_data(MemorySegment struct) Getter for field:void *user_datastatic voiduser_data(MemorySegment struct, MemorySegment fieldValue) Setter for field:void *user_datastatic final AddressLayoutLayout for field:void *user_datastatic final longOffset for field:void *user_data
-
Method Details
-
layout
The layout of this struct -
size$layout
Layout for field:uint32_t size -
size$offset
public static final long size$offset()Offset for field:uint32_t size -
size
Getter for field:uint32_t size -
size
Setter for field:uint32_t size -
callback$layout
Layout for field:mln_resource_provider_callback callback -
callback$offset
public static final long callback$offset()Offset for field:mln_resource_provider_callback callback -
callback
Getter for field:mln_resource_provider_callback callback -
callback
Setter for field:mln_resource_provider_callback callback -
user_data$layout
Layout for field:void *user_data -
user_data$offset
public static final long user_data$offset()Offset for field:void *user_data -
user_data
Getter for field:void *user_data -
user_data
Setter for field:void *user_data -
asSlice
Obtains a slice ofarrayParamwhich selects the array element atindex. The returned segment has addressarrayParam.address() + index * layout().byteSize() -
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()usingallocator -
allocateArray
Allocate an array of sizeelementCountusingallocator. The returned segment has sizeelementCount * layout().byteSize(). -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizelayout().byteSize() -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizeelementCount * layout().byteSize()
-