Struct leftwm_core::state::State

source ·
pub struct State {
Show 19 fields pub screens: Vec<Screen>, pub windows: Vec<Window>, pub window_history: HashMap<TagId, Vec<WindowHandle>>, pub workspaces: Vec<Workspace>, pub focus_manager: FocusManager, pub layout_manager: LayoutManager, pub mode: Mode, pub layouts: Vec<Layout>, pub scratchpads: Vec<ScratchPad>, pub active_scratchpads: HashMap<ScratchPadName, VecDeque<ChildID>>, pub actions: VecDeque<DisplayAction>, pub tags: Tags, pub mousekey: Vec<String>, pub max_window_width: Option<Size>, pub default_width: i32, pub default_height: i32, pub disable_tile_drag: bool, pub insert_behavior: InsertBehavior, pub single_window_border: bool,
}

Fields§

§screens: Vec<Screen>§windows: Vec<Window>§window_history: HashMap<TagId, Vec<WindowHandle>>§workspaces: Vec<Workspace>§focus_manager: FocusManager§layout_manager: LayoutManager§mode: Mode§layouts: Vec<Layout>§scratchpads: Vec<ScratchPad>§active_scratchpads: HashMap<ScratchPadName, VecDeque<ChildID>>§actions: VecDeque<DisplayAction>§tags: Tags§mousekey: Vec<String>§max_window_width: Option<Size>§default_width: i32§default_height: i32§disable_tile_drag: bool§insert_behavior: InsertBehavior§single_window_border: bool

Implementations§

source§

impl State

source

pub fn handle_window_focus(&mut self, handle: &WindowHandle)

Focuses a window based upon the FocusBehaviour

source

pub fn focus_window(&mut self, handle: &WindowHandle)

Focuses the given window.

source

pub fn focus_workspace(&mut self, workspace: &Workspace)

Focuses the given workspace.

source

pub fn focus_tag(&mut self, tag: &TagId)

Focuses the given tag.

source

pub fn focus_workspace_with_point(&mut self, x: i32, y: i32)

Focuses the workspace containing a given point.

source

pub fn focus_window_with_point(&mut self, x: i32, y: i32)

Focuses the window containing a given point.

source

pub fn validate_focus_at(&mut self, handle: &WindowHandle)

Validates that the given window is focused.

source§

impl State

source

pub fn goto_tag_handler(&mut self, tag_id: TagId) -> Option<bool>

source§

impl State

source

pub fn mouse_combo_handler( &mut self, modmask: ModMask, button: Button, handle: WindowHandle, x: i32, y: i32 ) -> bool

source§

impl State

source

pub fn sort_windows(&mut self)

source

pub fn handle_single_border(&mut self, border_width: i32)

source

pub fn move_to_top(&mut self, handle: &WindowHandle) -> Option<()>

source

pub fn update_static(&mut self)

source

pub fn restore_state(&mut self, old_state: &Self)

Apply saved state to a running manager.

Trait Implementations§

source§

impl Debug for State

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for State

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<&State> for ManagerState

source§

fn from(state: &State) -> Self

Converts to this type from the input type.
source§

impl Serialize for State

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for State

§

impl Send for State

§

impl Sync for State

§

impl Unpin for State

§

impl UnwindSafe for State

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,