// 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) }
// 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 }