Struct WindowManager

Source
pub struct WindowManager {
    pub windows: Arc<Mutex<HashMap<String, ManagedWindow>>>,
    pub workspaces: Arc<Mutex<HashMap<String, Workspace>>>,
    pub active_workspace: Arc<Mutex<String>>,
    pub config: Arc<Mutex<Config>>,
    pub system_windows: Arc<Mutex<HashMap<u64, SystemWindow>>>,
}

Fields§

§windows: Arc<Mutex<HashMap<String, ManagedWindow>>>§workspaces: Arc<Mutex<HashMap<String, Workspace>>>§active_workspace: Arc<Mutex<String>>§config: Arc<Mutex<Config>>§system_windows: Arc<Mutex<HashMap<u64, SystemWindow>>>

Implementations§

Source§

impl WindowManager

Source

pub fn new() -> Self

Source

pub fn add_window( &self, handle: u64, title: String, app_name: String, ) -> Result<String, String>

Source

pub fn remove_window(&self, window_id: &str) -> Result<(), String>

Source

pub fn get_windows(&self) -> Vec<ManagedWindow>

Source

pub fn get_workspace_windows(&self, workspace_id: &str) -> Vec<ManagedWindow>

Source

pub fn focus_window(&self, window_id: &str) -> Result<(), String>

Source

pub fn arrange_workspace(&self, workspace_id: &str) -> Result<(), String>

Source

pub fn create_workspace(&self, name: String, layout: LayoutType) -> String

Source

pub fn switch_workspace(&self, workspace_id: &str) -> Result<(), String>

Source

pub fn get_workspaces(&self) -> Vec<Workspace>

Source

pub fn get_active_workspace(&self) -> String

Source

pub fn get_system_windows(&self) -> Result<Vec<SystemWindow>, String>

Source

pub fn move_system_window( &self, handle: u64, x: i32, y: i32, ) -> Result<(), String>

Source

pub fn resize_system_window( &self, handle: u64, width: u32, height: u32, ) -> Result<(), String>

Source

pub fn set_system_window_bounds( &self, handle: u64, x: i32, y: i32, width: u32, height: u32, ) -> Result<(), String>

Source

pub fn minimize_system_window(&self, handle: u64) -> Result<(), String>

Source

pub fn maximize_system_window(&self, handle: u64) -> Result<(), String>

Source

pub fn restore_system_window(&self, handle: u64) -> Result<(), String>

Source

pub fn close_system_window(&self, handle: u64) -> Result<(), String>

Source

pub fn focus_system_window(&self, handle: u64) -> Result<(), String>

Source

pub fn hide_system_window(&self, handle: u64) -> Result<(), String>

Source

pub fn show_system_window(&self, handle: u64) -> Result<(), String>

Source

pub fn arrange_system_windows( &self, window_handles: &[u64], ) -> Result<(), String>

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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

impl<T> ErasedDestructor for T
where T: 'static,