Crate window_vibrancy

Source
Expand description

Make your windows vibrant.

§Platform-specific

  • Linux: Unsupported, Blur and any vibrancy effects are controlled by the compositor installed on the end-user system.

§Example

use window_vibrancy::{apply_vibrancy, apply_blur, NSVisualEffectMaterial};

#[cfg(target_os = "macos")]
apply_vibrancy(&window, NSVisualEffectMaterial::AppearanceBased, None, None).expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS");

#[cfg(target_os = "windows")]
apply_blur(&window, Some((18, 18, 18, 125))).expect("Unsupported platform! 'apply_blur' is only supported on Windows");

Structs§

NSVisualEffectViewTagged
A custom NSVisualEffectView subclass that overrides the tag method to provide a custom tag, to later identify the view

Enums§

Error
NSVisualEffectMaterial
https://developer.apple.com/documentation/appkit/nsvisualeffectview/material
NSVisualEffectState
https://developer.apple.com/documentation/appkit/nsvisualeffectview/state

Functions§

apply_acrylic
Applies acrylic effect to window. Works only on Windows 10 v1809 or newer.
apply_blur
Applies blur effect to window. Works only on Windows 7, Windows 10 v1809 or newer.
apply_mica
Applies mica effect to window. Works only on Windows 11.
apply_tabbed
Applies mica tabbed effect to window. Works only on Windows 11.
apply_vibrancy
Applies macos vibrancy effect to window. Works only on macOS 10.10 or newer.
clear_acrylic
Clears acrylic effect applied to window. Works only on Windows 10 v1809 or newer.
clear_blur
Clears blur effect applied to window. Works only on Windows 7, Windows 10 v1809 or newer.
clear_mica
Clears mica effect applied to window. Works only on Windows 11.
clear_tabbed
Clears mica tabbed effect applied to window. Works only on Windows 11.
clear_vibrancy
Clears vibrancy effect applied to window. Works only on macOS 10.10 or newer.

Type Aliases§

Color
a tuple of RGBA colors. Each value has minimum of 0 and maximum of 255.