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§
source§impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
sourcepub async fn start_event_loop(self) -> Result<(), Error>
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>
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.
source§impl<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.
source§impl<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 the changes to a manager.
Returns true
if changes need to be rendered.
source§impl<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
sourcepub fn get_next_or_previous_handle(
&mut self,
handle: &WindowHandle
) -> Option<WindowHandle>
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>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
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>
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER>
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,
impl<C, SERVER> Manager<C, SERVER>where
C: Config,
SERVER: DisplayServer,
source§impl<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.
source§impl<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
.