Trait xcb::BaseEvent [−][src]
pub trait BaseEvent {
const EXTENSION: Option<Extension>;
const NUMBER: u32;
unsafe fn from_raw(raw: *mut xcb_generic_event_t) -> Self;
unsafe fn into_raw(self) -> *mut xcb_generic_event_t;
fn as_raw(&self) -> *mut xcb_generic_event_t;
fn as_slice(&self) -> &[u8]ⓘ;
}
Expand description
Trait for base events (aka. non GE_GENERIC events)
Associated Constants
The extension associated to this event, or None
for the main protocol
Required methods
unsafe fn from_raw(raw: *mut xcb_generic_event_t) -> Self
unsafe fn from_raw(raw: *mut xcb_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_generic_event_t
unsafe fn into_raw(self) -> *mut xcb_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_generic_event_t
fn as_raw(&self) -> *mut xcb_generic_event_t
Obtain the event as a raw pointer