Documentation ¶
Index ¶
- Constants
- type Disposition
- type Item
- func (i *Item) Build() ItemTree
- func (i *Item) CanBeActivated(b bool) *Item
- func (i *Item) Disposition(d Disposition) *Item
- func (i *Item) IconData(data []byte) *Item
- func (i *Item) IconName(iconName string) *Item
- func (i *Item) Label(label string) *Item
- func (i *Item) OnClick(fn func()) *Item
- func (i *Item) Separator(b bool) *Item
- func (i *Item) Shortcut(shortcut [][]string) *Item
- func (i *Item) Submenu(children ...*Item) *Item
- func (i *Item) ToggleState(onoff bool) *Item
- func (i *Item) ToggleType(tt ToggleType) *Item
- func (i *Item) Visible(b bool) *Item
- type ItemTree
- type Layout
- type MenuServer
- func (m *MenuServer) AboutToShow(id int32) (needUpdate bool, err *dbus.Error)
- func (m *MenuServer) AboutToShowGroup(ids []int32) (updatesNeeded, idErrors []int32, err *dbus.Error)
- func (m *MenuServer) Event(id int32, eventId string, data dbus.Variant, timestamp uint32) (err *dbus.Error)
- func (m *MenuServer) EventGroup(events []struct{ ... }) (idErrors []int32, err *dbus.Error)
- func (m *MenuServer) GetGroupProperties(ids []int32, propertyNames []string) (properties []struct{ ... }, err *dbus.Error)
- func (m *MenuServer) GetLayout(parentId int32, recursionDepth int32, propertyNames []string) (revision uint32, layout Layout, err *dbus.Error)
- func (m *MenuServer) GetProperty(id int32, name string) (value dbus.Variant, err *dbus.Error)
- type ToggleType
Constants ¶
View Source
const ( ToggleTypeCheckmark ToggleType = "checkmark" ToggleTypeRadio ToggleType = "radio" DispositionNormal Disposition = "normal" DispositionInformative Disposition = "informative" DispositionWarning Disposition = "warning" DispositionAlert Disposition = "alert" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Disposition ¶
type Disposition string
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func (*Item) CanBeActivated ¶
func (*Item) Disposition ¶
func (i *Item) Disposition(d Disposition) *Item
func (*Item) ToggleState ¶
func (*Item) ToggleType ¶
func (i *Item) ToggleType(tt ToggleType) *Item
type MenuServer ¶
type MenuServer struct { // contains filtered or unexported fields }
func NewMenuServer ¶
func NewMenuServer(tree ItemTree) *MenuServer
func (*MenuServer) AboutToShow ¶
func (m *MenuServer) AboutToShow(id int32) (needUpdate bool, err *dbus.Error)
AboutToShow is com.canonical.dbusmenu.AboutToShow method.
func (*MenuServer) AboutToShowGroup ¶
func (m *MenuServer) AboutToShowGroup(ids []int32) (updatesNeeded, idErrors []int32, err *dbus.Error)
AboutToShowGroup is com.canonical.dbusmenu.AboutToShowGroup method.
func (*MenuServer) Event ¶
func (m *MenuServer) Event(id int32, eventId string, data dbus.Variant, timestamp uint32) (err *dbus.Error)
Event is com.canonical.dbusmenu.Event method.
func (*MenuServer) EventGroup ¶
func (m *MenuServer) EventGroup(events []struct { V0 int32 V1 string V2 dbus.Variant V3 uint32 }, ) (idErrors []int32, err *dbus.Error)
EventGroup is com.canonical.dbusmenu.EventGroup method.
func (*MenuServer) GetGroupProperties ¶
func (m *MenuServer) GetGroupProperties(ids []int32, propertyNames []string) (properties []struct { V0 int32 V1 map[string]dbus.Variant }, err *dbus.Error, )
GetGroupProperties is com.canonical.dbusmenu.GetGroupProperties method.
func (*MenuServer) GetProperty ¶
func (m *MenuServer) GetProperty(id int32, name string) (value dbus.Variant, err *dbus.Error)
GetProperty is com.canonical.dbusmenu.GetProperty method.
type ToggleType ¶
type ToggleType string
Click to show internal directories.
Click to hide internal directories.