energy/cef/cef-i-window-parent.go
杨红岩 03e3f74c7f 1. commons -> common
2. 增加内置资源http服务
2022-11-02 12:47:47 +08:00

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