org.purejava.appindicator._PangoAttrClass 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 _PangoAttrClass {
* enum PangoAttrType type;
* struct _PangoAttribute* (*copy)(struct _PangoAttribute*);
* void (*destroy)(struct _PangoAttribute*);
* int (*equal)(struct _PangoAttribute*,struct _PangoAttribute*);
* };
* }
*/
public class _PangoAttrClass {
public static MemoryLayout $LAYOUT() {
return constants$1562.const$1;
}
public static VarHandle type$VH() {
return constants$1562.const$2;
}
/**
* Getter for field:
* {@snippet :
* enum PangoAttrType type;
* }
*/
public static int type$get(MemorySegment seg) {
return (int)constants$1562.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* enum PangoAttrType type;
* }
*/
public static void type$set(MemorySegment seg, int x) {
constants$1562.const$2.set(seg, x);
}
public static int type$get(MemorySegment seg, long index) {
return (int)constants$1562.const$2.get(seg.asSlice(index*sizeof()));
}
public static void type$set(MemorySegment seg, long index, int x) {
constants$1562.const$2.set(seg.asSlice(index*sizeof()), x);
}
/**
* {@snippet :
* struct _PangoAttribute* (*copy)(struct _PangoAttribute*);
* }
*/
public interface copy {
java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(copy fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1562.const$3, fi, constants$5.const$2, scope);
}
static copy 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 copy$VH() {
return constants$1562.const$4;
}
/**
* Getter for field:
* {@snippet :
* struct _PangoAttribute* (*copy)(struct _PangoAttribute*);
* }
*/
public static MemorySegment copy$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1562.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* struct _PangoAttribute* (*copy)(struct _PangoAttribute*);
* }
*/
public static void copy$set(MemorySegment seg, MemorySegment x) {
constants$1562.const$4.set(seg, x);
}
public static MemorySegment copy$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1562.const$4.get(seg.asSlice(index*sizeof()));
}
public static void copy$set(MemorySegment seg, long index, MemorySegment x) {
constants$1562.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static copy copy(MemorySegment segment, Arena scope) {
return copy.ofAddress(copy$get(segment), scope);
}
/**
* {@snippet :
* void (*destroy)(struct _PangoAttribute*);
* }
*/
public interface destroy {
void apply(java.lang.foreign.MemorySegment display);
static MemorySegment allocate(destroy fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1562.const$5, fi, constants$13.const$1, scope);
}
static destroy ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _display) -> {
try {
constants$13.const$3.invokeExact(symbol, _display);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle destroy$VH() {
return constants$1563.const$0;
}
/**
* Getter for field:
* {@snippet :
* void (*destroy)(struct _PangoAttribute*);
* }
*/
public static MemorySegment destroy$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1563.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*destroy)(struct _PangoAttribute*);
* }
*/
public static void destroy$set(MemorySegment seg, MemorySegment x) {
constants$1563.const$0.set(seg, x);
}
public static MemorySegment destroy$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1563.const$0.get(seg.asSlice(index*sizeof()));
}
public static void destroy$set(MemorySegment seg, long index, MemorySegment x) {
constants$1563.const$0.set(seg.asSlice(index*sizeof()), x);
}
public static destroy destroy(MemorySegment segment, Arena scope) {
return destroy.ofAddress(destroy$get(segment), scope);
}
/**
* {@snippet :
* int (*equal)(struct _PangoAttribute*,struct _PangoAttribute*);
* }
*/
public interface equal {
int apply(java.lang.foreign.MemorySegment filter_info, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(equal fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1563.const$1, fi, constants$9.const$0, scope);
}
static equal ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _filter_info, java.lang.foreign.MemorySegment _user_data) -> {
try {
return (int)constants$12.const$1.invokeExact(symbol, _filter_info, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle equal$VH() {
return constants$1563.const$2;
}
/**
* Getter for field:
* {@snippet :
* int (*equal)(struct _PangoAttribute*,struct _PangoAttribute*);
* }
*/
public static MemorySegment equal$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1563.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int (*equal)(struct _PangoAttribute*,struct _PangoAttribute*);
* }
*/
public static void equal$set(MemorySegment seg, MemorySegment x) {
constants$1563.const$2.set(seg, x);
}
public static MemorySegment equal$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1563.const$2.get(seg.asSlice(index*sizeof()));
}
public static void equal$set(MemorySegment seg, long index, MemorySegment x) {
constants$1563.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static equal equal(MemorySegment segment, Arena scope) {
return equal.ofAddress(equal$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); }
}