![JAR search and dependency download from the Maven repository](/logo.png)
org.purejava.appindicator._AtkPlugClass Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libappindicator-gtk3-java-full Show documentation
Show all versions of libappindicator-gtk3-java-full Show documentation
Java bindings for libappindicator-gtk3 in 100% pure Java
// 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 _AtkPlugClass {
* struct _AtkObjectClass parent_class;
* char* (*get_object_id)(struct _AtkPlug*);
* };
* }
*/
public class _AtkPlugClass {
public static MemoryLayout $LAYOUT() {
return constants$2047.const$1;
}
public static MemorySegment parent_class$slice(MemorySegment seg) {
return seg.asSlice(0, 352);
}
/**
* {@snippet :
* char* (*get_object_id)(struct _AtkPlug*);
* }
*/
public interface get_object_id {
java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(get_object_id fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$2047.const$2, fi, constants$5.const$2, scope);
}
static get_object_id ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _user_data) -> {
try {
return (java.lang.foreign.MemorySegment)constants$99.const$0.invokeExact(symbol, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle get_object_id$VH() {
return constants$2047.const$3;
}
/**
* Getter for field:
* {@snippet :
* char* (*get_object_id)(struct _AtkPlug*);
* }
*/
public static MemorySegment get_object_id$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$2047.const$3.get(seg);
}
/**
* Setter for field:
* {@snippet :
* char* (*get_object_id)(struct _AtkPlug*);
* }
*/
public static void get_object_id$set(MemorySegment seg, MemorySegment x) {
constants$2047.const$3.set(seg, x);
}
public static MemorySegment get_object_id$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$2047.const$3.get(seg.asSlice(index*sizeof()));
}
public static void get_object_id$set(MemorySegment seg, long index, MemorySegment x) {
constants$2047.const$3.set(seg.asSlice(index*sizeof()), x);
}
public static get_object_id get_object_id(MemorySegment segment, Arena scope) {
return get_object_id.ofAddress(get_object_id$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