org.purejava.appindicator.GHashFunc 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 :
* unsigned int (*GHashFunc)(void* key);
* }
*/
public interface GHashFunc {
int apply(java.lang.foreign.MemorySegment key);
static MemorySegment allocate(GHashFunc fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$14.const$1, fi, constants$10.const$5, scope);
}
static GHashFunc ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _key) -> {
try {
return (int)constants$14.const$2.invokeExact(symbol, _key);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}