Package org.gnome.gdk
Interface DragSurface
- All Superinterfaces:
Proxy
- All Known Implementing Classes:
DragSurface.DragSurfaceImpl
A
GdkDragSurface
is an interface for surfaces used during DND.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Functional interface declaration of theComputeSizeCallback
callback.static class
The DragSurfaceImpl type represents a native instance of the DragSurface interface.static class
TheGdkDragSurfaceInterface
implementation is private to GDK. -
Method Summary
-
Method Details
-
getType
-
present
default boolean present(int width, int height) Present this DragSurface.- Parameters:
width
- the unconstrained drag_surface width to layoutheight
- the unconstrained drag_surface height to layout- Returns:
false
if it failed to be presented, otherwisetrue
.
-
onComputeSize
default SignalConnection<DragSurface.ComputeSizeCallback> onComputeSize(DragSurface.ComputeSizeCallback handler) 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.
- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitComputeSize
Emits the "compute-size" signal. SeeonComputeSize(org.gnome.gdk.DragSurface.ComputeSizeCallback)
.
-