org.purejava.appindicator._GDBusProxyClass 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 _GDBusProxyClass {
* struct _GObjectClass parent_class;
* void (*g_properties_changed)(struct _GDBusProxy*,struct _GVariant*,char**);
* void (*g_signal)(struct _GDBusProxy*,char*,char*,struct _GVariant*);
* void* padding[32];
* };
* }
*/
public class _GDBusProxyClass {
public static MemoryLayout $LAYOUT() {
return constants$926.const$1;
}
public static MemorySegment parent_class$slice(MemorySegment seg) {
return seg.asSlice(0, 136);
}
/**
* {@snippet :
* void (*g_properties_changed)(struct _GDBusProxy*,struct _GVariant*,char**);
* }
*/
public interface g_properties_changed {
void apply(java.lang.foreign.MemorySegment key, java.lang.foreign.MemorySegment value, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(g_properties_changed fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$926.const$2, fi, constants$14.const$3, scope);
}
static g_properties_changed ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _key, java.lang.foreign.MemorySegment _value, java.lang.foreign.MemorySegment _user_data) -> {
try {
constants$14.const$5.invokeExact(symbol, _key, _value, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle g_properties_changed$VH() {
return constants$926.const$3;
}
/**
* Getter for field:
* {@snippet :
* void (*g_properties_changed)(struct _GDBusProxy*,struct _GVariant*,char**);
* }
*/
public static MemorySegment g_properties_changed$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$926.const$3.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*g_properties_changed)(struct _GDBusProxy*,struct _GVariant*,char**);
* }
*/
public static void g_properties_changed$set(MemorySegment seg, MemorySegment x) {
constants$926.const$3.set(seg, x);
}
public static MemorySegment g_properties_changed$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$926.const$3.get(seg.asSlice(index*sizeof()));
}
public static void g_properties_changed$set(MemorySegment seg, long index, MemorySegment x) {
constants$926.const$3.set(seg.asSlice(index*sizeof()), x);
}
public static g_properties_changed g_properties_changed(MemorySegment segment, Arena scope) {
return g_properties_changed.ofAddress(g_properties_changed$get(segment), scope);
}
/**
* {@snippet :
* void (*g_signal)(struct _GDBusProxy*,char*,char*,struct _GVariant*);
* }
*/
public interface g_signal {
void apply(java.lang.foreign.MemorySegment model, java.lang.foreign.MemorySegment path, java.lang.foreign.MemorySegment iter, java.lang.foreign.MemorySegment data);
static MemorySegment allocate(g_signal fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$926.const$4, fi, constants$42.const$1, scope);
}
static g_signal ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _model, java.lang.foreign.MemorySegment _path, java.lang.foreign.MemorySegment _iter, java.lang.foreign.MemorySegment _data) -> {
try {
constants$259.const$4.invokeExact(symbol, _model, _path, _iter, _data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle g_signal$VH() {
return constants$926.const$5;
}
/**
* Getter for field:
* {@snippet :
* void (*g_signal)(struct _GDBusProxy*,char*,char*,struct _GVariant*);
* }
*/
public static MemorySegment g_signal$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$926.const$5.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*g_signal)(struct _GDBusProxy*,char*,char*,struct _GVariant*);
* }
*/
public static void g_signal$set(MemorySegment seg, MemorySegment x) {
constants$926.const$5.set(seg, x);
}
public static MemorySegment g_signal$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$926.const$5.get(seg.asSlice(index*sizeof()));
}
public static void g_signal$set(MemorySegment seg, long index, MemorySegment x) {
constants$926.const$5.set(seg.asSlice(index*sizeof()), x);
}
public static g_signal g_signal(MemorySegment segment, Arena scope) {
return g_signal.ofAddress(g_signal$get(segment), scope);
}
public static MemorySegment padding$slice(MemorySegment seg) {
return seg.asSlice(152, 256);
}
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); }
}