Enum Event
#[non_exhaustive]pub enum Event {
Show 109 variants
Unknown(Vec<u8>),
Error(X11Error),
ButtonPress(ButtonPressEvent),
ButtonRelease(ButtonPressEvent),
CirculateNotify(CirculateNotifyEvent),
CirculateRequest(CirculateNotifyEvent),
ClientMessage(ClientMessageEvent),
ColormapNotify(ColormapNotifyEvent),
ConfigureNotify(ConfigureNotifyEvent),
ConfigureRequest(ConfigureRequestEvent),
CreateNotify(CreateNotifyEvent),
DestroyNotify(DestroyNotifyEvent),
EnterNotify(EnterNotifyEvent),
Expose(ExposeEvent),
FocusIn(FocusInEvent),
FocusOut(FocusInEvent),
GeGeneric(GeGenericEvent),
GraphicsExposure(GraphicsExposureEvent),
GravityNotify(GravityNotifyEvent),
KeyPress(KeyPressEvent),
KeyRelease(KeyPressEvent),
KeymapNotify(KeymapNotifyEvent),
LeaveNotify(EnterNotifyEvent),
MapNotify(MapNotifyEvent),
MapRequest(MapRequestEvent),
MappingNotify(MappingNotifyEvent),
MotionNotify(MotionNotifyEvent),
NoExposure(NoExposureEvent),
PropertyNotify(PropertyNotifyEvent),
ReparentNotify(ReparentNotifyEvent),
ResizeRequest(ResizeRequestEvent),
SelectionClear(SelectionClearEvent),
SelectionNotify(SelectionNotifyEvent),
SelectionRequest(SelectionRequestEvent),
UnmapNotify(UnmapNotifyEvent),
VisibilityNotify(VisibilityNotifyEvent),
PresentCompleteNotify(CompleteNotifyEvent),
PresentConfigureNotify(ConfigureNotifyEvent),
PresentGeneric(GenericEvent),
PresentIdleNotify(IdleNotifyEvent),
PresentRedirectNotify(RedirectNotifyEvent),
RandrNotify(NotifyEvent),
RandrScreenChangeNotify(ScreenChangeNotifyEvent),
ShapeNotify(NotifyEvent),
SyncAlarmNotify(AlarmNotifyEvent),
SyncCounterNotify(CounterNotifyEvent),
XfixesCursorNotify(CursorNotifyEvent),
XfixesSelectionNotify(SelectionNotifyEvent),
XinputBarrierHit(BarrierHitEvent),
XinputBarrierLeave(BarrierHitEvent),
XinputButtonPress(ButtonPressEvent),
XinputButtonRelease(ButtonPressEvent),
XinputChangeDeviceNotify(ChangeDeviceNotifyEvent),
XinputDeviceButtonPress(DeviceKeyPressEvent),
XinputDeviceButtonRelease(DeviceKeyPressEvent),
XinputDeviceButtonStateNotify(DeviceButtonStateNotifyEvent),
XinputDeviceChanged(DeviceChangedEvent),
XinputDeviceFocusIn(DeviceFocusInEvent),
XinputDeviceFocusOut(DeviceFocusInEvent),
XinputDeviceKeyPress(DeviceKeyPressEvent),
XinputDeviceKeyRelease(DeviceKeyPressEvent),
XinputDeviceKeyStateNotify(DeviceKeyStateNotifyEvent),
XinputDeviceMappingNotify(DeviceMappingNotifyEvent),
XinputDeviceMotionNotify(DeviceKeyPressEvent),
XinputDevicePresenceNotify(DevicePresenceNotifyEvent),
XinputDevicePropertyNotify(DevicePropertyNotifyEvent),
XinputDeviceStateNotify(DeviceStateNotifyEvent),
XinputDeviceValuator(DeviceValuatorEvent),
XinputEnter(EnterEvent),
XinputFocusIn(EnterEvent),
XinputFocusOut(EnterEvent),
XinputGesturePinchBegin(GesturePinchBeginEvent),
XinputGesturePinchEnd(GesturePinchBeginEvent),
XinputGesturePinchUpdate(GesturePinchBeginEvent),
XinputGestureSwipeBegin(GestureSwipeBeginEvent),
XinputGestureSwipeEnd(GestureSwipeBeginEvent),
XinputGestureSwipeUpdate(GestureSwipeBeginEvent),
XinputHierarchy(HierarchyEvent),
XinputKeyPress(KeyPressEvent),
XinputKeyRelease(KeyPressEvent),
XinputLeave(EnterEvent),
XinputMotion(ButtonPressEvent),
XinputProperty(PropertyEvent),
XinputProximityIn(DeviceKeyPressEvent),
XinputProximityOut(DeviceKeyPressEvent),
XinputRawButtonPress(RawButtonPressEvent),
XinputRawButtonRelease(RawButtonPressEvent),
XinputRawKeyPress(RawKeyPressEvent),
XinputRawKeyRelease(RawKeyPressEvent),
XinputRawMotion(RawButtonPressEvent),
XinputRawTouchBegin(RawTouchBeginEvent),
XinputRawTouchEnd(RawTouchBeginEvent),
XinputRawTouchUpdate(RawTouchBeginEvent),
XinputTouchBegin(TouchBeginEvent),
XinputTouchEnd(TouchBeginEvent),
XinputTouchOwnership(TouchOwnershipEvent),
XinputTouchUpdate(TouchBeginEvent),
XkbAccessXNotify(AccessXNotifyEvent),
XkbActionMessage(ActionMessageEvent),
XkbBellNotify(BellNotifyEvent),
XkbCompatMapNotify(CompatMapNotifyEvent),
XkbControlsNotify(ControlsNotifyEvent),
XkbExtensionDeviceNotify(ExtensionDeviceNotifyEvent),
XkbIndicatorMapNotify(IndicatorMapNotifyEvent),
XkbIndicatorStateNotify(IndicatorStateNotifyEvent),
XkbMapNotify(MapNotifyEvent),
XkbNamesNotify(NamesNotifyEvent),
XkbNewKeyboardNotify(NewKeyboardNotifyEvent),
XkbStateNotify(StateNotifyEvent),
}
Expand description
Enumeration of all possible X11 events.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown(Vec<u8>)
Error(X11Error)
ButtonPress(ButtonPressEvent)
ButtonRelease(ButtonPressEvent)
CirculateNotify(CirculateNotifyEvent)
CirculateRequest(CirculateNotifyEvent)
ClientMessage(ClientMessageEvent)
ColormapNotify(ColormapNotifyEvent)
ConfigureNotify(ConfigureNotifyEvent)
ConfigureRequest(ConfigureRequestEvent)
CreateNotify(CreateNotifyEvent)
DestroyNotify(DestroyNotifyEvent)
EnterNotify(EnterNotifyEvent)
Expose(ExposeEvent)
FocusIn(FocusInEvent)
FocusOut(FocusInEvent)
GeGeneric(GeGenericEvent)
GraphicsExposure(GraphicsExposureEvent)
GravityNotify(GravityNotifyEvent)
KeyPress(KeyPressEvent)
KeyRelease(KeyPressEvent)
KeymapNotify(KeymapNotifyEvent)
LeaveNotify(EnterNotifyEvent)
MapNotify(MapNotifyEvent)
MapRequest(MapRequestEvent)
MappingNotify(MappingNotifyEvent)
MotionNotify(MotionNotifyEvent)
NoExposure(NoExposureEvent)
PropertyNotify(PropertyNotifyEvent)
ReparentNotify(ReparentNotifyEvent)
ResizeRequest(ResizeRequestEvent)
SelectionClear(SelectionClearEvent)
SelectionNotify(SelectionNotifyEvent)
SelectionRequest(SelectionRequestEvent)
UnmapNotify(UnmapNotifyEvent)
VisibilityNotify(VisibilityNotifyEvent)
PresentCompleteNotify(CompleteNotifyEvent)
PresentConfigureNotify(ConfigureNotifyEvent)
PresentGeneric(GenericEvent)
PresentIdleNotify(IdleNotifyEvent)
PresentRedirectNotify(RedirectNotifyEvent)
RandrNotify(NotifyEvent)
RandrScreenChangeNotify(ScreenChangeNotifyEvent)
ShapeNotify(NotifyEvent)
SyncAlarmNotify(AlarmNotifyEvent)
SyncCounterNotify(CounterNotifyEvent)
XfixesCursorNotify(CursorNotifyEvent)
XfixesSelectionNotify(SelectionNotifyEvent)
XinputBarrierHit(BarrierHitEvent)
XinputBarrierLeave(BarrierHitEvent)
XinputButtonPress(ButtonPressEvent)
XinputButtonRelease(ButtonPressEvent)
XinputChangeDeviceNotify(ChangeDeviceNotifyEvent)
XinputDeviceButtonPress(DeviceKeyPressEvent)
XinputDeviceButtonRelease(DeviceKeyPressEvent)
XinputDeviceButtonStateNotify(DeviceButtonStateNotifyEvent)
XinputDeviceChanged(DeviceChangedEvent)
XinputDeviceFocusIn(DeviceFocusInEvent)
XinputDeviceFocusOut(DeviceFocusInEvent)
XinputDeviceKeyPress(DeviceKeyPressEvent)
XinputDeviceKeyRelease(DeviceKeyPressEvent)
XinputDeviceKeyStateNotify(DeviceKeyStateNotifyEvent)
XinputDeviceMappingNotify(DeviceMappingNotifyEvent)
XinputDeviceMotionNotify(DeviceKeyPressEvent)
XinputDevicePresenceNotify(DevicePresenceNotifyEvent)
XinputDevicePropertyNotify(DevicePropertyNotifyEvent)
XinputDeviceStateNotify(DeviceStateNotifyEvent)
XinputDeviceValuator(DeviceValuatorEvent)
XinputEnter(EnterEvent)
XinputFocusIn(EnterEvent)
XinputFocusOut(EnterEvent)
XinputGesturePinchBegin(GesturePinchBeginEvent)
XinputGesturePinchEnd(GesturePinchBeginEvent)
XinputGesturePinchUpdate(GesturePinchBeginEvent)
XinputGestureSwipeBegin(GestureSwipeBeginEvent)
XinputGestureSwipeEnd(GestureSwipeBeginEvent)
XinputGestureSwipeUpdate(GestureSwipeBeginEvent)
XinputHierarchy(HierarchyEvent)
XinputKeyPress(KeyPressEvent)
XinputKeyRelease(KeyPressEvent)
XinputLeave(EnterEvent)
XinputMotion(ButtonPressEvent)
XinputProperty(PropertyEvent)
XinputProximityIn(DeviceKeyPressEvent)
XinputProximityOut(DeviceKeyPressEvent)
XinputRawButtonPress(RawButtonPressEvent)
XinputRawButtonRelease(RawButtonPressEvent)
XinputRawKeyPress(RawKeyPressEvent)
XinputRawKeyRelease(RawKeyPressEvent)
XinputRawMotion(RawButtonPressEvent)
XinputRawTouchBegin(RawTouchBeginEvent)
XinputRawTouchEnd(RawTouchBeginEvent)
XinputRawTouchUpdate(RawTouchBeginEvent)
XinputTouchBegin(TouchBeginEvent)
XinputTouchEnd(TouchBeginEvent)
XinputTouchOwnership(TouchOwnershipEvent)
XinputTouchUpdate(TouchBeginEvent)
XkbAccessXNotify(AccessXNotifyEvent)
XkbActionMessage(ActionMessageEvent)
XkbBellNotify(BellNotifyEvent)
XkbCompatMapNotify(CompatMapNotifyEvent)
XkbControlsNotify(ControlsNotifyEvent)
XkbExtensionDeviceNotify(ExtensionDeviceNotifyEvent)
XkbIndicatorMapNotify(IndicatorMapNotifyEvent)
XkbIndicatorStateNotify(IndicatorStateNotifyEvent)
XkbMapNotify(MapNotifyEvent)
XkbNamesNotify(NamesNotifyEvent)
XkbNewKeyboardNotify(NewKeyboardNotifyEvent)
XkbStateNotify(StateNotifyEvent)
Implementations§
§impl Event
impl Event
pub fn parse(
event: &[u8],
ext_info_provider: &dyn ExtInfoProvider,
) -> Result<Event, ParseError>
pub fn parse( event: &[u8], ext_info_provider: &dyn ExtInfoProvider, ) -> Result<Event, ParseError>
Parse a generic X11 event into a concrete event type.
pub fn wire_sequence_number(&self) -> Option<u16>
pub fn wire_sequence_number(&self) -> Option<u16>
Get the sequence number contained in this X11 event
pub fn raw_response_type(&self) -> u8
pub fn raw_response_type(&self) -> u8
Get the raw response type of this X11 event
Response types have seven bits in X11. The eight bit indicates whether
the packet was generated through the SendEvent
request. This function
returns all eight bits.
See also the response_type()
, server_generated()
and sent_event()
methods.
pub fn response_type(&self) -> u8
pub fn response_type(&self) -> u8
Get the response type of this X11 event
pub fn server_generated(&self) -> bool
pub fn server_generated(&self) -> bool
Was this event generated by the X11 server?
If this function returns true, then this event comes from the X11 server.
Otherwise, it was sent from another client via the SendEvent
request.
pub fn sent_event(&self) -> bool
pub fn sent_event(&self) -> bool
Was this event generated by another X11 client?
If this function returns true, then this event comes from another client via
the SendEvent
request. Otherwise, it was generated by the X11 server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)