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

org.purejava.appindicator._AtkComponentIface 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 _AtkComponentIface {
 *     GTypeInterface parent;
 *     guint (*add_focus_handler)(AtkComponent *, AtkFocusHandler);
 *     gboolean (*contains)(AtkComponent *, gint, gint, AtkCoordType);
 *     AtkObject *(*ref_accessible_at_point)(AtkComponent *, gint, gint, AtkCoordType);
 *     void (*get_extents)(AtkComponent *, gint *, gint *, gint *, gint *, AtkCoordType);
 *     void (*get_position)(AtkComponent *, gint *, gint *, AtkCoordType);
 *     void (*get_size)(AtkComponent *, gint *, gint *);
 *     gboolean (*grab_focus)(AtkComponent *);
 *     void (*remove_focus_handler)(AtkComponent *, guint);
 *     gboolean (*set_extents)(AtkComponent *, gint, gint, gint, gint, AtkCoordType);
 *     gboolean (*set_position)(AtkComponent *, gint, gint, AtkCoordType);
 *     gboolean (*set_size)(AtkComponent *, gint, gint);
 *     AtkLayer (*get_layer)(AtkComponent *);
 *     gint (*get_mdi_zorder)(AtkComponent *);
 *     void (*bounds_changed)(AtkComponent *, AtkRectangle *);
 *     gdouble (*get_alpha)(AtkComponent *);
 *     gboolean (*scroll_to)(AtkComponent *, AtkScrollType);
 *     gboolean (*scroll_to_point)(AtkComponent *, AtkCoordType, gint, gint);
 * }
 * }
 */
public class _AtkComponentIface {

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

