Package org.gnome.gobject
Interface TypeClassCacheFunc
- All Superinterfaces:
FunctionPointer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Generated("io.github.jwharm.JavaGI")
public interface TypeClassCacheFunc
extends FunctionPointer
Functional interface declaration of the
TypeClassCacheFunc callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrun(@Nullable MemorySegment cacheData, TypeClass gClass) A callback function which is called when the reference count of a class drops to zero.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default intupcall(MemorySegment cacheData, MemorySegment gClass) Theupcallmethod is called from native code.
-
Method Details
-
run
A callback function which is called when the reference count of a class drops to zero.It may use g_type_class_ref() to prevent the class from being freed. You should not call g_type_class_unref() from a
GTypeClassCacheFuncfunction to prevent infinite recursion, use g_type_class_unref_uncached() instead.The functions have to check the class id passed in to figure whether they actually want to cache the class of this type, since all classes are routed through the same
GTypeClassCacheFuncchain. -
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(java.lang.foreign.MemorySegment, org.gnome.gobject.TypeClass)is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-