#notifications #windows #winapi #win7 #windows7

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

#281 in GUI

Download history 1914/week @ 2024-08-18 1563/week @ 2024-08-25 2486/week @ 2024-09-01 1182/week @ 2024-09-08 1235/week @ 2024-09-15 1891/week @ 2024-09-22 1501/week @ 2024-09-29 1008/week @ 2024-10-06 1169/week @ 2024-10-13 1387/week @ 2024-10-20 845/week @ 2024-10-27 1270/week @ 2024-11-03 1847/week @ 2024-11-10 1713/week @ 2024-11-17 885/week @ 2024-11-24 1334/week @ 2024-12-01

6,069 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

~10–18MB
~224K SLoC