Trait xcb::GeEvent [−][src]
pub trait GeEvent {
const EXTENSION: Extension;
const NUMBER: u32;
unsafe fn from_raw(raw: *mut xcb_ge_generic_event_t) -> Self;
unsafe fn into_raw(self) -> *mut xcb_ge_generic_event_t;
fn as_raw(&self) -> *mut xcb_ge_generic_event_t;
fn as_slice(&self) -> &[u8]ⓘ;
}
Expand description
A trait for GE_GENERIC events
A GE_GENERIC event is an extension event that does not follow
the regular response_type
offset.
This system was introduced because the protocol eventually run
out of event numbers.
This should be completely transparent to the user, as Event is resolving all types of events together.
Associated Constants
Required methods
unsafe fn from_raw(raw: *mut xcb_ge_generic_event_t) -> Self
unsafe fn from_raw(raw: *mut xcb_ge_generic_event_t) -> Self
Build an event from a raw pointer
Safety
raw
must be a valid pointer to the event, and be allocated with libc::malloc
unsafe fn into_raw(self) -> *mut xcb_ge_generic_event_t
unsafe fn into_raw(self) -> *mut xcb_ge_generic_event_t
Convert the event into a raw pointer
Safety
returned value should be freed with libc::free
to avoid memory leak, or used to build a new event
fn as_raw(&self) -> *mut xcb_ge_generic_event_t
fn as_raw(&self) -> *mut xcb_ge_generic_event_t
Obtain the event as a raw pointer