org.purejava.appindicator.GLogFunc 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 :
* void (*GLogFunc)(char* log_domain,enum GLogLevelFlags log_level,char* message,void* user_data);
* }
*/
public interface GLogFunc {
void apply(java.lang.foreign.MemorySegment log_domain, int log_level, java.lang.foreign.MemorySegment message, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(GLogFunc fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$372.const$2, fi, constants$179.const$1, scope);
}
static GLogFunc ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _log_domain, int _log_level, java.lang.foreign.MemorySegment _message, java.lang.foreign.MemorySegment _user_data) -> {
try {
constants$372.const$3.invokeExact(symbol, _log_domain, _log_level, _message, _user_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}