Documentation ¶
Overview ¶
Package mgrgldi manages go applets as internal applets.
Index ¶
- type AppManager
- func (o *AppManager) BuildMenu(m *backendmenu.DockMenu) bool
- func (o *AppManager) CountActive() int
- func (o *AppManager) GetApplets(name string) (list []cdtype.AppInstance)
- func (o *AppManager) OnChangeFocus(win cdglobal.Window) bool
- func (o *AppManager) OnDropData(icon gldi.Icon, container *gldi.Container, data string, order float64) bool
- func (o *AppManager) OnLeftClick(icon gldi.Icon, container *gldi.Container, btnState uint) bool
- func (o *AppManager) OnMiddleClick(icon gldi.Icon, container *gldi.Container) bool
- func (o *AppManager) OnMouseScroll(icon gldi.Icon, container *gldi.Container, scrollUp bool) bool
- func (o *AppManager) StartLoop()
- func (o *AppManager) StopLoop()
- func (o *AppManager) Tick()
- type MenuerLike
- func (m *MenuerLike) AddCheckEntry(label string, active bool, call interface{}, userData ...interface{}) cdtype.MenuWidgeter
- func (m *MenuerLike) AddEntry(label, iconPath string, call interface{}, userData ...interface{}) cdtype.MenuWidgeter
- func (m *MenuerLike) AddRadioEntry(label string, active bool, group int, call interface{}, ...) cdtype.MenuWidgeter
- func (m *MenuerLike) AddSubMenu(label, iconPath string) cdtype.Menuer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppManager ¶
type AppManager struct {
// contains filtered or unexported fields
}
AppManager is a multi applet manager.
func NewAppManager ¶
func NewAppManager(log cdtype.Logger) *AppManager
NewAppManager creates an applets manager with the given list of applets services.
func Register ¶
func Register(log cdtype.Logger) *AppManager
Register starts the applets manager service to use go internal applets in the dock.
func (*AppManager) BuildMenu ¶
func (o *AppManager) BuildMenu(m *backendmenu.DockMenu) bool
BuildMenu forwards a build menu event to the applet.
func (*AppManager) CountActive ¶
func (o *AppManager) CountActive() int
CountActive returns the number of managed applets.
func (*AppManager) GetApplets ¶
func (o *AppManager) GetApplets(name string) (list []cdtype.AppInstance)
GetApplets return an applet instance.
func (*AppManager) OnChangeFocus ¶
func (o *AppManager) OnChangeFocus(win cdglobal.Window) bool
OnChangeFocus forwards a window focus event to the applet.
func (*AppManager) OnDropData ¶
func (o *AppManager) OnDropData(icon gldi.Icon, container *gldi.Container, data string, order float64) bool
OnDropData forwards a drop event to the applet.
func (*AppManager) OnLeftClick ¶
OnLeftClick forwards a click event to the applet.
func (*AppManager) OnMiddleClick ¶
OnMiddleClick forwards a click event to the applet.
func (*AppManager) OnMouseScroll ¶
OnMouseScroll forwards a mouse event to the applet.
func (*AppManager) StartLoop ¶
func (o *AppManager) StartLoop()
StartLoop starts the polling loop for applets.
type MenuerLike ¶
type MenuerLike struct {
backendmenu.DockMenu
}
MenuerLike converts the backend menu to match the applets Menuer interface.
func (*MenuerLike) AddCheckEntry ¶
func (m *MenuerLike) AddCheckEntry(label string, active bool, call interface{}, userData ...interface{}) cdtype.MenuWidgeter
AddCheckEntry adds a check entry to the menu.
func (*MenuerLike) AddEntry ¶
func (m *MenuerLike) AddEntry(label, iconPath string, call interface{}, userData ...interface{}) cdtype.MenuWidgeter
AddEntry adds an item to the menu with its callback.
func (*MenuerLike) AddRadioEntry ¶
func (m *MenuerLike) AddRadioEntry(label string, active bool, group int, call interface{}, userData ...interface{}) cdtype.MenuWidgeter
AddRadioEntry adds a radio entry to the menu.
func (*MenuerLike) AddSubMenu ¶
func (m *MenuerLike) AddSubMenu(label, iconPath string) cdtype.Menuer
AddSubMenu adds a submenu to the menu.