mgrgldi

package
v0.0.0-...-0caaa62 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2017 License: GPL-3.0-or-later Imports: 14 Imported by: 0

Documentation

Overview

Package mgrgldi manages go applets as internal applets.

Index

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

func (o *AppManager) OnLeftClick(icon gldi.Icon, container *gldi.Container, btnState uint) bool

OnLeftClick forwards a click event to the applet.

func (*AppManager) OnMiddleClick

func (o *AppManager) OnMiddleClick(icon gldi.Icon, container *gldi.Container) bool

OnMiddleClick forwards a click event to the applet.

func (*AppManager) OnMouseScroll

func (o *AppManager) OnMouseScroll(icon gldi.Icon, container *gldi.Container, scrollUp bool) bool

OnMouseScroll forwards a mouse event to the applet.

func (*AppManager) StartLoop

func (o *AppManager) StartLoop()

StartLoop starts the polling loop for applets.

func (*AppManager) StopLoop

func (o *AppManager) StopLoop()

StopLoop stops the polling loop.

func (*AppManager) Tick

func (o *AppManager) Tick()

Tick ticks all applets pollers.

type MenuerLike struct {
	backendmenu.DockMenu
}

MenuerLike converts the backend menu to match the applets Menuer interface.

func (m *MenuerLike) AddCheckEntry(label string, active bool, call interface{}, userData ...interface{}) cdtype.MenuWidgeter

AddCheckEntry adds a check entry to the menu.

func (m *MenuerLike) AddEntry(label, iconPath string, call interface{}, userData ...interface{}) cdtype.MenuWidgeter

AddEntry adds an item to the menu with its callback.

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 (m *MenuerLike) AddSubMenu(label, iconPath string) cdtype.Menuer

AddSubMenu adds a submenu to the menu.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL