go-toast

Send toast notifications in Windows
Log | Files | Refs | README | LICENSE

commit c6470b0dcd8fc78f92a0eff60019044674fe110b
parent a5c9562d1d217b76d18bfb0608dc4a4b64af88ef
Author: Jack Mordaunt <jackmordaunt@gmail.com>
Date:   Fri, 17 Mar 2023 16:52:15 +0800

toast: document ActivationType

Signed-off-by: Jack Mordaunt <jackmordaunt@gmail.com>

Diffstat:
Mconstants.go | 7++++++-
Mtoast.go | 2+-
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/constants.go b/constants.go @@ -49,10 +49,15 @@ const ( // ActivationType identifies the method that Windows Runtime will use to handle // notification interactions. +// +// See https://learn.microsoft.com/en-us/dotnet/api/microsoft.toolkit.uwp.notifications.toastactivationtype type ActivationType = string const ( - Protocol ActivationType = "protocol" + // Protocol is for launching third-party applications using a protocol uri, like https or mailto. + Protocol ActivationType = "protocol" + // Foreground is for launching your foreground application. Foreground ActivationType = "foreground" + // Background is for performing a background task. Background ActivationType = "background" ) diff --git a/toast.go b/toast.go @@ -125,7 +125,7 @@ type InputSelection struct { // Defines an actionable button. // See https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-and-notifications-adaptive-interactive-toasts for more info. // -// toast.Action{"protocol", "Open Maps", "bingmaps:?q=sushi"} +// toast.Action{toast.Protocol, "Open Maps", "bingmaps:?q=sushi"} // // TODO(jfm): we can likely support an activation callback directly in the Action. type Action struct {