Add RequestUserAttention to window::Action
This commit is contained in:
parent
54105a24e1
commit
d95b9bf244
4 changed files with 64 additions and 11 deletions
21
native/src/window/user_attention.rs
Normal file
21
native/src/window/user_attention.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/// The type of user attention to request.
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - **X11:** Sets the WM's `XUrgencyHint`. No distinction between [`Critical`] and [`Informational`].
|
||||
///
|
||||
/// [`Critical`]: Self::Critical
|
||||
/// [`Informational`]: Self::Informational
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum UserAttention {
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - **macOS:** Bounces the dock icon until the application is in focus.
|
||||
/// - **Windows:** Flashes both the window and the taskbar button until the application is in focus.
|
||||
Critical,
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - **macOS:** Bounces the dock icon once.
|
||||
/// - **Windows:** Flashes the taskbar button until the application is in focus.
|
||||
Informational,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue