Struct dioxus_mobile::wry::application::global_shortcut::ShortcutManager [−]
pub struct ShortcutManager { /* fields omitted */ }
Expand description
Object that allows you to manage a GlobalShortcut
.
Implementations
impl ShortcutManager
impl ShortcutManager
pub fn new<T>(event_loop: &EventLoopWindowTarget<T>) -> ShortcutManager where
T: 'static,
pub fn new<T>(event_loop: &EventLoopWindowTarget<T>) -> ShortcutManager where
T: 'static,
Creates a new shortcut manager instance connected to the event loop.
pub fn is_registered(&self, accelerator: &Accelerator) -> bool
pub fn is_registered(&self, accelerator: &Accelerator) -> bool
Whether the application has registered this Accelerator
.
pub fn register(
&mut self,
accelerator: Accelerator
) -> Result<GlobalShortcut, ShortcutManagerError>
pub fn register(
&mut self,
accelerator: Accelerator
) -> Result<GlobalShortcut, ShortcutManagerError>
Register a global shortcut of Accelerator
who trigger GlobalShortcutEvent
in the event loop.
pub fn unregister_all(&mut self) -> Result<(), ShortcutManagerError>
pub fn unregister_all(&mut self) -> Result<(), ShortcutManagerError>
Unregister all Accelerator
registered by the manager instance.
pub fn unregister(
&mut self,
global_shortcut: GlobalShortcut
) -> Result<(), ShortcutManagerError>
pub fn unregister(
&mut self,
global_shortcut: GlobalShortcut
) -> Result<(), ShortcutManagerError>
Unregister the provided Accelerator
.