Package org.gnome.gdk
Interface DragSurface.ComputeSizeCallback
- All Superinterfaces:
FunctionPointer
- Enclosing interface:
DragSurface
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface DragSurface.ComputeSizeCallback
extends FunctionPointer
Functional interface declaration of the
ComputeSizeCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(DragSurfaceSize size) Emitted when the size for the surface needs to be computed, when it is present.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 sourceDragSurface, MemorySegment size) Theupcall
method is called from native code.
-
Method Details
-
run
Emitted when the size for the surface needs to be computed, when it is present.This signal will normally be emitted during the native surface layout cycle when the surface size needs to be recomputed.
It is the responsibility of the drag surface user to handle this signal and compute the desired size of the surface, storing the computed size in the
Gdk.DragSurfaceSize
object that is passed to the signal handler, usingDragSurfaceSize.setSize(int, int)
.Failing to set a size so will result in an arbitrary size being used as a result.
-
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gdk.DragSurfaceSize)
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
-