DropTargetAsync.connectDrop

Connect to Drop signal.

Emitted on the drop site when the user drops the data onto the widget.

The signal handler must determine whether the pointer position is in a drop zone or not. If it is not in a drop zone, it returns false and no further processing is necessary.

Otherwise, the handler returns true. In this case, this handler will accept the drop. The handler must ensure that gdk.drop.Drop.finish is called to let the source know that the drop is done. The call to gdk.drop.Drop.finish must only be done when all data has been received.

To receive the data, use one of the read functions provided by gdk.drop.Drop such as gdk.drop.Drop.readAsync or gdk.drop.Drop.readValueAsync.

class DropTargetAsync
ulong
connectDrop
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == bool)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] : gdk.drop.Drop)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] == double)
)
)
&&
(
Parameters!T.length < 3 ||
(
ParameterStorageClassTuple!T[2] == ParameterStorageClass.none &&
is(Parameters!T[2] == double)
)
)
&&
(
Parameters!T.length < 4 ||
(
ParameterStorageClassTuple!T[3] == ParameterStorageClass.none &&
)
)
&&
Parameters!T.length < 5
)

Parameters

callback T

signal callback delegate or function to connect

bool callback(gdk.drop.Drop drop, double x, double y, gtk.drop_target_async.DropTargetAsync dropTargetAsync)

drop the gdk.drop.Drop (optional)

x the x coordinate of the current pointer position (optional)

y the y coordinate of the current pointer position (optional)

dropTargetAsync the instance the signal is connected to (optional)

Returns whether the drop is accepted at the given pointer position

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID