libnotify

package
v0.0.0-...-6238108 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2020 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NOTIFY_EXPIRES_DEFAULT = -1
	NOTIFY_EXPIRES_NEVER   = 0
)

Default timeouts

Variables

This section is empty.

Functions

func GetAppName

func GetAppName() string

GetAppName is a wrapper around notify_get_app_name().

func Init

func Init(appName string) error

Init is a wrapper around notify_init() and must be called before any other Libnotify calls and is used to initialize everything necessary.

func IsInitted

func IsInitted() bool

IsInitted is a wrapper around notify_is_initted().

func SetAppName

func SetAppName(appName string)

SetAppName is a wrapper around notify_set_app_name().

func Uninit

func Uninit()

Uninit is a wrapper around notify_uninit().

Types

type NotifyNotification

type NotifyNotification struct {
	*glib.Object
}

NotifyNotification is a representation of NotifyNotification.

func NotifyNotificationNew

func NotifyNotificationNew(summary, body, icon string) (*NotifyNotification, error)

NotifyNotificationNew is a wrapper around notify_notification_new().

func (*NotifyNotification) Close

func (v *NotifyNotification) Close() error

Close is a wrapper around notify_notification_close().

func (*NotifyNotification) SetAppName

func (v *NotifyNotification) SetAppName(appName string)

SetAppName is a wrapper around notify_notification_set_app_name().

func (*NotifyNotification) SetCategory

func (v *NotifyNotification) SetCategory(category string)

SetCategory is a wrapper around notify_notification_set_category().

func (*NotifyNotification) SetImageFromPixbuf

func (v *NotifyNotification) SetImageFromPixbuf(pixbuf *gdk.Pixbuf)

SetImageFromPixbuf is a wrapper around notify_notification_set_image_from_pixbuf().

func (*NotifyNotification) SetTimeout

func (v *NotifyNotification) SetTimeout(timeout int)

SetTimeout is a wrapper around notify_notification_set_timeout(). You can use NOTIFY_EXPIRES_DEFAULT or NOTIFY_EXPIRES_NEVER, either specific specific timeout amount in milliseconds.

func (*NotifyNotification) SetUrgency

func (v *NotifyNotification) SetUrgency(urgency NotifyUrgency)

SetUrgency is a wrapper around notify_notification_set_urgency().

func (*NotifyNotification) Show

func (v *NotifyNotification) Show() error

Show is a wrapper around notify_notification_show().

func (*NotifyNotification) Update

func (v *NotifyNotification) Update(summary, body, icon string) error

Update is a wrapper around notify_notification_update().

type NotifyUrgency

type NotifyUrgency int

NotifyUrgency is a representation of Libnotify's NotifyUrgency.

const (
	NOTIFY_URGENCY_LOW      NotifyUrgency = C.NOTIFY_URGENCY_LOW
	NOTIFY_URGENCY_NORMAL   NotifyUrgency = C.NOTIFY_URGENCY_NORMAL
	NOTIFY_URGENCY_CRITICAL NotifyUrgency = C.NOTIFY_URGENCY_CRITICAL
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL