Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.nextbreakpoint.freeimage4java.Plugin Maven / Gradle / Ivy
// Generated by jextract
package com.nextbreakpoint.freeimage4java;
import java.lang.invoke.*;
import java.lang.foreign.*;
import java.nio.ByteOrder;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import static java.lang.foreign.ValueLayout.*;
import static java.lang.foreign.MemoryLayout.PathElement.*;
/**
* {@snippet lang=c :
* struct Plugin {
* FI_FormatProc format_proc;
* FI_DescriptionProc description_proc;
* FI_ExtensionListProc extension_proc;
* FI_RegExprProc regexpr_proc;
* FI_OpenProc open_proc;
* FI_CloseProc close_proc;
* FI_PageCountProc pagecount_proc;
* FI_PageCapabilityProc pagecapability_proc;
* FI_LoadProc load_proc;
* FI_SaveProc save_proc;
* FI_ValidateProc validate_proc;
* FI_MimeProc mime_proc;
* FI_SupportsExportBPPProc supports_export_bpp_proc;
* FI_SupportsExportTypeProc supports_export_type_proc;
* FI_SupportsICCProfilesProc supports_icc_profiles_proc;
* FI_SupportsNoPixelsProc supports_no_pixels_proc;
* }
* }
*/
public class Plugin {
Plugin() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Libfreeimage.C_POINTER.withName("format_proc"),
Libfreeimage.C_POINTER.withName("description_proc"),
Libfreeimage.C_POINTER.withName("extension_proc"),
Libfreeimage.C_POINTER.withName("regexpr_proc"),
Libfreeimage.C_POINTER.withName("open_proc"),
Libfreeimage.C_POINTER.withName("close_proc"),
Libfreeimage.C_POINTER.withName("pagecount_proc"),
Libfreeimage.C_POINTER.withName("pagecapability_proc"),
Libfreeimage.C_POINTER.withName("load_proc"),
Libfreeimage.C_POINTER.withName("save_proc"),
Libfreeimage.C_POINTER.withName("validate_proc"),
Libfreeimage.C_POINTER.withName("mime_proc"),
Libfreeimage.C_POINTER.withName("supports_export_bpp_proc"),
Libfreeimage.C_POINTER.withName("supports_export_type_proc"),
Libfreeimage.C_POINTER.withName("supports_icc_profiles_proc"),
Libfreeimage.C_POINTER.withName("supports_no_pixels_proc")
).withName("Plugin");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final AddressLayout format_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("format_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_FormatProc format_proc
* }
*/
public static final AddressLayout format_proc$layout() {
return format_proc$LAYOUT;
}
private static final long format_proc$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* FI_FormatProc format_proc
* }
*/
public static final long format_proc$offset() {
return format_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_FormatProc format_proc
* }
*/
public static MemorySegment format_proc(MemorySegment struct) {
return struct.get(format_proc$LAYOUT, format_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_FormatProc format_proc
* }
*/
public static void format_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(format_proc$LAYOUT, format_proc$OFFSET, fieldValue);
}
private static final AddressLayout description_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("description_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_DescriptionProc description_proc
* }
*/
public static final AddressLayout description_proc$layout() {
return description_proc$LAYOUT;
}
private static final long description_proc$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* FI_DescriptionProc description_proc
* }
*/
public static final long description_proc$offset() {
return description_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_DescriptionProc description_proc
* }
*/
public static MemorySegment description_proc(MemorySegment struct) {
return struct.get(description_proc$LAYOUT, description_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_DescriptionProc description_proc
* }
*/
public static void description_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(description_proc$LAYOUT, description_proc$OFFSET, fieldValue);
}
private static final AddressLayout extension_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("extension_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_ExtensionListProc extension_proc
* }
*/
public static final AddressLayout extension_proc$layout() {
return extension_proc$LAYOUT;
}
private static final long extension_proc$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* FI_ExtensionListProc extension_proc
* }
*/
public static final long extension_proc$offset() {
return extension_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_ExtensionListProc extension_proc
* }
*/
public static MemorySegment extension_proc(MemorySegment struct) {
return struct.get(extension_proc$LAYOUT, extension_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_ExtensionListProc extension_proc
* }
*/
public static void extension_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(extension_proc$LAYOUT, extension_proc$OFFSET, fieldValue);
}
private static final AddressLayout regexpr_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("regexpr_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_RegExprProc regexpr_proc
* }
*/
public static final AddressLayout regexpr_proc$layout() {
return regexpr_proc$LAYOUT;
}
private static final long regexpr_proc$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* FI_RegExprProc regexpr_proc
* }
*/
public static final long regexpr_proc$offset() {
return regexpr_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_RegExprProc regexpr_proc
* }
*/
public static MemorySegment regexpr_proc(MemorySegment struct) {
return struct.get(regexpr_proc$LAYOUT, regexpr_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_RegExprProc regexpr_proc
* }
*/
public static void regexpr_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(regexpr_proc$LAYOUT, regexpr_proc$OFFSET, fieldValue);
}
private static final AddressLayout open_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("open_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_OpenProc open_proc
* }
*/
public static final AddressLayout open_proc$layout() {
return open_proc$LAYOUT;
}
private static final long open_proc$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* FI_OpenProc open_proc
* }
*/
public static final long open_proc$offset() {
return open_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_OpenProc open_proc
* }
*/
public static MemorySegment open_proc(MemorySegment struct) {
return struct.get(open_proc$LAYOUT, open_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_OpenProc open_proc
* }
*/
public static void open_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(open_proc$LAYOUT, open_proc$OFFSET, fieldValue);
}
private static final AddressLayout close_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("close_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_CloseProc close_proc
* }
*/
public static final AddressLayout close_proc$layout() {
return close_proc$LAYOUT;
}
private static final long close_proc$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* FI_CloseProc close_proc
* }
*/
public static final long close_proc$offset() {
return close_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_CloseProc close_proc
* }
*/
public static MemorySegment close_proc(MemorySegment struct) {
return struct.get(close_proc$LAYOUT, close_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_CloseProc close_proc
* }
*/
public static void close_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(close_proc$LAYOUT, close_proc$OFFSET, fieldValue);
}
private static final AddressLayout pagecount_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("pagecount_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_PageCountProc pagecount_proc
* }
*/
public static final AddressLayout pagecount_proc$layout() {
return pagecount_proc$LAYOUT;
}
private static final long pagecount_proc$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* FI_PageCountProc pagecount_proc
* }
*/
public static final long pagecount_proc$offset() {
return pagecount_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_PageCountProc pagecount_proc
* }
*/
public static MemorySegment pagecount_proc(MemorySegment struct) {
return struct.get(pagecount_proc$LAYOUT, pagecount_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_PageCountProc pagecount_proc
* }
*/
public static void pagecount_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(pagecount_proc$LAYOUT, pagecount_proc$OFFSET, fieldValue);
}
private static final AddressLayout pagecapability_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("pagecapability_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_PageCapabilityProc pagecapability_proc
* }
*/
public static final AddressLayout pagecapability_proc$layout() {
return pagecapability_proc$LAYOUT;
}
private static final long pagecapability_proc$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* FI_PageCapabilityProc pagecapability_proc
* }
*/
public static final long pagecapability_proc$offset() {
return pagecapability_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_PageCapabilityProc pagecapability_proc
* }
*/
public static MemorySegment pagecapability_proc(MemorySegment struct) {
return struct.get(pagecapability_proc$LAYOUT, pagecapability_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_PageCapabilityProc pagecapability_proc
* }
*/
public static void pagecapability_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(pagecapability_proc$LAYOUT, pagecapability_proc$OFFSET, fieldValue);
}
private static final AddressLayout load_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("load_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_LoadProc load_proc
* }
*/
public static final AddressLayout load_proc$layout() {
return load_proc$LAYOUT;
}
private static final long load_proc$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* FI_LoadProc load_proc
* }
*/
public static final long load_proc$offset() {
return load_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_LoadProc load_proc
* }
*/
public static MemorySegment load_proc(MemorySegment struct) {
return struct.get(load_proc$LAYOUT, load_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_LoadProc load_proc
* }
*/
public static void load_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(load_proc$LAYOUT, load_proc$OFFSET, fieldValue);
}
private static final AddressLayout save_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("save_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_SaveProc save_proc
* }
*/
public static final AddressLayout save_proc$layout() {
return save_proc$LAYOUT;
}
private static final long save_proc$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* FI_SaveProc save_proc
* }
*/
public static final long save_proc$offset() {
return save_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_SaveProc save_proc
* }
*/
public static MemorySegment save_proc(MemorySegment struct) {
return struct.get(save_proc$LAYOUT, save_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_SaveProc save_proc
* }
*/
public static void save_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(save_proc$LAYOUT, save_proc$OFFSET, fieldValue);
}
private static final AddressLayout validate_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("validate_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_ValidateProc validate_proc
* }
*/
public static final AddressLayout validate_proc$layout() {
return validate_proc$LAYOUT;
}
private static final long validate_proc$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
* FI_ValidateProc validate_proc
* }
*/
public static final long validate_proc$offset() {
return validate_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_ValidateProc validate_proc
* }
*/
public static MemorySegment validate_proc(MemorySegment struct) {
return struct.get(validate_proc$LAYOUT, validate_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_ValidateProc validate_proc
* }
*/
public static void validate_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(validate_proc$LAYOUT, validate_proc$OFFSET, fieldValue);
}
private static final AddressLayout mime_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("mime_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_MimeProc mime_proc
* }
*/
public static final AddressLayout mime_proc$layout() {
return mime_proc$LAYOUT;
}
private static final long mime_proc$OFFSET = 88;
/**
* Offset for field:
* {@snippet lang=c :
* FI_MimeProc mime_proc
* }
*/
public static final long mime_proc$offset() {
return mime_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_MimeProc mime_proc
* }
*/
public static MemorySegment mime_proc(MemorySegment struct) {
return struct.get(mime_proc$LAYOUT, mime_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_MimeProc mime_proc
* }
*/
public static void mime_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(mime_proc$LAYOUT, mime_proc$OFFSET, fieldValue);
}
private static final AddressLayout supports_export_bpp_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("supports_export_bpp_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_SupportsExportBPPProc supports_export_bpp_proc
* }
*/
public static final AddressLayout supports_export_bpp_proc$layout() {
return supports_export_bpp_proc$LAYOUT;
}
private static final long supports_export_bpp_proc$OFFSET = 96;
/**
* Offset for field:
* {@snippet lang=c :
* FI_SupportsExportBPPProc supports_export_bpp_proc
* }
*/
public static final long supports_export_bpp_proc$offset() {
return supports_export_bpp_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_SupportsExportBPPProc supports_export_bpp_proc
* }
*/
public static MemorySegment supports_export_bpp_proc(MemorySegment struct) {
return struct.get(supports_export_bpp_proc$LAYOUT, supports_export_bpp_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_SupportsExportBPPProc supports_export_bpp_proc
* }
*/
public static void supports_export_bpp_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(supports_export_bpp_proc$LAYOUT, supports_export_bpp_proc$OFFSET, fieldValue);
}
private static final AddressLayout supports_export_type_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("supports_export_type_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_SupportsExportTypeProc supports_export_type_proc
* }
*/
public static final AddressLayout supports_export_type_proc$layout() {
return supports_export_type_proc$LAYOUT;
}
private static final long supports_export_type_proc$OFFSET = 104;
/**
* Offset for field:
* {@snippet lang=c :
* FI_SupportsExportTypeProc supports_export_type_proc
* }
*/
public static final long supports_export_type_proc$offset() {
return supports_export_type_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_SupportsExportTypeProc supports_export_type_proc
* }
*/
public static MemorySegment supports_export_type_proc(MemorySegment struct) {
return struct.get(supports_export_type_proc$LAYOUT, supports_export_type_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_SupportsExportTypeProc supports_export_type_proc
* }
*/
public static void supports_export_type_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(supports_export_type_proc$LAYOUT, supports_export_type_proc$OFFSET, fieldValue);
}
private static final AddressLayout supports_icc_profiles_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("supports_icc_profiles_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_SupportsICCProfilesProc supports_icc_profiles_proc
* }
*/
public static final AddressLayout supports_icc_profiles_proc$layout() {
return supports_icc_profiles_proc$LAYOUT;
}
private static final long supports_icc_profiles_proc$OFFSET = 112;
/**
* Offset for field:
* {@snippet lang=c :
* FI_SupportsICCProfilesProc supports_icc_profiles_proc
* }
*/
public static final long supports_icc_profiles_proc$offset() {
return supports_icc_profiles_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_SupportsICCProfilesProc supports_icc_profiles_proc
* }
*/
public static MemorySegment supports_icc_profiles_proc(MemorySegment struct) {
return struct.get(supports_icc_profiles_proc$LAYOUT, supports_icc_profiles_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_SupportsICCProfilesProc supports_icc_profiles_proc
* }
*/
public static void supports_icc_profiles_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(supports_icc_profiles_proc$LAYOUT, supports_icc_profiles_proc$OFFSET, fieldValue);
}
private static final AddressLayout supports_no_pixels_proc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("supports_no_pixels_proc"));
/**
* Layout for field:
* {@snippet lang=c :
* FI_SupportsNoPixelsProc supports_no_pixels_proc
* }
*/
public static final AddressLayout supports_no_pixels_proc$layout() {
return supports_no_pixels_proc$LAYOUT;
}
private static final long supports_no_pixels_proc$OFFSET = 120;
/**
* Offset for field:
* {@snippet lang=c :
* FI_SupportsNoPixelsProc supports_no_pixels_proc
* }
*/
public static final long supports_no_pixels_proc$offset() {
return supports_no_pixels_proc$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* FI_SupportsNoPixelsProc supports_no_pixels_proc
* }
*/
public static MemorySegment supports_no_pixels_proc(MemorySegment struct) {
return struct.get(supports_no_pixels_proc$LAYOUT, supports_no_pixels_proc$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* FI_SupportsNoPixelsProc supports_no_pixels_proc
* }
*/
public static void supports_no_pixels_proc(MemorySegment struct, MemorySegment fieldValue) {
struct.set(supports_no_pixels_proc$LAYOUT, supports_no_pixels_proc$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}