Toasters#
Classes#
Invariant |
|
Wrapper to simplify WinRT's ToastNotificationManager |
|
Basic toaster, used to display toasts without actions and/or inputs. |
|
|
Data#
- windows_toasts.toasters.ToastNotificationT = TypeVar(ToastNotificationT, ToastNotification, ScheduledToastNotification)#
Type:
TypeVar
Invariant
TypeVar
constrained towinrt.windows.ui.notifications.ToastNotification
andwinrt.windows.ui.notifications.ScheduledToastNotification
.
API#
- class windows_toasts.toasters.BaseWindowsToaster(applicationText: str)[source]#
Wrapper to simplify WinRT’s ToastNotificationManager
- Parameters:
applicationText – Text to display the application as
- notifierAUMID: str | None#
- toastNotifier: winrt.windows.ui.notifications.ToastNotifier#
- applicationText: str#
- show_toast(toast: Toast) None [source]#
Displays the specified toast notification. If toast has already been shown, it will pop up again, but make no new sections in the action center
- Parameters:
toast – Toast to display
- update_toast(toast: Toast) bool [source]#
Update the passed notification data with the new data in the clas
- Parameters:
toast (Toast) – Toast to update
- Returns:
Whether the update succeeded
- schedule_toast(toast: Toast, displayTime: datetime) None [source]#
Schedule the passed notification toast. Warning: scheduled toasts cannot be updated or activated (i.e. on_X)
- Parameters:
toast (Toast) – Toast to display
displayTime (datetime) – Time to display the toast on
- class windows_toasts.toasters.WindowsToaster(applicationText: str)[source]#
Basic toaster, used to display toasts without actions and/or inputs. If you need to use them, see
InteractableWindowsToaster
- Parameters:
applicationText – Text to display the application as
- class windows_toasts.toasters.InteractableWindowsToaster(applicationText: str, notifierAUMID: str | None = None)[source]#
WindowsToaster
, but uses a AUMID to support actions. Actions require a recognised AUMID to trigger on_activated, otherwise it triggers on_dismissed with no arguments- Parameters:
applicationText – Text to display the application as
notifierAUMID – AUMID to use. Defaults to Command Prompt. To use a custom AUMID, see one of the scripts