notify

package module
Version: v0.0.0-...-1f9c015 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2013 License: MIT Imports: 3 Imported by: 0

README

This is a fork of https://github.com/lenormf/go-notify go-notify with some minor corrections.

Install : 

 # install libnotify devel librairies,
 sudo apt-get install libnotify-dev # debian style
 
 # installing go-notify
 go get github.com/mqu/go-notify

C Dependencies: libnotify (sudo apt-get install libnotify-dev)

GO Dependencies: github.com/mattn/go-gtk/glib

This package provides GO bindings for the C library libnotify.
Although this package provides full retro-compatibility with the regular C
library, it also provides OOP-like functions for the NotifyNotification object.

The notify package depends on mattn's glib wrapper for the GO language.

See example for usage.

Documentation

Index

Constants

View Source
const (
	NOTIFY_URGENCY_LOW      = 0
	NOTIFY_URGENCY_NORMAL   = 1
	NOTIFY_URGENCY_CRITICAL = 2
)

Variables

This section is empty.

Functions

func GetAppName

func GetAppName() string

func GetServerCaps

func GetServerCaps() *glib.List

func GetServerInfo

func GetServerInfo(name, vendor, version, spec_version *string) bool

func Init

func Init(app_name string) bool
* Exported Functions

Pure Functions

func IsInitted

func IsInitted() bool

func NotificationAddAction

func NotificationAddAction(notif *NotifyNotification, action, label string, callback NotifyActionCallback, user_data interface{})

FIXME: the C function is supposed to be allowing the user to pass another function than free

func NotificationClearActions

func NotificationClearActions(notif *NotifyNotification)

func NotificationClearHints

func NotificationClearHints(notif *NotifyNotification)

func NotificationClose

func NotificationClose(notif *NotifyNotification) *glib.Error

func NotificationSetCategory

func NotificationSetCategory(notif *NotifyNotification, category string)

func NotificationSetHint

func NotificationSetHint(notif *NotifyNotification, key string, value interface{})

func NotificationSetHintByte

func NotificationSetHintByte(notif *NotifyNotification, key string, value byte)

func NotificationSetHintByteArray

func NotificationSetHintByteArray(notif *NotifyNotification, key string, value []byte, len uint32)

FIXME: implement

func NotificationSetHintDouble

func NotificationSetHintDouble(notif *NotifyNotification, key string, value float64)

func NotificationSetHintInt32

func NotificationSetHintInt32(notif *NotifyNotification, key string, value int32)

func NotificationSetHintString

func NotificationSetHintString(notif *NotifyNotification, key string, value string)

func NotificationSetTimeout

func NotificationSetTimeout(notif *NotifyNotification, timeout int32)

func NotificationSetUrgency

func NotificationSetUrgency(notif *NotifyNotification, urgency NotifyUrgency)

func NotificationShow

func NotificationShow(notif *NotifyNotification) *glib.Error

func NotificationUpdate

func NotificationUpdate(notif *NotifyNotification, summary, body, icon string) bool

func UnInit

func UnInit()

Types

type NotifyActionCallback

type NotifyActionCallback func(*NotifyNotification, string, interface{})

type NotifyNotification

type NotifyNotification struct {
	// contains filtered or unexported fields
}

* Exported Types

func NotificationNew

func NotificationNew(title, text, image string) *NotifyNotification

func (*NotifyNotification) AddAction

func (this *NotifyNotification) AddAction(action, label string, callback NotifyActionCallback, user_data interface{})

func (*NotifyNotification) ClearActions

func (this *NotifyNotification) ClearActions()

func (*NotifyNotification) ClearHints

func (this *NotifyNotification) ClearHints()

func (*NotifyNotification) Close

func (this *NotifyNotification) Close() *glib.Error

func (*NotifyNotification) SetCategory

func (this *NotifyNotification) SetCategory(category string)

func (*NotifyNotification) SetHint

func (this *NotifyNotification) SetHint(key string, value interface{})

func (*NotifyNotification) SetHintByte

func (this *NotifyNotification) SetHintByte(key string, value byte)

func (*NotifyNotification) SetHintByteArray

func (this *NotifyNotification) SetHintByteArray(key string, value []byte, len uint32)

func (*NotifyNotification) SetHintDouble

func (this *NotifyNotification) SetHintDouble(key string, value float64)

func (*NotifyNotification) SetHintInt32

func (this *NotifyNotification) SetHintInt32(key string, value int32)

func (*NotifyNotification) SetHintString

func (this *NotifyNotification) SetHintString(key string, value string)

func (*NotifyNotification) SetTimeout

func (this *NotifyNotification) SetTimeout(timeout int32)

func (*NotifyNotification) SetUrgency

func (this *NotifyNotification) SetUrgency(urgency NotifyUrgency)

func (*NotifyNotification) Show

func (this *NotifyNotification) Show() *glib.Error

func (*NotifyNotification) Update

func (this *NotifyNotification) Update(summary, body, icon string) bool

Member Functions

type NotifyUrgency

type NotifyUrgency int

Source Files

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL