#[non_exhaustive]
pub enum Event {
Show 121 variants Unknown(Vec<u8>), Error(X11Error), ButtonPress(ButtonPressEvent), ButtonRelease(ButtonReleaseEvent), CirculateNotify(CirculateNotifyEvent), CirculateRequest(CirculateRequestEvent), ClientMessage(ClientMessageEvent), ColormapNotify(ColormapNotifyEvent), ConfigureNotify(ConfigureNotifyEvent), ConfigureRequest(ConfigureRequestEvent), CreateNotify(CreateNotifyEvent), DestroyNotify(DestroyNotifyEvent), EnterNotify(EnterNotifyEvent), Expose(ExposeEvent), FocusIn(FocusInEvent), FocusOut(FocusOutEvent), GeGeneric(GeGenericEvent), GraphicsExposure(GraphicsExposureEvent), GravityNotify(GravityNotifyEvent), KeyPress(KeyPressEvent), KeyRelease(KeyReleaseEvent), KeymapNotify(KeymapNotifyEvent), LeaveNotify(LeaveNotifyEvent), 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), DamageNotify(NotifyEvent), DpmsInfoNotify(InfoNotifyEvent), Dri2BufferSwapComplete(BufferSwapCompleteEvent), Dri2InvalidateBuffers(InvalidateBuffersEvent), GlxBufferSwapComplete(BufferSwapCompleteEvent), GlxPbufferClobber(PbufferClobberEvent), PresentCompleteNotify(CompleteNotifyEvent), PresentConfigureNotify(ConfigureNotifyEvent), PresentGeneric(GenericEvent), PresentIdleNotify(IdleNotifyEvent), PresentRedirectNotify(RedirectNotifyEvent), RandrNotify(NotifyEvent), RandrScreenChangeNotify(ScreenChangeNotifyEvent), ScreensaverNotify(NotifyEvent), ShapeNotify(NotifyEvent), ShmCompletion(CompletionEvent), SyncAlarmNotify(AlarmNotifyEvent), SyncCounterNotify(CounterNotifyEvent), XfixesCursorNotify(CursorNotifyEvent), XfixesSelectionNotify(SelectionNotifyEvent), XinputBarrierHit(BarrierHitEvent), XinputBarrierLeave(BarrierLeaveEvent), XinputButtonPress(ButtonPressEvent), XinputButtonRelease(ButtonReleaseEvent), XinputChangeDeviceNotify(ChangeDeviceNotifyEvent), XinputDeviceButtonPress(DeviceButtonPressEvent), XinputDeviceButtonRelease(DeviceButtonReleaseEvent), XinputDeviceButtonStateNotify(DeviceButtonStateNotifyEvent), XinputDeviceChanged(DeviceChangedEvent), XinputDeviceFocusIn(DeviceFocusInEvent), XinputDeviceFocusOut(DeviceFocusOutEvent), XinputDeviceKeyPress(DeviceKeyPressEvent), XinputDeviceKeyRelease(DeviceKeyReleaseEvent), XinputDeviceKeyStateNotify(DeviceKeyStateNotifyEvent), XinputDeviceMappingNotify(DeviceMappingNotifyEvent), XinputDeviceMotionNotify(DeviceMotionNotifyEvent), XinputDevicePresenceNotify(DevicePresenceNotifyEvent), XinputDevicePropertyNotify(DevicePropertyNotifyEvent), XinputDeviceStateNotify(DeviceStateNotifyEvent), XinputDeviceValuator(DeviceValuatorEvent), XinputEnter(EnterEvent), XinputFocusIn(FocusInEvent), XinputFocusOut(FocusOutEvent), XinputGesturePinchBegin(GesturePinchBeginEvent), XinputGesturePinchEnd(GesturePinchEndEvent), XinputGesturePinchUpdate(GesturePinchUpdateEvent), XinputGestureSwipeBegin(GestureSwipeBeginEvent), XinputGestureSwipeEnd(GestureSwipeEndEvent), XinputGestureSwipeUpdate(GestureSwipeUpdateEvent), XinputHierarchy(HierarchyEvent), XinputKeyPress(KeyPressEvent), XinputKeyRelease(KeyReleaseEvent), XinputLeave(LeaveEvent), XinputMotion(MotionEvent), XinputProperty(PropertyEvent), XinputProximityIn(ProximityInEvent), XinputProximityOut(ProximityOutEvent), XinputRawButtonPress(RawButtonPressEvent), XinputRawButtonRelease(RawButtonReleaseEvent), XinputRawKeyPress(RawKeyPressEvent), XinputRawKeyRelease(RawKeyReleaseEvent), XinputRawMotion(RawMotionEvent), XinputRawTouchBegin(RawTouchBeginEvent), XinputRawTouchEnd(RawTouchEndEvent), XinputRawTouchUpdate(RawTouchUpdateEvent), XinputTouchBegin(TouchBeginEvent), XinputTouchEnd(TouchEndEvent), XinputTouchOwnership(TouchOwnershipEvent), XinputTouchUpdate(TouchUpdateEvent), XkbAccessXNotify(AccessXNotifyEvent), XkbActionMessage(ActionMessageEvent), XkbBellNotify(BellNotifyEvent), XkbCompatMapNotify(CompatMapNotifyEvent), XkbControlsNotify(ControlsNotifyEvent), XkbExtensionDeviceNotify(ExtensionDeviceNotifyEvent), XkbIndicatorMapNotify(IndicatorMapNotifyEvent), XkbIndicatorStateNotify(IndicatorStateNotifyEvent), XkbMapNotify(MapNotifyEvent), XkbNamesNotify(NamesNotifyEvent), XkbNewKeyboardNotify(NewKeyboardNotifyEvent), XkbStateNotify(StateNotifyEvent), XprintAttributNotify(AttributNotifyEvent), XprintNotify(NotifyEvent), XvPortNotify(PortNotifyEvent), XvVideoNotify(VideoNotifyEvent),
}
Expand description

