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

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

There is a newer version: 1.4.1
Show newest version
// Generated by jextract

package org.purejava.appindicator;

import java.lang.foreign.Arena;
import java.lang.foreign.MemoryLayout;
import java.lang.foreign.MemorySegment;
import java.lang.foreign.SegmentAllocator;
import java.lang.invoke.VarHandle;
/**
 * {@snippet :
 * struct _GMenuModelClass {
 *     struct _GObjectClass parent_class;
 *     int (*is_mutable)(struct _GMenuModel*);
 *     int (*get_n_items)(struct _GMenuModel*);
 *     void (*get_item_attributes)(struct _GMenuModel*,int,struct _GHashTable**);
 *     struct _GMenuAttributeIter* (*iterate_item_attributes)(struct _GMenuModel*,int);
 *     struct _GVariant* (*get_item_attribute_value)(struct _GMenuModel*,int,char*,struct _GVariantType*);
 *     void (*get_item_links)(struct _GMenuModel*,int,struct _GHashTable**);
 *     struct _GMenuLinkIter* (*iterate_item_links)(struct _GMenuModel*,int);
 *     struct _GMenuModel* (*get_item_link)(struct _GMenuModel*,int,char*);
 * };
 * }
 */
public class _GMenuModelClass {

    public static MemoryLayout $LAYOUT() {
        return constants$1145.const$2;
    }
    public static MemorySegment parent_class$slice(MemorySegment seg) {
        return seg.asSlice(0, 136);
    }
    /**
     * {@snippet :
 * int (*is_mutable)(struct _GMenuModel*);
     * }
     */
    public interface is_mutable {

