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

org.purejava.appindicator._PangoEngineShapeClass 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 _PangoEngineShapeClass {
 *     struct _PangoEngineClass parent_class;
 *     void (*script_shape)(struct _PangoEngineShape*,struct _PangoFont*,char*,unsigned int,struct _PangoAnalysis*,struct _PangoGlyphString*,char*,unsigned int);
 *     enum PangoCoverageLevel (*covers)(struct _PangoEngineShape*,struct _PangoFont*,struct _PangoLanguage*,unsigned int);
 * };
 * }
 */
public class _PangoEngineShapeClass {

    public static MemoryLayout $LAYOUT() {
        return constants$1605.const$2;
    }
    public static MemorySegment parent_class$slice(MemorySegment seg) {
        return seg.asSlice(0, 136);
    }
    /**
     * {@snippet :
 * void (*script_shape)(struct _PangoEngineShape*,struct _PangoFont*,char*,unsigned int,struct _PangoAnalysis*,struct _PangoGlyphString*,char*,unsigned int);
     * }
     */
    public interface script_shape {

        void apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, int _x3, java.lang.foreign.MemorySegment _x4, java.lang.foreign.MemorySegment _x5, java.lang.foreign.MemorySegment _x6, int _x7);
        static MemorySegment allocate(script_shape fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$1605.const$4, fi, constants$1605.const$3, scope);
        }
        static script_shape ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, int __x3, java.lang.foreign.MemorySegment __x4, java.lang.foreign.MemorySegment __x5, java.lang.foreign.MemorySegment __x6, int __x7) -> {
                try {
                    constants$1605.const$5.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4, __x5, __x6, __x7);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle script_shape$VH() {
        return constants$1606.const$0;
    }
    /**
     * Getter for field:
     * {@snippet :
     * void (*script_shape)(struct _PangoEngineShape*,struct _PangoFont*,char*,unsigned int,struct _PangoAnalysis*,struct _PangoGlyphString*,char*,unsigned int);
     * }
     */
    public static MemorySegment script_shape$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1606.const$0.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * void (*script_shape)(struct _PangoEngineShape*,struct _PangoFont*,char*,unsigned int,struct _PangoAnalysis*,struct _PangoGlyphString*,char*,unsigned int);
     * }
     */
    public static void script_shape$set(MemorySegment seg, MemorySegment x) {
        constants$1606.const$0.set(seg, x);
    }
    public static MemorySegment script_shape$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1606.const$0.get(seg.asSlice(index*sizeof()));
    }
    public static void script_shape$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1606.const$0.set(seg.asSlice(index*sizeof()), x);
    }
    public static script_shape script_shape(MemorySegment segment, Arena scope) {
        return script_shape.ofAddress(script_shape$get(segment), scope);
    }
    /**
     * {@snippet :
 * enum PangoCoverageLevel (*covers)(struct _PangoEngineShape*,struct _PangoFont*,struct _PangoLanguage*,unsigned int);
     * }
     */
    public interface covers {

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

    public static VarHandle covers$VH() {
        return constants$1606.const$3;
    }
    /**
     * Getter for field:
     * {@snippet :
     * enum PangoCoverageLevel (*covers)(struct _PangoEngineShape*,struct _PangoFont*,struct _PangoLanguage*,unsigned int);
     * }
     */
    public static MemorySegment covers$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$1606.const$3.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * enum PangoCoverageLevel (*covers)(struct _PangoEngineShape*,struct _PangoFont*,struct _PangoLanguage*,unsigned int);
     * }
     */
    public static void covers$set(MemorySegment seg, MemorySegment x) {
        constants$1606.const$3.set(seg, x);
    }
    public static MemorySegment covers$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$1606.const$3.get(seg.asSlice(index*sizeof()));
    }
    public static void covers$set(MemorySegment seg, long index, MemorySegment x) {
        constants$1606.const$3.set(seg.asSlice(index*sizeof()), x);
    }
    public static covers covers(MemorySegment segment, Arena scope) {
        return covers.ofAddress(covers$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