Package org.gnome.gobject
Interface TypeValueCopyFunc
- 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 TypeValueCopyFunc
extends FunctionPointer
Functional interface declaration of the
TypeValueCopyFunc
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Copies the content of aGValue
into another.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default void
upcall
(MemorySegment srcValue, MemorySegment destValue) Theupcall
method is called from native code.
-
Method Details
-
run
Copies the content of aGValue
into another.The
destValue
is aGValue
with zero-filled data section andsrcValue
is a properly initializedGValue
of same type, or derived type.The purpose of this function is to copy the contents of
srcValue
intodestValue
in a way, that even aftersrcValue
has been freed, the contents ofdestValue
remain valid. String type example:dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer);
-
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gobject.Value, org.gnome.gobject.Value)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-