Skip to main content

WebViewInput

Enum WebViewInput 

Source
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:

NativeTransparent
touch_action over the regionNONEunset (AUTO)
miss-only slop / grip outsetsoff (no_hit_slop)as any other widget
a pointer event that does reach the nodeanswered, and the pointer’s live sequence revokeddeclined, so it bubbles
the engine is asked to pass input throughnoyes

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.

Implementations§

Source§

impl WebViewInput

Source

pub fn is_native(self) -> bool

Whether the engine owns pointer input over the page.

Trait Implementations§

Source§

impl Clone for WebViewInput

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for WebViewInput

Source§

impl Debug for WebViewInput

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WebViewInput

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for WebViewInput

Source§

impl PartialEq for WebViewInput

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WebViewInput

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.