org.purejava.appindicator._PangoEngineInfo Maven / Gradle / Ivy
// Generated by jextract
package org.purejava.appindicator;
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 _PangoEngineInfo {
* const gchar *id;
* const gchar *engine_type;
* const gchar *render_type;
* PangoEngineScriptInfo *scripts;
* gint n_scripts;
* }
* }
*/
public class _PangoEngineInfo {
_PangoEngineInfo() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
app_indicator_h.C_POINTER.withName("id"),
app_indicator_h.C_POINTER.withName("engine_type"),
app_indicator_h.C_POINTER.withName("render_type"),
app_indicator_h.C_POINTER.withName("scripts"),
app_indicator_h.C_INT.withName("n_scripts"),
MemoryLayout.paddingLayout(4)
).withName("_PangoEngineInfo");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final AddressLayout id$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("id"));
/**
* Layout for field:
* {@snippet lang=c :
* const gchar *id
* }
*/
public static final AddressLayout id$layout() {
return id$LAYOUT;
}
private static final long id$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* const gchar *id
* }
*/
public static final long id$offset() {
return id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* const gchar *id
* }
*/
public static MemorySegment id(MemorySegment struct) {
return struct.get(id$LAYOUT, id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* const gchar *id
* }
*/
public static void id(MemorySegment struct, MemorySegment fieldValue) {
struct.set(id$LAYOUT, id$OFFSET, fieldValue);
}
private static final AddressLayout engine_type$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("engine_type"));
/**
* Layout for field:
* {@snippet lang=c :
* const gchar *engine_type
* }
*/
public static final AddressLayout engine_type$layout() {
return engine_type$LAYOUT;
}
private static final long engine_type$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* const gchar *engine_type
* }
*/
public static final long engine_type$offset() {
return engine_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* const gchar *engine_type
* }
*/
public static MemorySegment engine_type(MemorySegment struct) {
return struct.get(engine_type$LAYOUT, engine_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* const gchar *engine_type
* }
*/
public static void engine_type(MemorySegment struct, MemorySegment fieldValue) {
struct.set(engine_type$LAYOUT, engine_type$OFFSET, fieldValue);
}
private static final AddressLayout render_type$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("render_type"));
/**
* Layout for field:
* {@snippet lang=c :
* const gchar *render_type
* }
*/
public static final AddressLayout render_type$layout() {
return render_type$LAYOUT;
}
private static final long render_type$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* const gchar *render_type
* }
*/
public static final long render_type$offset() {
return render_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* const gchar *render_type
* }
*/
public static MemorySegment render_type(MemorySegment struct) {
return struct.get(render_type$LAYOUT, render_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* const gchar *render_type
* }
*/
public static void render_type(MemorySegment struct, MemorySegment fieldValue) {
struct.set(render_type$LAYOUT, render_type$OFFSET, fieldValue);
}
private static final AddressLayout scripts$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("scripts"));
/**
* Layout for field:
* {@snippet lang=c :
* PangoEngineScriptInfo *scripts
* }
*/
public static final AddressLayout scripts$layout() {
return scripts$LAYOUT;
}
private static final long scripts$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* PangoEngineScriptInfo *scripts
* }
*/
public static final long scripts$offset() {
return scripts$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* PangoEngineScriptInfo *scripts
* }
*/
public static MemorySegment scripts(MemorySegment struct) {
return struct.get(scripts$LAYOUT, scripts$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* PangoEngineScriptInfo *scripts
* }
*/
public static void scripts(MemorySegment struct, MemorySegment fieldValue) {
struct.set(scripts$LAYOUT, scripts$OFFSET, fieldValue);
}
private static final OfInt n_scripts$LAYOUT = (OfInt)$LAYOUT.select(groupElement("n_scripts"));
/**
* Layout for field:
* {@snippet lang=c :
* gint n_scripts
* }
*/
public static final OfInt n_scripts$layout() {
return n_scripts$LAYOUT;
}
private static final long n_scripts$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* gint n_scripts
* }
*/
public static final long n_scripts$offset() {
return n_scripts$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gint n_scripts
* }
*/
public static int n_scripts(MemorySegment struct) {
return struct.get(n_scripts$LAYOUT, n_scripts$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gint n_scripts
* }
*/
public static void n_scripts(MemorySegment struct, int fieldValue) {
struct.set(n_scripts$LAYOUT, n_scripts$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);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy