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

The extension associated to this event

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