org.purejava.appindicator.GTestConfig 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 GTestConfig {
* int test_initialized;
* int test_quick;
* int test_perf;
* int test_verbose;
* int test_quiet;
* int test_undefined;
* };
* }
*/
public class GTestConfig {
public static MemoryLayout $LAYOUT() {
return constants$460.const$0;
}
public static VarHandle test_initialized$VH() {
return constants$460.const$1;
}
/**
* Getter for field:
* {@snippet :
* int test_initialized;
* }
*/
public static int test_initialized$get(MemorySegment seg) {
return (int)constants$460.const$1.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int test_initialized;
* }
*/
public static void test_initialized$set(MemorySegment seg, int x) {
constants$460.const$1.set(seg, x);
}
public static int test_initialized$get(MemorySegment seg, long index) {
return (int)constants$460.const$1.get(seg.asSlice(index*sizeof()));
}
public static void test_initialized$set(MemorySegment seg, long index, int x) {
constants$460.const$1.set(seg.asSlice(index*sizeof()), x);
}
public static VarHandle test_quick$VH() {
return constants$460.const$2;
}
/**
* Getter for field:
* {@snippet :
* int test_quick;
* }
*/
public static int test_quick$get(MemorySegment seg) {
return (int)constants$460.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int test_quick;
* }
*/
public static void test_quick$set(MemorySegment seg, int x) {
constants$460.const$2.set(seg, x);
}
public static int test_quick$get(MemorySegment seg, long index) {
return (int)constants$460.const$2.get(seg.asSlice(index*sizeof()));
}
public static void test_quick$set(MemorySegment seg, long index, int x) {
constants$460.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static VarHandle test_perf$VH() {
return constants$460.const$3;
}
/**
* Getter for field:
* {@snippet :
* int test_perf;
* }
*/
public static int test_perf$get(MemorySegment seg) {
return (int)constants$460.const$3.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int test_perf;
* }
*/
public static void test_perf$set(MemorySegment seg, int x) {
constants$460.const$3.set(seg, x);
}
public static int test_perf$get(MemorySegment seg, long index) {
return (int)constants$460.const$3.get(seg.asSlice(index*sizeof()));
}
public static void test_perf$set(MemorySegment seg, long index, int x) {
constants$460.const$3.set(seg.asSlice(index*sizeof()), x);
}
public static VarHandle test_verbose$VH() {
return constants$460.const$4;
}
/**
* Getter for field:
* {@snippet :
* int test_verbose;
* }
*/
public static int test_verbose$get(MemorySegment seg) {
return (int)constants$460.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int test_verbose;
* }
*/
public static void test_verbose$set(MemorySegment seg, int x) {
constants$460.const$4.set(seg, x);
}
public static int test_verbose$get(MemorySegment seg, long index) {
return (int)constants$460.const$4.get(seg.asSlice(index*sizeof()));
}
public static void test_verbose$set(MemorySegment seg, long index, int x) {
constants$460.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static VarHandle test_quiet$VH() {
return constants$460.const$5;
}
/**
* Getter for field:
* {@snippet :
* int test_quiet;
* }
*/
public static int test_quiet$get(MemorySegment seg) {
return (int)constants$460.const$5.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int test_quiet;
* }
*/
public static void test_quiet$set(MemorySegment seg, int x) {
constants$460.const$5.set(seg, x);
}
public static int test_quiet$get(MemorySegment seg, long index) {
return (int)constants$460.const$5.get(seg.asSlice(index*sizeof()));
}
public static void test_quiet$set(MemorySegment seg, long index, int x) {
constants$460.const$5.set(seg.asSlice(index*sizeof()), x);
}
public static VarHandle test_undefined$VH() {
return constants$461.const$0;
}
/**
* Getter for field:
* {@snippet :
* int test_undefined;
* }
*/
public static int test_undefined$get(MemorySegment seg) {
return (int)constants$461.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int test_undefined;
* }
*/
public static void test_undefined$set(MemorySegment seg, int x) {
constants$461.const$0.set(seg, x);
}
public static int test_undefined$get(MemorySegment seg, long index) {
return (int)constants$461.const$0.get(seg.asSlice(index*sizeof()));
}
public static void test_undefined$set(MemorySegment seg, long index, int x) {
constants$461.const$0.set(seg.asSlice(index*sizeof()), x);
}
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); }
}