mirror of
https://gitee.com/energye/energy.git
synced 2024-12-02 19:57:48 +08:00
03e3f74c7f
2. 增加内置资源http服务
29 lines
586 B
Go
29 lines
586 B
Go
package cef
|
|
|
|
import (
|
|
"github.com/energye/energy/common"
|
|
"github.com/energye/energy/consts"
|
|
"github.com/energye/golcl/lcl"
|
|
)
|
|
|
|
type ITCefWindow interface {
|
|
lcl.IWinControl
|
|
Type() consts.TCefWindowHandleType
|
|
SetChromium(chromium *TCEFChromium, tag int32)
|
|
UpdateSize()
|
|
HandleAllocated() bool
|
|
CreateHandle()
|
|
SetOnEnter(fn lcl.TNotifyEvent)
|
|
SetOnExit(fn lcl.TNotifyEvent)
|
|
DestroyChildWindow() bool
|
|
Free()
|
|
}
|
|
|
|
func NewCEFWindow(owner lcl.IComponent) ITCefWindow {
|
|
if common.IsWindows() {
|
|
return NewCEFWindowParent(owner)
|
|
} else {
|
|
return NewCEFLinkedWindowParent(owner)
|
|
}
|
|
}
|