    private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
        _GTypeInterface.layout().withName("parent"),
        app_indicator_h.C_POINTER.withName("add_focus_handler"),
        app_indicator_h.C_POINTER.withName("contains"),
        app_indicator_h.C_POINTER.withName("ref_accessible_at_point"),
        app_indicator_h.C_POINTER.withName("get_extents"),
        app_indicator_h.C_POINTER.withName("get_position"),
        app_indicator_h.C_POINTER.withName("get_size"),
        app_indicator_h.C_POINTER.withName("grab_focus"),
        app_indicator_h.C_POINTER.withName("remove_focus_handler"),
        app_indicator_h.C_POINTER.withName("set_extents"),
        app_indicator_h.C_POINTER.withName("set_position"),
        app_indicator_h.C_POINTER.withName("set_size"),
        app_indicator_h.C_POINTER.withName("get_layer"),
        app_indicator_h.C_POINTER.withName("get_mdi_zorder"),
        app_indicator_h.C_POINTER.withName("bounds_changed"),
        app_indicator_h.C_POINTER.withName("get_alpha"),
        app_indicator_h.C_POINTER.withName("scroll_to"),
        app_indicator_h.C_POINTER.withName("scroll_to_point")
    ).withName("_AtkComponentIface");

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

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

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

    private static final long parent$OFFSET = 0;

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

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

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

    /**
     * {@snippet lang=c :
     * guint (*add_focus_handler)(AtkComponent *, AtkFocusHandler)
     * }
     */
    public class add_focus_handler {

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

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            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(add_focus_handler.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(add_focus_handler.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) {
            try {
                return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

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

    /**
     * Layout for field:
     * {@snippet lang=c :
     * guint (*add_focus_handler)(AtkComponent *, AtkFocusHandler)
     * }
     */
    public static final AddressLayout add_focus_handler$layout() {
        return add_focus_handler$LAYOUT;
    }

    private static final long add_focus_handler$OFFSET = 16;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * guint (*add_focus_handler)(AtkComponent *, AtkFocusHandler)
     * }
     */
    public static final long add_focus_handler$offset() {
        return add_focus_handler$OFFSET;
    }

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*contains)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public class contains {

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

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            app_indicator_h.C_INT,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_INT,
            app_indicator_h.C_INT,
            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(contains.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(contains.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, int _x1, int _x2, int _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 contains$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("contains"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*contains)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public static final AddressLayout contains$layout() {
        return contains$LAYOUT;
    }

    private static final long contains$OFFSET = 24;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*contains)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public static final long contains$offset() {
        return contains$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*contains)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public static MemorySegment contains(MemorySegment struct) {
        return struct.get(contains$LAYOUT, contains$OFFSET);
    }

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

    /**
     * {@snippet lang=c :
     * AtkObject *(*ref_accessible_at_point)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public class ref_accessible_at_point {

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

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

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

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

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

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AtkObject *(*ref_accessible_at_point)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public static final AddressLayout ref_accessible_at_point$layout() {
        return ref_accessible_at_point$LAYOUT;
    }

    private static final long ref_accessible_at_point$OFFSET = 32;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AtkObject *(*ref_accessible_at_point)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public static final long ref_accessible_at_point$offset() {
        return ref_accessible_at_point$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AtkObject *(*ref_accessible_at_point)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public static MemorySegment ref_accessible_at_point(MemorySegment struct) {
        return struct.get(ref_accessible_at_point$LAYOUT, ref_accessible_at_point$OFFSET);
    }

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

    /**
     * {@snippet lang=c :
     * void (*get_extents)(AtkComponent *, gint *, gint *, gint *, gint *, AtkCoordType)
     * }
     */
    public class get_extents {

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

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_POINTER,
            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(get_extents.Function.class, "apply", $DESC);

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

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

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

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

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

    private static final long get_extents$OFFSET = 40;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*get_position)(AtkComponent *, gint *, gint *, AtkCoordType)
     * }
     */
    public class get_position {

        /**
         * 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(get_position.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(get_position.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 get_position$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_position"));

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

    private static final long get_position$OFFSET = 48;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*get_size)(AtkComponent *, gint *, gint *)
     * }
     */
    public class get_size {

        /**
         * 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(get_size.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(get_size.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 get_size$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_size"));

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

    private static final long get_size$OFFSET = 56;

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

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*grab_focus)(AtkComponent *)
     * }
     */
    public class grab_focus {

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

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

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

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

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

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

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

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

    private static final long grab_focus$OFFSET = 64;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*remove_focus_handler)(AtkComponent *, guint)
     * }
     */
    public class remove_focus_handler {

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

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

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

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

    private static final long remove_focus_handler$OFFSET = 72;

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

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*set_extents)(AtkComponent *, gint, gint, gint, gint, AtkCoordType)
     * }
     */
    public class set_extents {

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

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            app_indicator_h.C_INT,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_INT,
            app_indicator_h.C_INT,
            app_indicator_h.C_INT,
            app_indicator_h.C_INT,
            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(set_extents.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(set_extents.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, int _x1, int _x2, int _x3, int _x4, int _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 set_extents$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("set_extents"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*set_extents)(AtkComponent *, gint, gint, gint, gint, AtkCoordType)
     * }
     */
    public static final AddressLayout set_extents$layout() {
        return set_extents$LAYOUT;
    }

    private static final long set_extents$OFFSET = 80;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*set_extents)(AtkComponent *, gint, gint, gint, gint, AtkCoordType)
     * }
     */
    public static final long set_extents$offset() {
        return set_extents$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*set_extents)(AtkComponent *, gint, gint, gint, gint, AtkCoordType)
     * }
     */
    public static MemorySegment set_extents(MemorySegment struct) {
        return struct.get(set_extents$LAYOUT, set_extents$OFFSET);
    }

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

    /**
     * {@snippet lang=c :
     * gboolean (*set_position)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public class set_position {

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

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            app_indicator_h.C_INT,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_INT,
            app_indicator_h.C_INT,
            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(set_position.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(set_position.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, int _x1, int _x2, int _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 set_position$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("set_position"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*set_position)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public static final AddressLayout set_position$layout() {
        return set_position$LAYOUT;
    }

    private static final long set_position$OFFSET = 88;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*set_position)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public static final long set_position$offset() {
        return set_position$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*set_position)(AtkComponent *, gint, gint, AtkCoordType)
     * }
     */
    public static MemorySegment set_position(MemorySegment struct) {
        return struct.get(set_position$LAYOUT, set_position$OFFSET);
    }

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

    /**
     * {@snippet lang=c :
     * gboolean (*set_size)(AtkComponent *, gint, gint)
     * }
     */
    public class set_size {

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

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            app_indicator_h.C_INT,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_INT,
            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(set_size.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(set_size.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, int _x1, int _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 set_size$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("set_size"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*set_size)(AtkComponent *, gint, gint)
     * }
     */
    public static final AddressLayout set_size$layout() {
        return set_size$LAYOUT;
    }

    private static final long set_size$OFFSET = 96;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*set_size)(AtkComponent *, gint, gint)
     * }
     */
    public static final long set_size$offset() {
        return set_size$OFFSET;
    }

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

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

    /**
     * {@snippet lang=c :
     * AtkLayer (*get_layer)(AtkComponent *)
     * }
     */
    public class get_layer {

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

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

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

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

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

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

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

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

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

    private static final long get_layer$OFFSET = 104;

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

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

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

    /**
     * {@snippet lang=c :
     * gint (*get_mdi_zorder)(AtkComponent *)
     * }
     */
    public class get_mdi_zorder {

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

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

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

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

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

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

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

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

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

    private static final long get_mdi_zorder$OFFSET = 112;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*bounds_changed)(AtkComponent *, AtkRectangle *)
     * }
     */
    public class bounds_changed {

        /**
         * 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(bounds_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(bounds_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, MemorySegment _x1) {
            try {
                 DOWN$MH.invokeExact(funcPtr, _x0, _x1);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

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

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

    private static final long bounds_changed$OFFSET = 120;

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

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

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

    /**
     * {@snippet lang=c :
     * gdouble (*get_alpha)(AtkComponent *)
     * }
     */
    public class get_alpha {

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

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

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

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

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(get_alpha.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 double invoke(MemorySegment funcPtr,MemorySegment _x0) {
            try {
                return (double) DOWN$MH.invokeExact(funcPtr, _x0);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

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

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

    private static final long get_alpha$OFFSET = 128;

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

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*scroll_to)(AtkComponent *, AtkScrollType)
     * }
     */
    public class scroll_to {

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

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

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

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*scroll_to)(AtkComponent *, AtkScrollType)
     * }
     */
    public static final AddressLayout scroll_to$layout() {
        return scroll_to$LAYOUT;
    }

    private static final long scroll_to$OFFSET = 136;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*scroll_to)(AtkComponent *, AtkScrollType)
     * }
     */
    public static final long scroll_to$offset() {
        return scroll_to$OFFSET;
    }

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*scroll_to_point)(AtkComponent *, AtkCoordType, gint, gint)
     * }
     */
    public class scroll_to_point {

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

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            app_indicator_h.C_INT,
            app_indicator_h.C_POINTER,
            app_indicator_h.C_INT,
            app_indicator_h.C_INT,
            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(scroll_to_point.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(scroll_to_point.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, int _x1, int _x2, int _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 scroll_to_point$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("scroll_to_point"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*scroll_to_point)(AtkComponent *, AtkCoordType, gint, gint)
     * }
     */
    public static final AddressLayout scroll_to_point$layout() {
        return scroll_to_point$LAYOUT;
    }

    private static final long scroll_to_point$OFFSET = 144;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*scroll_to_point)(AtkComponent *, AtkCoordType, gint, gint)
     * }
     */
    public static final long scroll_to_point$offset() {
        return scroll_to_point$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * gboolean (*scroll_to_point)(AtkComponent *, AtkCoordType, gint, gint)
     * }
     */
    public static MemorySegment scroll_to_point(MemorySegment struct) {
        return struct.get(scroll_to_point$LAYOUT, scroll_to_point$OFFSET);
    }

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