Struct xcb::x::ChangeProperty

source ·
pub struct ChangeProperty<'a, P: PropEl> {
    pub mode: PropMode,
    pub window: Window,
    pub property: Atom,
    pub type: Atom,
    pub data: &'a [P],
}
Expand description

Changes a window property

Sets or updates a property on the specified window. Properties are for example the window title (WM_NAME) or its minimum size (WM_NORMAL_HINTS). Protocols such as EWMH also use properties - for example EWMH defines the window title, encoded as UTF-8 string, in the _NET_WM_NAME property.

§Example

// Set the WM_NAME property of the window "XCB Example".
conn.send_request(&x::ChangeProperty {
    mode: x::PropMode::Replace,
    window,
    property: x::ATOM_WM_NAME,
    r#type: x::ATOM_STRING,
    data: b"XCB Example",
});

This request has no reply.

Associated cookie types are VoidCookie and VoidCookieChecked.

Fields§

§mode: PropMode
§window: Window

The window whose property you want to change.

§property: Atom

The property you want to change (an atom).

§type: Atom

The type of the property you want to change (an atom).

§data: &'a [P]

The property data.

Trait Implementations§

source§

impl<'a, P: Clone + PropEl> Clone for ChangeProperty<'a, P>

source§

fn clone(&self) -> ChangeProperty<'a, P>

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, P: Debug + PropEl> Debug for ChangeProperty<'a, P>

source§

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

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

impl<'a, P: PropEl> RawRequest for ChangeProperty<'a, P>

source§

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

Actual implementation of the request sending Read more
source§

impl<'a, P: PropEl> Request for ChangeProperty<'a, P>

§

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, P: PropEl> RequestWithoutReply for ChangeProperty<'a, P>

Auto Trait Implementations§

§

impl<'a, P> Freeze for ChangeProperty<'a, P>

§

impl<'a, P> RefUnwindSafe for ChangeProperty<'a, P>
where P: RefUnwindSafe,

§

impl<'a, P> Send for ChangeProperty<'a, P>
where P: Sync,

§

impl<'a, P> Sync for ChangeProperty<'a, P>
where P: Sync,

§

impl<'a, P> Unpin for ChangeProperty<'a, P>

§

impl<'a, P> UnwindSafe for ChangeProperty<'a, P>
where P: 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> 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,

§

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>,

§

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>,

§

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.