Documentation ¶
Index ¶
- Constants
- type Category
- type Indicator
- func (indicator *Indicator) BuildMenuFromDesktop(desktopFile, desktopProfile string)
- func (indicator *Indicator) GetAttentionIcon() string
- func (indicator *Indicator) GetAttentionIconDesc() string
- func (indicator *Indicator) GetCategory() Category
- func (indicator *Indicator) GetIcon() string
- func (indicator *Indicator) GetIconDesc() string
- func (indicator *Indicator) GetIconThemePath() string
- func (indicator *Indicator) GetId() string
- func (indicator *Indicator) GetLabel() string
- func (indicator *Indicator) GetLabelGuide() string
- func (indicator *Indicator) GetMenu() *gtk.Menu
- func (indicator *Indicator) GetOrderingIndex() uint
- func (indicator *Indicator) GetSecondaryActivateTarget() *gtk.MenuItem
- func (indicator *Indicator) GetStatus() Status
- func (indicator *Indicator) GetTitle() string
- func (indicator *Indicator) Object() *glib.Object
- func (indicator *Indicator) SetAttentionIcon(iconName string)
- func (indicator *Indicator) SetAttentionIconFull(iconName, iconDesc string)
- func (indicator *Indicator) SetIcon(iconName string)
- func (indicator *Indicator) SetIconFull(iconName, iconDesc string)
- func (indicator *Indicator) SetIconThemePath(iconThemePath string)
- func (indicator *Indicator) SetLabel(label, guide string)
- func (indicator *Indicator) SetMenu(menu *gtk.Menu)
- func (indicator *Indicator) SetOrderingIndex(orderingIndex uint)
- func (indicator *Indicator) SetSecondaryActivateTarget(menuItem *gtk.MenuItem)
- func (indicator *Indicator) SetStatus(status Status)
- func (indicator *Indicator) SetTitle(title string)
- type Status
Constants ¶
const ( // SignalNewIcon defines that indicator has new icon. SignalNewIcon = C.APP_INDICATOR_SIGNAL_NEW_ICON // SignalNewAttentionIcon defines that indicator has new attention icon. SignalNewAttentionIcon = C.APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON // SignalNewStatus defines that indicator has new status. SignalNewStatus = C.APP_INDICATOR_SIGNAL_NEW_STATUS // SignalNewLabel defines that indicator has new label. SignalNewLabel = C.APP_INDICATOR_SIGNAL_NEW_LABEL // SignalConnectionChanged defines that indicator's connection has changed. SignalConnectionChanged = C.APP_INDICATOR_SIGNAL_CONNECTION_CHANGED // SignalNewIconThemePath defines that indicator has new icon theme path. SignalNewIconThemePath = C.APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH // SignalScrollEvent defines that user scrolled on indicator. SignalScrollEvent = C.APP_INDICATOR_SIGNAL_SCROLL_EVENT )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category int
Category represents a category of indicator.
const ( // CategoryApplicationStatus defines that indicator's category is // an application status. CategoryApplicationStatus Category = C.APP_INDICATOR_CATEGORY_APPLICATION_STATUS // CategoryCommunications defines that indicator's category is // communications. CategoryCommunications Category = C.APP_INDICATOR_CATEGORY_COMMUNICATIONS // CategorySystemServices defines that indicator's category is // system services. CategorySystemServices Category = C.APP_INDICATOR_CATEGORY_SYSTEM_SERVICES // CategoryHardware defines that indicator's category is // hardware. CategoryHardware Category = C.APP_INDICATOR_CATEGORY_HARDWARE // CategoryOther defines that indicator's category is // something else. CategoryOther Category = C.APP_INDICATOR_CATEGORY_OTHER )
type Indicator ¶
type Indicator struct {
// contains filtered or unexported fields
}
Indicator represents a single indicator object.
It holds only a pointer to C counterpart.
func NewWithPath ¶
NewWithPath creates a fresh indicator with custom icon theme path.
func (*Indicator) BuildMenuFromDesktop ¶
BuildMenuFromDesktop builds whole menu with items from desktop file.
To be honest I don't know how it works.
func (*Indicator) GetAttentionIcon ¶
GetAttentionIcon returns current attention icon of indicator.
func (*Indicator) GetAttentionIconDesc ¶
GetAttentionIconDesc returns current attention icon description of indicator.
func (*Indicator) GetCategory ¶
GetCategory returns the category of indicator specified in New() or NewWithPath().
func (*Indicator) GetIconDesc ¶
GetIconDesc returns current icon description of indicator.
func (*Indicator) GetIconThemePath ¶
GetIconThemePath returns current icon theme path of indicator.
func (*Indicator) GetLabelGuide ¶
GetLabelGuide returns current label guide of indicator.
func (*Indicator) GetOrderingIndex ¶
GetOrderingIndex returns current ordering index of indicator.
func (*Indicator) GetSecondaryActivateTarget ¶
GetSecondaryActivateTarget returns pointer to gtk.MenuItem which connected callback is activated when middle clicked indicator.
func (*Indicator) Object ¶
Object returns a pointer to glib.Object of indicator.
Useful for connecting signals to indicator for example.
func (*Indicator) SetAttentionIcon ¶
SetAttentionIcon sets attention icon of indicator.
func (*Indicator) SetAttentionIconFull ¶
SetAttentionIconFull sets attention icon of indicator with description.
func (*Indicator) SetIconFull ¶
SetIconFull sets icon of indicator with description.
func (*Indicator) SetIconThemePath ¶
SetIconThemePath sets icon theme path of indicator.
func (*Indicator) SetLabel ¶
SetLabel sets label of indicator.
Second parameter "guide" is used to set maximum width for label. Don't know if it works. Feel free to pass empty string.
func (*Indicator) SetMenu ¶
SetMenu sets gtk.Menu for indicator.
Note that this is mandatory for indicator to show and work properly.
func (*Indicator) SetOrderingIndex ¶
SetOrderingIndex sets ordering index of indicator.
It may or may not work.
func (*Indicator) SetSecondaryActivateTarget ¶
SetSecondaryActivateTarget sets which menu item's callback will be activated when middle clicked indicator.
type Status ¶
type Status int
Status represents status of indicator.
const ( // StatusActive defines that indicator is active. StatusActive Status = C.APP_INDICATOR_STATUS_ACTIVE // StatusPassive defines that indicator is not active. StatusPassive Status = C.APP_INDICATOR_STATUS_PASSIVE // StatusAttention defines that indicator wants a bag of attention. StatusAttention Status = C.APP_INDICATOR_STATUS_ATTENTION )