org.purejava.appindicator.GtkTranslateFunc 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 :
* char* (*GtkTranslateFunc)(char* path,void* func_data);
* }
*/
public interface GtkTranslateFunc {
java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment path, java.lang.foreign.MemorySegment func_data);
static MemorySegment allocate(GtkTranslateFunc fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$3258.const$3, fi, constants$5.const$5, scope);
}
static GtkTranslateFunc 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$);
}
};
}
}