pub struct Window {
pub id: u64,
pub title: Option<String>,
pub app_id: Option<String>,
pub pid: Option<i32>,
pub workspace_id: Option<u64>,
pub is_focused: bool,
pub is_floating: bool,
}
Expand description
Toplevel window.
Fields§
§id: u64
Unique id of this window.
This id remains constant while this window is open.
Do not assume that window ids will always increase without wrapping, or start at 1. That is an implementation detail subject to change. For example, ids may change to be randomly generated for each new window.
title: Option<String>
Title, if set.
app_id: Option<String>
Application ID, if set.
pid: Option<i32>
Process ID that created the Wayland connection for this window, if known.
Currently, windows created by xdg-desktop-portal-gnome will have a None
PID, but this may
change in the future.
workspace_id: Option<u64>
Id of the workspace this window is on, if any.
is_focused: bool
Whether this window is currently focused.
There can be either one focused window or zero (e.g. when a layer-shell surface has focus).
is_floating: bool
Whether this window is currently floating.
If the window isn’t floating then it is in the tiling layout.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Window
impl<'de> Deserialize<'de> for Window
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnwindSafe for Window
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)