Struct leftwm_core::models::FocusManager
source · [−]pub struct FocusManager {
pub behaviour: FocusBehaviour,
pub focus_new_windows: bool,
pub workspace_history: VecDeque<usize>,
pub window_history: VecDeque<Option<WindowHandle>>,
pub tag_history: VecDeque<TagId>,
pub tags_last_window: HashMap<TagId, WindowHandle>,
pub sloppy_mouse_follows_focus: bool,
pub last_mouse_position: Option<(i32, i32)>,
}Fields
behaviour: FocusBehaviourfocus_new_windows: boolworkspace_history: VecDeque<usize>window_history: VecDeque<Option<WindowHandle>>tag_history: VecDeque<TagId>sloppy_mouse_follows_focus: boollast_mouse_position: Option<(i32, i32)>Implementations
sourceimpl FocusManager
impl FocusManager
pub fn new(config: &impl Config) -> Self
sourcepub fn workspace<'a, 'b>(
&self,
workspaces: &'a [Workspace]
) -> Option<&'b Workspace>where
'a: 'b,
pub fn workspace<'a, 'b>(
&self,
workspaces: &'a [Workspace]
) -> Option<&'b Workspace>where
'a: 'b,
Return the currently focused workspace.
sourcepub fn workspace_mut<'a, 'b>(
&self,
workspaces: &'a mut [Workspace]
) -> Option<&'b mut Workspace>where
'a: 'b,
pub fn workspace_mut<'a, 'b>(
&self,
workspaces: &'a mut [Workspace]
) -> Option<&'b mut Workspace>where
'a: 'b,
Return the currently focused workspace.
sourcepub fn tag(&self, offset: usize) -> Option<TagId>
pub fn tag(&self, offset: usize) -> Option<TagId>
Return the currently focused tag if the offset is 0. Offset is used to reach further down the history.
sourcepub fn window<'a, 'b>(&self, windows: &'a [Window]) -> Option<&'b Window>where
'a: 'b,
pub fn window<'a, 'b>(&self, windows: &'a [Window]) -> Option<&'b Window>where
'a: 'b,
Return the currently focused window.
sourcepub fn window_mut<'a, 'b>(
&self,
windows: &'a mut [Window]
) -> Option<&'b mut Window>where
'a: 'b,
pub fn window_mut<'a, 'b>(
&self,
windows: &'a mut [Window]
) -> Option<&'b mut Window>where
'a: 'b,
Return the currently focused window.
Trait Implementations
sourceimpl Clone for FocusManager
impl Clone for FocusManager
sourcefn clone(&self) -> FocusManager
fn clone(&self) -> FocusManager
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for FocusManager
impl Debug for FocusManager
sourceimpl<'de> Deserialize<'de> for FocusManager
impl<'de> Deserialize<'de> for FocusManager
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for FocusManager
impl Serialize for FocusManager
Auto Trait Implementations
impl RefUnwindSafe for FocusManager
impl Send for FocusManager
impl Sync for FocusManager
impl Unpin for FocusManager
impl UnwindSafe for FocusManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more