IInputRoot
trait · ferroui-base · v0.5.0
trait IInputRoot
Defines the interface for top-level input elements: the part of a presentation source that input is delivered through.
Members
focus_managerpointer_over_elementset_pointer_over_elementcursor_elementset_cursor_elementroot_elementtry_root_elementfocus_roothit_test_chrome_elementpointer_over_invalidated
focus_manager
fn focus_manager(self: &Self) -> Option<Rc<FocusManager>>
The focus manager of the root.
pointer_over_element
fn pointer_over_element(self: &Self) -> Option<Ref<InputElement>>
The input element that the pointer is currently over.
set_pointer_over_element
fn set_pointer_over_element(self: &Self, value: Option<Ref<InputElement>>)
Sets the input element that the pointer is currently over.
cursor_element
fn cursor_element(self: &Self) -> Option<Ref<InputElement>>
The element whose cursor is shown.
set_cursor_element
fn set_cursor_element(self: &Self, value: Option<Ref<InputElement>>)
Sets the element whose cursor is shown.
root_element
fn root_element(self: &Self) -> Ref<InputElement>
The root input element.
try_root_element
fn try_root_element(self: &Self) -> Option<Ref<InputElement>>
Deviation (DEVIATIONS.md, Input): the optional form of
root_element.
The root input element, or None once the root has closed: what the
reference reads as a null RootElement, for the code that runs while
an event that closed its root is still being processed.
focus_root
fn focus_root(self: &Self) -> Ref<InputElement>
The element keyboard input is sent to when nothing is focused.
hit_test_chrome_element
fn hit_test_chrome_element(self: &Self, _point: Point) -> Option<WindowDecorationsElementRole>
Performs a hit-test for chrome/decoration elements at the given position, in root-relative coordinates.
Returns None if no chrome element was hit (no chrome involvement
at this point),
WindowDecorationsElementRole::DecorationsElement or
WindowDecorationsElementRole::User if an interactive chrome
element was hit — the platform should redirect non-client input to
regular client input. Any other value different from
WindowDecorationsElementRole::None indicates a specific
non-client role (titlebar, resize grip, etc.).
pointer_over_invalidated
fn pointer_over_invalidated(self: &Self)
Called when what is under the pointer may have changed without the pointer moving, e.g. when the capture of a pointer changes.
The root re-evaluates the pointer-over element. This is a dispatcher seam: a host should update the pointer-over state from here, either immediately or posted to its dispatcher.
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.