mirror of
https://gitee.com/energye/energy.git
synced 2024-12-15 18:01:52 +08:00
29 lines
582 B
Go
29 lines
582 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 IChromium, 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)
|
|
}
|
|
}
|