energy/cef/cef-base-win-control.go

34 lines
671 B
Go
Raw Normal View History

2022-10-04 13:21:05 +08:00
//----------------------------------------
//
// Copyright © yanghy. All Rights Reserved.
//
// 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
//
//----------------------------------------
// CEF Window Parent 父组件
2022-10-04 13:21:05 +08:00
package cef
import (
"github.com/energye/golcl/lcl"
"unsafe"
)
// WindowParent和WindowLinkedParent父结构体
2022-10-04 13:21:05 +08:00
type BaseWinControl struct {
lcl.IWinControl
2022-12-05 10:44:24 +08:00
instance unsafe.Pointer
2022-10-04 13:21:05 +08:00
}
// IsValid 是否有效
2022-10-04 13:21:05 +08:00
func (m *BaseWinControl) IsValid() bool {
2022-12-05 10:44:24 +08:00
return m.instance != nullptr
2022-10-04 13:21:05 +08:00
}
// Instance 当前实例
func (m *BaseWinControl) Instance() uintptr {
return uintptr(m.instance)
2022-10-04 13:21:05 +08:00
}