energy/cef/cef-component.go

38 lines
731 B
Go
Raw Normal View History

2022-10-04 13:21:05 +08:00
//----------------------------------------
//
// Copyright © yanghy. All Rights Reserved.
//
// Licensed under Apache License Version 2.0, January 2004
//
// https://www.apache.org/licenses/LICENSE-2.0
2022-10-04 13:21:05 +08:00
//
//----------------------------------------
package cef
// 适用于 windows linux macos 系统托盘
func (m *LCLBrowserWindow) NewTray() ITray {
if m.tray == nil {
m.tray = newTray(m.TForm)
}
return m.tray
}
2023-01-24 18:55:02 +08:00
func (m *LCLBrowserWindow) NewSysTray() ITray {
if m.tray == nil {
m.tray = newSysTray()
}
return m.tray
}
2023-01-24 23:08:39 +08:00
// 只适用于windows的无菜单托盘
2023-01-24 23:08:39 +08:00
func (m *ViewsFrameworkBrowserWindow) NewSysTray() ITray {
if m == nil {
return nil
}
if m.tray == nil {
m.tray = newSysTray()
}
return m.tray
}