org.purejava.appindicator.GFileReadMoreCallback 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 (*GFileReadMoreCallback)(char* file_contents,long file_size,void* callback_data);
* }
*/
public interface GFileReadMoreCallback {
int apply(java.lang.foreign.MemorySegment file_contents, long file_size, java.lang.foreign.MemorySegment callback_data);
static MemorySegment allocate(GFileReadMoreCallback fi, Arena scope) {
return RuntimeHelper.upcallStub(constants$693.const$4, fi, constants$62.const$2, scope);
}
static GFileReadMoreCallback ofAddress(MemorySegment addr, Arena arena) {
MemorySegment symbol = addr.reinterpret(arena, null);
return (java.lang.foreign.MemorySegment _file_contents, long _file_size, java.lang.foreign.MemorySegment _callback_data) -> {
try {
return (int)constants$693.const$5.invokeExact(symbol, _file_contents, _file_size, _callback_data);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
};
}
}