pub struct Processor<T: EventListener, A: ActionContext<T>> {
pub ctx: A,
_phantom: PhantomData<T>,
}
Expand description
Processes input from winit.
An escape sequence may be emitted in case specific keys or key combinations are activated.
Fields§
§ctx: A
§_phantom: PhantomData<T>
Implementations§
source§impl Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>>
impl Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>>
sourcepub fn handle_event(&mut self, event: WinitEvent<'_, Event>)
pub fn handle_event(&mut self, event: WinitEvent<'_, Event>)
Handle events from winit.
source§impl<T: EventListener, A: ActionContext<T>> Processor<T, A>
impl<T: EventListener, A: ActionContext<T>> Processor<T, A>
pub fn new(ctx: A) -> Self
pub fn mouse_moved(&mut self, position: PhysicalPosition<f64>)
fn mouse_report(&mut self, button: u8, state: ElementState)
fn normal_mouse_report(&mut self, point: Point, button: u8)
fn sgr_mouse_report(&mut self, point: Point, button: u8, state: ElementState)
fn on_mouse_press(&mut self, button: MouseButton)
sourcefn on_left_click(&mut self, point: Point)
fn on_left_click(&mut self, point: Point)
Handle left click selection and vi mode cursor movement.
fn on_mouse_release(&mut self, button: MouseButton)
pub fn mouse_wheel_input(&mut self, delta: MouseScrollDelta, phase: TouchPhase)
fn scroll_terminal(&mut self, new_scroll_x_px: f64, new_scroll_y_px: f64)
pub fn on_focus_change(&mut self, is_focused: bool)
sourcepub fn touch(&mut self, touch: TouchEvent)
pub fn touch(&mut self, touch: TouchEvent)
Handle touch input.
sourcepub fn on_touch_start(&mut self, touch: TouchEvent)
pub fn on_touch_start(&mut self, touch: TouchEvent)
Handle beginning of touch input.
sourcepub fn on_touch_motion(&mut self, touch: TouchEvent)
pub fn on_touch_motion(&mut self, touch: TouchEvent)
Handle touch input movement.
sourcepub fn on_touch_end(&mut self, touch: TouchEvent)
pub fn on_touch_end(&mut self, touch: TouchEvent)
Handle end of touch input.
pub fn mouse_input(&mut self, state: ElementState, button: MouseButton)
sourcepub fn key_input(&mut self, input: KeyboardInput)
pub fn key_input(&mut self, input: KeyboardInput)
Process key input.
sourcepub fn modifiers_input(&mut self, modifiers: ModifiersState)
pub fn modifiers_input(&mut self, modifiers: ModifiersState)
Modifier state change.
sourcepub fn reset_mouse_cursor(&mut self)
pub fn reset_mouse_cursor(&mut self)
Reset mouse cursor based on modifier and terminal state.
sourcepub fn received_char(&mut self, c: char)
pub fn received_char(&mut self, c: char)
Process a received character.
sourcefn process_key_bindings(&mut self, input: KeyboardInput)
fn process_key_bindings(&mut self, input: KeyboardInput)
Attempt to find a binding and execute its action.
The provided mode, mods, and key must match what is allowed by a binding for its action to be executed.
sourcefn process_mouse_bindings(&mut self, button: MouseButton)
fn process_mouse_bindings(&mut self, button: MouseButton)
Attempt to find a binding and execute its action.
The provided mode, mods, and key must match what is allowed by a binding for its action to be executed.
sourcefn message_bar_cursor_state(&self) -> Option<CursorIcon>
fn message_bar_cursor_state(&self) -> Option<CursorIcon>
Check mouse icon state in relation to the message bar.
sourcefn cursor_state(&mut self) -> CursorIcon
fn cursor_state(&mut self) -> CursorIcon
Icon state of the cursor.
sourcefn update_selection_scrolling(&mut self, mouse_y: i32)
fn update_selection_scrolling(&mut self, mouse_y: i32)
Handle automatic scrolling when selecting above/below the window.