#notifications

win7-notifications

Send Windows 10 styled notifications on Windows 7

13 releases

0.4.5 Aug 15, 2024
0.4.4 Jul 4, 2024
0.4.3 Nov 16, 2023
0.4.0 Jun 20, 2023
0.2.3 Oct 31, 2021

#275 in GUI

Download history 483/week @ 2024-07-18 1658/week @ 2024-07-25 2350/week @ 2024-08-01 3355/week @ 2024-08-08 2321/week @ 2024-08-15 1592/week @ 2024-08-22 1979/week @ 2024-08-29 1904/week @ 2024-09-05 1339/week @ 2024-09-12 1248/week @ 2024-09-19 1874/week @ 2024-09-26 1296/week @ 2024-10-03 996/week @ 2024-10-10 1361/week @ 2024-10-17 915/week @ 2024-10-24 1024/week @ 2024-10-31

4,425 downloads per month
Used in tauri-plugin-notification

Apache-2.0 OR MIT

33KB
525 lines

win7-notifications

Chat Server

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–19MB
~245K SLoC