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

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

There is a newer version: 1.4.1
Show 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 _GtkTextBufferClass {
 *     GObjectClass parent_class;
 *     void (*insert_text)(GtkTextBuffer *, GtkTextIter *, const gchar *, gint);
 *     void (*insert_pixbuf)(GtkTextBuffer *, GtkTextIter *, GdkPixbuf *);
 *     void (*insert_child_anchor)(GtkTextBuffer *, GtkTextIter *, GtkTextChildAnchor *);
 *     void (*delete_range)(GtkTextBuffer *, GtkTextIter *, GtkTextIter *);
 *     void (*changed)(GtkTextBuffer *);
 *     void (*modified_changed)(GtkTextBuffer *);
 *     void (*mark_set)(GtkTextBuffer *, const GtkTextIter *, GtkTextMark *);
 *     void (*mark_deleted)(GtkTextBuffer *, GtkTextMark *);
 *     void (*apply_tag)(GtkTextBuffer *, GtkTextTag *, const GtkTextIter *, const GtkTextIter *);
 *     void (*remove_tag)(GtkTextBuffer *, GtkTextTag *, const GtkTextIter *, const GtkTextIter *);
 *     void (*begin_user_action)(GtkTextBuffer *);
 *     void (*end_user_action)(GtkTextBuffer *);
 *     void (*paste_done)(GtkTextBuffer *, GtkClipboard *);
 *     void (*_gtk_reserved1)(void);
 *     void (*_gtk_reserved2)(void);
 *     void (*_gtk_reserved3)(void);
 *     void (*_gtk_reserved4)(void);
 * }
 * }
 */
public class _GtkTextBufferClass {

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

