org.purejava.appindicator._GtkBuildableIface 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 _GtkBuildableIface {
* GTypeInterface g_iface;
* void (*set_name)(GtkBuildable *, const gchar *);
* const gchar *(*get_name)(GtkBuildable *);
* void (*add_child)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *);
* void (*set_buildable_property)(GtkBuildable *, GtkBuilder *, const gchar *, const GValue *);
* GObject *(*construct_child)(GtkBuildable *, GtkBuilder *, const gchar *);
* gboolean (*custom_tag_start)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, GMarkupParser *, gpointer *);
* void (*custom_tag_end)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer *);
* void (*custom_finished)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer);
* void (*parser_finished)(GtkBuildable *, GtkBuilder *);
* GObject *(*get_internal_child)(GtkBuildable *, GtkBuilder *, const gchar *);
* }
* }
*/
public class _GtkBuildableIface {
_GtkBuildableIface() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
_GTypeInterface.layout().withName("g_iface"),
app_indicator_h.C_POINTER.withName("set_name"),
app_indicator_h.C_POINTER.withName("get_name"),
app_indicator_h.C_POINTER.withName("add_child"),
app_indicator_h.C_POINTER.withName("set_buildable_property"),
app_indicator_h.C_POINTER.withName("construct_child"),
app_indicator_h.C_POINTER.withName("custom_tag_start"),
app_indicator_h.C_POINTER.withName("custom_tag_end"),
app_indicator_h.C_POINTER.withName("custom_finished"),
app_indicator_h.C_POINTER.withName("parser_finished"),
app_indicator_h.C_POINTER.withName("get_internal_child")
).withName("_GtkBuildableIface");
/**
* 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 (*set_name)(GtkBuildable *, const gchar *)
* }
*/
public class set_name {
/**
* 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(set_name.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_name.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 set_name$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("set_name"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*set_name)(GtkBuildable *, const gchar *)
* }
*/
public static final AddressLayout set_name$layout() {
return set_name$LAYOUT;
}
private static final long set_name$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* void (*set_name)(GtkBuildable *, const gchar *)
* }
*/
public static final long set_name$offset() {
return set_name$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*set_name)(GtkBuildable *, const gchar *)
* }
*/
public static MemorySegment set_name(MemorySegment struct) {
return struct.get(set_name$LAYOUT, set_name$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*set_name)(GtkBuildable *, const gchar *)
* }
*/
public static void set_name(MemorySegment struct, MemorySegment fieldValue) {
struct.set(set_name$LAYOUT, set_name$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* const gchar *(*get_name)(GtkBuildable *)
* }
*/
public class get_name {
/**
* 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_name.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_name.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_name$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_name"));
/**
* Layout for field:
* {@snippet lang=c :
* const gchar *(*get_name)(GtkBuildable *)
* }
*/
public static final AddressLayout get_name$layout() {
return get_name$LAYOUT;
}
private static final long get_name$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* const gchar *(*get_name)(GtkBuildable *)
* }
*/
public static final long get_name$offset() {
return get_name$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* const gchar *(*get_name)(GtkBuildable *)
* }
*/
public static MemorySegment get_name(MemorySegment struct) {
return struct.get(get_name$LAYOUT, get_name$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* const gchar *(*get_name)(GtkBuildable *)
* }
*/
public static void get_name(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_name$LAYOUT, get_name$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*add_child)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *)
* }
*/
public class add_child {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _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_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(add_child.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_child.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) {
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_child$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("add_child"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*add_child)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *)
* }
*/
public static final AddressLayout add_child$layout() {
return add_child$LAYOUT;
}
private static final long add_child$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* void (*add_child)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *)
* }
*/
public static final long add_child$offset() {
return add_child$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*add_child)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *)
* }
*/
public static MemorySegment add_child(MemorySegment struct) {
return struct.get(add_child$LAYOUT, add_child$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*add_child)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *)
* }
*/
public static void add_child(MemorySegment struct, MemorySegment fieldValue) {
struct.set(add_child$LAYOUT, add_child$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*set_buildable_property)(GtkBuildable *, GtkBuilder *, const gchar *, const GValue *)
* }
*/
public class set_buildable_property {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _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_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(set_buildable_property.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_buildable_property.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) {
try {
DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout set_buildable_property$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("set_buildable_property"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*set_buildable_property)(GtkBuildable *, GtkBuilder *, const gchar *, const GValue *)
* }
*/
public static final AddressLayout set_buildable_property$layout() {
return set_buildable_property$LAYOUT;
}
private static final long set_buildable_property$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* void (*set_buildable_property)(GtkBuildable *, GtkBuilder *, const gchar *, const GValue *)
* }
*/
public static final long set_buildable_property$offset() {
return set_buildable_property$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*set_buildable_property)(GtkBuildable *, GtkBuilder *, const gchar *, const GValue *)
* }
*/
public static MemorySegment set_buildable_property(MemorySegment struct) {
return struct.get(set_buildable_property$LAYOUT, set_buildable_property$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*set_buildable_property)(GtkBuildable *, GtkBuilder *, const gchar *, const GValue *)
* }
*/
public static void set_buildable_property(MemorySegment struct, MemorySegment fieldValue) {
struct.set(set_buildable_property$LAYOUT, set_buildable_property$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* GObject *(*construct_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public class construct_child {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
MemorySegment apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
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(construct_child.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(construct_child.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, MemorySegment _x1, MemorySegment _x2) {
try {
return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout construct_child$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("construct_child"));
/**
* Layout for field:
* {@snippet lang=c :
* GObject *(*construct_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public static final AddressLayout construct_child$layout() {
return construct_child$LAYOUT;
}
private static final long construct_child$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* GObject *(*construct_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public static final long construct_child$offset() {
return construct_child$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GObject *(*construct_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public static MemorySegment construct_child(MemorySegment struct) {
return struct.get(construct_child$LAYOUT, construct_child$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* GObject *(*construct_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public static void construct_child(MemorySegment struct, MemorySegment fieldValue) {
struct.set(construct_child$LAYOUT, construct_child$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*custom_tag_start)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, GMarkupParser *, gpointer *)
* }
*/
public class custom_tag_start {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3, MemorySegment _x4, MemorySegment _x5);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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,
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(custom_tag_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(custom_tag_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 int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3, MemorySegment _x4, MemorySegment _x5) {
try {
return (int) 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 custom_tag_start$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("custom_tag_start"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*custom_tag_start)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, GMarkupParser *, gpointer *)
* }
*/
public static final AddressLayout custom_tag_start$layout() {
return custom_tag_start$LAYOUT;
}
private static final long custom_tag_start$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*custom_tag_start)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, GMarkupParser *, gpointer *)
* }
*/
public static final long custom_tag_start$offset() {
return custom_tag_start$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*custom_tag_start)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, GMarkupParser *, gpointer *)
* }
*/
public static MemorySegment custom_tag_start(MemorySegment struct) {
return struct.get(custom_tag_start$LAYOUT, custom_tag_start$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*custom_tag_start)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, GMarkupParser *, gpointer *)
* }
*/
public static void custom_tag_start(MemorySegment struct, MemorySegment fieldValue) {
struct.set(custom_tag_start$LAYOUT, custom_tag_start$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*custom_tag_end)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer *)
* }
*/
public class custom_tag_end {
/**
* 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(custom_tag_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(custom_tag_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, 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 custom_tag_end$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("custom_tag_end"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*custom_tag_end)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer *)
* }
*/
public static final AddressLayout custom_tag_end$layout() {
return custom_tag_end$LAYOUT;
}
private static final long custom_tag_end$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* void (*custom_tag_end)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer *)
* }
*/
public static final long custom_tag_end$offset() {
return custom_tag_end$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*custom_tag_end)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer *)
* }
*/
public static MemorySegment custom_tag_end(MemorySegment struct) {
return struct.get(custom_tag_end$LAYOUT, custom_tag_end$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*custom_tag_end)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer *)
* }
*/
public static void custom_tag_end(MemorySegment struct, MemorySegment fieldValue) {
struct.set(custom_tag_end$LAYOUT, custom_tag_end$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*custom_finished)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer)
* }
*/
public class custom_finished {
/**
* 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(custom_finished.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(custom_finished.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 custom_finished$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("custom_finished"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*custom_finished)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer)
* }
*/
public static final AddressLayout custom_finished$layout() {
return custom_finished$LAYOUT;
}
private static final long custom_finished$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* void (*custom_finished)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer)
* }
*/
public static final long custom_finished$offset() {
return custom_finished$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*custom_finished)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer)
* }
*/
public static MemorySegment custom_finished(MemorySegment struct) {
return struct.get(custom_finished$LAYOUT, custom_finished$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*custom_finished)(GtkBuildable *, GtkBuilder *, GObject *, const gchar *, gpointer)
* }
*/
public static void custom_finished(MemorySegment struct, MemorySegment fieldValue) {
struct.set(custom_finished$LAYOUT, custom_finished$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*parser_finished)(GtkBuildable *, GtkBuilder *)
* }
*/
public class parser_finished {
/**
* 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(parser_finished.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(parser_finished.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 parser_finished$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("parser_finished"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*parser_finished)(GtkBuildable *, GtkBuilder *)
* }
*/
public static final AddressLayout parser_finished$layout() {
return parser_finished$LAYOUT;
}
private static final long parser_finished$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
* void (*parser_finished)(GtkBuildable *, GtkBuilder *)
* }
*/
public static final long parser_finished$offset() {
return parser_finished$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*parser_finished)(GtkBuildable *, GtkBuilder *)
* }
*/
public static MemorySegment parser_finished(MemorySegment struct) {
return struct.get(parser_finished$LAYOUT, parser_finished$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*parser_finished)(GtkBuildable *, GtkBuilder *)
* }
*/
public static void parser_finished(MemorySegment struct, MemorySegment fieldValue) {
struct.set(parser_finished$LAYOUT, parser_finished$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* GObject *(*get_internal_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public class get_internal_child {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
MemorySegment apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
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(get_internal_child.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_internal_child.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, MemorySegment _x1, MemorySegment _x2) {
try {
return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout get_internal_child$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_internal_child"));
/**
* Layout for field:
* {@snippet lang=c :
* GObject *(*get_internal_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public static final AddressLayout get_internal_child$layout() {
return get_internal_child$LAYOUT;
}
private static final long get_internal_child$OFFSET = 88;
/**
* Offset for field:
* {@snippet lang=c :
* GObject *(*get_internal_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public static final long get_internal_child$offset() {
return get_internal_child$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GObject *(*get_internal_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public static MemorySegment get_internal_child(MemorySegment struct) {
return struct.get(get_internal_child$LAYOUT, get_internal_child$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* GObject *(*get_internal_child)(GtkBuildable *, GtkBuilder *, const gchar *)
* }
*/
public static void get_internal_child(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_internal_child$LAYOUT, get_internal_child$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