All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.purejava.appindicator.GFileReadMoreCallback Maven / Gradle / Ivy

There is a newer version: 1.4.1
Show newest version
// 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$);
            }
        };
    }
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy