pub struct EventProcessor {
Show 17 fields pub dnd: Dnd, pub ime_receiver: Receiver<ImeRequest>, pub ime_event_receiver: Receiver<(Window, ImeEvent)>, pub randr_event_offset: u8, pub devices: RefCell<HashMap<DeviceId, Device>>, pub xi2ext: ExtensionInformation, pub xkbext: ExtensionInformation, pub target: ActiveEventLoop, pub xkb_context: Context, pub num_touch: u32, pub held_key_press: Option<u32>, pub first_touch: Option<u64>, pub active_window: Option<Window>, pub modifiers: Cell<ModifiersState>, pub xfiltered_modifiers: VecDeque<c_ulong>, pub xmodmap: ModifierKeymap, pub is_composing: bool,
}

Fields§

§dnd: Dnd§ime_receiver: Receiver<ImeRequest>§ime_event_receiver: Receiver<(Window, ImeEvent)>§randr_event_offset: u8§devices: RefCell<HashMap<DeviceId, Device>>§xi2ext: ExtensionInformation§xkbext: ExtensionInformation§target: ActiveEventLoop§xkb_context: Context§num_touch: u32§held_key_press: Option<u32>§first_touch: Option<u64>§active_window: Option<Window>§modifiers: Cell<ModifiersState>

Latest modifiers we’ve sent for the user to trigger change in event.

§xfiltered_modifiers: VecDeque<c_ulong>§xmodmap: ModifierKeymap§is_composing: bool

Implementations§

source§

impl EventProcessor

source

pub fn process_event<T: 'static, F>(&mut self, xev: &mut XEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn filter_event(&mut self, xev: &mut XEvent) -> bool

XFilterEvent tells us when an event has been discarded by the input method. Specifically, this involves all of the KeyPress events in compose/pre-edit sequences, along with an extra copy of the KeyRelease events. This also prevents backspace and arrow keys from being detected twice.

source

fn process_xevent<T: 'static, F>(&mut self, xev: &mut XEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

pub fn poll(&self) -> bool

source

pub unsafe fn poll_one_event(&mut self, event_ptr: *mut XEvent) -> bool

source

pub fn init_device(&self, device: DeviceId)

source

pub fn with_window<F, Ret>(&self, window_id: Window, callback: F) -> Option<Ret>
where F: Fn(&Arc<UnownedWindow>) -> Ret,

source

pub fn window_target(window_target: &RootAEL) -> &ActiveEventLoop

Get the platform window target.

source

pub fn window_target_mut(window_target: &mut RootAEL) -> &mut ActiveEventLoop

Get the platform window target.

source

fn client_message<T: 'static, F>( &mut self, xev: &XClientMessageEvent, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn selection_notify<T: 'static, F>( &mut self, xev: &XSelectionEvent, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn configure_notify<T: 'static, F>(&self, xev: &XConfigureEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn reparent_notify(&self, xev: &XReparentEvent)

This is generally a reliable way to detect when the window manager’s been replaced, though this event is only fired by reparenting window managers (which is almost all of them). Failing to correctly update WM info doesn’t really have much impact, since on the WMs affected (xmonad, dwm, etc.) the only effect is that we waste some time trying to query unsupported properties.

source

fn map_notify<T: 'static, F>(&self, xev: &XMapEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn destroy_notify<T: 'static, F>(&self, xev: &XDestroyWindowEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn property_notify<T: 'static, F>(&mut self, xev: &XPropertyEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn visibility_notify<T: 'static, F>(&self, xev: &XVisibilityEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn expose<T: 'static, F>(&self, xev: &XExposeEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput_key_input<T: 'static, F>( &mut self, xev: &mut XKeyEvent, state: ElementState, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn send_synthic_modifier_from_core<T: 'static, F>( &mut self, window_id: WindowId, state: u16, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_button_input<T: 'static, F>( &self, event: &XIDeviceEvent, state: ElementState, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_mouse_motion<T: 'static, F>( &self, event: &XIDeviceEvent, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_mouse_enter<T: 'static, F>(&self, event: &XIEnterEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_mouse_left<T: 'static, F>(&self, event: &XILeaveEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_focused<T: 'static, F>(&mut self, xev: &XIFocusInEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_unfocused<T: 'static, F>( &mut self, xev: &XIFocusOutEvent, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_touch<T: 'static, F>( &mut self, xev: &XIDeviceEvent, phase: TouchPhase, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_raw_button_input<T: 'static, F>( &self, xev: &XIRawEvent, state: ElementState, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_raw_mouse_motion<T: 'static, F>(&self, xev: &XIRawEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_raw_key_input<T: 'static, F>( &mut self, xev: &XIRawEvent, state: ElementState, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn xinput2_hierarchy_changed<T: 'static, F>( &mut self, xev: &XIHierarchyEvent, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn xkb_event<T: 'static, F>(&mut self, xev: &XkbAnyEvent, callback: F)
where F: FnMut(&RootAEL, Event<T>),

source

pub fn update_mods_from_xinput2_event<T: 'static, F>( &mut self, mods: &XIModifierState, group: &XIModifierState, force: bool, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn update_mods_from_query<T: 'static, F>( &mut self, window_id: WindowId, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

pub fn update_mods_from_core_event<T: 'static, F>( &mut self, window_id: WindowId, state: u16, callback: F, )
where F: FnMut(&RootAEL, Event<T>),

source

pub fn core_keyboard_group(state: u16) -> u32

source

pub fn xkb_mod_mask_from_core(&mut self, state: u16) -> xkb_mod_mask_t

source

fn send_modifiers<T: 'static, F: FnMut(&RootAEL, Event<T>)>( &self, window_id: WindowId, modifiers: ModifiersState, force: bool, callback: &mut F, )

Send modifiers for the active window.

The event won’t be sent when the modifiers match the previously sent modifiers value, unless force is passed. The force should be passed when the active window changes.

source

fn handle_pressed_keys<T: 'static, F>( target: &RootAEL, window_id: WindowId, state: ElementState, xkb_context: &mut Context, callback: &mut F, )
where F: FnMut(&RootAEL, Event<T>),

source

fn process_dpi_change<T: 'static, F>(&self, callback: &mut F)
where F: FnMut(&RootAEL, Event<T>),

source

fn window_exists(&self, window_id: Window) -> bool

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> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more