Ejemplo n.º 1
0
// Register registers mouse events and sets the logger.
//
func Register(l cdtype.Logger) {
	log = l
	notif.RegisterContainerLeftClick(OnLeftClick)
	notif.RegisterContainerMiddleClick(OnMiddleClick)
	notif.RegisterContainerMouseScroll(OnMouseScroll)
	notif.RegisterContainerDropData(OnDropData)
}
Ejemplo n.º 2
0
// Register starts the applets manager service to use go internal applets in the dock.
//
func Register(log cdtype.Logger) *AppManager {
	apps = NewAppManager(log)

	notif.RegisterContainerLeftClick(apps.OnLeftClick)
	notif.RegisterContainerMiddleClick(apps.OnMiddleClick)
	notif.RegisterContainerMouseScroll(apps.OnMouseScroll)
	notif.RegisterContainerDropData(apps.OnDropData)
	notif.RegisterWindowChangeFocus(apps.OnChangeFocus)
	notif.RegisterContainerMenuIcon(backendmenu.WrapDockMenuCallback(apps.BuildMenu))

	apps.registerApplets()

	return apps
}