Trait xcb::ResolveWireGeEvent [−][src]
pub trait ResolveWireGeEvent: Sized {
unsafe fn resolve_wire_ge_event(event: *mut xcb_ge_generic_event_t) -> Self;
}
Expand description
Trait for the resolution of raw wire GE_GENERIC event to a unified event enum.
Self
is normally an enum of several event subtypes.
See crate::xinput::Event and crate::Event
Required methods
unsafe fn resolve_wire_ge_event(event: *mut xcb_ge_generic_event_t) -> Self
unsafe fn resolve_wire_ge_event(event: *mut xcb_ge_generic_event_t) -> Self
Resolve a pointer to xcb_ge_generic_event_t
to Self
, inferring the correct subtype
using event_type
field.
Panics
Panics if the event subtype cannot be resolved for Self
. That is, event_type
must be checked beforehand to be in range.
Safety
event
must be a valid, non-null event returned by xcb_wait_for_event
or similar function