org.purejava.appindicator._PangoRendererClass Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libayatana-appindicator-java-full Show documentation
Show all versions of libayatana-appindicator-java-full Show documentation
Java bindings for libayatana-appindicator in 100% pure Java
// 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 _PangoRendererClass {
* GObjectClass parent_class;
* void (*draw_glyphs)(PangoRenderer *, PangoFont *, PangoGlyphString *, int, int);
* void (*draw_rectangle)(PangoRenderer *, PangoRenderPart, int, int, int, int);
* void (*draw_error_underline)(PangoRenderer *, int, int, int, int);
* void (*draw_shape)(PangoRenderer *, PangoAttrShape *, int, int);
* void (*draw_trapezoid)(PangoRenderer *, PangoRenderPart, double, double, double, double, double, double);
* void (*draw_glyph)(PangoRenderer *, PangoFont *, PangoGlyph, double, double);
* void (*part_changed)(PangoRenderer *, PangoRenderPart);
* void (*begin)(PangoRenderer *);
* void (*end)(PangoRenderer *);
* void (*prepare_run)(PangoRenderer *, PangoLayoutRun *);
* void (*draw_glyph_item)(PangoRenderer *, const char *, PangoGlyphItem *, int, int);
* void (*_pango_reserved2)(void);
* void (*_pango_reserved3)(void);
* void (*_pango_reserved4)(void);
* }
* }
*/
public class _PangoRendererClass {
_PangoRendererClass() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
_GObjectClass.layout().withName("parent_class"),
app_indicator_h.C_POINTER.withName("draw_glyphs"),
app_indicator_h.C_POINTER.withName("draw_rectangle"),
app_indicator_h.C_POINTER.withName("draw_error_underline"),
app_indicator_h.C_POINTER.withName("draw_shape"),
app_indicator_h.C_POINTER.withName("draw_trapezoid"),
app_indicator_h.C_POINTER.withName("draw_glyph"),
app_indicator_h.C_POINTER.withName("part_changed"),
app_indicator_h.C_POINTER.withName("begin"),
app_indicator_h.C_POINTER.withName("end"),
app_indicator_h.C_POINTER.withName("prepare_run"),
app_indicator_h.C_POINTER.withName("draw_glyph_item"),
app_indicator_h.C_POINTER.withName("_pango_reserved2"),
app_indicator_h.C_POINTER.withName("_pango_reserved3"),
app_indicator_h.C_POINTER.withName("_pango_reserved4")
).withName("_PangoRendererClass");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final GroupLayout parent_class$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("parent_class"));
/**
* Layout for field:
* {@snippet lang=c :
* GObjectClass parent_class
* }
*/
public static final GroupLayout parent_class$layout() {
return parent_class$LAYOUT;
}
private static final long parent_class$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* GObjectClass parent_class
* }
*/
public static final long parent_class$offset() {
return parent_class$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GObjectClass parent_class
* }
*/
public static MemorySegment parent_class(MemorySegment struct) {
return struct.asSlice(parent_class$OFFSET, parent_class$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* GObjectClass parent_class
* }
*/
public static void parent_class(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, parent_class$OFFSET, parent_class$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* void (*draw_glyphs)(PangoRenderer *, PangoFont *, PangoGlyphString *, int, int)
* }
*/
public class draw_glyphs {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, int _x3, int _x4);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_POINTER,
app_indicator_h.C_POINTER,
app_indicator_h.C_INT,
app_indicator_h.C_INT
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(draw_glyphs.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(draw_glyphs.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, int _x3, int _x4) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout draw_glyphs$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("draw_glyphs"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*draw_glyphs)(PangoRenderer *, PangoFont *, PangoGlyphString *, int, int)
* }
*/
public static final AddressLayout draw_glyphs$layout() {
return draw_glyphs$LAYOUT;
}
private static final long draw_glyphs$OFFSET = 136;
/**
* Offset for field:
* {@snippet lang=c :
* void (*draw_glyphs)(PangoRenderer *, PangoFont *, PangoGlyphString *, int, int)
* }
*/
public static final long draw_glyphs$offset() {
return draw_glyphs$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*draw_glyphs)(PangoRenderer *, PangoFont *, PangoGlyphString *, int, int)
* }
*/
public static MemorySegment draw_glyphs(MemorySegment struct) {
return struct.get(draw_glyphs$LAYOUT, draw_glyphs$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*draw_glyphs)(PangoRenderer *, PangoFont *, PangoGlyphString *, int, int)
* }
*/
public static void draw_glyphs(MemorySegment struct, MemorySegment fieldValue) {
struct.set(draw_glyphs$LAYOUT, draw_glyphs$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*draw_rectangle)(PangoRenderer *, PangoRenderPart, int, int, int, int)
* }
*/
public class draw_rectangle {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, int _x1, int _x2, int _x3, int _x4, int _x5);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_INT,
app_indicator_h.C_INT,
app_indicator_h.C_INT,
app_indicator_h.C_INT,
app_indicator_h.C_INT
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(draw_rectangle.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(draw_rectangle.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, int _x2, int _x3, int _x4, int _x5) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout draw_rectangle$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("draw_rectangle"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*draw_rectangle)(PangoRenderer *, PangoRenderPart, int, int, int, int)
* }
*/
public static final AddressLayout draw_rectangle$layout() {
return draw_rectangle$LAYOUT;
}
private static final long draw_rectangle$OFFSET = 144;
/**
* Offset for field:
* {@snippet lang=c :
* void (*draw_rectangle)(PangoRenderer *, PangoRenderPart, int, int, int, int)
* }
*/
public static final long draw_rectangle$offset() {
return draw_rectangle$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*draw_rectangle)(PangoRenderer *, PangoRenderPart, int, int, int, int)
* }
*/
public static MemorySegment draw_rectangle(MemorySegment struct) {
return struct.get(draw_rectangle$LAYOUT, draw_rectangle$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*draw_rectangle)(PangoRenderer *, PangoRenderPart, int, int, int, int)
* }
*/
public static void draw_rectangle(MemorySegment struct, MemorySegment fieldValue) {
struct.set(draw_rectangle$LAYOUT, draw_rectangle$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*draw_error_underline)(PangoRenderer *, int, int, int, int)
* }
*/
public class draw_error_underline {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, int _x1, int _x2, int _x3, int _x4);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_INT,
app_indicator_h.C_INT,
app_indicator_h.C_INT,
app_indicator_h.C_INT
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(draw_error_underline.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(draw_error_underline.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, int _x2, int _x3, int _x4) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout draw_error_underline$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("draw_error_underline"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*draw_error_underline)(PangoRenderer *, int, int, int, int)
* }
*/
public static final AddressLayout draw_error_underline$layout() {
return draw_error_underline$LAYOUT;
}
private static final long draw_error_underline$OFFSET = 152;
/**
* Offset for field:
* {@snippet lang=c :
* void (*draw_error_underline)(PangoRenderer *, int, int, int, int)
* }
*/
public static final long draw_error_underline$offset() {
return draw_error_underline$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*draw_error_underline)(PangoRenderer *, int, int, int, int)
* }
*/
public static MemorySegment draw_error_underline(MemorySegment struct) {
return struct.get(draw_error_underline$LAYOUT, draw_error_underline$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*draw_error_underline)(PangoRenderer *, int, int, int, int)
* }
*/
public static void draw_error_underline(MemorySegment struct, MemorySegment fieldValue) {
struct.set(draw_error_underline$LAYOUT, draw_error_underline$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*draw_shape)(PangoRenderer *, PangoAttrShape *, int, int)
* }
*/
public class draw_shape {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, int _x2, int _x3);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_POINTER,
app_indicator_h.C_INT,
app_indicator_h.C_INT
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(draw_shape.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(draw_shape.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2, int _x3) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout draw_shape$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("draw_shape"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*draw_shape)(PangoRenderer *, PangoAttrShape *, int, int)
* }
*/
public static final AddressLayout draw_shape$layout() {
return draw_shape$LAYOUT;
}
private static final long draw_shape$OFFSET = 160;
/**
* Offset for field:
* {@snippet lang=c :
* void (*draw_shape)(PangoRenderer *, PangoAttrShape *, int, int)
* }
*/
public static final long draw_shape$offset() {
return draw_shape$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*draw_shape)(PangoRenderer *, PangoAttrShape *, int, int)
* }
*/
public static MemorySegment draw_shape(MemorySegment struct) {
return struct.get(draw_shape$LAYOUT, draw_shape$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*draw_shape)(PangoRenderer *, PangoAttrShape *, int, int)
* }
*/
public static void draw_shape(MemorySegment struct, MemorySegment fieldValue) {
struct.set(draw_shape$LAYOUT, draw_shape$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*draw_trapezoid)(PangoRenderer *, PangoRenderPart, double, double, double, double, double, double)
* }
*/
public class draw_trapezoid {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, int _x1, double _x2, double _x3, double _x4, double _x5, double _x6, double _x7);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_INT,
app_indicator_h.C_DOUBLE,
app_indicator_h.C_DOUBLE,
app_indicator_h.C_DOUBLE,
app_indicator_h.C_DOUBLE,
app_indicator_h.C_DOUBLE,
app_indicator_h.C_DOUBLE
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(draw_trapezoid.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(draw_trapezoid.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1, double _x2, double _x3, double _x4, double _x5, double _x6, double _x7) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5, _x6, _x7);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout draw_trapezoid$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("draw_trapezoid"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*draw_trapezoid)(PangoRenderer *, PangoRenderPart, double, double, double, double, double, double)
* }
*/
public static final AddressLayout draw_trapezoid$layout() {
return draw_trapezoid$LAYOUT;
}
private static final long draw_trapezoid$OFFSET = 168;
/**
* Offset for field:
* {@snippet lang=c :
* void (*draw_trapezoid)(PangoRenderer *, PangoRenderPart, double, double, double, double, double, double)
* }
*/
public static final long draw_trapezoid$offset() {
return draw_trapezoid$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*draw_trapezoid)(PangoRenderer *, PangoRenderPart, double, double, double, double, double, double)
* }
*/
public static MemorySegment draw_trapezoid(MemorySegment struct) {
return struct.get(draw_trapezoid$LAYOUT, draw_trapezoid$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*draw_trapezoid)(PangoRenderer *, PangoRenderPart, double, double, double, double, double, double)
* }
*/
public static void draw_trapezoid(MemorySegment struct, MemorySegment fieldValue) {
struct.set(draw_trapezoid$LAYOUT, draw_trapezoid$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*draw_glyph)(PangoRenderer *, PangoFont *, PangoGlyph, double, double)
* }
*/
public class draw_glyph {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, int _x2, double _x3, double _x4);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_POINTER,
app_indicator_h.C_INT,
app_indicator_h.C_DOUBLE,
app_indicator_h.C_DOUBLE
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(draw_glyph.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(draw_glyph.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2, double _x3, double _x4) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout draw_glyph$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("draw_glyph"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*draw_glyph)(PangoRenderer *, PangoFont *, PangoGlyph, double, double)
* }
*/
public static final AddressLayout draw_glyph$layout() {
return draw_glyph$LAYOUT;
}
private static final long draw_glyph$OFFSET = 176;
/**
* Offset for field:
* {@snippet lang=c :
* void (*draw_glyph)(PangoRenderer *, PangoFont *, PangoGlyph, double, double)
* }
*/
public static final long draw_glyph$offset() {
return draw_glyph$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*draw_glyph)(PangoRenderer *, PangoFont *, PangoGlyph, double, double)
* }
*/
public static MemorySegment draw_glyph(MemorySegment struct) {
return struct.get(draw_glyph$LAYOUT, draw_glyph$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*draw_glyph)(PangoRenderer *, PangoFont *, PangoGlyph, double, double)
* }
*/
public static void draw_glyph(MemorySegment struct, MemorySegment fieldValue) {
struct.set(draw_glyph$LAYOUT, draw_glyph$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*part_changed)(PangoRenderer *, PangoRenderPart)
* }
*/
public class part_changed {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, int _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_INT
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(part_changed.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(part_changed.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout part_changed$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("part_changed"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*part_changed)(PangoRenderer *, PangoRenderPart)
* }
*/
public static final AddressLayout part_changed$layout() {
return part_changed$LAYOUT;
}
private static final long part_changed$OFFSET = 184;
/**
* Offset for field:
* {@snippet lang=c :
* void (*part_changed)(PangoRenderer *, PangoRenderPart)
* }
*/
public static final long part_changed$offset() {
return part_changed$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*part_changed)(PangoRenderer *, PangoRenderPart)
* }
*/
public static MemorySegment part_changed(MemorySegment struct) {
return struct.get(part_changed$LAYOUT, part_changed$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*part_changed)(PangoRenderer *, PangoRenderPart)
* }
*/
public static void part_changed(MemorySegment struct, MemorySegment fieldValue) {
struct.set(part_changed$LAYOUT, part_changed$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*begin)(PangoRenderer *)
* }
*/
public class begin {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(begin.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(begin.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout begin$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("begin"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*begin)(PangoRenderer *)
* }
*/
public static final AddressLayout begin$layout() {
return begin$LAYOUT;
}
private static final long begin$OFFSET = 192;
/**
* Offset for field:
* {@snippet lang=c :
* void (*begin)(PangoRenderer *)
* }
*/
public static final long begin$offset() {
return begin$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*begin)(PangoRenderer *)
* }
*/
public static MemorySegment begin(MemorySegment struct) {
return struct.get(begin$LAYOUT, begin$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*begin)(PangoRenderer *)
* }
*/
public static void begin(MemorySegment struct, MemorySegment fieldValue) {
struct.set(begin$LAYOUT, begin$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*end)(PangoRenderer *)
* }
*/
public class end {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(end.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(end.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout end$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("end"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*end)(PangoRenderer *)
* }
*/
public static final AddressLayout end$layout() {
return end$LAYOUT;
}
private static final long end$OFFSET = 200;
/**
* Offset for field:
* {@snippet lang=c :
* void (*end)(PangoRenderer *)
* }
*/
public static final long end$offset() {
return end$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*end)(PangoRenderer *)
* }
*/
public static MemorySegment end(MemorySegment struct) {
return struct.get(end$LAYOUT, end$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*end)(PangoRenderer *)
* }
*/
public static void end(MemorySegment struct, MemorySegment fieldValue) {
struct.set(end$LAYOUT, end$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*prepare_run)(PangoRenderer *, PangoLayoutRun *)
* }
*/
public class prepare_run {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(prepare_run.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(prepare_run.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout prepare_run$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("prepare_run"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*prepare_run)(PangoRenderer *, PangoLayoutRun *)
* }
*/
public static final AddressLayout prepare_run$layout() {
return prepare_run$LAYOUT;
}
private static final long prepare_run$OFFSET = 208;
/**
* Offset for field:
* {@snippet lang=c :
* void (*prepare_run)(PangoRenderer *, PangoLayoutRun *)
* }
*/
public static final long prepare_run$offset() {
return prepare_run$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*prepare_run)(PangoRenderer *, PangoLayoutRun *)
* }
*/
public static MemorySegment prepare_run(MemorySegment struct) {
return struct.get(prepare_run$LAYOUT, prepare_run$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*prepare_run)(PangoRenderer *, PangoLayoutRun *)
* }
*/
public static void prepare_run(MemorySegment struct, MemorySegment fieldValue) {
struct.set(prepare_run$LAYOUT, prepare_run$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*draw_glyph_item)(PangoRenderer *, const char *, PangoGlyphItem *, int, int)
* }
*/
public class draw_glyph_item {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, int _x3, int _x4);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_POINTER,
app_indicator_h.C_POINTER,
app_indicator_h.C_INT,
app_indicator_h.C_INT
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(draw_glyph_item.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(draw_glyph_item.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, int _x3, int _x4) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout draw_glyph_item$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("draw_glyph_item"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*draw_glyph_item)(PangoRenderer *, const char *, PangoGlyphItem *, int, int)
* }
*/
public static final AddressLayout draw_glyph_item$layout() {
return draw_glyph_item$LAYOUT;
}
private static final long draw_glyph_item$OFFSET = 216;
/**
* Offset for field:
* {@snippet lang=c :
* void (*draw_glyph_item)(PangoRenderer *, const char *, PangoGlyphItem *, int, int)
* }
*/
public static final long draw_glyph_item$offset() {
return draw_glyph_item$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*draw_glyph_item)(PangoRenderer *, const char *, PangoGlyphItem *, int, int)
* }
*/
public static MemorySegment draw_glyph_item(MemorySegment struct) {
return struct.get(draw_glyph_item$LAYOUT, draw_glyph_item$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*draw_glyph_item)(PangoRenderer *, const char *, PangoGlyphItem *, int, int)
* }
*/
public static void draw_glyph_item(MemorySegment struct, MemorySegment fieldValue) {
struct.set(draw_glyph_item$LAYOUT, draw_glyph_item$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*_pango_reserved2)(void)
* }
*/
public class _pango_reserved2 {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply();
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid();
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(_pango_reserved2.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(_pango_reserved2.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr) {
try {
DOWN$MH.invokeExact(funcPtr);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout _pango_reserved2$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_pango_reserved2"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*_pango_reserved2)(void)
* }
*/
public static final AddressLayout _pango_reserved2$layout() {
return _pango_reserved2$LAYOUT;
}
private static final long _pango_reserved2$OFFSET = 224;
/**
* Offset for field:
* {@snippet lang=c :
* void (*_pango_reserved2)(void)
* }
*/
public static final long _pango_reserved2$offset() {
return _pango_reserved2$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*_pango_reserved2)(void)
* }
*/
public static MemorySegment _pango_reserved2(MemorySegment struct) {
return struct.get(_pango_reserved2$LAYOUT, _pango_reserved2$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*_pango_reserved2)(void)
* }
*/
public static void _pango_reserved2(MemorySegment struct, MemorySegment fieldValue) {
struct.set(_pango_reserved2$LAYOUT, _pango_reserved2$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*_pango_reserved3)(void)
* }
*/
public class _pango_reserved3 {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply();
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid();
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(_pango_reserved3.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(_pango_reserved3.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr) {
try {
DOWN$MH.invokeExact(funcPtr);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout _pango_reserved3$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_pango_reserved3"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*_pango_reserved3)(void)
* }
*/
public static final AddressLayout _pango_reserved3$layout() {
return _pango_reserved3$LAYOUT;
}
private static final long _pango_reserved3$OFFSET = 232;
/**
* Offset for field:
* {@snippet lang=c :
* void (*_pango_reserved3)(void)
* }
*/
public static final long _pango_reserved3$offset() {
return _pango_reserved3$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*_pango_reserved3)(void)
* }
*/
public static MemorySegment _pango_reserved3(MemorySegment struct) {
return struct.get(_pango_reserved3$LAYOUT, _pango_reserved3$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*_pango_reserved3)(void)
* }
*/
public static void _pango_reserved3(MemorySegment struct, MemorySegment fieldValue) {
struct.set(_pango_reserved3$LAYOUT, _pango_reserved3$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*_pango_reserved4)(void)
* }
*/
public class _pango_reserved4 {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply();
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid();
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(_pango_reserved4.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(_pango_reserved4.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static void invoke(MemorySegment funcPtr) {
try {
DOWN$MH.invokeExact(funcPtr);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout _pango_reserved4$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_pango_reserved4"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*_pango_reserved4)(void)
* }
*/
public static final AddressLayout _pango_reserved4$layout() {
return _pango_reserved4$LAYOUT;
}
private static final long _pango_reserved4$OFFSET = 240;
/**
* Offset for field:
* {@snippet lang=c :
* void (*_pango_reserved4)(void)
* }
*/
public static final long _pango_reserved4$offset() {
return _pango_reserved4$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*_pango_reserved4)(void)
* }
*/
public static MemorySegment _pango_reserved4(MemorySegment struct) {
return struct.get(_pango_reserved4$LAYOUT, _pango_reserved4$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*_pango_reserved4)(void)
* }
*/
public static void _pango_reserved4(MemorySegment struct, MemorySegment fieldValue) {
struct.set(_pango_reserved4$LAYOUT, _pango_reserved4$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);
}
}