org.purejava.appindicator._GMarkupParser 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 _GMarkupParser {
* void (*start_element)(struct _GMarkupParseContext*,char*,char**,char**,void*,struct _GError**);
* void (*end_element)(struct _GMarkupParseContext*,char*,void*,struct _GError**);
* void (*text)(struct _GMarkupParseContext*,char*,unsigned long,void*,struct _GError**);
* void (*passthrough)(struct _GMarkupParseContext*,char*,unsigned long,void*,struct _GError**);
* void (*error)(struct _GMarkupParseContext*,struct _GError*,void*);
* };
* }
*/
public class _GMarkupParser {
public static MemoryLayout $LAYOUT() {
return constants$338.const$2;
}
/**
* {@snippet :
* void (*start_element)(struct _GMarkupParseContext*,char*,char**,char**,void*,struct _GError**);
* }
*/
public interface start_element {
void apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, java.lang.foreign.MemorySegment _x3, java.lang.foreign.MemorySegment _x4, java.lang.foreign.MemorySegment _x5);
static MemorySegment allocate(start_element fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$338.const$4, fi, constants$338.const$3, scope);
}
static start_element ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, java.lang.foreign.MemorySegment __x3, java.lang.foreign.MemorySegment __x4, java.lang.foreign.MemorySegment __x5) -> {
try {
constants$338.const$5.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4, __x5);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle start_element$VH() {
return constants$339.const$0;
}
/**
* Getter for field:
* {@snippet :
* void (*start_element)(struct _GMarkupParseContext*,char*,char**,char**,void*,struct _GError**);
* }
*/
public static MemorySegment start_element$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$339.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*start_element)(struct _GMarkupParseContext*,char*,char**,char**,void*,struct _GError**);
* }
*/
public static void start_element$set(MemorySegment seg, MemorySegment x) {
constants$339.const$0.set(seg, x);
}
public static MemorySegment start_element$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$339.const$0.get(seg.asSlice(index*sizeof()));
}
public static void start_element$set(MemorySegment seg, long index, MemorySegment x) {
constants$339.const$0.set(seg.asSlice(index*sizeof()), x);
}
public static start_element start_element(MemorySegment segment, Arena scope) {
return start_element.ofAddress(start_element$get(segment), scope);
}
/**
* {@snippet :
* void (*end_element)(struct _GMarkupParseContext*,char*,void*,struct _GError**);
* }
*/
public interface end_element {
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(end_element fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$339.const$1, fi, constants$42.const$1, scope);
}
static end_element 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 end_element$VH() {
return constants$339.const$2;
}
/**
* Getter for field:
* {@snippet :
* void (*end_element)(struct _GMarkupParseContext*,char*,void*,struct _GError**);
* }
*/
public static MemorySegment end_element$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$339.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*end_element)(struct _GMarkupParseContext*,char*,void*,struct _GError**);
* }
*/
public static void end_element$set(MemorySegment seg, MemorySegment x) {
constants$339.const$2.set(seg, x);
}
public static MemorySegment end_element$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$339.const$2.get(seg.asSlice(index*sizeof()));
}
public static void end_element$set(MemorySegment seg, long index, MemorySegment x) {
constants$339.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static end_element end_element(MemorySegment segment, Arena scope) {
return end_element.ofAddress(end_element$get(segment), scope);
}
/**
* {@snippet :
* void (*text)(struct _GMarkupParseContext*,char*,unsigned long,void*,struct _GError**);
* }
*/
public interface text {
void apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, java.lang.foreign.MemorySegment _x3, java.lang.foreign.MemorySegment _x4);
static MemorySegment allocate(text fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$339.const$4, fi, constants$339.const$3, scope);
}
static text ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, java.lang.foreign.MemorySegment __x3, java.lang.foreign.MemorySegment __x4) -> {
try {
constants$339.const$5.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle text$VH() {
return constants$340.const$0;
}
/**
* Getter for field:
* {@snippet :
* void (*text)(struct _GMarkupParseContext*,char*,unsigned long,void*,struct _GError**);
* }
*/
public static MemorySegment text$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$340.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*text)(struct _GMarkupParseContext*,char*,unsigned long,void*,struct _GError**);
* }
*/
public static void text$set(MemorySegment seg, MemorySegment x) {
constants$340.const$0.set(seg, x);
}
public static MemorySegment text$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$340.const$0.get(seg.asSlice(index*sizeof()));
}
public static void text$set(MemorySegment seg, long index, MemorySegment x) {
constants$340.const$0.set(seg.asSlice(index*sizeof()), x);
}
public static text text(MemorySegment segment, Arena scope) {
return text.ofAddress(text$get(segment), scope);
}
/**
* {@snippet :
* void (*passthrough)(struct _GMarkupParseContext*,char*,unsigned long,void*,struct _GError**);
* }
*/
public interface passthrough {
void apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, java.lang.foreign.MemorySegment _x3, java.lang.foreign.MemorySegment _x4);
static MemorySegment allocate(passthrough fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$340.const$1, fi, constants$339.const$3, scope);
}
static passthrough ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, java.lang.foreign.MemorySegment __x3, java.lang.foreign.MemorySegment __x4) -> {
try {
constants$339.const$5.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle passthrough$VH() {
return constants$340.const$2;
}
/**
* Getter for field:
* {@snippet :
* void (*passthrough)(struct _GMarkupParseContext*,char*,unsigned long,void*,struct _GError**);
* }
*/
public static MemorySegment passthrough$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$340.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*passthrough)(struct _GMarkupParseContext*,char*,unsigned long,void*,struct _GError**);
* }
*/
public static void passthrough$set(MemorySegment seg, MemorySegment x) {
constants$340.const$2.set(seg, x);
}
public static MemorySegment passthrough$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$340.const$2.get(seg.asSlice(index*sizeof()));
}
public static void passthrough$set(MemorySegment seg, long index, MemorySegment x) {
constants$340.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static passthrough passthrough(MemorySegment segment, Arena scope) {
return passthrough.ofAddress(passthrough$get(segment), scope);
}
/**
* {@snippet :
* void (*error)(struct _GMarkupParseContext*,struct _GError*,void*);
* }
*/
public interface error {
void apply(java.lang.foreign.MemorySegment key, java.lang.foreign.MemorySegment value, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(error fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$340.const$3, fi, constants$14.const$3, scope);
}
static error 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 error$VH() {
return constants$340.const$4;
}
/**
* Getter for field:
* {@snippet :
* void (*error)(struct _GMarkupParseContext*,struct _GError*,void*);
* }
*/
public static MemorySegment error$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$340.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* void (*error)(struct _GMarkupParseContext*,struct _GError*,void*);
* }
*/
public static void error$set(MemorySegment seg, MemorySegment x) {
constants$340.const$4.set(seg, x);
}
public static MemorySegment error$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$340.const$4.get(seg.asSlice(index*sizeof()));
}
public static void error$set(MemorySegment seg, long index, MemorySegment x) {
constants$340.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static error error(MemorySegment segment, Arena scope) {
return error.ofAddress(error$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); }
}