signal callback delegate or function to connect
bool callback(gdk.drag_context.DragContext context, int x, int y, uint time, gtk.widget.Widget widget)
context the drag context (optional)
x the x coordinate of the current cursor position (optional)
y the y coordinate of the current cursor position (optional)
time the timestamp of the motion event (optional)
widget the instance the signal is connected to (optional)
Returns whether the cursor position is in a drop zone
Yes.After to execute callback after default handler, No.After to execute before (default)
Signal ID
Connect to DragMotion signal.
The ::drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor 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, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling gdk.global.dragStatus.
If the decision whether the drop will be accepted or rejected can't be made based solely on the cursor position and the type of the data, the handler may inspect the dragged data by calling gtk.widget.Widget.dragGetData and defer the gdk.global.dragStatus call to the #GtkWidget::drag-data-received handler. Note that you must pass #GTK_DEST_DEFAULT_DROP, #GTK_DEST_DEFAULT_MOTION or #GTK_DEST_DEFAULT_ALL to gtk.widget.Widget.dragDestSet when using the drag-motion signal that way.
Also note that there is no drag-enter signal. The drag receiver has to keep track of whether he has received any drag-motion signals since the last #GtkWidget::drag-leave and if not, treat the drag-motion signal as an "enter" signal. Upon an "enter", the handler will typically highlight the drop site with gtk.widget.Widget.dragHighlight.