pub enum WebViewInput {
Native,
Transparent,
}Expand description
Who owns pointer input over the page’s rectangle.
The engine’s subview sits above the wgpu surface, so this is not a
preference the toolkit can enforce on its own: in Native
the OS hands a press over that rectangle to the engine and Teksilo never
sees it, and in Transparent the engine has to be
asked to stop taking it (WebViewHandle::set_input_passthrough) — which
not every engine can do.
What Teksilo does on its own side follows from the declaration:
Native | Transparent | |
|---|---|---|
touch_action over the region | NONE | unset (AUTO) |
| miss-only slop / grip outsets | off (no_hit_slop) | as any other widget |
| a pointer event that does reach the node | answered, and the pointer’s live sequence revoked | declined, so it bubbles |
| the engine is asked to pass input through | no | yes |
Variants§
Native
The page owns its rectangle: links, form fields, its own scrolling and its own long-press menus. The default, and what a browser-shaped view wants.
Teksilo therefore claims nothing over the region. touch_action(NONE)
stops a pan, a pinch or a tree-owned hold forming on the hit path (the
page scrolls itself; an enclosing ScrollArea must not also move under
the finger), and no_hit_slop makes the painted rectangle the exact
contract in both directions — no neighbouring control may claim a press
that landed on the page, and the page claims none that missed it.
Transparent
Teksilo owns the rectangle; the page is a display surface.
For a view that renders rather than interacts — a document preview, a rendered chart, a kiosk banner — and the mode to reach for when app widgets, menus or a dialog have to be operable over the page: with the engine passing input through, an overlay above the view receives the tap instead of the engine swallowing it.
The engine half is a request, not a guarantee. A backend that cannot
make its surface input-transparent reports so as a
WebViewEvent::ConsoleMessage; the Teksilo half (no touch_action
declaration, ordinary hit widening, pointer events declined so they
bubble) applies either way.