    private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
        _GObjectClass.layout().withName("parent_class"),
        app_indicator_h.C_POINTER.withName("insert_text"),
        app_indicator_h.C_POINTER.withName("insert_pixbuf"),
        app_indicator_h.C_POINTER.withName("insert_child_anchor"),
        app_indicator_h.C_POINTER.withName("delete_range"),
        app_indicator_h.C_POINTER.withName("changed"),
        app_indicator_h.C_POINTER.withName("modified_changed"),
        app_indicator_h.C_POINTER.withName("mark_set"),
        app_indicator_h.C_POINTER.withName("mark_deleted"),
        app_indicator_h.C_POINTER.withName("apply_tag"),
        app_indicator_h.C_POINTER.withName("remove_tag"),
        app_indicator_h.C_POINTER.withName("begin_user_action"),
        app_indicator_h.C_POINTER.withName("end_user_action"),
        app_indicator_h.C_POINTER.withName("paste_done"),
        app_indicator_h.C_POINTER.withName("_gtk_reserved1"),
        app_indicator_h.C_POINTER.withName("_gtk_reserved2"),
        app_indicator_h.C_POINTER.withName("_gtk_reserved3"),
        app_indicator_h.C_POINTER.withName("_gtk_reserved4")
    ).withName("_GtkTextBufferClass");

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

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

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

    private static final long parent_class$OFFSET = 0;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*insert_text)(GtkTextBuffer *, GtkTextIter *, const gchar *, gint)
     * }
     */
    public class insert_text {

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

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_INT
        );

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

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

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

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

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

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*insert_text)(GtkTextBuffer *, GtkTextIter *, const gchar *, gint)
     * }
     */
    public static final AddressLayout insert_text$layout() {
        return insert_text$LAYOUT;
    }

    private static final long insert_text$OFFSET = 136;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*insert_text)(GtkTextBuffer *, GtkTextIter *, const gchar *, gint)
     * }
     */
    public static final long insert_text$offset() {
        return insert_text$OFFSET;
    }

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

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

    /**
     * {@snippet lang=c :
     * void (*insert_pixbuf)(GtkTextBuffer *, GtkTextIter *, GdkPixbuf *)
     * }
     */
    public class insert_pixbuf {

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

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

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

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

    private static final long insert_pixbuf$OFFSET = 144;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*insert_child_anchor)(GtkTextBuffer *, GtkTextIter *, GtkTextChildAnchor *)
     * }
     */
    public class insert_child_anchor {

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

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

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

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

    private static final long insert_child_anchor$OFFSET = 152;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*delete_range)(GtkTextBuffer *, GtkTextIter *, GtkTextIter *)
     * }
     */
    public class delete_range {

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

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

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

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

    private static final long delete_range$OFFSET = 160;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*changed)(GtkTextBuffer *)
     * }
     */
    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)(GtkTextBuffer *)
     * }
     */
    public static final AddressLayout changed$layout() {
        return changed$LAYOUT;
    }

    private static final long changed$OFFSET = 168;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*modified_changed)(GtkTextBuffer *)
     * }
     */
    public class modified_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(modified_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(modified_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 modified_changed$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("modified_changed"));

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

    private static final long modified_changed$OFFSET = 176;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*mark_set)(GtkTextBuffer *, const GtkTextIter *, GtkTextMark *)
     * }
     */
    public class mark_set {

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

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

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

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*mark_set)(GtkTextBuffer *, const GtkTextIter *, GtkTextMark *)
     * }
     */
    public static final AddressLayout mark_set$layout() {
        return mark_set$LAYOUT;
    }

    private static final long mark_set$OFFSET = 184;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*mark_set)(GtkTextBuffer *, const GtkTextIter *, GtkTextMark *)
     * }
     */
    public static final long mark_set$offset() {
        return mark_set$OFFSET;
    }

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

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

    /**
     * {@snippet lang=c :
     * void (*mark_deleted)(GtkTextBuffer *, GtkTextMark *)
     * }
     */
    public class mark_deleted {

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

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

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

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

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

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

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

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

    private static final long mark_deleted$OFFSET = 192;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*apply_tag)(GtkTextBuffer *, GtkTextTag *, const GtkTextIter *, const GtkTextIter *)
     * }
     */
    public class apply_tag {

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

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*apply_tag)(GtkTextBuffer *, GtkTextTag *, const GtkTextIter *, const GtkTextIter *)
     * }
     */
    public static final AddressLayout apply_tag$layout() {
        return apply_tag$LAYOUT;
    }

    private static final long apply_tag$OFFSET = 200;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*apply_tag)(GtkTextBuffer *, GtkTextTag *, const GtkTextIter *, const GtkTextIter *)
     * }
     */
    public static final long apply_tag$offset() {
        return apply_tag$OFFSET;
    }

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

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

    /**
     * {@snippet lang=c :
     * void (*remove_tag)(GtkTextBuffer *, GtkTextTag *, const GtkTextIter *, const GtkTextIter *)
     * }
     */
    public class remove_tag {

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

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*remove_tag)(GtkTextBuffer *, GtkTextTag *, const GtkTextIter *, const GtkTextIter *)
     * }
     */
    public static final AddressLayout remove_tag$layout() {
        return remove_tag$LAYOUT;
    }

    private static final long remove_tag$OFFSET = 208;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*remove_tag)(GtkTextBuffer *, GtkTextTag *, const GtkTextIter *, const GtkTextIter *)
     * }
     */
    public static final long remove_tag$offset() {
        return remove_tag$OFFSET;
    }

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

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

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

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

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

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

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

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

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

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

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

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

    private static final long begin_user_action$OFFSET = 216;

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

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

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

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

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

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

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

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

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

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

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

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

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

    private static final long end_user_action$OFFSET = 224;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*paste_done)(GtkTextBuffer *, GtkClipboard *)
     * }
     */
    public class paste_done {

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

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

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

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

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

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

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

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

    private static final long paste_done$OFFSET = 232;

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

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

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

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

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

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

    private static final long _gtk_reserved1$OFFSET = 240;

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

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

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

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

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

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

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

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

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

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

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

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

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

    private static final long _gtk_reserved2$OFFSET = 248;

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

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

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

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

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

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

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

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

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

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

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

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

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

    private static final long _gtk_reserved3$OFFSET = 256;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*_gtk_reserved4)(void)
     * }
     */
    public class _gtk_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(_gtk_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(_gtk_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 _gtk_reserved4$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_gtk_reserved4"));

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

    private static final long _gtk_reserved4$OFFSET = 264;

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

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

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

    /**
     * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
     * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
     */
    public static MemorySegment asSlice(MemorySegment array, long index) {
        return array.asSlice(layout().byteSize() * index);
    }

    /**
     * The size (in bytes) of this struct
     */
    public static long sizeof() { return layout().byteSize(); }

    /**
     * Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
     */
    public static MemorySegment allocate(SegmentAllocator allocator) {
        return allocator.allocate(layout());
    }

    /**
     * Allocate an array of size {@code elementCount} using {@code allocator}.
     * The returned segment has size {@code elementCount * layout().byteSize()}.
     */
    public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
        return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
    }

    /**
     * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
     * The returned segment has size {@code layout().byteSize()}
     */
    public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
        return reinterpret(addr, 1, arena, cleanup);
    }

    /**
     * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
     * The returned segment has size {@code elementCount * layout().byteSize()}
     */
    public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
        return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy