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

org.purejava.appindicator._GtkStyleProviderIface 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 _GtkStyleProviderIface {
 *     struct _GTypeInterface g_iface;
 *     struct _GtkStyleProperties* (*get_style)(struct _GtkStyleProvider*,struct _GtkWidgetPath*);
 *     int (*get_style_property)(struct _GtkStyleProvider*,struct _GtkWidgetPath*,enum GtkStateFlags,struct _GParamSpec*,struct _GValue*);
 *     struct _GtkIconFactory* (*get_icon_factory)(struct _GtkStyleProvider*,struct _GtkWidgetPath*);
 * };
 * }
 */
public class _GtkStyleProviderIface {

    public static MemoryLayout $LAYOUT() {
        return constants$2773.const$4;
    }
    public static MemorySegment g_iface$slice(MemorySegment seg) {
        return seg.asSlice(0, 16);
    }
    /**
     * {@snippet :
 * struct _GtkStyleProperties* (*get_style)(struct _GtkStyleProvider*,struct _GtkWidgetPath*);
     * }
     */
    public interface get_style {

        java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment path, java.lang.foreign.MemorySegment func_data);
        static MemorySegment allocate(get_style fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$2773.const$5, fi, constants$5.const$5, scope);
        }
        static get_style ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _path, java.lang.foreign.MemorySegment _func_data) -> {
                try {
                    return (java.lang.foreign.MemorySegment)constants$15.const$1.invokeExact(symbol, _path, _func_data);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

    public static VarHandle get_style$VH() {
        return constants$2774.const$0;
    }
    /**
     * Getter for field:
     * {@snippet :
     * struct _GtkStyleProperties* (*get_style)(struct _GtkStyleProvider*,struct _GtkWidgetPath*);
     * }
     */
    public static MemorySegment get_style$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$2774.const$0.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * struct _GtkStyleProperties* (*get_style)(struct _GtkStyleProvider*,struct _GtkWidgetPath*);
     * }
     */
    public static void get_style$set(MemorySegment seg, MemorySegment x) {
        constants$2774.const$0.set(seg, x);
    }
    public static MemorySegment get_style$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$2774.const$0.get(seg.asSlice(index*sizeof()));
    }
    public static void get_style$set(MemorySegment seg, long index, MemorySegment x) {
        constants$2774.const$0.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_style get_style(MemorySegment segment, Arena scope) {
        return get_style.ofAddress(get_style$get(segment), scope);
    }
    /**
     * {@snippet :
 * int (*get_style_property)(struct _GtkStyleProvider*,struct _GtkWidgetPath*,enum GtkStateFlags,struct _GParamSpec*,struct _GValue*);
     * }
     */
    public interface get_style_property {

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

    public static VarHandle get_style_property$VH() {
        return constants$2774.const$2;
    }
    /**
     * Getter for field:
     * {@snippet :
     * int (*get_style_property)(struct _GtkStyleProvider*,struct _GtkWidgetPath*,enum GtkStateFlags,struct _GParamSpec*,struct _GValue*);
     * }
     */
    public static MemorySegment get_style_property$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$2774.const$2.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * int (*get_style_property)(struct _GtkStyleProvider*,struct _GtkWidgetPath*,enum GtkStateFlags,struct _GParamSpec*,struct _GValue*);
     * }
     */
    public static void get_style_property$set(MemorySegment seg, MemorySegment x) {
        constants$2774.const$2.set(seg, x);
    }
    public static MemorySegment get_style_property$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$2774.const$2.get(seg.asSlice(index*sizeof()));
    }
    public static void get_style_property$set(MemorySegment seg, long index, MemorySegment x) {
        constants$2774.const$2.set(seg.asSlice(index*sizeof()), x);
    }
    public static get_style_property get_style_property(MemorySegment segment, Arena scope) {
        return get_style_property.ofAddress(get_style_property$get(segment), scope);
    }
    /**
     * {@snippet :
 * struct _GtkIconFactory* (*get_icon_factory)(struct _GtkStyleProvider*,struct _GtkWidgetPath*);
     * }
     */
    public interface get_icon_factory {

        java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment path, java.lang.foreign.MemorySegment func_data);
        static MemorySegment allocate(get_icon_factory fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$2774.const$3, fi, constants$5.const$5, scope);
        }
        static get_icon_factory ofAddress(MemorySegment addr, Arena arena) {
            MemorySegment symbol = addr.reinterpret(arena, null);
            return (java.lang.foreign.MemorySegment _path, java.lang.foreign.MemorySegment _func_data) -> {
                try {
                    return (java.lang.foreign.MemorySegment)constants$15.const$1.invokeExact(symbol, _path, _func_data);
                } catch (Throwable ex$) {
                    throw new AssertionError("should not reach here", ex$);
                }
            };
        }
    }

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