pub struct XWrap {
    pub atoms: XAtom,
    pub managed_windows: Vec<Window>,
    pub tag_labels: Vec<String>,
    pub mode: Mode,
    pub focus_behaviour: FocusBehaviour,
    pub mouse_key_mask: ModMask,
    pub mode_origin: (i32, i32),
    pub task_notify: Arc<Notify>,
    pub motion_event_limiter: c_ulong,
    pub refresh_rate: c_short,
    /* private fields */
}
Expand description

Contains Xserver information and origins.

Fields

atoms: XAtommanaged_windows: Vec<Window>tag_labels: Vec<String>mode: Modefocus_behaviour: FocusBehaviourmouse_key_mask: ModMaskmode_origin: (i32, i32)task_notify: Arc<Notify>motion_event_limiter: c_ulongrefresh_rate: c_short

Implementations

Returns the child windows of all roots.

Errors

Will error if root has no windows or there is an error obtaining the root windows. See get_windows_for_root.

Returns a XColor for a color.

Returns the current position of the cursor.

Errors

Will error if root window cannot be found.

Returns the current window under the cursor.

Errors

Will error if root window cannot be found.

Returns the handle of the default root.

Returns the default root.

Returns the WM_SIZE_HINTS/WM_NORMAL_HINTS of a window as a XyhwChange.

Returns the next Xevent that matches the mask of the xserver.

Returns the next Xevent of the xserver.

Returns all the screens of the display.

Panics

Panics if xorg cannot be contacted (xlib missing, not started, etc.) Also panics if window attrs cannot be obtained.

Returns the dimensions of the screens.

Returns the transient parent of a window.

Returns the atom actions of a window.

Returns the attributes of a window.

Errors

Will error if window status is 0 (no attributes).

Returns a windows class WM_CLASS

Returns the geometry of a window as a XyhwChange struct.

Errors

Errors if Xlib returns a status of 0.

Returns a windows name.

Returns a WM_NAME (not _NETwindows name).

Returns a windows _NET_WM_PID.

Returns the states of a window.

Returns the atom states of a window.

Returns structure of a window as a DockArea.

Returns the type of a window.

Returns the WM_HINTS of a window.

Returns the WM_STATE of a window.

Returns the name of a XAtom.

Errors

Errors if XAtom is not valid.

Grabs the keysym with the modifier for a window.

Resets the keybindings to a list of keybindings.

Updates the keyboard mapping.

Errors

Will error if updating the keyboard failed.

Converts a keycode to a keysym.

Converts a keysym to a keycode.

Grabs the mouse clicks of a window.

Grabs the button with the modifier for a window.

Cleans all currently grabbed buttons of a window.

Grabs the cursor and sets its visual.

Ungrab the cursor.

Move the cursor to a window.

Errors

Will error if unable to obtain window attributes. See get_window_attrs.

Move the cursor to a point.

Errors

Error indicates XlibError.

Replay a click on a window.

Release the pointer if it is frozen.

Appends a window property.

Replaces a window property.

Sets the client list to the currently managed windows.

Sets the current desktop.

Sets a desktop property.

Sets a desktop property with type c_ulong.

Sets a desktop property with type string.

Sets a windows state.

Sets a windows border color.

Sets a windows configuration.

Sets what desktop a window is on.

Sets the atom states of a window.

Sets the WM_STATE of a window.

Sets up a window before we manage it.

Sets up a window that we want to manage.

Teardown a managed window when it is destroyed.

Updates a window.

Maps and unmaps a window depending on it is visible.

Makes a window take focus.

Unfocuses all windows.

Send a XConfigureEvent for a window to X.

Change a windows attributes.

Restacks the windows to the order of the vec.

Raise a window.

Kills a window.

Forcibly unmap a window.

Subscribe to an event of a window.

Subscribe to the wanted events of a window.

Panics

Panics if unable to contact xorg.

Initialize the xwrapper.

EWMH support used for bars such as polybar.

Panics

Panics if a new Cstring cannot be formed

Send a xevent for a window to X.

Load the colors of our theme.

Sets the mode within our xwrapper.

Wait until readable.

Flush and sync the xserver.

Flush the xserver.

Returns how many events are waiting.

Trait Implementations

Returns the “default value” for a type. Read more

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