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

org.purejava.appindicator._GtkAppChooserButtonClass 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 _GtkAppChooserButtonClass {
 *     struct _GtkComboBoxClass parent_class;
 *     void (*custom_item_activated)(struct _GtkAppChooserButton*,char*);
 *     void* padding[16];
 * };
 * }
 */
public class _GtkAppChooserButtonClass {

    public static MemoryLayout $LAYOUT() {
        return constants$2504.const$5;
    }
    public static MemorySegment parent_class$slice(MemorySegment seg) {
        return seg.asSlice(0, 1048);
    }
    /**
     * {@snippet :
 * void (*custom_item_activated)(struct _GtkAppChooserButton*,char*);
     * }
     */
    public interface custom_item_activated {

        void apply(java.lang.foreign.MemorySegment tag, java.lang.foreign.MemorySegment data);
        static MemorySegment allocate(custom_item_activated fi, Arena scope) {
            return RuntimeHelper.upcallStub(constants$2505.const$0, fi, constants$13.const$4, scope);
        }
        static custom_item_activated 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 custom_item_activated$VH() {
        return constants$2505.const$1;
    }
    /**
     * Getter for field:
     * {@snippet :
     * void (*custom_item_activated)(struct _GtkAppChooserButton*,char*);
     * }
     */
    public static MemorySegment custom_item_activated$get(MemorySegment seg) {
        return (java.lang.foreign.MemorySegment)constants$2505.const$1.get(seg);
    }
    /**
     * Setter for field:
     * {@snippet :
     * void (*custom_item_activated)(struct _GtkAppChooserButton*,char*);
     * }
     */
    public static void custom_item_activated$set(MemorySegment seg, MemorySegment x) {
        constants$2505.const$1.set(seg, x);
    }
    public static MemorySegment custom_item_activated$get(MemorySegment seg, long index) {
        return (java.lang.foreign.MemorySegment)constants$2505.const$1.get(seg.asSlice(index*sizeof()));
    }
    public static void custom_item_activated$set(MemorySegment seg, long index, MemorySegment x) {
        constants$2505.const$1.set(seg.asSlice(index*sizeof()), x);
    }
    public static custom_item_activated custom_item_activated(MemorySegment segment, Arena scope) {
        return custom_item_activated.ofAddress(custom_item_activated$get(segment), scope);
    }
    public static MemorySegment padding$slice(MemorySegment seg) {
        return seg.asSlice(1056, 128);
    }
    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