Documentation ¶
Overview ¶
Package wintoast provides a pure-Go implementation of toast notifications on Windows.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PowershellFallback ¶
func PowershellFallback(opt *options)
PowershellFallback specifies to use the powershell method as a fallback if the COM api fails.
func PreferPowershell ¶
func PreferPowershell(opt *options)
PreferPowershell indicates to use the powershell method by default. COM will not be used.
func Push ¶
Push a notification described by the XML to the Windows Runtime.
App data should be set first via a call to SetAppData before calling this function.
If the powershell fallback is engaged, activation callbacks will not work as expected and the COM error will still be returned.
func SetActivationCallback ¶
func SetActivationCallback(cb Callback)
SetActivationCallback establishes the callback `cb` to be invoked when the toast notification is activated. This callback instance should handle being activated from any available toast notification.
func SetAppData ¶
SetAppData teaches the Windows Runtime about our application and establishes the activation GUID so Windows will know how to invoke us back.
Types ¶
type AppData ¶
type AppData struct { AppID string GUID string ActivationExe string // optional IconPath string // optional IconBackgroundColor string // optional }
AppData describes the application to the Windows Runtime. See toast.Notification for more thorough documentation off these fields.