Enumeration of all possible X11 events.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Unknown(Vec<u8>)

§

Error(X11Error)

§

ButtonPress(ButtonPressEvent)

§

ButtonRelease(ButtonReleaseEvent)

§

CirculateNotify(CirculateNotifyEvent)

§

CirculateRequest(CirculateRequestEvent)

§

ClientMessage(ClientMessageEvent)

§

ColormapNotify(ColormapNotifyEvent)

§

ConfigureNotify(ConfigureNotifyEvent)

§

ConfigureRequest(ConfigureRequestEvent)

§

CreateNotify(CreateNotifyEvent)

§

DestroyNotify(DestroyNotifyEvent)

§

EnterNotify(EnterNotifyEvent)

§

Expose(ExposeEvent)

§

FocusIn(FocusInEvent)

§

FocusOut(FocusOutEvent)

§

GeGeneric(GeGenericEvent)

§

GraphicsExposure(GraphicsExposureEvent)

§

GravityNotify(GravityNotifyEvent)

§

KeyPress(KeyPressEvent)

§

KeyRelease(KeyReleaseEvent)

§

KeymapNotify(KeymapNotifyEvent)

§

LeaveNotify(LeaveNotifyEvent)

§

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)

§

DamageNotify(NotifyEvent)

§

DpmsInfoNotify(InfoNotifyEvent)

§

Dri2BufferSwapComplete(BufferSwapCompleteEvent)

§

Dri2InvalidateBuffers(InvalidateBuffersEvent)

§

GlxBufferSwapComplete(BufferSwapCompleteEvent)

§

GlxPbufferClobber(PbufferClobberEvent)

§

PresentCompleteNotify(CompleteNotifyEvent)

§

PresentConfigureNotify(ConfigureNotifyEvent)

§

PresentGeneric(GenericEvent)

§

PresentIdleNotify(IdleNotifyEvent)

§

PresentRedirectNotify(RedirectNotifyEvent)

§

RandrNotify(NotifyEvent)

§

RandrScreenChangeNotify(ScreenChangeNotifyEvent)

§

ScreensaverNotify(NotifyEvent)

§

ShapeNotify(NotifyEvent)

§

ShmCompletion(CompletionEvent)

§

SyncAlarmNotify(AlarmNotifyEvent)

§

SyncCounterNotify(CounterNotifyEvent)

§

XfixesCursorNotify(CursorNotifyEvent)

§

XfixesSelectionNotify(SelectionNotifyEvent)

§

XinputBarrierHit(BarrierHitEvent)

§

XinputBarrierLeave(BarrierLeaveEvent)

§

XinputButtonPress(ButtonPressEvent)

§

XinputButtonRelease(ButtonReleaseEvent)

§

XinputChangeDeviceNotify(ChangeDeviceNotifyEvent)

§

XinputDeviceButtonPress(DeviceButtonPressEvent)

§

