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

org.purejava.appindicator._GDBusInterfaceIface 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 _GDBusInterfaceIface {
 *     struct _GTypeInterface parent_iface;
 *     struct _GDBusInterfaceInfo* (*get_info)(struct _GDBusInterface*);
 *     struct _GDBusObject* (*get_object)(struct _GDBusInterface*);
 *     void (*set_object)(struct _GDBusInterface*,struct _GDBusObject*);
 *     struct _GDBusObject* (*dup_object)(struct _GDBusInterface*);
 * };
 * }
 */
public class _GDBusInterfaceIface {

    public static MemoryLayout $LAYOUT() {
        return constants$873.const$0;
    }
    public static MemorySegment parent_iface$slice(MemorySegment seg) {
        return seg.asSlice(0, 16);
    }
    /**
     * {@snippet :
 * struct _GDBusInterfaceInfo* (*get_info)(struct _GDBusInterface*);
     * }
     */
    public interface get_info {

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

    public static VarHandle get_info$VH() {
        return constants$873.const$2;
    }
    /**
     * Getter for field:
     * {@snippet :
     * struct _GDBusInterfaceInfo* (*get_info)(struct _GDBusInterface*);
     * }
     */
    public static MemorySegment get_info$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$873.const$2.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * struct _GDBusInterfaceInfo* (*get_info)(struct _GDBusInterface*);
     * }
     */
    public static void get_info$set(MemorySegment seg, MemorySegment x) {
        constants$873.const$2.set(seg, x);
    }
    public static MemorySegment get_info$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$873.const$2.get(seg.asSlice(index*sizeof()));
    }
    public static void get_info$set(MemorySegment seg, long index, MemorySegment x) {
        constants$873.const$2.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_info get_info(MemorySegment segment, Arena scope) {
        return get_info.ofAddress(get_info$get(segment), scope);
    }
    /**
     * {@snippet :
 * struct _GDBusObject* (*get_object)(struct _GDBusInterface*);
     * }
     */
    public interface get_object {

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

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

        void apply(java.lang.foreign.MemorySegment tag, java.lang.foreign.MemorySegment data);
        static MemorySegment allocate(set_object fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$873.const$5, fi, constants$13.const$4, scope);
        }
        static set_object ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _tag, java.lang.foreign.MemorySegment _data) -> {
                try {
                    constants$14.const$0.invokeExact(symbol, _tag, _data);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

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

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

    public static VarHandle dup_object$VH() {
        return constants$874.const$2;
    }
    /**
     * Getter for field:
     * {@snippet :
     * struct _GDBusObject* (*dup_object)(struct _GDBusInterface*);
     * }
     */
    public static MemorySegment dup_object$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$874.const$2.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * struct _GDBusObject* (*dup_object)(struct _GDBusInterface*);
     * }
     */
    public static void dup_object$set(MemorySegment seg, MemorySegment x) {
        constants$874.const$2.set(seg, x);
    }
    public static MemorySegment dup_object$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$874.const$2.get(seg.asSlice(index*sizeof()));
    }
    public static void dup_object$set(MemorySegment seg, long index, MemorySegment x) {
        constants$874.const$2.set(seg.asSlice(index*sizeof()), x);
    }
    public static dup_object dup_object(MemorySegment segment, Arena scope) {
        return dup_object.ofAddress(dup_object$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