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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Actual implementation of the request sending Read more

The default cookie associated to this request.

false if the request returns a reply, true otherwise.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.