![JAR search and dependency download from the Maven repository](/logo.png)
org.purejava.appindicator._GPollableOutputStreamInterface 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 _GPollableOutputStreamInterface {
* struct _GTypeInterface g_iface;
* int (*can_poll)(struct _GPollableOutputStream*);
* int (*is_writable)(struct _GPollableOutputStream*);
* struct _GSource* (*create_source)(struct _GPollableOutputStream*,struct _GCancellable*);
* long (*write_nonblocking)(struct _GPollableOutputStream*,void*,unsigned long,struct _GError**);
* enum GPollableReturn (*writev_nonblocking)(struct _GPollableOutputStream*,struct _GOutputVector*,unsigned long,unsigned long*,struct _GError**);
* };
* }
*/
public class _GPollableOutputStreamInterface {
public static MemoryLayout $LAYOUT() {
return constants$1211.const$4;
}
public static MemorySegment g_iface$slice(MemorySegment seg) {
return seg.asSlice(0, 16);
}
/**
* {@snippet :
* int (*can_poll)(struct _GPollableOutputStream*);
* }
*/
public interface can_poll {
int apply(java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(can_poll fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1211.const$5, fi, constants$10.const$5, scope);
}
static can_poll ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _user_data) -> {
try {
return (int)constants$14.const$2.invokeExact(symbol, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle can_poll$VH() {
return constants$1212.const$0;
}
/**
* Getter for field:
* {@snippet :
* int (*can_poll)(struct _GPollableOutputStream*);
* }
*/
public static MemorySegment can_poll$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1212.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int (*can_poll)(struct _GPollableOutputStream*);
* }
*/
public static void can_poll$set(MemorySegment seg, MemorySegment x) {
constants$1212.const$0.set(seg, x);
}
public static MemorySegment can_poll$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1212.const$0.get(seg.asSlice(index*sizeof()));
}
public static void can_poll$set(MemorySegment seg, long index, MemorySegment x) {
constants$1212.const$0.set(seg.asSlice(index*sizeof()), x);
}
public static can_poll can_poll(MemorySegment segment, Arena scope) {
return can_poll.ofAddress(can_poll$get(segment), scope);
}
/**
* {@snippet :
* int (*is_writable)(struct _GPollableOutputStream*);
* }
*/
public interface is_writable {
int apply(java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(is_writable fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1212.const$1, fi, constants$10.const$5, scope);
}
static is_writable ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _user_data) -> {
try {
return (int)constants$14.const$2.invokeExact(symbol, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle is_writable$VH() {
return constants$1212.const$2;
}
/**
* Getter for field:
* {@snippet :
* int (*is_writable)(struct _GPollableOutputStream*);
* }
*/
public static MemorySegment is_writable$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1212.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* int (*is_writable)(struct _GPollableOutputStream*);
* }
*/
public static void is_writable$set(MemorySegment seg, MemorySegment x) {
constants$1212.const$2.set(seg, x);
}
public static MemorySegment is_writable$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1212.const$2.get(seg.asSlice(index*sizeof()));
}
public static void is_writable$set(MemorySegment seg, long index, MemorySegment x) {
constants$1212.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static is_writable is_writable(MemorySegment segment, Arena scope) {
return is_writable.ofAddress(is_writable$get(segment), scope);
}
/**
* {@snippet :
* struct _GSource* (*create_source)(struct _GPollableOutputStream*,struct _GCancellable*);
* }
*/
public interface create_source {
java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment path, java.lang.foreign.MemorySegment func_data);
static MemorySegment allocate(create_source fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1212.const$3, fi, constants$5.const$5, scope);
}
static create_source ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _path, java.lang.foreign.MemorySegment _func_data) -> {
try {
return (java.lang.foreign.MemorySegment)constants$15.const$1.invokeExact(symbol, _path, _func_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle create_source$VH() {
return constants$1212.const$4;
}
/**
* Getter for field:
* {@snippet :
* struct _GSource* (*create_source)(struct _GPollableOutputStream*,struct _GCancellable*);
* }
*/
public static MemorySegment create_source$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1212.const$4.get(seg);
}
/**
* Setter for field:
* {@snippet :
* struct _GSource* (*create_source)(struct _GPollableOutputStream*,struct _GCancellable*);
* }
*/
public static void create_source$set(MemorySegment seg, MemorySegment x) {
constants$1212.const$4.set(seg, x);
}
public static MemorySegment create_source$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1212.const$4.get(seg.asSlice(index*sizeof()));
}
public static void create_source$set(MemorySegment seg, long index, MemorySegment x) {
constants$1212.const$4.set(seg.asSlice(index*sizeof()), x);
}
public static create_source create_source(MemorySegment segment, Arena scope) {
return create_source.ofAddress(create_source$get(segment), scope);
}
/**
* {@snippet :
* long (*write_nonblocking)(struct _GPollableOutputStream*,void*,unsigned long,struct _GError**);
* }
*/
public interface write_nonblocking {
long apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, java.lang.foreign.MemorySegment _x3);
static MemorySegment allocate(write_nonblocking fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1212.const$5, fi, constants$20.const$4, scope);
}
static write_nonblocking 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) -> {
try {
return (long)constants$1210.const$3.invokeExact(symbol, __x0, __x1, __x2, __x3);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle write_nonblocking$VH() {
return constants$1213.const$0;
}
/**
* Getter for field:
* {@snippet :
* long (*write_nonblocking)(struct _GPollableOutputStream*,void*,unsigned long,struct _GError**);
* }
*/
public static MemorySegment write_nonblocking$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1213.const$0.get(seg);
}
/**
* Setter for field:
* {@snippet :
* long (*write_nonblocking)(struct _GPollableOutputStream*,void*,unsigned long,struct _GError**);
* }
*/
public static void write_nonblocking$set(MemorySegment seg, MemorySegment x) {
constants$1213.const$0.set(seg, x);
}
public static MemorySegment write_nonblocking$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1213.const$0.get(seg.asSlice(index*sizeof()));
}
public static void write_nonblocking$set(MemorySegment seg, long index, MemorySegment x) {
constants$1213.const$0.set(seg.asSlice(index*sizeof()), x);
}
public static write_nonblocking write_nonblocking(MemorySegment segment, Arena scope) {
return write_nonblocking.ofAddress(write_nonblocking$get(segment), scope);
}
/**
* {@snippet :
* enum GPollableReturn (*writev_nonblocking)(struct _GPollableOutputStream*,struct _GOutputVector*,unsigned long,unsigned long*,struct _GError**);
* }
*/
public interface writev_nonblocking {
int 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(writev_nonblocking fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$1213.const$1, fi, constants$315.const$5, scope);
}
static writev_nonblocking 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 {
return (int)constants$316.const$1.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}
public static VarHandle writev_nonblocking$VH() {
return constants$1213.const$2;
}
/**
* Getter for field:
* {@snippet :
* enum GPollableReturn (*writev_nonblocking)(struct _GPollableOutputStream*,struct _GOutputVector*,unsigned long,unsigned long*,struct _GError**);
* }
*/
public static MemorySegment writev_nonblocking$get(MemorySegment seg) {
return (java.lang.foreign.MemorySegment)constants$1213.const$2.get(seg);
}
/**
* Setter for field:
* {@snippet :
* enum GPollableReturn (*writev_nonblocking)(struct _GPollableOutputStream*,struct _GOutputVector*,unsigned long,unsigned long*,struct _GError**);
* }
*/
public static void writev_nonblocking$set(MemorySegment seg, MemorySegment x) {
constants$1213.const$2.set(seg, x);
}
public static MemorySegment writev_nonblocking$get(MemorySegment seg, long index) {
return (java.lang.foreign.MemorySegment)constants$1213.const$2.get(seg.asSlice(index*sizeof()));
}
public static void writev_nonblocking$set(MemorySegment seg, long index, MemorySegment x) {
constants$1213.const$2.set(seg.asSlice(index*sizeof()), x);
}
public static writev_nonblocking writev_nonblocking(MemorySegment segment, Arena scope) {
return writev_nonblocking.ofAddress(writev_nonblocking$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); }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy