org.purejava.appindicator._GDriveIface 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 _GDriveIface {
* GTypeInterface g_iface;
* void (*changed)(GDrive *);
* void (*disconnected)(GDrive *);
* void (*eject_button)(GDrive *);
* char *(*get_name)(GDrive *);
* GIcon *(*get_icon)(GDrive *);
* gboolean (*has_volumes)(GDrive *);
* GList *(*get_volumes)(GDrive *);
* gboolean (*is_media_removable)(GDrive *);
* gboolean (*has_media)(GDrive *);
* gboolean (*is_media_check_automatic)(GDrive *);
* gboolean (*can_eject)(GDrive *);
* gboolean (*can_poll_for_media)(GDrive *);
* void (*eject)(GDrive *, GMountUnmountFlags, GCancellable *, GAsyncReadyCallback, gpointer);
* gboolean (*eject_finish)(GDrive *, GAsyncResult *, GError **);
* void (*poll_for_media)(GDrive *, GCancellable *, GAsyncReadyCallback, gpointer);
* gboolean (*poll_for_media_finish)(GDrive *, GAsyncResult *, GError **);
* char *(*get_identifier)(GDrive *, const char *);
* char **(*enumerate_identifiers)(GDrive *);
* GDriveStartStopType (*get_start_stop_type)(GDrive *);
* gboolean (*can_start)(GDrive *);
* gboolean (*can_start_degraded)(GDrive *);
* void (*start)(GDrive *, GDriveStartFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer);
* gboolean (*start_finish)(GDrive *, GAsyncResult *, GError **);
* gboolean (*can_stop)(GDrive *);
* void (*stop)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer);
* gboolean (*stop_finish)(GDrive *, GAsyncResult *, GError **);
* void (*stop_button)(GDrive *);
* void (*eject_with_operation)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer);
* gboolean (*eject_with_operation_finish)(GDrive *, GAsyncResult *, GError **);
* const gchar *(*get_sort_key)(GDrive *);
* GIcon *(*get_symbolic_icon)(GDrive *);
* gboolean (*is_removable)(GDrive *);
* }
* }
*/
public class _GDriveIface {
_GDriveIface() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
_GTypeInterface.layout().withName("g_iface"),
app_indicator_h.C_POINTER.withName("changed"),
app_indicator_h.C_POINTER.withName("disconnected"),
app_indicator_h.C_POINTER.withName("eject_button"),
app_indicator_h.C_POINTER.withName("get_name"),
app_indicator_h.C_POINTER.withName("get_icon"),
app_indicator_h.C_POINTER.withName("has_volumes"),
app_indicator_h.C_POINTER.withName("get_volumes"),
app_indicator_h.C_POINTER.withName("is_media_removable"),
app_indicator_h.C_POINTER.withName("has_media"),
app_indicator_h.C_POINTER.withName("is_media_check_automatic"),
app_indicator_h.C_POINTER.withName("can_eject"),
app_indicator_h.C_POINTER.withName("can_poll_for_media"),
app_indicator_h.C_POINTER.withName("eject"),
app_indicator_h.C_POINTER.withName("eject_finish"),
app_indicator_h.C_POINTER.withName("poll_for_media"),
app_indicator_h.C_POINTER.withName("poll_for_media_finish"),
app_indicator_h.C_POINTER.withName("get_identifier"),
app_indicator_h.C_POINTER.withName("enumerate_identifiers"),
app_indicator_h.C_POINTER.withName("get_start_stop_type"),
app_indicator_h.C_POINTER.withName("can_start"),
app_indicator_h.C_POINTER.withName("can_start_degraded"),
app_indicator_h.C_POINTER.withName("start"),
app_indicator_h.C_POINTER.withName("start_finish"),
app_indicator_h.C_POINTER.withName("can_stop"),
app_indicator_h.C_POINTER.withName("stop"),
app_indicator_h.C_POINTER.withName("stop_finish"),
app_indicator_h.C_POINTER.withName("stop_button"),
app_indicator_h.C_POINTER.withName("eject_with_operation"),
app_indicator_h.C_POINTER.withName("eject_with_operation_finish"),
app_indicator_h.C_POINTER.withName("get_sort_key"),
app_indicator_h.C_POINTER.withName("get_symbolic_icon"),
app_indicator_h.C_POINTER.withName("is_removable")
).withName("_GDriveIface");
/**
* 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 (*changed)(GDrive *)
* }
*/
public class changed {
/**
* 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(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(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) {
try {
DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout changed$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("changed"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*changed)(GDrive *)
* }
*/
public static final AddressLayout changed$layout() {
return changed$LAYOUT;
}
private static final long changed$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* void (*changed)(GDrive *)
* }
*/
public static final long changed$offset() {
return changed$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*changed)(GDrive *)
* }
*/
public static MemorySegment changed(MemorySegment struct) {
return struct.get(changed$LAYOUT, changed$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*changed)(GDrive *)
* }
*/
public static void changed(MemorySegment struct, MemorySegment fieldValue) {
struct.set(changed$LAYOUT, changed$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*disconnected)(GDrive *)
* }
*/
public class disconnected {
/**
* 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(disconnected.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(disconnected.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 disconnected$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("disconnected"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*disconnected)(GDrive *)
* }
*/
public static final AddressLayout disconnected$layout() {
return disconnected$LAYOUT;
}
private static final long disconnected$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* void (*disconnected)(GDrive *)
* }
*/
public static final long disconnected$offset() {
return disconnected$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*disconnected)(GDrive *)
* }
*/
public static MemorySegment disconnected(MemorySegment struct) {
return struct.get(disconnected$LAYOUT, disconnected$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*disconnected)(GDrive *)
* }
*/
public static void disconnected(MemorySegment struct, MemorySegment fieldValue) {
struct.set(disconnected$LAYOUT, disconnected$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*eject_button)(GDrive *)
* }
*/
public class eject_button {
/**
* 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(eject_button.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(eject_button.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 eject_button$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("eject_button"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*eject_button)(GDrive *)
* }
*/
public static final AddressLayout eject_button$layout() {
return eject_button$LAYOUT;
}
private static final long eject_button$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* void (*eject_button)(GDrive *)
* }
*/
public static final long eject_button$offset() {
return eject_button$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*eject_button)(GDrive *)
* }
*/
public static MemorySegment eject_button(MemorySegment struct) {
return struct.get(eject_button$LAYOUT, eject_button$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*eject_button)(GDrive *)
* }
*/
public static void eject_button(MemorySegment struct, MemorySegment fieldValue) {
struct.set(eject_button$LAYOUT, eject_button$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* char *(*get_name)(GDrive *)
* }
*/
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 :
* char *(*get_name)(GDrive *)
* }
*/
public static final AddressLayout get_name$layout() {
return get_name$LAYOUT;
}
private static final long get_name$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* char *(*get_name)(GDrive *)
* }
*/
public static final long get_name$offset() {
return get_name$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* char *(*get_name)(GDrive *)
* }
*/
public static MemorySegment get_name(MemorySegment struct) {
return struct.get(get_name$LAYOUT, get_name$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* char *(*get_name)(GDrive *)
* }
*/
public static void get_name(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_name$LAYOUT, get_name$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* GIcon *(*get_icon)(GDrive *)
* }
*/
public class get_icon {
/**
* 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_icon.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_icon.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_icon$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_icon"));
/**
* Layout for field:
* {@snippet lang=c :
* GIcon *(*get_icon)(GDrive *)
* }
*/
public static final AddressLayout get_icon$layout() {
return get_icon$LAYOUT;
}
private static final long get_icon$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* GIcon *(*get_icon)(GDrive *)
* }
*/
public static final long get_icon$offset() {
return get_icon$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GIcon *(*get_icon)(GDrive *)
* }
*/
public static MemorySegment get_icon(MemorySegment struct) {
return struct.get(get_icon$LAYOUT, get_icon$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* GIcon *(*get_icon)(GDrive *)
* }
*/
public static void get_icon(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_icon$LAYOUT, get_icon$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*has_volumes)(GDrive *)
* }
*/
public class has_volumes {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(has_volumes.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(has_volumes.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout has_volumes$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("has_volumes"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*has_volumes)(GDrive *)
* }
*/
public static final AddressLayout has_volumes$layout() {
return has_volumes$LAYOUT;
}
private static final long has_volumes$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*has_volumes)(GDrive *)
* }
*/
public static final long has_volumes$offset() {
return has_volumes$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*has_volumes)(GDrive *)
* }
*/
public static MemorySegment has_volumes(MemorySegment struct) {
return struct.get(has_volumes$LAYOUT, has_volumes$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*has_volumes)(GDrive *)
* }
*/
public static void has_volumes(MemorySegment struct, MemorySegment fieldValue) {
struct.set(has_volumes$LAYOUT, has_volumes$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* GList *(*get_volumes)(GDrive *)
* }
*/
public class get_volumes {
/**
* 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_volumes.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_volumes.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_volumes$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_volumes"));
/**
* Layout for field:
* {@snippet lang=c :
* GList *(*get_volumes)(GDrive *)
* }
*/
public static final AddressLayout get_volumes$layout() {
return get_volumes$LAYOUT;
}
private static final long get_volumes$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* GList *(*get_volumes)(GDrive *)
* }
*/
public static final long get_volumes$offset() {
return get_volumes$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GList *(*get_volumes)(GDrive *)
* }
*/
public static MemorySegment get_volumes(MemorySegment struct) {
return struct.get(get_volumes$LAYOUT, get_volumes$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* GList *(*get_volumes)(GDrive *)
* }
*/
public static void get_volumes(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_volumes$LAYOUT, get_volumes$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*is_media_removable)(GDrive *)
* }
*/
public class is_media_removable {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(is_media_removable.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(is_media_removable.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout is_media_removable$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("is_media_removable"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*is_media_removable)(GDrive *)
* }
*/
public static final AddressLayout is_media_removable$layout() {
return is_media_removable$LAYOUT;
}
private static final long is_media_removable$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*is_media_removable)(GDrive *)
* }
*/
public static final long is_media_removable$offset() {
return is_media_removable$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*is_media_removable)(GDrive *)
* }
*/
public static MemorySegment is_media_removable(MemorySegment struct) {
return struct.get(is_media_removable$LAYOUT, is_media_removable$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*is_media_removable)(GDrive *)
* }
*/
public static void is_media_removable(MemorySegment struct, MemorySegment fieldValue) {
struct.set(is_media_removable$LAYOUT, is_media_removable$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*has_media)(GDrive *)
* }
*/
public class has_media {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(has_media.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(has_media.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout has_media$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("has_media"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*has_media)(GDrive *)
* }
*/
public static final AddressLayout has_media$layout() {
return has_media$LAYOUT;
}
private static final long has_media$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*has_media)(GDrive *)
* }
*/
public static final long has_media$offset() {
return has_media$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*has_media)(GDrive *)
* }
*/
public static MemorySegment has_media(MemorySegment struct) {
return struct.get(has_media$LAYOUT, has_media$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*has_media)(GDrive *)
* }
*/
public static void has_media(MemorySegment struct, MemorySegment fieldValue) {
struct.set(has_media$LAYOUT, has_media$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*is_media_check_automatic)(GDrive *)
* }
*/
public class is_media_check_automatic {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(is_media_check_automatic.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(is_media_check_automatic.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout is_media_check_automatic$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("is_media_check_automatic"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*is_media_check_automatic)(GDrive *)
* }
*/
public static final AddressLayout is_media_check_automatic$layout() {
return is_media_check_automatic$LAYOUT;
}
private static final long is_media_check_automatic$OFFSET = 88;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*is_media_check_automatic)(GDrive *)
* }
*/
public static final long is_media_check_automatic$offset() {
return is_media_check_automatic$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*is_media_check_automatic)(GDrive *)
* }
*/
public static MemorySegment is_media_check_automatic(MemorySegment struct) {
return struct.get(is_media_check_automatic$LAYOUT, is_media_check_automatic$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*is_media_check_automatic)(GDrive *)
* }
*/
public static void is_media_check_automatic(MemorySegment struct, MemorySegment fieldValue) {
struct.set(is_media_check_automatic$LAYOUT, is_media_check_automatic$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*can_eject)(GDrive *)
* }
*/
public class can_eject {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(can_eject.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(can_eject.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout can_eject$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("can_eject"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*can_eject)(GDrive *)
* }
*/
public static final AddressLayout can_eject$layout() {
return can_eject$LAYOUT;
}
private static final long can_eject$OFFSET = 96;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*can_eject)(GDrive *)
* }
*/
public static final long can_eject$offset() {
return can_eject$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*can_eject)(GDrive *)
* }
*/
public static MemorySegment can_eject(MemorySegment struct) {
return struct.get(can_eject$LAYOUT, can_eject$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*can_eject)(GDrive *)
* }
*/
public static void can_eject(MemorySegment struct, MemorySegment fieldValue) {
struct.set(can_eject$LAYOUT, can_eject$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*can_poll_for_media)(GDrive *)
* }
*/
public class can_poll_for_media {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(can_poll_for_media.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(can_poll_for_media.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout can_poll_for_media$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("can_poll_for_media"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*can_poll_for_media)(GDrive *)
* }
*/
public static final AddressLayout can_poll_for_media$layout() {
return can_poll_for_media$LAYOUT;
}
private static final long can_poll_for_media$OFFSET = 104;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*can_poll_for_media)(GDrive *)
* }
*/
public static final long can_poll_for_media$offset() {
return can_poll_for_media$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*can_poll_for_media)(GDrive *)
* }
*/
public static MemorySegment can_poll_for_media(MemorySegment struct) {
return struct.get(can_poll_for_media$LAYOUT, can_poll_for_media$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*can_poll_for_media)(GDrive *)
* }
*/
public static void can_poll_for_media(MemorySegment struct, MemorySegment fieldValue) {
struct.set(can_poll_for_media$LAYOUT, can_poll_for_media$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*eject)(GDrive *, GMountUnmountFlags, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public class eject {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, int _x1, MemorySegment _x2, MemorySegment _x3, MemorySegment _x4);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
app_indicator_h.C_INT,
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(eject.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(eject.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, 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 eject$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("eject"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*eject)(GDrive *, GMountUnmountFlags, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final AddressLayout eject$layout() {
return eject$LAYOUT;
}
private static final long eject$OFFSET = 112;
/**
* Offset for field:
* {@snippet lang=c :
* void (*eject)(GDrive *, GMountUnmountFlags, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final long eject$offset() {
return eject$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*eject)(GDrive *, GMountUnmountFlags, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static MemorySegment eject(MemorySegment struct) {
return struct.get(eject$LAYOUT, eject$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*eject)(GDrive *, GMountUnmountFlags, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static void eject(MemorySegment struct, MemorySegment fieldValue) {
struct.set(eject$LAYOUT, eject$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*eject_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public class eject_finish {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
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
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(eject_finish.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(eject_finish.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout eject_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("eject_finish"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*eject_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final AddressLayout eject_finish$layout() {
return eject_finish$LAYOUT;
}
private static final long eject_finish$OFFSET = 120;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*eject_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final long eject_finish$offset() {
return eject_finish$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*eject_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static MemorySegment eject_finish(MemorySegment struct) {
return struct.get(eject_finish$LAYOUT, eject_finish$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*eject_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static void eject_finish(MemorySegment struct, MemorySegment fieldValue) {
struct.set(eject_finish$LAYOUT, eject_finish$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*poll_for_media)(GDrive *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public class poll_for_media {
/**
* 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(poll_for_media.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(poll_for_media.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 poll_for_media$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("poll_for_media"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*poll_for_media)(GDrive *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final AddressLayout poll_for_media$layout() {
return poll_for_media$LAYOUT;
}
private static final long poll_for_media$OFFSET = 128;
/**
* Offset for field:
* {@snippet lang=c :
* void (*poll_for_media)(GDrive *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final long poll_for_media$offset() {
return poll_for_media$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*poll_for_media)(GDrive *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static MemorySegment poll_for_media(MemorySegment struct) {
return struct.get(poll_for_media$LAYOUT, poll_for_media$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*poll_for_media)(GDrive *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static void poll_for_media(MemorySegment struct, MemorySegment fieldValue) {
struct.set(poll_for_media$LAYOUT, poll_for_media$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*poll_for_media_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public class poll_for_media_finish {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
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
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(poll_for_media_finish.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(poll_for_media_finish.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout poll_for_media_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("poll_for_media_finish"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*poll_for_media_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final AddressLayout poll_for_media_finish$layout() {
return poll_for_media_finish$LAYOUT;
}
private static final long poll_for_media_finish$OFFSET = 136;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*poll_for_media_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final long poll_for_media_finish$offset() {
return poll_for_media_finish$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*poll_for_media_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static MemorySegment poll_for_media_finish(MemorySegment struct) {
return struct.get(poll_for_media_finish$LAYOUT, poll_for_media_finish$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*poll_for_media_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static void poll_for_media_finish(MemorySegment struct, MemorySegment fieldValue) {
struct.set(poll_for_media_finish$LAYOUT, poll_for_media_finish$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* char *(*get_identifier)(GDrive *, const char *)
* }
*/
public class get_identifier {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
MemorySegment apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
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_identifier.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_identifier.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) {
try {
return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout get_identifier$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_identifier"));
/**
* Layout for field:
* {@snippet lang=c :
* char *(*get_identifier)(GDrive *, const char *)
* }
*/
public static final AddressLayout get_identifier$layout() {
return get_identifier$LAYOUT;
}
private static final long get_identifier$OFFSET = 144;
/**
* Offset for field:
* {@snippet lang=c :
* char *(*get_identifier)(GDrive *, const char *)
* }
*/
public static final long get_identifier$offset() {
return get_identifier$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* char *(*get_identifier)(GDrive *, const char *)
* }
*/
public static MemorySegment get_identifier(MemorySegment struct) {
return struct.get(get_identifier$LAYOUT, get_identifier$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* char *(*get_identifier)(GDrive *, const char *)
* }
*/
public static void get_identifier(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_identifier$LAYOUT, get_identifier$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* char **(*enumerate_identifiers)(GDrive *)
* }
*/
public class enumerate_identifiers {
/**
* 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(enumerate_identifiers.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(enumerate_identifiers.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 enumerate_identifiers$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("enumerate_identifiers"));
/**
* Layout for field:
* {@snippet lang=c :
* char **(*enumerate_identifiers)(GDrive *)
* }
*/
public static final AddressLayout enumerate_identifiers$layout() {
return enumerate_identifiers$LAYOUT;
}
private static final long enumerate_identifiers$OFFSET = 152;
/**
* Offset for field:
* {@snippet lang=c :
* char **(*enumerate_identifiers)(GDrive *)
* }
*/
public static final long enumerate_identifiers$offset() {
return enumerate_identifiers$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* char **(*enumerate_identifiers)(GDrive *)
* }
*/
public static MemorySegment enumerate_identifiers(MemorySegment struct) {
return struct.get(enumerate_identifiers$LAYOUT, enumerate_identifiers$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* char **(*enumerate_identifiers)(GDrive *)
* }
*/
public static void enumerate_identifiers(MemorySegment struct, MemorySegment fieldValue) {
struct.set(enumerate_identifiers$LAYOUT, enumerate_identifiers$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* GDriveStartStopType (*get_start_stop_type)(GDrive *)
* }
*/
public class get_start_stop_type {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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_start_stop_type.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_start_stop_type.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout get_start_stop_type$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_start_stop_type"));
/**
* Layout for field:
* {@snippet lang=c :
* GDriveStartStopType (*get_start_stop_type)(GDrive *)
* }
*/
public static final AddressLayout get_start_stop_type$layout() {
return get_start_stop_type$LAYOUT;
}
private static final long get_start_stop_type$OFFSET = 160;
/**
* Offset for field:
* {@snippet lang=c :
* GDriveStartStopType (*get_start_stop_type)(GDrive *)
* }
*/
public static final long get_start_stop_type$offset() {
return get_start_stop_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GDriveStartStopType (*get_start_stop_type)(GDrive *)
* }
*/
public static MemorySegment get_start_stop_type(MemorySegment struct) {
return struct.get(get_start_stop_type$LAYOUT, get_start_stop_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* GDriveStartStopType (*get_start_stop_type)(GDrive *)
* }
*/
public static void get_start_stop_type(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_start_stop_type$LAYOUT, get_start_stop_type$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*can_start)(GDrive *)
* }
*/
public class can_start {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(can_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(can_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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout can_start$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("can_start"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*can_start)(GDrive *)
* }
*/
public static final AddressLayout can_start$layout() {
return can_start$LAYOUT;
}
private static final long can_start$OFFSET = 168;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*can_start)(GDrive *)
* }
*/
public static final long can_start$offset() {
return can_start$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*can_start)(GDrive *)
* }
*/
public static MemorySegment can_start(MemorySegment struct) {
return struct.get(can_start$LAYOUT, can_start$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*can_start)(GDrive *)
* }
*/
public static void can_start(MemorySegment struct, MemorySegment fieldValue) {
struct.set(can_start$LAYOUT, can_start$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*can_start_degraded)(GDrive *)
* }
*/
public class can_start_degraded {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(can_start_degraded.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(can_start_degraded.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout can_start_degraded$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("can_start_degraded"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*can_start_degraded)(GDrive *)
* }
*/
public static final AddressLayout can_start_degraded$layout() {
return can_start_degraded$LAYOUT;
}
private static final long can_start_degraded$OFFSET = 176;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*can_start_degraded)(GDrive *)
* }
*/
public static final long can_start_degraded$offset() {
return can_start_degraded$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*can_start_degraded)(GDrive *)
* }
*/
public static MemorySegment can_start_degraded(MemorySegment struct) {
return struct.get(can_start_degraded$LAYOUT, can_start_degraded$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*can_start_degraded)(GDrive *)
* }
*/
public static void can_start_degraded(MemorySegment struct, MemorySegment fieldValue) {
struct.set(can_start_degraded$LAYOUT, can_start_degraded$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*start)(GDrive *, GDriveStartFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public class start {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, int _x1, MemorySegment _x2, MemorySegment _x3, MemorySegment _x4, MemorySegment _x5);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
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
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(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(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, int _x1, MemorySegment _x2, MemorySegment _x3, MemorySegment _x4, MemorySegment _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 start$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("start"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*start)(GDrive *, GDriveStartFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final AddressLayout start$layout() {
return start$LAYOUT;
}
private static final long start$OFFSET = 184;
/**
* Offset for field:
* {@snippet lang=c :
* void (*start)(GDrive *, GDriveStartFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final long start$offset() {
return start$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*start)(GDrive *, GDriveStartFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static MemorySegment start(MemorySegment struct) {
return struct.get(start$LAYOUT, start$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*start)(GDrive *, GDriveStartFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static void start(MemorySegment struct, MemorySegment fieldValue) {
struct.set(start$LAYOUT, start$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*start_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public class start_finish {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
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
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(start_finish.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(start_finish.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout start_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("start_finish"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*start_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final AddressLayout start_finish$layout() {
return start_finish$LAYOUT;
}
private static final long start_finish$OFFSET = 192;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*start_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final long start_finish$offset() {
return start_finish$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*start_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static MemorySegment start_finish(MemorySegment struct) {
return struct.get(start_finish$LAYOUT, start_finish$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*start_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static void start_finish(MemorySegment struct, MemorySegment fieldValue) {
struct.set(start_finish$LAYOUT, start_finish$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*can_stop)(GDrive *)
* }
*/
public class can_stop {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(can_stop.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(can_stop.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout can_stop$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("can_stop"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*can_stop)(GDrive *)
* }
*/
public static final AddressLayout can_stop$layout() {
return can_stop$LAYOUT;
}
private static final long can_stop$OFFSET = 200;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*can_stop)(GDrive *)
* }
*/
public static final long can_stop$offset() {
return can_stop$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*can_stop)(GDrive *)
* }
*/
public static MemorySegment can_stop(MemorySegment struct) {
return struct.get(can_stop$LAYOUT, can_stop$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*can_stop)(GDrive *)
* }
*/
public static void can_stop(MemorySegment struct, MemorySegment fieldValue) {
struct.set(can_stop$LAYOUT, can_stop$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*stop)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public class stop {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, int _x1, MemorySegment _x2, MemorySegment _x3, MemorySegment _x4, MemorySegment _x5);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
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
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(stop.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(stop.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, MemorySegment _x2, MemorySegment _x3, MemorySegment _x4, MemorySegment _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 stop$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("stop"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*stop)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final AddressLayout stop$layout() {
return stop$LAYOUT;
}
private static final long stop$OFFSET = 208;
/**
* Offset for field:
* {@snippet lang=c :
* void (*stop)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final long stop$offset() {
return stop$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*stop)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static MemorySegment stop(MemorySegment struct) {
return struct.get(stop$LAYOUT, stop$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*stop)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static void stop(MemorySegment struct, MemorySegment fieldValue) {
struct.set(stop$LAYOUT, stop$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*stop_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public class stop_finish {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
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
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(stop_finish.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(stop_finish.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout stop_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("stop_finish"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*stop_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final AddressLayout stop_finish$layout() {
return stop_finish$LAYOUT;
}
private static final long stop_finish$OFFSET = 216;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*stop_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final long stop_finish$offset() {
return stop_finish$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*stop_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static MemorySegment stop_finish(MemorySegment struct) {
return struct.get(stop_finish$LAYOUT, stop_finish$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*stop_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static void stop_finish(MemorySegment struct, MemorySegment fieldValue) {
struct.set(stop_finish$LAYOUT, stop_finish$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*stop_button)(GDrive *)
* }
*/
public class stop_button {
/**
* 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(stop_button.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(stop_button.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 stop_button$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("stop_button"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*stop_button)(GDrive *)
* }
*/
public static final AddressLayout stop_button$layout() {
return stop_button$LAYOUT;
}
private static final long stop_button$OFFSET = 224;
/**
* Offset for field:
* {@snippet lang=c :
* void (*stop_button)(GDrive *)
* }
*/
public static final long stop_button$offset() {
return stop_button$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*stop_button)(GDrive *)
* }
*/
public static MemorySegment stop_button(MemorySegment struct) {
return struct.get(stop_button$LAYOUT, stop_button$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*stop_button)(GDrive *)
* }
*/
public static void stop_button(MemorySegment struct, MemorySegment fieldValue) {
struct.set(stop_button$LAYOUT, stop_button$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* void (*eject_with_operation)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public class eject_with_operation {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
void apply(MemorySegment _x0, int _x1, MemorySegment _x2, MemorySegment _x3, MemorySegment _x4, MemorySegment _x5);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
app_indicator_h.C_POINTER,
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
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(eject_with_operation.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(eject_with_operation.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, MemorySegment _x2, MemorySegment _x3, MemorySegment _x4, MemorySegment _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 eject_with_operation$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("eject_with_operation"));
/**
* Layout for field:
* {@snippet lang=c :
* void (*eject_with_operation)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final AddressLayout eject_with_operation$layout() {
return eject_with_operation$LAYOUT;
}
private static final long eject_with_operation$OFFSET = 232;
/**
* Offset for field:
* {@snippet lang=c :
* void (*eject_with_operation)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static final long eject_with_operation$offset() {
return eject_with_operation$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void (*eject_with_operation)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static MemorySegment eject_with_operation(MemorySegment struct) {
return struct.get(eject_with_operation$LAYOUT, eject_with_operation$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void (*eject_with_operation)(GDrive *, GMountUnmountFlags, GMountOperation *, GCancellable *, GAsyncReadyCallback, gpointer)
* }
*/
public static void eject_with_operation(MemorySegment struct, MemorySegment fieldValue) {
struct.set(eject_with_operation$LAYOUT, eject_with_operation$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*eject_with_operation_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public class eject_with_operation_finish {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
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
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(eject_with_operation_finish.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(eject_with_operation_finish.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout eject_with_operation_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("eject_with_operation_finish"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*eject_with_operation_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final AddressLayout eject_with_operation_finish$layout() {
return eject_with_operation_finish$LAYOUT;
}
private static final long eject_with_operation_finish$OFFSET = 240;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*eject_with_operation_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static final long eject_with_operation_finish$offset() {
return eject_with_operation_finish$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*eject_with_operation_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static MemorySegment eject_with_operation_finish(MemorySegment struct) {
return struct.get(eject_with_operation_finish$LAYOUT, eject_with_operation_finish$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*eject_with_operation_finish)(GDrive *, GAsyncResult *, GError **)
* }
*/
public static void eject_with_operation_finish(MemorySegment struct, MemorySegment fieldValue) {
struct.set(eject_with_operation_finish$LAYOUT, eject_with_operation_finish$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* const gchar *(*get_sort_key)(GDrive *)
* }
*/
public class get_sort_key {
/**
* 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_sort_key.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_sort_key.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_sort_key$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_sort_key"));
/**
* Layout for field:
* {@snippet lang=c :
* const gchar *(*get_sort_key)(GDrive *)
* }
*/
public static final AddressLayout get_sort_key$layout() {
return get_sort_key$LAYOUT;
}
private static final long get_sort_key$OFFSET = 248;
/**
* Offset for field:
* {@snippet lang=c :
* const gchar *(*get_sort_key)(GDrive *)
* }
*/
public static final long get_sort_key$offset() {
return get_sort_key$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* const gchar *(*get_sort_key)(GDrive *)
* }
*/
public static MemorySegment get_sort_key(MemorySegment struct) {
return struct.get(get_sort_key$LAYOUT, get_sort_key$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* const gchar *(*get_sort_key)(GDrive *)
* }
*/
public static void get_sort_key(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_sort_key$LAYOUT, get_sort_key$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* GIcon *(*get_symbolic_icon)(GDrive *)
* }
*/
public class get_symbolic_icon {
/**
* 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_symbolic_icon.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_symbolic_icon.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_symbolic_icon$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_symbolic_icon"));
/**
* Layout for field:
* {@snippet lang=c :
* GIcon *(*get_symbolic_icon)(GDrive *)
* }
*/
public static final AddressLayout get_symbolic_icon$layout() {
return get_symbolic_icon$LAYOUT;
}
private static final long get_symbolic_icon$OFFSET = 256;
/**
* Offset for field:
* {@snippet lang=c :
* GIcon *(*get_symbolic_icon)(GDrive *)
* }
*/
public static final long get_symbolic_icon$offset() {
return get_symbolic_icon$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* GIcon *(*get_symbolic_icon)(GDrive *)
* }
*/
public static MemorySegment get_symbolic_icon(MemorySegment struct) {
return struct.get(get_symbolic_icon$LAYOUT, get_symbolic_icon$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* GIcon *(*get_symbolic_icon)(GDrive *)
* }
*/
public static void get_symbolic_icon(MemorySegment struct, MemorySegment fieldValue) {
struct.set(get_symbolic_icon$LAYOUT, get_symbolic_icon$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* gboolean (*is_removable)(GDrive *)
* }
*/
public class is_removable {
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
app_indicator_h.C_INT,
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(is_removable.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(is_removable.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) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout is_removable$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("is_removable"));
/**
* Layout for field:
* {@snippet lang=c :
* gboolean (*is_removable)(GDrive *)
* }
*/
public static final AddressLayout is_removable$layout() {
return is_removable$LAYOUT;
}
private static final long is_removable$OFFSET = 264;
/**
* Offset for field:
* {@snippet lang=c :
* gboolean (*is_removable)(GDrive *)
* }
*/
public static final long is_removable$offset() {
return is_removable$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* gboolean (*is_removable)(GDrive *)
* }
*/
public static MemorySegment is_removable(MemorySegment struct) {
return struct.get(is_removable$LAYOUT, is_removable$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* gboolean (*is_removable)(GDrive *)
* }
*/
public static void is_removable(MemorySegment struct, MemorySegment fieldValue) {
struct.set(is_removable$LAYOUT, is_removable$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);
}
}