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]
Notable traits for &'_ mut [u8]
impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [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

The number associated to this event

Required methods

Build an event from a raw pointer

Safety

raw must be a valid pointer to the event, and be allocated with libc::malloc

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

Obtain the event as a raw pointer

Access to the raw event data

Implementors