Crate window_vibrancy
source · [−]Expand description
Make your windows vibrant.
Platform support:
- Windows: Yes!
- macOS: Yes!
- Linux: No, blur effect is controlled by the compositor installed on the user system and they can enable it for your app if they want.
Example with winit
let event_loop = EventLoop::new();
let window = WindowBuilder::new()
.with_decorations(false)
.build(&event_loop)
.unwrap();
#[cfg(target_os = "windows")]
apply_blur(&window, Some((18, 18, 18, 125))).unwrap();
#[cfg(target_os = "macos")]
apply_vibrancy(&window, NSVisualEffectMaterial::AppearanceBased).unwrap();
Enums
Functions
Applies Acrylic effect to you window. Works only on Windows 10 v1809 or newer and Windows 11
Applies blur effect to window. Works only on Windows 7, Windows 10 v1809 or newer and Windows 11.
Applies mica effect to window. Works only on Windows 11.
Applies macos vibrancy effect to window. Works only on macOS 10.10 or newer.
Clears acrylic effect applied to window. Works only on Windows 10 v1809 or newer and Windows 11.
Clears blur effect applied to window. Works only on Windows 7, Windows 10 v1809 or newer and Windows 11.
Clears mica effect applied to window. Works only on Windows 11.
Type Definitions
a tuple of RGBA colors. Each value has minimum of 0 and maximum of 255.