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

org.purejava.appindicator._GtkPrintOperationClass 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 _GtkPrintOperationClass {
 *     GObjectClass parent_class;
 *     void (*done)(GtkPrintOperation *, GtkPrintOperationResult);
 *     void (*begin_print)(GtkPrintOperation *, GtkPrintContext *);
 *     gboolean (*paginate)(GtkPrintOperation *, GtkPrintContext *);
 *     void (*request_page_setup)(GtkPrintOperation *, GtkPrintContext *, gint, GtkPageSetup *);
 *     void (*draw_page)(GtkPrintOperation *, GtkPrintContext *, gint);
 *     void (*end_print)(GtkPrintOperation *, GtkPrintContext *);
 *     void (*status_changed)(GtkPrintOperation *);
 *     GtkWidget *(*create_custom_widget)(GtkPrintOperation *);
 *     void (*custom_widget_apply)(GtkPrintOperation *, GtkWidget *);
 *     gboolean (*preview)(GtkPrintOperation *, GtkPrintOperationPreview *, GtkPrintContext *, GtkWindow *);
 *     void (*update_custom_widget)(GtkPrintOperation *, GtkWidget *, GtkPageSetup *, GtkPrintSettings *);
 *     void (*_gtk_reserved1)(void);
 *     void (*_gtk_reserved2)(void);
 *     void (*_gtk_reserved3)(void);
 *     void (*_gtk_reserved4)(void);
 *     void (*_gtk_reserved5)(void);
 *     void (*_gtk_reserved6)(void);
 *     void (*_gtk_reserved7)(void);
 *     void (*_gtk_reserved8)(void);
 * }
 * }
 */
public class _GtkPrintOperationClass {

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

    private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
        _GObjectClass.layout().withName("parent_class"),
        app_indicator_h.C_POINTER.withName("done"),
        app_indicator_h.C_POINTER.withName("begin_print"),
        app_indicator_h.C_POINTER.withName("paginate"),
        app_indicator_h.C_POINTER.withName("request_page_setup"),
        app_indicator_h.C_POINTER.withName("draw_page"),
        app_indicator_h.C_POINTER.withName("end_print"),
        app_indicator_h.C_POINTER.withName("status_changed"),
        app_indicator_h.C_POINTER.withName("create_custom_widget"),
        app_indicator_h.C_POINTER.withName("custom_widget_apply"),
        app_indicator_h.C_POINTER.withName("preview"),
        app_indicator_h.C_POINTER.withName("update_custom_widget"),
        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"),
        app_indicator_h.C_POINTER.withName("_gtk_reserved5"),
        app_indicator_h.C_POINTER.withName("_gtk_reserved6"),
        app_indicator_h.C_POINTER.withName("_gtk_reserved7"),
        app_indicator_h.C_POINTER.withName("_gtk_reserved8")
    ).withName("_GtkPrintOperationClass");

    /**
     * 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 (*done)(GtkPrintOperation *, GtkPrintOperationResult)
     * }
     */
    public class done {

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

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

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

    private static final long done$OFFSET = 136;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*begin_print)(GtkPrintOperation *, GtkPrintContext *)
     * }
     */
    public class begin_print {

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

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

    private static final long begin_print$OFFSET = 144;

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

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*paginate)(GtkPrintOperation *, GtkPrintContext *)
     * }
     */
    public class paginate {

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

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

    private static final long paginate$OFFSET = 152;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*request_page_setup)(GtkPrintOperation *, GtkPrintContext *, gint, GtkPageSetup *)
     * }
     */
    public class request_page_setup {

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

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

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

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

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

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static void invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2, 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 request_page_setup$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("request_page_setup"));

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

    private static final long request_page_setup$OFFSET = 160;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*draw_page)(GtkPrintOperation *, GtkPrintContext *, gint)
     * }
     */
    public class draw_page {

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

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

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

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

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

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

    private static final long draw_page$OFFSET = 168;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*end_print)(GtkPrintOperation *, GtkPrintContext *)
     * }
     */
    public class end_print {

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

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

    private static final long end_print$OFFSET = 176;

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

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

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

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

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

    private static final long status_changed$OFFSET = 184;

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

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

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

    /**
     * {@snippet lang=c :
     * GtkWidget *(*create_custom_widget)(GtkPrintOperation *)
     * }
     */
    public class create_custom_widget {

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

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

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

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

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

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

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

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

    private static final long create_custom_widget$OFFSET = 192;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*custom_widget_apply)(GtkPrintOperation *, GtkWidget *)
     * }
     */
    public class custom_widget_apply {

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

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

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

    private static final long custom_widget_apply$OFFSET = 200;

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

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*preview)(GtkPrintOperation *, GtkPrintOperationPreview *, GtkPrintContext *, GtkWindow *)
     * }
     */
    public class preview {

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

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

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

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

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

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

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

    /**
     * Layout for field:
     * {@snippet lang=c :
     * gboolean (*preview)(GtkPrintOperation *, GtkPrintOperationPreview *, GtkPrintContext *, GtkWindow *)
     * }
     */
    public static final AddressLayout preview$layout() {
        return preview$LAYOUT;
    }

    private static final long preview$OFFSET = 208;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * gboolean (*preview)(GtkPrintOperation *, GtkPrintOperationPreview *, GtkPrintContext *, GtkWindow *)
     * }
     */
    public static final long preview$offset() {
        return preview$OFFSET;
    }

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

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

    /**
     * {@snippet lang=c :
     * void (*update_custom_widget)(GtkPrintOperation *, GtkWidget *, GtkPageSetup *, GtkPrintSettings *)
     * }
     */
    public class update_custom_widget {

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

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*update_custom_widget)(GtkPrintOperation *, GtkWidget *, GtkPageSetup *, GtkPrintSettings *)
     * }
     */
    public static final AddressLayout update_custom_widget$layout() {
        return update_custom_widget$LAYOUT;
    }

    private static final long update_custom_widget$OFFSET = 216;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*update_custom_widget)(GtkPrintOperation *, GtkWidget *, GtkPageSetup *, GtkPrintSettings *)
     * }
     */
    public static final long update_custom_widget$offset() {
        return update_custom_widget$OFFSET;
    }

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

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

    /**
     * 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 = 232;

    /**
     * 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 = 240;

    /**
     * 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 = 248;

    /**
     * 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);
    }

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

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

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

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

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

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

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

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

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

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

    private static final long _gtk_reserved5$OFFSET = 256;

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

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

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

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

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

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

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

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

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

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

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

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

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

    private static final long _gtk_reserved6$OFFSET = 264;

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

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

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

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

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

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

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

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

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

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

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

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

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

    private static final long _gtk_reserved7$OFFSET = 272;

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

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

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

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

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

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

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

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

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

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

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

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

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

    private static final long _gtk_reserved8$OFFSET = 280;

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

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

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

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

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

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

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

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

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy