An action for drop targets
<clutter-drop-action>
is a <clutter-action>
that allows a
<clutter-actor>
implementation to control what happens when an
actor dragged using a <clutter-drag-action>
crosses the target
area or when a dragged actor is released (or "dropped") on the target
area.
A trivial use of <clutter-drop-action>
consists in connecting to
the <"drop">
signal and handling the drop from there, for
instance:
ClutterAction *action = clutter_drop_action (); g_signal_connect (action, "drop", G_CALLBACK (on_drop), NULL); clutter_actor_add_action (an_actor, action);
The <"can-drop">
can be used to control whether the
<"drop">
signal is going to be emitted; returning
‘#f
’ from a handler connected to the <"can-drop">
signal will cause the <"drop">
signal to be skipped when the
input device button is released.
It's important to note that <clutter-drop-action>
will only work
with actors dragged using <clutter-drag-action>
.
<clutter-drop-action>
is available since Clutter 1.8