11 releases
0.4.3 | Nov 16, 2023 |
---|---|
0.4.2 | Oct 19, 2023 |
0.4.1 | Sep 29, 2023 |
0.4.0 | Jun 20, 2023 |
0.0.0 | Oct 4, 2021 |
#194 in GUI
3,610 downloads per month
Used in 2 crates
32KB
620 lines
win7-notifications
Send Windows 10 styled notifications on Windows 7.
Note:
This crate requires a win32 event loop to be running on the thread, otherwise the notification will close immediately, check examples/single.rs which uses winit or just roll your own win32 event loop.
TODO:
- Move old notifications above new ones.
- Sounds
- Shadows
- Change close button color when mouse hovers.
- Callbacks for when close button or body of notification is clicked.
- Account for taskbar size and position
- Animations
lib.rs
:
Send Windows 10 styled notifications on Windows 7.
Note:
This crate requires a win32 event loop to be running on the thread, otherwise the notification will close immediately, it is recommended to use it with other win32 event loop crates like winit or just use your own win32 event loop.
Examples
Example 1: Simple Notification
Notification::new()
.appname("App name")
.summary("Critical Error")
.body("Just kidding, this is just the notification example.")
.icon(icon.to_vec(), 32, 32)
.timeout(Timeout::Default) // 5000 milliseconds
.show().unwrap();
Example 2: Presistent Notification
Notification::new()
.appname("App name")
.summary("Critical Error")
.body("Just kidding, this is just the notification example.")
.icon(icon.to_vec(), 32, 32)
.timeout(Timeout::Never)
.show().unwrap();
Dependencies
~12–21MB
~281K SLoC