2022-10-04 13:21:05 +08:00
|
|
|
//----------------------------------------
|
|
|
|
//
|
|
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
|
|
//
|
2023-02-19 23:21:47 +08:00
|
|
|
// 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
|
|
|
//
|
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
//go:build windows
|
|
|
|
// +build windows
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
// CEF 浏览器窗口组件定义-windows
|
2022-10-04 13:21:05 +08:00
|
|
|
package cef
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
// NewCefTray
|
|
|
|
// LCL窗口组件 只适用于windows的无菜单托盘, 需使用web端技术实现
|
2023-01-27 21:34:56 +08:00
|
|
|
//
|
2023-02-19 23:21:47 +08:00
|
|
|
// 不支持Linux和MacOSX
|
2023-01-04 22:47:30 +08:00
|
|
|
func (m *LCLBrowserWindow) NewCefTray(width, height int32, url string) ITray {
|
2023-01-06 21:42:29 +08:00
|
|
|
if m == nil {
|
2023-01-06 13:50:44 +08:00
|
|
|
return nil
|
2022-10-04 13:21:05 +08:00
|
|
|
}
|
2023-01-06 21:42:29 +08:00
|
|
|
if m.tray == nil {
|
2023-01-07 11:48:19 +08:00
|
|
|
m.tray = newLCLTrayWindow(m, width, height, url)
|
2023-01-06 13:50:44 +08:00
|
|
|
}
|
2023-01-06 21:42:29 +08:00
|
|
|
return m.tray
|
2022-10-04 13:21:05 +08:00
|
|
|
}
|
2023-01-06 19:27:12 +08:00
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
// NewCefTray
|
|
|
|
// VF窗口组件 只适用于windows的无菜单托盘, 需使用web端技术实现
|
2023-01-27 21:34:56 +08:00
|
|
|
//
|
2023-02-19 23:21:47 +08:00
|
|
|
// 不支持Linux和MacOSX
|
2023-01-06 19:27:12 +08:00
|
|
|
func (m *ViewsFrameworkBrowserWindow) NewCefTray(width, height int32, url string) ITray {
|
|
|
|
if m == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
if m.tray == nil {
|
2023-01-07 11:48:19 +08:00
|
|
|
m.tray = newViewsFrameTray(m.component, width, height, url)
|
2023-01-06 19:27:12 +08:00
|
|
|
}
|
|
|
|
return m.tray
|
|
|
|
}
|