org.purejava.appindicator.GPollableSourceFunc 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.MemorySegment;
/**
* {@snippet :
* int (*GPollableSourceFunc)(struct _GObject* pollable_stream,void* data);
* }
*/
public interface GPollableSourceFunc {
int apply(java.lang.foreign.MemorySegment filter_info, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(GPollableSourceFunc fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$698.const$5, fi, constants$9.const$0, scope);
}
static GPollableSourceFunc ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _filter_info, java.lang.foreign.MemorySegment _user_data) -> {
try {
return (int)constants$12.const$1.invokeExact(symbol, _filter_info, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}