Struct leftwm_core::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
sourceimpl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
sourcepub async fn event_loop(self)
pub async fn event_loop(self)
Panics
This function panics if it can’t create or write to the command file.
sourceimpl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
sourcepub fn command_handler(&mut self, command: &Command) -> bool
pub fn command_handler(&mut self, command: &Command) -> bool
Processes a command and invokes the associated function.
sourceimpl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
sourcepub fn display_event_handler(&mut self, event: DisplayEvent) -> bool
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.
sourceimpl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
sourcepub fn screen_create_handler(&mut self, screen: Screen) -> bool
pub fn screen_create_handler(&mut self, screen: Screen) -> bool
Process a collection of events, and apply them changes to a manager.
Returns true
if changes need to be rendered.
sourceimpl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
sourcepub fn window_created_handler(&mut self, window: Window, x: i32, y: i32) -> bool
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.
sourcepub fn window_destroyed_handler(&mut self, handle: &WindowHandle) -> bool
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.
pub fn window_changed_handler(&mut self, change: WindowChange) -> bool
pub fn update_workspace_avoid_list(&mut self)
sourcepub fn get_next_or_previous(
&mut self,
handle: &WindowHandle
) -> Option<WindowHandle>
pub fn get_next_or_previous(
&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.
sourceimpl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
pub fn window_move_handler(
&mut self,
handle: &WindowHandle,
offset_x: i32,
offset_y: i32
) -> bool
sourceimpl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
pub fn window_resize_handler(
&mut self,
handle: &WindowHandle,
offset_w: i32,
offset_h: i32
) -> bool
sourceimpl<C, SERVER> Manager<C, SERVER> where
C: Config,
SERVER: DisplayServer,
impl<C, SERVER> Manager<C, SERVER> where
C: Config,
SERVER: DisplayServer,
sourceimpl<C, SERVER> Manager<C, SERVER>
impl<C, SERVER> Manager<C, SERVER>
pub fn register_child_hook(&self)
sourcepub fn hard_reload(&mut self)
pub fn hard_reload(&mut self)
Soft reload the worker without saving state.
sourceimpl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
sourcepub fn reload_config(&mut self) -> bool
pub fn reload_config(&mut self) -> bool
Reload the configuration of the running Manager
.
sourceimpl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
pub fn update_windows(&mut self)
Trait Implementations
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
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