Documentation ¶
Overview ¶
Package notify provides cross-platform notifications for Gio applications.
https://gioui.org
Sending a notification is easy:
notifier, _ := NewNotifier() notification, _ := notifier.CreateNotification("hello!", "I was sent from Gio!") notification.Cancel()
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IconNotifier ¶
IconNotifier is a notifier that can display an icon notification.
type Notification ¶
type Notification interface { // Cancel a notification. Cancel() error }
Notification handle that can used to manipulate a platform notification, such as by cancelling it.
type Notifier ¶
type Notifier interface {
CreateNotification(title, text string) (Notification, error)
}
Notifier provides methods for creating and managing notifications.
func NewNotifier ¶
NewNotifier creates a new Manager tailored to the current operating system.
type OngoingNotifier ¶
type OngoingNotifier interface { Notifier // CreateOngoingNotification creates a notification that cannot be dismissed // by the user. Callers must be careful to cancel this notification when it // is no longer needed. CreateOngoingNotification(title, text string) (Notification, error) }
OngoingNotifier is a notifier that can display an ongoing notification. Some platforms (currently Android) support persistent notifications and will implement this optional interface.
Click to show internal directories.
Click to hide internal directories.