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§
Sourcefn window_open_animation(
&mut self,
_data: &AnimationFrameData,
) -> Option<AnimationFrameResult>
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.
Sourcefn window_close_animation(
&mut self,
_data: &AnimationFrameData,
) -> Option<AnimationFrameResult>
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.
Sourcefn window_move_animation(
&mut self,
_data: &AnimationFrameData,
) -> Option<AnimationFrameResult>
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.
Sourcefn workspace_switch_animation(
&mut self,
_data: &AnimationFrameData,
) -> Option<AnimationFrameResult>
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.
Sourcefn place_new_window(&mut self, _info: &WindowInfo) -> Option<Placement>
fn place_new_window(&mut self, _info: &WindowInfo) -> Option<Placement>
Place a new window.
Sourcefn window_deleted(&mut self, _info: &WindowInfo)
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).
Sourcefn window_focused(&mut self, _info: &WindowInfo)
fn window_focused(&mut self, _info: &WindowInfo)
Called when a window gains focus.
Sourcefn window_unfocused(&mut self, _info: &WindowInfo)
fn window_unfocused(&mut self, _info: &WindowInfo)
Called when a window loses focus.
Sourcefn workspace_created(&mut self, _workspace: &Workspace)
fn workspace_created(&mut self, _workspace: &Workspace)
Called when a workspace is created.
Sourcefn workspace_removed(&mut self, _workspace: &Workspace)
fn workspace_removed(&mut self, _workspace: &Workspace)
Called when a workspace is removed.
Sourcefn workspace_focused(&mut self, _previous_id: Option<u64>, _current: &Workspace)
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.
Sourcefn workspace_area_changed(&mut self, _workspace: &Workspace)
fn workspace_area_changed(&mut self, _workspace: &Workspace)
Called when a workspace’s area (geometry) changes.
Sourcefn window_workspace_changed(
&mut self,
_info: &WindowInfo,
_workspace: &Workspace,
)
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.
Sourcefn handle_keyboard_input(&mut self, _event: KeyboardEvent) -> bool
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.
Sourcefn handle_pointer_event(&mut self, _event: PointerEvent) -> bool
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.