Expand description
Script-facing drag-and-drop event dispatchers (on_drop /
on_drag_start). See the module docs.
Script-facing drag-and-drop events.
Surfaces the in-app DnD pipeline (lumen-os-dnd) to app scripts the
same way pointer events reach them - one uniform host seam, not a
Rhai-only builtin, so every binding / SDK gets it (like page() /
http()):
- [
DropAccepted] ->on_drop(target_id, payload)with per-id routing viaon("drop", "<target_id>", "<fn>"). - [
DragStarted] ->on_drag_start(source_id, payload)with per-id routing viaon("drag_start", "<source_id>", "<fn>").
payload is the source’s text payload (its drag-payload attr, or
its id when the payload was derived from the element id).
Mirrors HTML5 ondrop(event) - event.target is the drop zone,
event.dataTransfer.getData() is the payload - and Qt’s dropEvent
carrying the source + QMimeData. Kept in its own submodule so the
shared lib.rs touch stays to two add_systems lines.
Functions§
- dispatch_
drag_ start_ to_ script - Forward each
DragStartedto the script ason_drag_start(source_id, payload). - dispatch_
drops_ to_ script - Forward each
DropAcceptedto the script ason_drop(target_id, payload). A reactiveon_dropthat reassigns a signal drives the next reconcile - no per-frame polling.