Struct leftwm_core::models::Manager

source ·
pub struct Manager<C, SERVER> {
    pub state: State,
    pub config: C,
    pub display_server: SERVER,
    /* private fields */
}
Expand description

Maintains current program state.

Fields§

§state: State§config: C§display_server: SERVER

Implementations§

source§

impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>

source

pub async fn start_event_loop(self) -> Result<(), Error>

Starts the event loop of leftwm

Errors

EventResponse if the initialisation of the command pipe or/and the state socket failed.

source§

impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>

source

pub fn command_handler(&mut self, command: &Command) -> bool

Processes a command and invokes the associated function.

source§

impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>

source

pub fn display_event_handler(&mut self, event: DisplayEvent) -> bool

Process a collection of events, and apply them changes to a manager. Returns true if changes need to be rendered.

source§

impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>

source

pub fn screen_create_handler(&mut self, screen: Screen) -> bool

Process a collection of events, and apply the changes to a manager.

Returns true if changes need to be rendered.

source§

impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>

source

pub fn window_created_handler(&mut self, window: Window, x: i32, y: i32) -> bool

Process a collection of events, and apply them changes to a manager. Returns true if changes need to be rendered.

source

pub fn window_destroyed_handler(&mut self, handle: &WindowHandle) -> bool

Process a collection of events, and apply them changes to a manager. Returns true if changes need to be rendered.

source

pub fn window_changed_handler(&mut self, change: WindowChange) -> bool

source

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

Find the next or previous window on the currently focused workspace. May return None if no other window is present.

source§

impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>

source

pub fn window_move_handler( &mut self, handle: &WindowHandle, offset_x: i32, offset_y: i32 ) -> bool

source§

impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>

source

pub fn window_resize_handler( &mut self, handle: &WindowHandle, offset_w: i32, offset_h: i32 ) -> bool

source§

impl<C, SERVER> Manager<C, SERVER>where C: Config, SERVER: DisplayServer,

source

pub fn new(config: C) -> Self

source§

impl<C, SERVER> Manager<C, SERVER>

source

pub fn register_child_hook(&self)

source

pub fn hard_reload(&mut self)

Soft reload the worker without saving state.

source§

impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>

source

pub fn reload_config(&mut self) -> bool

Reload the configuration of the running Manager.

source§

impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>

source

pub fn update_windows(&mut self)

Trait Implementations§

source§

impl<C: Debug, SERVER: Debug> Debug for Manager<C, SERVER>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<C, SERVER> RefUnwindSafe for Manager<C, SERVER>where C: RefUnwindSafe, SERVER: RefUnwindSafe,

§

impl<C, SERVER> Send for Manager<C, SERVER>where C: Send, SERVER: Send,

§

impl<C, SERVER> Sync for Manager<C, SERVER>where C: Sync, SERVER: Sync,

§

impl<C, SERVER> Unpin for Manager<C, SERVER>where C: Unpin, SERVER: Unpin,

§

impl<C, SERVER> UnwindSafe for Manager<C, SERVER>where C: UnwindSafe, SERVER: UnwindSafe,

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