Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin {
Show 15 methods // Provided methods fn window_open_animation( &mut self, _data: &AnimationFrameData, ) -> Option<AnimationFrameResult> { ... } fn window_close_animation( &mut self, _data: &AnimationFrameData, ) -> Option<AnimationFrameResult> { ... } fn window_move_animation( &mut self, _data: &AnimationFrameData, ) -> Option<AnimationFrameResult> { ... } fn workspace_switch_animation( &mut self, _data: &AnimationFrameData, ) -> Option<AnimationFrameResult> { ... } fn place_new_window(&mut self, _info: &WindowInfo) -> Option<Placement> { ... } fn window_deleted(&mut self, _info: &WindowInfo) { ... } fn window_focused(&mut self, _info: &WindowInfo) { ... } fn window_unfocused(&mut self, _info: &WindowInfo) { ... } fn workspace_created(&mut self, _workspace: &Workspace) { ... } fn workspace_removed(&mut self, _workspace: &Workspace) { ... } fn workspace_focused( &mut self, _previous_id: Option<u64>, _current: &Workspace, ) { ... } fn workspace_area_changed(&mut self, _workspace: &Workspace) { ... } fn window_workspace_changed( &mut self, _info: &WindowInfo, _workspace: &Workspace, ) { ... } fn handle_keyboard_input(&mut self, _event: KeyboardEvent) -> bool { ... } fn handle_pointer_event(&mut self, _event: PointerEvent) -> bool { ... }
}

Provided Methods§

Source

fn window_open_animation( &mut self, _data: &AnimationFrameData, ) -> Option<AnimationFrameResult>

Handles the window opening animation.

If None is returned, the animation is not handled by this plugin.

Source

fn window_close_animation( &mut self, _data: &AnimationFrameData, ) -> Option<AnimationFrameResult>

Handles the window closing animation.

If None is returned, the animation is not handled by this plugin.

Source

fn window_move_animation( &mut self, _data: &AnimationFrameData, ) -> Option<AnimationFrameResult>

Handles the window movement animation.

If None is returned, the animation is not handled by this plugin.

Source

fn workspace_switch_animation( &mut self, _data: &AnimationFrameData, ) -> Option<AnimationFrameResult>

Handles the workspace switching animation.

If None is returned, the animation is not handled by this plugin.

Source

fn place_new_window(&mut self, _info: &WindowInfo) -> Option<Placement>

Place a new window.

Source

fn window_deleted(&mut self, _info: &WindowInfo)

Called when a window is about to be deleted.

The window info is still valid at this point (the window has not yet been removed from the compositor).

Source

fn window_focused(&mut self, _info: &WindowInfo)

Called when a window gains focus.

Source

fn window_unfocused(&mut self, _info: &WindowInfo)

Called when a window loses focus.

Source

fn workspace_created(&mut self, _workspace: &Workspace)

Called when a workspace is created.

Source

fn workspace_removed(&mut self, _workspace: &Workspace)

Called when a workspace is removed.

Source

fn workspace_focused(&mut self, _previous_id: Option<u64>, _current: &Workspace)

Called when a workspace gains focus.

previous_id is the internal ID of the previously focused workspace, if any.

Source

fn workspace_area_changed(&mut self, _workspace: &Workspace)

Called when a workspace’s area (geometry) changes.

Source

fn window_workspace_changed( &mut self, _info: &WindowInfo, _workspace: &Workspace, )

Called when a window’s workspace has changed.

This fires whenever a window is moved to a different workspace, whether initiated by the user, a command, or a plugin.

Source

fn handle_keyboard_input(&mut self, _event: KeyboardEvent) -> bool

Handle a keyboard event.

If the plugin returns false, the event is propagated to the next handler in Miracle. If the plugin returns true, then the event is consumed by the plugin.

Source

fn handle_pointer_event(&mut self, _event: PointerEvent) -> bool

Handle a pointer event.

If the plugin returns false, the event is propagated to the next handler in Miracle. If the plugin returns true, then the event is consumed by the plugin.

Implementors§