#notifications #winapi #windows #win7 #windows7

win7-notifications

Send Windows 10 styled notifications on Windows 7

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

Download history 1118/week @ 2023-12-17 412/week @ 2023-12-24 729/week @ 2023-12-31 848/week @ 2024-01-07 1010/week @ 2024-01-14 764/week @ 2024-01-21 1100/week @ 2024-01-28 726/week @ 2024-02-04 1289/week @ 2024-02-11 1471/week @ 2024-02-18 944/week @ 2024-02-25 1375/week @ 2024-03-03 1012/week @ 2024-03-10 1114/week @ 2024-03-17 731/week @ 2024-03-24 620/week @ 2024-03-31

3,610 downloads per month
Used in 2 crates

Apache-2.0 OR MIT

32KB
620 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–21MB
~281K SLoC