org.purejava.appindicator._GtkCellLayoutIface 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 _GtkCellLayoutIface {
* GTypeInterface g_iface;
* void (*pack_start)(GtkCellLayout *, GtkCellRenderer *, gboolean);
* void (*pack_end)(GtkCellLayout *, GtkCellRenderer *, gboolean);
* void (*clear)(GtkCellLayout *);
* void (*add_attribute)(GtkCellLayout *, GtkCellRenderer *, const gchar *, gint);
* void (*set_cell_data_func)(GtkCellLayout *, GtkCellRenderer *, GtkCellLayoutDataFunc, gpointer, GDestroyNotify);
* void (*clear_attributes)(GtkCellLayout *, GtkCellRenderer *);
* void (*reorder)(GtkCellLayout *, GtkCellRenderer *, gint);
* GList *(*get_cells)(GtkCellLayout *);
* GtkCellArea *(*get_area)(GtkCellLayout *);
* }
* }
*/
public class _GtkCellLayoutIface {
_GtkCellLayoutIface() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
_GTypeInterface.layout().withName("g_iface"),
app_indicator_h.C_POINTER.withName("pack_start"),
app_indicator_h.C_POINTER.withName("pack_end"),
app_indicator_h.C_POINTER.withName("clear"),
app_indicator_h.C_POINTER.withName("add_attribute"),
app_indicator_h.C_POINTER.withName("set_cell_data_func"),
app_indicator_h.C_POINTER.withName("clear_attributes"),
app_indicator_h.C_POINTER.withName("reorder"),
app_indicator_h.C_POINTER.withName("get_cells"),
app_indicator_h.C_POINTER.withName("get_area")
).withName("_GtkCellLayoutIface");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final GroupLayout g_iface$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("g_iface"));
/**
* Layout for field:
* {@snippet lang=c :
* GTypeInterface g_iface
* }
*/
public static final GroupLayout g_iface$layout() {
return g_iface$LAYOUT;
}
private static final long g_iface$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* GTypeInterface g_iface
* }
*/
public static final long g_iface$offset() {
return g_iface$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GTypeInterface g_iface
* }
*/
public static MemorySegment g_iface(MemorySegment struct) {
return struct.asSlice(g_iface$OFFSET, g_iface$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* GTypeInterface g_iface
* }
*/
public static void g_iface(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, g_iface$OFFSET, g_iface$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* void (*pack_start)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public class pack_start {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, int _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
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(pack_start.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(pack_start.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) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout pack_start$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("pack_start"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*pack_start)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public static final AddressLayout pack_start$layout() {
return pack_start$LAYOUT;
}
private static final long pack_start$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* void (*pack_start)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public static final long pack_start$offset() {
return pack_start$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*pack_start)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public static MemorySegment pack_start(MemorySegment struct) {
return struct.get(pack_start$LAYOUT, pack_start$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*pack_start)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public static void pack_start(MemorySegment struct, MemorySegment fieldValue) {
struct.set(pack_start$LAYOUT, pack_start$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*pack_end)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public class pack_end {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, int _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
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(pack_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(pack_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, MemorySegment _x1, int _x2) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout pack_end$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("pack_end"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*pack_end)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public static final AddressLayout pack_end$layout() {
return pack_end$LAYOUT;
}
private static final long pack_end$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* void (*pack_end)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public static final long pack_end$offset() {
return pack_end$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*pack_end)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public static MemorySegment pack_end(MemorySegment struct) {
return struct.get(pack_end$LAYOUT, pack_end$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*pack_end)(GtkCellLayout *, GtkCellRenderer *, gboolean)
* }
*/
public static void pack_end(MemorySegment struct, MemorySegment fieldValue) {
struct.set(pack_end$LAYOUT, pack_end$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*clear)(GtkCellLayout *)
* }
*/
public class clear {
/**
* 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(clear.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(clear.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 clear$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("clear"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*clear)(GtkCellLayout *)
* }
*/
public static final AddressLayout clear$layout() {
return clear$LAYOUT;
}
private static final long clear$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* void (*clear)(GtkCellLayout *)
* }
*/
public static final long clear$offset() {
return clear$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*clear)(GtkCellLayout *)
* }
*/
public static MemorySegment clear(MemorySegment struct) {
return struct.get(clear$LAYOUT, clear$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*clear)(GtkCellLayout *)
* }
*/
public static void clear(MemorySegment struct, MemorySegment fieldValue) {
struct.set(clear$LAYOUT, clear$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*add_attribute)(GtkCellLayout *, GtkCellRenderer *, const gchar *, gint)
* }
*/
public class add_attribute {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, int _x3);
}
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
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(add_attribute.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(add_attribute.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) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout add_attribute$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("add_attribute"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*add_attribute)(GtkCellLayout *, GtkCellRenderer *, const gchar *, gint)
* }
*/
public static final AddressLayout add_attribute$layout() {
return add_attribute$LAYOUT;
}
private static final long add_attribute$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* void (*add_attribute)(GtkCellLayout *, GtkCellRenderer *, const gchar *, gint)
* }
*/
public static final long add_attribute$offset() {
return add_attribute$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*add_attribute)(GtkCellLayout *, GtkCellRenderer *, const gchar *, gint)
* }
*/
public static MemorySegment add_attribute(MemorySegment struct) {
return struct.get(add_attribute$LAYOUT, add_attribute$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*add_attribute)(GtkCellLayout *, GtkCellRenderer *, const gchar *, gint)
* }
*/
public static void add_attribute(MemorySegment struct, MemorySegment fieldValue) {
struct.set(add_attribute$LAYOUT, add_attribute$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*set_cell_data_func)(GtkCellLayout *, GtkCellRenderer *, GtkCellLayoutDataFunc, gpointer, GDestroyNotify)
* }
*/
public class set_cell_data_func {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3, MemorySegment _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_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(set_cell_data_func.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(set_cell_data_func.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, MemorySegment _x3, MemorySegment _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 set_cell_data_func$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("set_cell_data_func"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*set_cell_data_func)(GtkCellLayout *, GtkCellRenderer *, GtkCellLayoutDataFunc, gpointer, GDestroyNotify)
* }
*/
public static final AddressLayout set_cell_data_func$layout() {
return set_cell_data_func$LAYOUT;
}
private static final long set_cell_data_func$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* void (*set_cell_data_func)(GtkCellLayout *, GtkCellRenderer *, GtkCellLayoutDataFunc, gpointer, GDestroyNotify)
* }
*/
public static final long set_cell_data_func$offset() {
return set_cell_data_func$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*set_cell_data_func)(GtkCellLayout *, GtkCellRenderer *, GtkCellLayoutDataFunc, gpointer, GDestroyNotify)
* }
*/
public static MemorySegment set_cell_data_func(MemorySegment struct) {
return struct.get(set_cell_data_func$LAYOUT, set_cell_data_func$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*set_cell_data_func)(GtkCellLayout *, GtkCellRenderer *, GtkCellLayoutDataFunc, gpointer, GDestroyNotify)
* }
*/
public static void set_cell_data_func(MemorySegment struct, MemorySegment fieldValue) {
struct.set(set_cell_data_func$LAYOUT, set_cell_data_func$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*clear_attributes)(GtkCellLayout *, GtkCellRenderer *)
* }
*/
public class clear_attributes {
/**
* 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(clear_attributes.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(clear_attributes.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 clear_attributes$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("clear_attributes"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*clear_attributes)(GtkCellLayout *, GtkCellRenderer *)
* }
*/
public static final AddressLayout clear_attributes$layout() {
return clear_attributes$LAYOUT;
}
private static final long clear_attributes$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* void (*clear_attributes)(GtkCellLayout *, GtkCellRenderer *)
* }
*/
public static final long clear_attributes$offset() {
return clear_attributes$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*clear_attributes)(GtkCellLayout *, GtkCellRenderer *)
* }
*/
public static MemorySegment clear_attributes(MemorySegment struct) {
return struct.get(clear_attributes$LAYOUT, clear_attributes$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*clear_attributes)(GtkCellLayout *, GtkCellRenderer *)
* }
*/
public static void clear_attributes(MemorySegment struct, MemorySegment fieldValue) {
struct.set(clear_attributes$LAYOUT, clear_attributes$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*reorder)(GtkCellLayout *, GtkCellRenderer *, gint)
* }
*/
public class reorder {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, int _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
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(reorder.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(reorder.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) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout reorder$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("reorder"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*reorder)(GtkCellLayout *, GtkCellRenderer *, gint)
* }
*/
public static final AddressLayout reorder$layout() {
return reorder$LAYOUT;
}
private static final long reorder$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* void (*reorder)(GtkCellLayout *, GtkCellRenderer *, gint)
* }
*/
public static final long reorder$offset() {
return reorder$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*reorder)(GtkCellLayout *, GtkCellRenderer *, gint)
* }
*/
public static MemorySegment reorder(MemorySegment struct) {
return struct.get(reorder$LAYOUT, reorder$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*reorder)(GtkCellLayout *, GtkCellRenderer *, gint)
* }
*/
public static void reorder(MemorySegment struct, MemorySegment fieldValue) {
struct.set(reorder$LAYOUT, reorder$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* GList *(*get_cells)(GtkCellLayout *)
* }
*/
public class get_cells {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
MemorySegment apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
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(get_cells.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(get_cells.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 MemorySegment invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout get_cells$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_cells"));
/**
* Layout for field:
* {@snippet lang=c :
* GList *(*get_cells)(GtkCellLayout *)
* }
*/
public static final AddressLayout get_cells$layout() {
return get_cells$LAYOUT;
}
private static final long get_cells$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* GList *(*get_cells)(GtkCellLayout *)
* }
*/
public static final long get_cells$offset() {
return get_cells$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GList *(*get_cells)(GtkCellLayout *)
* }
*/
public static MemorySegment get_cells(MemorySegment struct) {
return struct.get(get_cells$LAYOUT, get_cells$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* GList *(*get_cells)(GtkCellLayout *)
* }
*/
public static void get_cells(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_cells$LAYOUT, get_cells$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* GtkCellArea *(*get_area)(GtkCellLayout *)
* }
*/
public class get_area {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
MemorySegment apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
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(get_area.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(get_area.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 MemorySegment invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout get_area$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_area"));
/**
* Layout for field:
* {@snippet lang=c :
* GtkCellArea *(*get_area)(GtkCellLayout *)
* }
*/
public static final AddressLayout get_area$layout() {
return get_area$LAYOUT;
}
private static final long get_area$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
* GtkCellArea *(*get_area)(GtkCellLayout *)
* }
*/
public static final long get_area$offset() {
return get_area$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GtkCellArea *(*get_area)(GtkCellLayout *)
* }
*/
public static MemorySegment get_area(MemorySegment struct) {
return struct.get(get_area$LAYOUT, get_area$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* GtkCellArea *(*get_area)(GtkCellLayout *)
* }
*/
public static void get_area(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_area$LAYOUT, get_area$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);
}
}