Skip to main content

Module pick_wire

Module pick_wire 

Expand description

Picking parts of a window drawn by another process: what the desktop asks the app that draws a window while a person points at what is wrong (crate::floating_surface::FloatingSurfaceHostMessage::Pick), and what the app answers from its own retained tree with answer (crate::floating_surface::FloatingSurfaceClientMessage::PickAnswered).

Everything is in the window’s logical coordinates, rectangles as [x0, y0, x1, y1]. The desktop names the app by the launcher’s id, never by anything in an answer.

Structs§

CapturedPart
A picked part’s texts, read again from the tree.
CapturedText
One text under a picked part.
PartToCapture
One picked part, by the path and bounds an earlier answer gave.
PickedPart
A part a person can pick.
RecentAction
Something the person last did through a control of the app: names only, never arguments.

Enums§

PickAnswer
A window’s answer to a PickQuery.
PickQuery
What the desktop asks a window while a person picks.

Constants§

MAX_CAPTURES
Most parts one capture is asked for.
MAX_PARTS
Most parts one answer names: the chain under a point is never this deep in a person’s interface, and a dragged rectangle asks for fewer.
MAX_RECENT
Most recent actions a capture carries.

Functions§

answer
Answer query from the tree under root.
rect_array
rect as the wire carries it.
rect_of
A rectangle from the wire: finite, with an area.