energy/cef/cef-component_windows.go

39 lines
863 B
Go
Raw Normal View History

2022-10-04 13:21:05 +08:00
//----------------------------------------
//
// Copyright © yanghy. All Rights Reserved.
//
2022-10-04 16:38:43 +08:00
// Licensed under GNU General Public License v3.0
2022-10-04 13:21:05 +08:00
//
//----------------------------------------
//go:build windows
// +build windows
package cef
2023-01-27 21:34:56 +08:00
//只适用于windows的无菜单托盘, 需使用web端技术实现
//
//不支持Linux和MacOSX
func (m *LCLBrowserWindow) NewCefTray(width, height int32, url string) ITray {
if m == nil {
return nil
2022-10-04 13:21:05 +08:00
}
if m.tray == nil {
m.tray = newLCLTrayWindow(m, width, height, url)
}
return m.tray
2022-10-04 13:21:05 +08:00
}
2023-01-27 21:34:56 +08:00
//只适用于windows的无菜单托盘, 需使用web端技术实现
//
//不支持Linux和MacOSX
func (m *ViewsFrameworkBrowserWindow) NewCefTray(width, height int32, url string) ITray {
if m == nil {
return nil
}
if m.tray == nil {
m.tray = newViewsFrameTray(m.component, width, height, url)
}
return m.tray
}