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

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

There is a newer version: 1.4.2
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 _AtkMiscClass {
 *     struct _GObjectClass parent;
 *     void (*threads_enter)(struct _AtkMisc*);
 *     void (*threads_leave)(struct _AtkMisc*);
 *     void* vfuncs[32];
 * };
 * }
 */
public class _AtkMiscClass {

    public static MemoryLayout $LAYOUT() {
        return constants$2041.const$2;
    }
    public static MemorySegment parent$slice(MemorySegment seg) {
        return seg.asSlice(0, 136);
    }
    /**
     * {@snippet :
 * void (*threads_enter)(struct _AtkMisc*);
     * }
     */
    public interface threads_enter {

        void apply(java.lang.foreign.MemorySegment display);
        static MemorySegment allocate(threads_enter fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$2041.const$3, fi, constants$13.const$1, scope);
        }
        static threads_enter ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _display) -> {
                try {
                    constants$13.const$3.invokeExact(symbol, _display);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

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

        void apply(java.lang.foreign.MemorySegment display);
        static MemorySegment allocate(threads_leave fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$2041.const$5, fi, constants$13.const$1, scope);
        }
        static threads_leave ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _display) -> {
                try {
                    constants$13.const$3.invokeExact(symbol, _display);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle threads_leave$VH() {
        return constants$2042.const$0;
    }
    /**
     * Getter for field:
     * {@snippet :
     * void (*threads_leave)(struct _AtkMisc*);
     * }
     */
    public static MemorySegment threads_leave$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$2042.const$0.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * void (*threads_leave)(struct _AtkMisc*);
     * }
     */
    public static void threads_leave$set(MemorySegment seg, MemorySegment x) {
        constants$2042.const$0.set(seg, x);
    }
    public static MemorySegment threads_leave$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$2042.const$0.get(seg.asSlice(index*sizeof()));
    }
    public static void threads_leave$set(MemorySegment seg, long index, MemorySegment x) {
        constants$2042.const$0.set(seg.asSlice(index*sizeof()), x);
    }
    public static threads_leave threads_leave(MemorySegment segment, Arena scope) {
        return threads_leave.ofAddress(threads_leave$get(segment), scope);
    }
    public static MemorySegment vfuncs$slice(MemorySegment seg) {
        return seg.asSlice(152, 256);
    }
    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 - 2025 Weber Informatics LLC | Privacy Policy