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

org.purejava.appindicator._GtkIMContextClass 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 _GtkIMContextClass {
 *     GObjectClass parent_class;
 *     void (*preedit_start)(GtkIMContext *);
 *     void (*preedit_end)(GtkIMContext *);
 *     void (*preedit_changed)(GtkIMContext *);
 *     void (*commit)(GtkIMContext *, const gchar *);
 *     gboolean (*retrieve_surrounding)(GtkIMContext *);
 *     gboolean (*delete_surrounding)(GtkIMContext *, gint, gint);
 *     void (*set_client_window)(GtkIMContext *, GdkWindow *);
 *     void (*get_preedit_string)(GtkIMContext *, gchar **, PangoAttrList **, gint *);
 *     gboolean (*filter_keypress)(GtkIMContext *, GdkEventKey *);
 *     void (*focus_in)(GtkIMContext *);
 *     void (*focus_out)(GtkIMContext *);
 *     void (*reset)(GtkIMContext *);
 *     void (*set_cursor_location)(GtkIMContext *, GdkRectangle *);
 *     void (*set_use_preedit)(GtkIMContext *, gboolean);
 *     void (*set_surrounding)(GtkIMContext *, const gchar *, gint, gint);
 *     gboolean (*get_surrounding)(GtkIMContext *, gchar **, gint *);
 *     void (*_gtk_reserved1)(void);
 *     void (*_gtk_reserved2)(void);
 *     void (*_gtk_reserved3)(void);
 *     void (*_gtk_reserved4)(void);
 *     void (*_gtk_reserved5)(void);
 *     void (*_gtk_reserved6)(void);
 * }
 * }
 */
public class _GtkIMContextClass {

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

    private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
        _GObjectClass.layout().withName("parent_class"),
        app_indicator_h.C_POINTER.withName("preedit_start"),
        app_indicator_h.C_POINTER.withName("preedit_end"),
        app_indicator_h.C_POINTER.withName("preedit_changed"),
        app_indicator_h.C_POINTER.withName("commit"),
        app_indicator_h.C_POINTER.withName("retrieve_surrounding"),
        app_indicator_h.C_POINTER.withName("delete_surrounding"),
        app_indicator_h.C_POINTER.withName("set_client_window"),
        app_indicator_h.C_POINTER.withName("get_preedit_string"),
        app_indicator_h.C_POINTER.withName("filter_keypress"),
        app_indicator_h.C_POINTER.withName("focus_in"),
        app_indicator_h.C_POINTER.withName("focus_out"),
        app_indicator_h.C_POINTER.withName("reset"),
        app_indicator_h.C_POINTER.withName("set_cursor_location"),
        app_indicator_h.C_POINTER.withName("set_use_preedit"),
        app_indicator_h.C_POINTER.withName("set_surrounding"),
        app_indicator_h.C_POINTER.withName("get_surrounding"),
        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")
    ).withName("_GtkIMContextClass");

    /**
     * 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 (*preedit_start)(GtkIMContext *)
     * }
     */
    public class preedit_start {

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

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

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

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

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

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

    private static final long preedit_start$OFFSET = 136;

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

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

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

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

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

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

    private static final long preedit_end$OFFSET = 144;

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

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

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

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

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

    private static final long preedit_changed$OFFSET = 152;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*commit)(GtkIMContext *, const gchar *)
     * }
     */
    public class commit {

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

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

    private static final long commit$OFFSET = 160;

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

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*retrieve_surrounding)(GtkIMContext *)
     * }
     */
    public class retrieve_surrounding {

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

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

    private static final long retrieve_surrounding$OFFSET = 168;

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

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

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

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

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

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

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

    private static final long delete_surrounding$OFFSET = 176;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*set_client_window)(GtkIMContext *, GdkWindow *)
     * }
     */
    public class set_client_window {

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

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

    private static final long set_client_window$OFFSET = 184;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*get_preedit_string)(GtkIMContext *, gchar **, PangoAttrList **, gint *)
     * }
     */
    public class get_preedit_string {

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

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

    private static final long get_preedit_string$OFFSET = 192;

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

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*filter_keypress)(GtkIMContext *, GdkEventKey *)
     * }
     */
    public class filter_keypress {

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

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

    private static final long filter_keypress$OFFSET = 200;

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

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

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

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

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

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

    private static final long focus_in$OFFSET = 208;

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

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

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

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

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

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

    private static final long focus_out$OFFSET = 216;

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

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

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

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

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

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

    private static final long reset$OFFSET = 224;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*set_cursor_location)(GtkIMContext *, GdkRectangle *)
     * }
     */
    public class set_cursor_location {

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

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

    private static final long set_cursor_location$OFFSET = 232;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*set_use_preedit)(GtkIMContext *, gboolean)
     * }
     */
    public class set_use_preedit {

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

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

    private static final long set_use_preedit$OFFSET = 240;

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

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

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

    /**
     * {@snippet lang=c :
     * void (*set_surrounding)(GtkIMContext *, const gchar *, gint, gint)
     * }
     */
    public class set_surrounding {

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply(MemorySegment _x0, MemorySegment _x1, int _x2, int _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_INT
        );

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

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

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

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

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

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

    private static final long set_surrounding$OFFSET = 248;

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

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

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

    /**
     * {@snippet lang=c :
     * gboolean (*get_surrounding)(GtkIMContext *, gchar **, gint *)
     * }
     */
    public class get_surrounding {

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

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

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

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

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

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

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

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

    private static final long get_surrounding$OFFSET = 256;

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

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

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

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

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

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

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

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

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

    /**
     * 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