XinputDeviceButtonRelease(DeviceButtonReleaseEvent)

§

XinputDeviceButtonStateNotify(DeviceButtonStateNotifyEvent)

§

XinputDeviceChanged(DeviceChangedEvent)

§

XinputDeviceFocusIn(DeviceFocusInEvent)

§

XinputDeviceFocusOut(DeviceFocusOutEvent)

§

XinputDeviceKeyPress(DeviceKeyPressEvent)

§

XinputDeviceKeyRelease(DeviceKeyReleaseEvent)

§

XinputDeviceKeyStateNotify(DeviceKeyStateNotifyEvent)

§

XinputDeviceMappingNotify(DeviceMappingNotifyEvent)

§

XinputDeviceMotionNotify(DeviceMotionNotifyEvent)

§

XinputDevicePresenceNotify(DevicePresenceNotifyEvent)

§

XinputDevicePropertyNotify(DevicePropertyNotifyEvent)

§

XinputDeviceStateNotify(DeviceStateNotifyEvent)

§

XinputDeviceValuator(DeviceValuatorEvent)

§

XinputEnter(EnterEvent)

§

XinputFocusIn(FocusInEvent)

§

XinputFocusOut(FocusOutEvent)

§

XinputGesturePinchBegin(GesturePinchBeginEvent)

§

XinputGesturePinchEnd(GesturePinchEndEvent)

§

XinputGesturePinchUpdate(GesturePinchUpdateEvent)

§

XinputGestureSwipeBegin(GestureSwipeBeginEvent)

§

XinputGestureSwipeEnd(GestureSwipeEndEvent)

§

XinputGestureSwipeUpdate(GestureSwipeUpdateEvent)

§

XinputHierarchy(HierarchyEvent)

§

XinputKeyPress(KeyPressEvent)

§

XinputKeyRelease(KeyReleaseEvent)

§

XinputLeave(LeaveEvent)

§

XinputMotion(MotionEvent)

§

XinputProperty(PropertyEvent)

§

XinputProximityIn(ProximityInEvent)

§

XinputProximityOut(ProximityOutEvent)

§

XinputRawButtonPress(RawButtonPressEvent)

§

XinputRawButtonRelease(RawButtonReleaseEvent)

§

XinputRawKeyPress(RawKeyPressEvent)

§

XinputRawKeyRelease(RawKeyReleaseEvent)

§

XinputRawMotion(RawMotionEvent)

§

XinputRawTouchBegin(RawTouchBeginEvent)

§

XinputRawTouchEnd(RawTouchEndEvent)

§

XinputRawTouchUpdate(RawTouchUpdateEvent)

§

XinputTouchBegin(TouchBeginEvent)

§

XinputTouchEnd(TouchEndEvent)

§

XinputTouchOwnership(TouchOwnershipEvent)

§

XinputTouchUpdate(TouchUpdateEvent)

§

XkbAccessXNotify(AccessXNotifyEvent)

§

XkbActionMessage(ActionMessageEvent)

§

XkbBellNotify(BellNotifyEvent)

§

XkbCompatMapNotify(CompatMapNotifyEvent)

§

XkbControlsNotify(ControlsNotifyEvent)

§

XkbExtensionDeviceNotify(ExtensionDeviceNotifyEvent)

§

XkbIndicatorMapNotify(IndicatorMapNotifyEvent)

§

XkbIndicatorStateNotify(IndicatorStateNotifyEvent)

§

XkbMapNotify(MapNotifyEvent)

§

XkbNamesNotify(NamesNotifyEvent)

§

XkbNewKeyboardNotify(NewKeyboardNotifyEvent)

§

XkbStateNotify(StateNotifyEvent)

§

XprintAttributNotify(AttributNotifyEvent)

§

XprintNotify(NotifyEvent)

§

XvPortNotify(PortNotifyEvent)

§

XvVideoNotify(VideoNotifyEvent)

Implementations§

source§

impl Event

source

pub fn parse( event: &[u8], ext_info_provider: &dyn ExtInfoProvider ) -> Result<Self, ParseError>

Parse a generic X11 event into a concrete event type.

source

pub fn wire_sequence_number(&self) -> Option<u16>

Get the sequence number contained in this X11 event

source

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.

source

pub fn response_type(&self) -> u8

Get the response type of this X11 event

source

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.

source

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§

source§

impl Clone for Event

source§

fn clone(&self) -> Event

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Event

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

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> 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> 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,

§

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>,

§

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.