org.purejava.appindicator.GHookCompareFunc 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 (*GHookCompareFunc)(struct _GHook* new_hook,struct _GHook* sibling);
* }
*/
public interface GHookCompareFunc {
int apply(java.lang.foreign.MemorySegment filter_info, java.lang.foreign.MemorySegment user_data);
static MemorySegment allocate(GHookCompareFunc fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$238.const$0, fi, constants$9.const$0, scope);
}
static GHookCompareFunc 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$);
}
};
}
}