All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.purejava.appindicator._GOutputStreamClass Maven / Gradle / Ivy

The newest version!
// 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 _GOutputStreamClass {
 *     GObjectClass parent_class;
 *     gssize (*write_fn)(GOutputStream *, const void *, gsize, GCancellable *, GError **);
 *     gssize (*splice)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, GCancellable *, GError **);
 *     gboolean (*flush)(GOutputStream *, GCancellable *, GError **);
 *     gboolean (*close_fn)(GOutputStream *, GCancellable *, GError **);
 *     void (*write_async)(GOutputStream *, const void *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer);
 *     gssize (*write_finish)(GOutputStream *, GAsyncResult *, GError **);
 *     void (*splice_async)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, int, GCancellable *, GAsyncReadyCallback, gpointer);
 *     gssize (*splice_finish)(GOutputStream *, GAsyncResult *, GError **);
 *     void (*flush_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer);
 *     gboolean (*flush_finish)(GOutputStream *, GAsyncResult *, GError **);
 *     void (*close_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer);
 *     gboolean (*close_finish)(GOutputStream *, GAsyncResult *, GError **);
 *     gboolean (*writev_fn)(GOutputStream *, const GOutputVector *, gsize, gsize *, GCancellable *, GError **);
 *     void (*writev_async)(GOutputStream *, const GOutputVector *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer);
 *     gboolean (*writev_finish)(GOutputStream *, GAsyncResult *, gsize *, GError **);
 *     void (*_g_reserved4)(void);
 *     void (*_g_reserved5)(void);
 *     void (*_g_reserved6)(void);
 *     void (*_g_reserved7)(void);
 *     void (*_g_reserved8)(void);
 * }
 * }
 */
public class _GOutputStreamClass {

    _GOutputStreamClass() {
        // Should not be called directly
    }