        int apply(java.lang.foreign.MemorySegment user_data);
        static MemorySegment allocate(is_mutable fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1145.const$3, fi, constants$10.const$5, scope);
        }
        static is_mutable ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _user_data) -> {
                try {
                    return (int)constants$14.const$2.invokeExact(symbol, _user_data);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle is_mutable$VH() {
        return constants$1145.const$4;
    }
    /**
     * Getter for field:
     * {@snippet :
     * int (*is_mutable)(struct _GMenuModel*);
     * }
     */
    public static MemorySegment is_mutable$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1145.const$4.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * int (*is_mutable)(struct _GMenuModel*);
     * }
     */
    public static void is_mutable$set(MemorySegment seg, MemorySegment x) {
        constants$1145.const$4.set(seg, x);
    }
    public static MemorySegment is_mutable$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1145.const$4.get(seg.asSlice(index*sizeof()));
    }
    public static void is_mutable$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1145.const$4.set(seg.asSlice(index*sizeof()), x);
    }
    public static is_mutable is_mutable(MemorySegment segment, Arena scope) {
        return is_mutable.ofAddress(is_mutable$get(segment), scope);
    }
    /**
     * {@snippet :
 * int (*get_n_items)(struct _GMenuModel*);
     * }
     */
    public interface get_n_items {

        int apply(java.lang.foreign.MemorySegment user_data);
        static MemorySegment allocate(get_n_items fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1145.const$5, fi, constants$10.const$5, scope);
        }
        static get_n_items ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _user_data) -> {
                try {
                    return (int)constants$14.const$2.invokeExact(symbol, _user_data);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle get_n_items$VH() {
        return constants$1146.const$0;
    }
    /**
     * Getter for field:
     * {@snippet :
     * int (*get_n_items)(struct _GMenuModel*);
     * }
     */
    public static MemorySegment get_n_items$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1146.const$0.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * int (*get_n_items)(struct _GMenuModel*);
     * }
     */
    public static void get_n_items$set(MemorySegment seg, MemorySegment x) {
        constants$1146.const$0.set(seg, x);
    }
    public static MemorySegment get_n_items$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1146.const$0.get(seg.asSlice(index*sizeof()));
    }
    public static void get_n_items$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1146.const$0.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_n_items get_n_items(MemorySegment segment, Arena scope) {
        return get_n_items.ofAddress(get_n_items$get(segment), scope);
    }
    /**
     * {@snippet :
 * void (*get_item_attributes)(struct _GMenuModel*,int,struct _GHashTable**);
     * }
     */
    public interface get_item_attributes {

        void apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2);
        static MemorySegment allocate(get_item_attributes fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1146.const$1, fi, constants$42.const$4, scope);
        }
        static get_item_attributes ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> {
                try {
                    constants$625.const$2.invokeExact(symbol, __x0, __x1, __x2);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle get_item_attributes$VH() {
        return constants$1146.const$2;
    }
    /**
     * Getter for field:
     * {@snippet :
     * void (*get_item_attributes)(struct _GMenuModel*,int,struct _GHashTable**);
     * }
     */
    public static MemorySegment get_item_attributes$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1146.const$2.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * void (*get_item_attributes)(struct _GMenuModel*,int,struct _GHashTable**);
     * }
     */
    public static void get_item_attributes$set(MemorySegment seg, MemorySegment x) {
        constants$1146.const$2.set(seg, x);
    }
    public static MemorySegment get_item_attributes$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1146.const$2.get(seg.asSlice(index*sizeof()));
    }
    public static void get_item_attributes$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1146.const$2.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_item_attributes get_item_attributes(MemorySegment segment, Arena scope) {
        return get_item_attributes.ofAddress(get_item_attributes$get(segment), scope);
    }
    /**
     * {@snippet :
 * struct _GMenuAttributeIter* (*iterate_item_attributes)(struct _GMenuModel*,int);
     * }
     */
    public interface iterate_item_attributes {

        java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment _x0, int _x1);
        static MemorySegment allocate(iterate_item_attributes fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1146.const$3, fi, constants$21.const$3, scope);
        }
        static iterate_item_attributes ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, int __x1) -> {
                try {
                    return (java.lang.foreign.MemorySegment)constants$318.const$0.invokeExact(symbol, __x0, __x1);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle iterate_item_attributes$VH() {
        return constants$1146.const$4;
    }
    /**
     * Getter for field:
     * {@snippet :
     * struct _GMenuAttributeIter* (*iterate_item_attributes)(struct _GMenuModel*,int);
     * }
     */
    public static MemorySegment iterate_item_attributes$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1146.const$4.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * struct _GMenuAttributeIter* (*iterate_item_attributes)(struct _GMenuModel*,int);
     * }
     */
    public static void iterate_item_attributes$set(MemorySegment seg, MemorySegment x) {
        constants$1146.const$4.set(seg, x);
    }
    public static MemorySegment iterate_item_attributes$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1146.const$4.get(seg.asSlice(index*sizeof()));
    }
    public static void iterate_item_attributes$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1146.const$4.set(seg.asSlice(index*sizeof()), x);
    }
    public static iterate_item_attributes iterate_item_attributes(MemorySegment segment, Arena scope) {
        return iterate_item_attributes.ofAddress(iterate_item_attributes$get(segment), scope);
    }
    /**
     * {@snippet :
 * struct _GVariant* (*get_item_attribute_value)(struct _GMenuModel*,int,char*,struct _GVariantType*);
     * }
     */
    public interface get_item_attribute_value {

        java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2, java.lang.foreign.MemorySegment _x3);
        static MemorySegment allocate(get_item_attribute_value fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1146.const$5, fi, constants$180.const$0, scope);
        }
        static get_item_attribute_value ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2, java.lang.foreign.MemorySegment __x3) -> {
                try {
                    return (java.lang.foreign.MemorySegment)constants$987.const$2.invokeExact(symbol, __x0, __x1, __x2, __x3);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle get_item_attribute_value$VH() {
        return constants$1147.const$0;
    }
    /**
     * Getter for field:
     * {@snippet :
     * struct _GVariant* (*get_item_attribute_value)(struct _GMenuModel*,int,char*,struct _GVariantType*);
     * }
     */
    public static MemorySegment get_item_attribute_value$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1147.const$0.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * struct _GVariant* (*get_item_attribute_value)(struct _GMenuModel*,int,char*,struct _GVariantType*);
     * }
     */
    public static void get_item_attribute_value$set(MemorySegment seg, MemorySegment x) {
        constants$1147.const$0.set(seg, x);
    }
    public static MemorySegment get_item_attribute_value$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1147.const$0.get(seg.asSlice(index*sizeof()));
    }
    public static void get_item_attribute_value$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1147.const$0.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_item_attribute_value get_item_attribute_value(MemorySegment segment, Arena scope) {
        return get_item_attribute_value.ofAddress(get_item_attribute_value$get(segment), scope);
    }
    /**
     * {@snippet :
 * void (*get_item_links)(struct _GMenuModel*,int,struct _GHashTable**);
     * }
     */
    public interface get_item_links {

        void apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2);
        static MemorySegment allocate(get_item_links fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1147.const$1, fi, constants$42.const$4, scope);
        }
        static get_item_links ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> {
                try {
                    constants$625.const$2.invokeExact(symbol, __x0, __x1, __x2);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle get_item_links$VH() {
        return constants$1147.const$2;
    }
    /**
     * Getter for field:
     * {@snippet :
     * void (*get_item_links)(struct _GMenuModel*,int,struct _GHashTable**);
     * }
     */
    public static MemorySegment get_item_links$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1147.const$2.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * void (*get_item_links)(struct _GMenuModel*,int,struct _GHashTable**);
     * }
     */
    public static void get_item_links$set(MemorySegment seg, MemorySegment x) {
        constants$1147.const$2.set(seg, x);
    }
    public static MemorySegment get_item_links$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1147.const$2.get(seg.asSlice(index*sizeof()));
    }
    public static void get_item_links$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1147.const$2.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_item_links get_item_links(MemorySegment segment, Arena scope) {
        return get_item_links.ofAddress(get_item_links$get(segment), scope);
    }
    /**
     * {@snippet :
 * struct _GMenuLinkIter* (*iterate_item_links)(struct _GMenuModel*,int);
     * }
     */
    public interface iterate_item_links {

        java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment _x0, int _x1);
        static MemorySegment allocate(iterate_item_links fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1147.const$3, fi, constants$21.const$3, scope);
        }
        static iterate_item_links ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, int __x1) -> {
                try {
                    return (java.lang.foreign.MemorySegment)constants$318.const$0.invokeExact(symbol, __x0, __x1);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle iterate_item_links$VH() {
        return constants$1147.const$4;
    }
    /**
     * Getter for field:
     * {@snippet :
     * struct _GMenuLinkIter* (*iterate_item_links)(struct _GMenuModel*,int);
     * }
     */
    public static MemorySegment iterate_item_links$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1147.const$4.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * struct _GMenuLinkIter* (*iterate_item_links)(struct _GMenuModel*,int);
     * }
     */
    public static void iterate_item_links$set(MemorySegment seg, MemorySegment x) {
        constants$1147.const$4.set(seg, x);
    }
    public static MemorySegment iterate_item_links$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1147.const$4.get(seg.asSlice(index*sizeof()));
    }
    public static void iterate_item_links$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1147.const$4.set(seg.asSlice(index*sizeof()), x);
    }
    public static iterate_item_links iterate_item_links(MemorySegment segment, Arena scope) {
        return iterate_item_links.ofAddress(iterate_item_links$get(segment), scope);
    }
    /**
     * {@snippet :
 * struct _GMenuModel* (*get_item_link)(struct _GMenuModel*,int,char*);
     * }
     */
    public interface get_item_link {

        java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2);
        static MemorySegment allocate(get_item_link fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1147.const$5, fi, constants$196.const$3, scope);
        }
        static get_item_link ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> {
                try {
                    return (java.lang.foreign.MemorySegment)constants$837.const$1.invokeExact(symbol, __x0, __x1, __x2);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle get_item_link$VH() {
        return constants$1148.const$0;
    }
    /**
     * Getter for field:
     * {@snippet :
     * struct _GMenuModel* (*get_item_link)(struct _GMenuModel*,int,char*);
     * }
     */
    public static MemorySegment get_item_link$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1148.const$0.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * struct _GMenuModel* (*get_item_link)(struct _GMenuModel*,int,char*);
     * }
     */
    public static void get_item_link$set(MemorySegment seg, MemorySegment x) {
        constants$1148.const$0.set(seg, x);
    }
    public static MemorySegment get_item_link$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1148.const$0.get(seg.asSlice(index*sizeof()));
    }
    public static void get_item_link$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1148.const$0.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_item_link get_item_link(MemorySegment segment, Arena scope) {
        return get_item_link.ofAddress(get_item_link$get(segment), scope);
    }
    public static long sizeof() { return $LAYOUT().byteSize(); }
    public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); }
    public static MemorySegment allocateArray(long len, SegmentAllocator allocator) {
        return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT()));
    }
    public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); }
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy