示例#1
0
文件: eventmouse.go 项目: sqp/godock
// 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)
}
示例#2
0
文件: mgrgldi.go 项目: sqp/godock
// 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
}