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

org.purejava.appindicator._GtkRecentChooserMenuClass 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 _GtkRecentChooserMenuClass {
 *     struct _GtkMenuClass parent_class;
 *     void (*gtk_recent1)();
 *     void (*gtk_recent2)();
 *     void (*gtk_recent3)();
 *     void (*gtk_recent4)();
 * };
 * }
 */
public class _GtkRecentChooserMenuClass {

    public static MemoryLayout $LAYOUT() {
        return constants$3036.const$4;
    }
    public static MemorySegment parent_class$slice(MemorySegment seg) {
        return seg.asSlice(0, 1120);
    }
    /**
     * {@snippet :
 * void (*gtk_recent1)();
     * }
     */
    public interface gtk_recent1 {

        void apply();
        static MemorySegment allocate(gtk_recent1 fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$3036.const$5, fi, constants$7.const$5, scope);
        }
        static gtk_recent1 ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return () -> {
                try {
                    constants$64.const$1.invokeExact(symbol);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

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

        void apply();
        static MemorySegment allocate(gtk_recent2 fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$3037.const$1, fi, constants$7.const$5, scope);
        }
        static gtk_recent2 ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return () -> {
                try {
                    constants$64.const$1.invokeExact(symbol);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

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

        void apply();
        static MemorySegment allocate(gtk_recent3 fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$3037.const$3, fi, constants$7.const$5, scope);
        }
        static gtk_recent3 ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return () -> {
                try {
                    constants$64.const$1.invokeExact(symbol);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

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

        void apply();
        static MemorySegment allocate(gtk_recent4 fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$3037.const$5, fi, constants$7.const$5, scope);
        }
        static gtk_recent4 ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return () -> {
                try {
                    constants$64.const$1.invokeExact(symbol);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

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