Struct xcb::x::SendEvent

source ·
pub struct SendEvent<'a, E: BaseEvent> {
    pub propagate: bool,
    pub destination: SendEventDest,
    pub event_mask: EventMask,
    pub event: &'a E,
}
Expand description

send an event

Identifies the destination window, determines which clients should receive the specified event and ignores any active grabs.

The event must be one of the core events or an event defined by an extension, so that the X server can correctly byte-swap the contents as necessary. The contents of event are otherwise unaltered and unchecked except for the send_event field which is forced to ‘true’.

§Example

// Tell the given window that it was configured to a size of 800x600 pixels.
let event = x::ConfigureNotifyEvent::new(
    window,
    window,
    x::Window::none(),
    0,
    0,
    800,
    600,
    0,
    false,
);
conn.send_request(&x::SendEvent {
    propagate: false,
    destination: x::SendEventDest::Window(window),
    event_mask: x::EventMask::STRUCTURE_NOTIFY,
    event: &event,
});
conn.flush()?;

This request has no reply.

Associated cookie types are VoidCookie and VoidCookieChecked.

Fields§

§propagate: bool

If propagate is true and no clients have selected any event on destination, the destination is replaced with the closest ancestor of destination for which some client has selected a type in event_mask and for which no intervening window has that type in its do-not-propagate-mask. If no such window exists or if the window is an ancestor of the focus window and InputFocus was originally specified as the destination, the event is not sent to any clients. Otherwise, the event is reported to every client selecting on the final destination any of the types specified in event_mask.

§destination: SendEventDest

The window to send this event to. Every client which selects any event within event_mask on destination will get the event.

The special value XCB_SEND_EVENT_DEST_POINTER_WINDOW refers to the window that contains the mouse pointer.

The special value XCB_SEND_EVENT_DEST_ITEM_FOCUS refers to the window which has the keyboard focus.

§event_mask: EventMask

Event_mask for determining which clients should receive the specified event. See destination and propagate.

§event: &'a E

The event to send to the specified destination.

Trait Implementations§

source§

impl<'a, E: Clone + BaseEvent> Clone for SendEvent<'a, E>

source§

fn clone(&self) -> SendEvent<'a, E>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, E: Debug + BaseEvent> Debug for SendEvent<'a, E>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, E: BaseEvent> RawRequest for SendEvent<'a, E>

source§

fn raw_request(&self, c: &Connection, checked: bool) -> u64

Actual implementation of the request sending Read more
source§

impl<'a, E: BaseEvent> Request for SendEvent<'a, E>

source§

type Cookie = VoidCookie

The default cookie associated to this request.
source§

const IS_VOID: bool = true

false if the request returns a reply, true otherwise.
source§

impl<'a, E: BaseEvent> RequestWithoutReply for SendEvent<'a, E>

Auto Trait Implementations§

§

impl<'a, E> Freeze for SendEvent<'a, E>

§

impl<'a, E> RefUnwindSafe for SendEvent<'a, E>
where E: RefUnwindSafe,

§

impl<'a, E> Send for SendEvent<'a, E>
where E: Sync,

§

impl<'a, E> Sync for SendEvent<'a, E>
where E: Sync,

§

impl<'a, E> Unpin for SendEvent<'a, E>

§

impl<'a, E> UnwindSafe for SendEvent<'a, E>
where E: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.