gdk.drag_surface_mixin
Module for [DragSurface] interface mixin
Templates 2
tmplDragSurfaceT()
A [gdk.drag_surface.DragSurface] is an interface for surfaces used during DND.
Functions
bool present(int width, int height)
Present drag_surface.
Parameters
width | the unconstrained drag_surface width to layout |
height | the unconstrained drag_surface height to layout |
Returns
false if it failed to be presented, otherwise true.
gulong connectComputeSize(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gdk.drag_surface_size.DragSurfaceSize)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gdk.drag_surface.DragSurface)))
&& Parameters!T.length < 3)
Connect to ComputeSize signal.
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.drag_surface_size.DragSurfaceSize] object that is passed to the signal handler, using [gdk.drag_surface_size.DragSurfaceSize.setSize].
Failing to set a size so will result in an arbitrary size being used as a result.
Parameters
callback | signal callback delegate or function to connect void callback(gdk.drag_surface_size.DragSurfaceSize size, gdk.drag_surface.DragSurface dragSurface) size the size of the drag surface (optional) dragSurface the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Signal ID
tmplDragSurfaceGidBuilderT()