Documentation ¶
Overview ¶
Package sni implements the Freedesktop.org StatusNotifierItem specification.
Index ¶
- type Icon
- type Item
- func (sni *Item) Close() error
- func (sni *Item) SetAttentionIcon(icon Icon) error
- func (sni *Item) SetIcon(icon Icon) error
- func (sni *Item) SetOverlayIcon(icon Icon) error
- func (sni *Item) SetStatus(status string) error
- func (sni *Item) SetTitle(t string) error
- func (sni *Item) SetTooltip(tooltip Tooltip) error
- type ItemConfig
- type Pixmap
- type Tooltip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { // Caled when activation is requested for the item (e.g. clicked) Activate func(x, y int) // Called when secondary activation is requested for the item (e.g. middle-click) SecondaryActivate func(x, y int) // Called when a context menu is requested for the item (e.g. right-click) ContextMenu func(x, y int) // Called when scroll is requested for the item (e.g. scroll wheel) Scroll func(delta int, direction string) // contains filtered or unexported fields }
func NewItem ¶
func NewItem(conf ItemConfig) (*Item, error)
func (*Item) SetAttentionIcon ¶
func (*Item) SetOverlayIcon ¶
func (*Item) SetTooltip ¶
type ItemConfig ¶
type ItemConfig struct { Category string ID string Title string Status string Icon Icon OverlayIcon Icon AttentionIcon Icon Tooltip Tooltip }
See https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/StatusNotifierItem/ for details of tese fields
type Pixmap ¶
func ImagePixmap ¶
Click to show internal directories.
Click to hide internal directories.