![JAR search and dependency download from the Maven repository](/logo.png)
org.purejava.appindicator._GThread 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 _GThread {
* void* (*func)(void*);
* void* data;
* int joinable;
* enum GThreadPriority priority;
* };
* }
*/
public class _GThread {
public static MemoryLayout $LAYOUT() {
return constants$502.const$0;
}
/**
* {@snippet :
* void* (*func)(void*);
* }
*/
public interface func {
java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(func fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$502.const$1, fi, constants$5.const$2, scope);
}
static func 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 func$VH() {
return constants$502.const$2;
}
/**
* Getter for field:
* {@snippet :
* void* (*func)(void*);
* }
*/
public static MemorySegment func$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$502.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void* (*func)(void*);
* }
*/
public static void func$set(MemorySegment seg, MemorySegment x) {
constants$502.const$2.set(seg, x);
}
public static MemorySegment func$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$502.const$2.get(seg.asSlice(index*sizeof()));
}
public static void func$set(MemorySegment seg, long index, MemorySegment x) {
constants$502.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static func func(MemorySegment segment, Arena scope) {
return func.ofAddress(func$get(segment), scope);
}
public static VarHandle data$VH() {
return constants$502.const$3;
}
/**
* Getter for field:
* {@snippet :
* void* data;
* }
*/
public static MemorySegment data$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$502.const$3.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void* data;
* }
*/
public static void data$set(MemorySegment seg, MemorySegment x) {
constants$502.const$3.set(seg, x);
}
public static MemorySegment data$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$502.const$3.get(seg.asSlice(index*sizeof()));
}
public static void data$set(MemorySegment seg, long index, MemorySegment x) {
constants$502.const$3.set(seg.asSlice(index*sizeof()), x);
}
public static VarHandle joinable$VH() {
return constants$502.const$4;
}
/**
* Getter for field:
* {@snippet :
* int joinable;
* }
*/
public static int joinable$get(MemorySegment seg) {
return (int)constants$502.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int joinable;
* }
*/
public static void joinable$set(MemorySegment seg, int x) {
constants$502.const$4.set(seg, x);
}
public static int joinable$get(MemorySegment seg, long index) {
return (int)constants$502.const$4.get(seg.asSlice(index*sizeof()));
}
public static void joinable$set(MemorySegment seg, long index, int x) {
constants$502.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static VarHandle priority$VH() {
return constants$502.const$5;
}
/**
* Getter for field:
* {@snippet :
* enum GThreadPriority priority;
* }
*/
public static int priority$get(MemorySegment seg) {
return (int)constants$502.const$5.get(seg);
}
/**
* Setter for field:
* {@snippet :
* enum GThreadPriority priority;
* }
*/
public static void priority$set(MemorySegment seg, int x) {
constants$502.const$5.set(seg, x);
}
public static int priority$get(MemorySegment seg, long index) {
return (int)constants$502.const$5.get(seg.asSlice(index*sizeof()));
}
public static void priority$set(MemorySegment seg, long index, int x) {
constants$502.const$5.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); }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy