pub struct Window {
pub id: u32,
/* private fields */
}Expand description
Window provides a higer level interfacefor manipulating windows.
Fields§
§id: u32Implementations§
Source§impl Window
impl Window
Sourcepub fn pid(&self) -> WmCtlResult<i32>
pub fn pid(&self) -> WmCtlResult<i32>
Sourcepub fn name(&self) -> WmCtlResult<String>
pub fn name(&self) -> WmCtlResult<String>
Sourcepub fn class(&self) -> WmCtlResult<String>
pub fn class(&self) -> WmCtlResult<String>
Sourcepub fn kind(&self) -> WmCtlResult<Kind>
pub fn kind(&self) -> WmCtlResult<Kind>
Sourcepub fn state(&self) -> WmCtlResult<Vec<State>>
pub fn state(&self) -> WmCtlResult<Vec<State>>
Sourcepub fn parent(&self) -> WmCtlResult<Window>
pub fn parent(&self) -> WmCtlResult<Window>
Sourcepub fn desktop(&self) -> WmCtlResult<i32>
pub fn desktop(&self) -> WmCtlResult<i32>
Sourcepub fn visual_geometry(&self) -> WmCtlResult<(i32, i32, u32, u32)>
pub fn visual_geometry(&self) -> WmCtlResult<(i32, i32, u32, u32)>
Sourcepub fn gtk_borders(&self) -> Border
pub fn gtk_borders(&self) -> Border
Sourcepub fn mapped(&self) -> WmCtlResult<MapState>
pub fn mapped(&self) -> WmCtlResult<MapState>
Sourcepub fn properties(&self) -> WmCtlResult<Vec<Property>>
pub fn properties(&self) -> WmCtlResult<Vec<Property>>
Sourcepub fn map(&self) -> WmCtlResult<()>
pub fn map(&self) -> WmCtlResult<()>
Map the window to the screen
- Windows are created in the unmapped state and must be mapped to be visible
- Unmapping the window will have the opposite effect of hidding the window
- Useful for new windows or dialogs that need to conditionally be visible
- It is much faster to hide and show and window rather than recreate it
§Examples
ⓘ
use libwmctl::prelude::*;
let win = window(12345);
win.map().unwrap();Sourcepub fn maximize(&self) -> WmCtlResult<()>
pub fn maximize(&self) -> WmCtlResult<()>
Sourcepub fn unmaximize(&self) -> WmCtlResult<()>
pub fn unmaximize(&self) -> WmCtlResult<()>
Trait Implementations§
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
Mutably borrows from an owned value. Read more