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>,
}
Fields
behaviour: FocusBehaviour
focus_new_windows: bool
workspace_history: VecDeque<usize>
window_history: VecDeque<Option<WindowHandle>>
tag_history: VecDeque<TagId>
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.
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 more
sourceimpl 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more