    private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
        _GObjectClass.layout().withName("parent_class"),
        app_indicator_h.C_POINTER.withName("write_fn"),
        app_indicator_h.C_POINTER.withName("splice"),
        app_indicator_h.C_POINTER.withName("flush"),
        app_indicator_h.C_POINTER.withName("close_fn"),
        app_indicator_h.C_POINTER.withName("write_async"),
        app_indicator_h.C_POINTER.withName("write_finish"),
        app_indicator_h.C_POINTER.withName("splice_async"),
        app_indicator_h.C_POINTER.withName("splice_finish"),
        app_indicator_h.C_POINTER.withName("flush_async"),
        app_indicator_h.C_POINTER.withName("flush_finish"),
        app_indicator_h.C_POINTER.withName("close_async"),
        app_indicator_h.C_POINTER.withName("close_finish"),
        app_indicator_h.C_POINTER.withName("writev_fn"),
        app_indicator_h.C_POINTER.withName("writev_async"),
        app_indicator_h.C_POINTER.withName("writev_finish"),
        app_indicator_h.C_POINTER.withName("_g_reserved4"),
        app_indicator_h.C_POINTER.withName("_g_reserved5"),
        app_indicator_h.C_POINTER.withName("_g_reserved6"),
        app_indicator_h.C_POINTER.withName("_g_reserved7"),
        app_indicator_h.C_POINTER.withName("_g_reserved8")
    ).withName("_GOutputStreamClass");

    /**
     * The layout of this struct
     */
    public static final GroupLayout layout() {
        return $LAYOUT;
    }

    private static final GroupLayout parent_class$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("parent_class"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * GObjectClass parent_class
     * }
     */
    public static final GroupLayout parent_class$layout() {
        return parent_class$LAYOUT;
    }

    private static final long parent_class$OFFSET = 0;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * GObjectClass parent_class
     * }
     */
    public static final long parent_class$offset() {
        return parent_class$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * GObjectClass parent_class
     * }
     */
    public static MemorySegment parent_class(MemorySegment struct) {
        return struct.asSlice(parent_class$OFFSET, parent_class$LAYOUT.byteSize());
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * GObjectClass parent_class
     * }
     */
    public static void parent_class(MemorySegment struct, MemorySegment fieldValue) {
        MemorySegment.copy(fieldValue, 0L, struct, parent_class$OFFSET, parent_class$LAYOUT.byteSize());
    }

    /**
     * {@snippet lang=c :
     * gssize (*write_fn)(GOutputStream *, const void *, gsize, GCancellable *, GError **)
     * }
     */
    public class write_fn {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            long apply(MemorySegment _x0, MemorySegment _x1, long _x2, MemorySegment _x3, MemorySegment _x4);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            app_indicator_h.C_LONG,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_LONG,
            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(write_fn.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(write_fn.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 long invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, long _x2, MemorySegment _x3, MemorySegment _x4) {
            try {
                return (long) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout write_fn$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("write_fn"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gssize (*write_fn)(GOutputStream *, const void *, gsize, GCancellable *, GError **)
     * }
     */
    public static final AddressLayout write_fn$layout() {
        return write_fn$LAYOUT;
    }

    private static final long write_fn$OFFSET = 136;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gssize (*write_fn)(GOutputStream *, const void *, gsize, GCancellable *, GError **)
     * }
     */
    public static final long write_fn$offset() {
        return write_fn$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gssize (*write_fn)(GOutputStream *, const void *, gsize, GCancellable *, GError **)
     * }
     */
    public static MemorySegment write_fn(MemorySegment struct) {
        return struct.get(write_fn$LAYOUT, write_fn$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gssize (*write_fn)(GOutputStream *, const void *, gsize, GCancellable *, GError **)
     * }
     */
    public static void write_fn(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(write_fn$LAYOUT, write_fn$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * gssize (*splice)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, GCancellable *, GError **)
     * }
     */
    public class splice {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            long apply(MemorySegment _x0, MemorySegment _x1, int _x2, MemorySegment _x3, MemorySegment _x4);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            app_indicator_h.C_LONG,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_INT,
            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(splice.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(splice.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 long invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2, MemorySegment _x3, MemorySegment _x4) {
            try {
                return (long) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout splice$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("splice"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gssize (*splice)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, GCancellable *, GError **)
     * }
     */
    public static final AddressLayout splice$layout() {
        return splice$LAYOUT;
    }

    private static final long splice$OFFSET = 144;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gssize (*splice)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, GCancellable *, GError **)
     * }
     */
    public static final long splice$offset() {
        return splice$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gssize (*splice)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, GCancellable *, GError **)
     * }
     */
    public static MemorySegment splice(MemorySegment struct) {
        return struct.get(splice$LAYOUT, splice$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gssize (*splice)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, GCancellable *, GError **)
     * }
     */
    public static void splice(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(splice$LAYOUT, splice$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * gboolean (*flush)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public class flush {

        /**
         * 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(flush.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(flush.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 flush$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("flush"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*flush)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public static final AddressLayout flush$layout() {
        return flush$LAYOUT;
    }

    private static final long flush$OFFSET = 152;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*flush)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public static final long flush$offset() {
        return flush$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*flush)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public static MemorySegment flush(MemorySegment struct) {
        return struct.get(flush$LAYOUT, flush$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gboolean (*flush)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public static void flush(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(flush$LAYOUT, flush$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * gboolean (*close_fn)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public class close_fn {

        /**
         * 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(close_fn.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(close_fn.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 close_fn$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("close_fn"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*close_fn)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public static final AddressLayout close_fn$layout() {
        return close_fn$LAYOUT;
    }

    private static final long close_fn$OFFSET = 160;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*close_fn)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public static final long close_fn$offset() {
        return close_fn$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*close_fn)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public static MemorySegment close_fn(MemorySegment struct) {
        return struct.get(close_fn$LAYOUT, close_fn$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gboolean (*close_fn)(GOutputStream *, GCancellable *, GError **)
     * }
     */
    public static void close_fn(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(close_fn$LAYOUT, close_fn$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*write_async)(GOutputStream *, const void *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public class write_async {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply(MemorySegment _x0, MemorySegment _x1, long _x2, int _x3, MemorySegment _x4, MemorySegment _x5, MemorySegment _x6);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_LONG,
            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(write_async.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(write_async.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, long _x2, int _x3, MemorySegment _x4, MemorySegment _x5, MemorySegment _x6) {
            try {
                 DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5, _x6);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout write_async$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("write_async"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*write_async)(GOutputStream *, const void *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final AddressLayout write_async$layout() {
        return write_async$LAYOUT;
    }

    private static final long write_async$OFFSET = 168;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*write_async)(GOutputStream *, const void *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final long write_async$offset() {
        return write_async$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*write_async)(GOutputStream *, const void *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static MemorySegment write_async(MemorySegment struct) {
        return struct.get(write_async$LAYOUT, write_async$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*write_async)(GOutputStream *, const void *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static void write_async(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(write_async$LAYOUT, write_async$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * gssize (*write_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public class write_finish {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            long apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            app_indicator_h.C_LONG,
            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(write_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(write_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 long invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2) {
            try {
                return (long) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout write_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("write_finish"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gssize (*write_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static final AddressLayout write_finish$layout() {
        return write_finish$LAYOUT;
    }

    private static final long write_finish$OFFSET = 176;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gssize (*write_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static final long write_finish$offset() {
        return write_finish$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gssize (*write_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static MemorySegment write_finish(MemorySegment struct) {
        return struct.get(write_finish$LAYOUT, write_finish$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gssize (*write_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static void write_finish(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(write_finish$LAYOUT, write_finish$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*splice_async)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public class splice_async {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply(MemorySegment _x0, MemorySegment _x1, int _x2, int _x3, MemorySegment _x4, MemorySegment _x5, MemorySegment _x6);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_INT,
            app_indicator_h.C_INT,
            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(splice_async.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(splice_async.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static void invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2, int _x3, MemorySegment _x4, MemorySegment _x5, MemorySegment _x6) {
            try {
                 DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5, _x6);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout splice_async$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("splice_async"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*splice_async)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final AddressLayout splice_async$layout() {
        return splice_async$LAYOUT;
    }

    private static final long splice_async$OFFSET = 184;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*splice_async)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final long splice_async$offset() {
        return splice_async$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*splice_async)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static MemorySegment splice_async(MemorySegment struct) {
        return struct.get(splice_async$LAYOUT, splice_async$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*splice_async)(GOutputStream *, GInputStream *, GOutputStreamSpliceFlags, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static void splice_async(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(splice_async$LAYOUT, splice_async$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * gssize (*splice_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public class splice_finish {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            long apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            app_indicator_h.C_LONG,
            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(splice_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(splice_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 long invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2) {
            try {
                return (long) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout splice_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("splice_finish"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gssize (*splice_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static final AddressLayout splice_finish$layout() {
        return splice_finish$LAYOUT;
    }

    private static final long splice_finish$OFFSET = 192;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gssize (*splice_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static final long splice_finish$offset() {
        return splice_finish$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gssize (*splice_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static MemorySegment splice_finish(MemorySegment struct) {
        return struct.get(splice_finish$LAYOUT, splice_finish$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gssize (*splice_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static void splice_finish(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(splice_finish$LAYOUT, splice_finish$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*flush_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public class flush_async {

        /**
         * 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(flush_async.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(flush_async.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 flush_async$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("flush_async"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*flush_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final AddressLayout flush_async$layout() {
        return flush_async$LAYOUT;
    }

    private static final long flush_async$OFFSET = 200;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*flush_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final long flush_async$offset() {
        return flush_async$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*flush_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static MemorySegment flush_async(MemorySegment struct) {
        return struct.get(flush_async$LAYOUT, flush_async$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*flush_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static void flush_async(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(flush_async$LAYOUT, flush_async$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * gboolean (*flush_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public class flush_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(flush_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(flush_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 flush_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("flush_finish"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*flush_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static final AddressLayout flush_finish$layout() {
        return flush_finish$LAYOUT;
    }

    private static final long flush_finish$OFFSET = 208;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*flush_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static final long flush_finish$offset() {
        return flush_finish$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*flush_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static MemorySegment flush_finish(MemorySegment struct) {
        return struct.get(flush_finish$LAYOUT, flush_finish$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gboolean (*flush_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static void flush_finish(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(flush_finish$LAYOUT, flush_finish$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*close_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public class close_async {

        /**
         * 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(close_async.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(close_async.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 close_async$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("close_async"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*close_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final AddressLayout close_async$layout() {
        return close_async$LAYOUT;
    }

    private static final long close_async$OFFSET = 216;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*close_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final long close_async$offset() {
        return close_async$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*close_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static MemorySegment close_async(MemorySegment struct) {
        return struct.get(close_async$LAYOUT, close_async$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*close_async)(GOutputStream *, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static void close_async(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(close_async$LAYOUT, close_async$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * gboolean (*close_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public class close_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(close_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(close_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 close_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("close_finish"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*close_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static final AddressLayout close_finish$layout() {
        return close_finish$LAYOUT;
    }

    private static final long close_finish$OFFSET = 224;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*close_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static final long close_finish$offset() {
        return close_finish$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*close_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static MemorySegment close_finish(MemorySegment struct) {
        return struct.get(close_finish$LAYOUT, close_finish$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gboolean (*close_finish)(GOutputStream *, GAsyncResult *, GError **)
     * }
     */
    public static void close_finish(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(close_finish$LAYOUT, close_finish$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * gboolean (*writev_fn)(GOutputStream *, const GOutputVector *, gsize, gsize *, GCancellable *, GError **)
     * }
     */
    public class writev_fn {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            int apply(MemorySegment _x0, MemorySegment _x1, long _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_LONG,
            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(writev_fn.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(writev_fn.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, long _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 writev_fn$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("writev_fn"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*writev_fn)(GOutputStream *, const GOutputVector *, gsize, gsize *, GCancellable *, GError **)
     * }
     */
    public static final AddressLayout writev_fn$layout() {
        return writev_fn$LAYOUT;
    }

    private static final long writev_fn$OFFSET = 232;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*writev_fn)(GOutputStream *, const GOutputVector *, gsize, gsize *, GCancellable *, GError **)
     * }
     */
    public static final long writev_fn$offset() {
        return writev_fn$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*writev_fn)(GOutputStream *, const GOutputVector *, gsize, gsize *, GCancellable *, GError **)
     * }
     */
    public static MemorySegment writev_fn(MemorySegment struct) {
        return struct.get(writev_fn$LAYOUT, writev_fn$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gboolean (*writev_fn)(GOutputStream *, const GOutputVector *, gsize, gsize *, GCancellable *, GError **)
     * }
     */
    public static void writev_fn(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(writev_fn$LAYOUT, writev_fn$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*writev_async)(GOutputStream *, const GOutputVector *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public class writev_async {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply(MemorySegment _x0, MemorySegment _x1, long _x2, int _x3, MemorySegment _x4, MemorySegment _x5, MemorySegment _x6);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_LONG,
            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(writev_async.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(writev_async.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, long _x2, int _x3, MemorySegment _x4, MemorySegment _x5, MemorySegment _x6) {
            try {
                 DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5, _x6);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout writev_async$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("writev_async"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*writev_async)(GOutputStream *, const GOutputVector *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final AddressLayout writev_async$layout() {
        return writev_async$LAYOUT;
    }

    private static final long writev_async$OFFSET = 240;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*writev_async)(GOutputStream *, const GOutputVector *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static final long writev_async$offset() {
        return writev_async$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*writev_async)(GOutputStream *, const GOutputVector *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static MemorySegment writev_async(MemorySegment struct) {
        return struct.get(writev_async$LAYOUT, writev_async$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*writev_async)(GOutputStream *, const GOutputVector *, gsize, int, GCancellable *, GAsyncReadyCallback, gpointer)
     * }
     */
    public static void writev_async(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(writev_async$LAYOUT, writev_async$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * gboolean (*writev_finish)(GOutputStream *, GAsyncResult *, gsize *, GError **)
     * }
     */
    public class writev_finish {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3);
        }

        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
        );

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(writev_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(writev_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, MemorySegment _x3) {
            try {
                return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout writev_finish$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("writev_finish"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*writev_finish)(GOutputStream *, GAsyncResult *, gsize *, GError **)
     * }
     */
    public static final AddressLayout writev_finish$layout() {
        return writev_finish$LAYOUT;
    }

    private static final long writev_finish$OFFSET = 248;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*writev_finish)(GOutputStream *, GAsyncResult *, gsize *, GError **)
     * }
     */
    public static final long writev_finish$offset() {
        return writev_finish$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*writev_finish)(GOutputStream *, GAsyncResult *, gsize *, GError **)
     * }
     */
    public static MemorySegment writev_finish(MemorySegment struct) {
        return struct.get(writev_finish$LAYOUT, writev_finish$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * gboolean (*writev_finish)(GOutputStream *, GAsyncResult *, gsize *, GError **)
     * }
     */
    public static void writev_finish(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(writev_finish$LAYOUT, writev_finish$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*_g_reserved4)(void)
     * }
     */
    public class _g_reserved4 {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply();
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid();

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(_g_reserved4.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(_g_reserved4.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static void invoke(MemorySegment funcPtr) {
            try {
                 DOWN$MH.invokeExact(funcPtr);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout _g_reserved4$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_g_reserved4"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*_g_reserved4)(void)
     * }
     */
    public static final AddressLayout _g_reserved4$layout() {
        return _g_reserved4$LAYOUT;
    }

    private static final long _g_reserved4$OFFSET = 256;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*_g_reserved4)(void)
     * }
     */
    public static final long _g_reserved4$offset() {
        return _g_reserved4$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*_g_reserved4)(void)
     * }
     */
    public static MemorySegment _g_reserved4(MemorySegment struct) {
        return struct.get(_g_reserved4$LAYOUT, _g_reserved4$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*_g_reserved4)(void)
     * }
     */
    public static void _g_reserved4(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(_g_reserved4$LAYOUT, _g_reserved4$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*_g_reserved5)(void)
     * }
     */
    public class _g_reserved5 {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply();
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid();

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(_g_reserved5.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(_g_reserved5.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static void invoke(MemorySegment funcPtr) {
            try {
                 DOWN$MH.invokeExact(funcPtr);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout _g_reserved5$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_g_reserved5"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*_g_reserved5)(void)
     * }
     */
    public static final AddressLayout _g_reserved5$layout() {
        return _g_reserved5$LAYOUT;
    }

    private static final long _g_reserved5$OFFSET = 264;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*_g_reserved5)(void)
     * }
     */
    public static final long _g_reserved5$offset() {
        return _g_reserved5$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*_g_reserved5)(void)
     * }
     */
    public static MemorySegment _g_reserved5(MemorySegment struct) {
        return struct.get(_g_reserved5$LAYOUT, _g_reserved5$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*_g_reserved5)(void)
     * }
     */
    public static void _g_reserved5(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(_g_reserved5$LAYOUT, _g_reserved5$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*_g_reserved6)(void)
     * }
     */
    public class _g_reserved6 {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply();
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid();

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(_g_reserved6.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(_g_reserved6.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static void invoke(MemorySegment funcPtr) {
            try {
                 DOWN$MH.invokeExact(funcPtr);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout _g_reserved6$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_g_reserved6"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*_g_reserved6)(void)
     * }
     */
    public static final AddressLayout _g_reserved6$layout() {
        return _g_reserved6$LAYOUT;
    }

    private static final long _g_reserved6$OFFSET = 272;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*_g_reserved6)(void)
     * }
     */
    public static final long _g_reserved6$offset() {
        return _g_reserved6$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*_g_reserved6)(void)
     * }
     */
    public static MemorySegment _g_reserved6(MemorySegment struct) {
        return struct.get(_g_reserved6$LAYOUT, _g_reserved6$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*_g_reserved6)(void)
     * }
     */
    public static void _g_reserved6(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(_g_reserved6$LAYOUT, _g_reserved6$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*_g_reserved7)(void)
     * }
     */
    public class _g_reserved7 {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply();
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid();

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(_g_reserved7.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(_g_reserved7.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static void invoke(MemorySegment funcPtr) {
            try {
                 DOWN$MH.invokeExact(funcPtr);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout _g_reserved7$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_g_reserved7"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*_g_reserved7)(void)
     * }
     */
    public static final AddressLayout _g_reserved7$layout() {
        return _g_reserved7$LAYOUT;
    }

    private static final long _g_reserved7$OFFSET = 280;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*_g_reserved7)(void)
     * }
     */
    public static final long _g_reserved7$offset() {
        return _g_reserved7$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*_g_reserved7)(void)
     * }
     */
    public static MemorySegment _g_reserved7(MemorySegment struct) {
        return struct.get(_g_reserved7$LAYOUT, _g_reserved7$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*_g_reserved7)(void)
     * }
     */
    public static void _g_reserved7(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(_g_reserved7$LAYOUT, _g_reserved7$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*_g_reserved8)(void)
     * }
     */
    public class _g_reserved8 {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply();
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid();

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = app_indicator_h.upcallHandle(_g_reserved8.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(_g_reserved8.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static void invoke(MemorySegment funcPtr) {
            try {
                 DOWN$MH.invokeExact(funcPtr);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout _g_reserved8$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_g_reserved8"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*_g_reserved8)(void)
     * }
     */
    public static final AddressLayout _g_reserved8$layout() {
        return _g_reserved8$LAYOUT;
    }

    private static final long _g_reserved8$OFFSET = 288;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*_g_reserved8)(void)
     * }
     */
    public static final long _g_reserved8$offset() {
        return _g_reserved8$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*_g_reserved8)(void)
     * }
     */
    public static MemorySegment _g_reserved8(MemorySegment struct) {
        return struct.get(_g_reserved8$LAYOUT, _g_reserved8$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*_g_reserved8)(void)
     * }
     */
    public static void _g_reserved8(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(_g_reserved8$LAYOUT, _g_reserved8$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