![JAR search and dependency download from the Maven repository](/logo.png)
org.purejava.appindicator._GClosure 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 _GClosure {
* * unsigned int ref_count;
* unsigned int meta_marshal_nouse;
* unsigned int n_guards;
* unsigned int n_fnotifiers;
* unsigned int n_inotifiers;
* unsigned int in_inotify;
* unsigned int floating;
* unsigned int derivative_flag;
* unsigned int in_marshal;
* unsigned int is_invalid;
* void (*marshal)(struct _GClosure*,struct _GValue*,unsigned int,struct _GValue*,void*,void*);
* void* data;
* struct _GClosureNotifyData* notifiers;
* };
* }
*/
public class _GClosure {
public static MemoryLayout $LAYOUT() {
return constants$586.const$1;
}
/**
* {@snippet :
* void (*marshal)(struct _GClosure*,struct _GValue*,unsigned int,struct _GValue*,void*,void*);
* }
*/
public interface marshal {
void apply(java.lang.foreign.MemorySegment font, java.lang.foreign.MemorySegment font_data, int glyph, java.lang.foreign.MemorySegment draw_funcs, java.lang.foreign.MemorySegment draw_data, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(marshal fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$586.const$2, fi, constants$584.const$3, scope);
}
static marshal ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _font, java.lang.foreign.MemorySegment _font_data, int _glyph, java.lang.foreign.MemorySegment _draw_funcs, java.lang.foreign.MemorySegment _draw_data, java.lang.foreign.MemorySegment _user_data) -> {
try {
constants$584.const$5.invokeExact(symbol, _font, _font_data, _glyph, _draw_funcs, _draw_data, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle marshal$VH() {
return constants$586.const$3;
}
/**
* Getter for field:
* {@snippet :
* void (*marshal)(struct _GClosure*,struct _GValue*,unsigned int,struct _GValue*,void*,void*);
* }
*/
public static MemorySegment marshal$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$586.const$3.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*marshal)(struct _GClosure*,struct _GValue*,unsigned int,struct _GValue*,void*,void*);
* }
*/
public static void marshal$set(MemorySegment seg, MemorySegment x) {
constants$586.const$3.set(seg, x);
}
public static MemorySegment marshal$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$586.const$3.get(seg.asSlice(index*sizeof()));
}
public static void marshal$set(MemorySegment seg, long index, MemorySegment x) {
constants$586.const$3.set(seg.asSlice(index*sizeof()), x);
}
public static marshal marshal(MemorySegment segment, Arena scope) {
return marshal.ofAddress(marshal$get(segment), scope);
}
public static VarHandle data$VH() {
return constants$586.const$4;
}
/**
* Getter for field:
* {@snippet :
* void* data;
* }
*/
public static MemorySegment data$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$586.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void* data;
* }
*/
public static void data$set(MemorySegment seg, MemorySegment x) {
constants$586.const$4.set(seg, x);
}
public static MemorySegment data$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$586.const$4.get(seg.asSlice(index*sizeof()));
}
public static void data$set(MemorySegment seg, long index, MemorySegment x) {
constants$586.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static VarHandle notifiers$VH() {
return constants$586.const$5;
}
/**
* Getter for field:
* {@snippet :
* struct _GClosureNotifyData* notifiers;
* }
*/
public static MemorySegment notifiers$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$586.const$5.get(seg);
}
/**
* Setter for field:
* {@snippet :
* struct _GClosureNotifyData* notifiers;
* }
*/
public static void notifiers$set(MemorySegment seg, MemorySegment x) {
constants$586.const$5.set(seg, x);
}
public static MemorySegment notifiers$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$586.const$5.get(seg.asSlice(index*sizeof()));
}
public static void notifiers$set(MemorySegment seg, long index, MemorySegment x) {
constants$586.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