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
|
|
|
//
|
|
|
|
//----------------------------------------
|
|
|
|
|
2023-02-19 23:21:47 +08:00
|
|
|
// CEF Window Parent 父组件
|
2022-10-04 13:21:05 +08:00
|
|
|
package cef
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/energye/golcl/lcl"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2023-02-19 23:21:47 +08:00
|
|
|
// 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
|
|
|
}
|
|
|
|
|
2023-02-19 23:21:47 +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
|
|
|
}
|
|
|
|
|
2023-02-19 23:21:47 +08:00
|
|
|
// Instance 当前实例
|
2022-12-05 12:07:58 +08:00
|
|
|
func (m *BaseWinControl) Instance() uintptr {
|
|
|
|
return uintptr(m.instance)
|
2022-10-04 13:21:05 +08:00
|
|
|
}
|