mirror of
https://gitee.com/energye/energy.git
synced 2024-12-15 18:01:52 +08:00
35 lines
628 B
Go
35 lines
628 B
Go
//----------------------------------------
|
|
//
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
//
|
|
// Licensed under GNU General Public License v3.0
|
|
//
|
|
//----------------------------------------
|
|
|
|
package cef
|
|
|
|
import (
|
|
"github.com/energye/golcl/lcl"
|
|
"github.com/energye/golcl/lcl/types"
|
|
"unsafe"
|
|
)
|
|
|
|
type BaseComponent struct {
|
|
lcl.TComponent
|
|
procName string
|
|
instance uintptr
|
|
ptr unsafe.Pointer
|
|
}
|
|
|
|
func (m *BaseComponent) Instance() uintptr {
|
|
return m.instance
|
|
}
|
|
|
|
func (m *BaseComponent) Handle() types.HWND {
|
|
return GetHandle(m.procName, m.instance)
|
|
}
|
|
|
|
func (m *BaseComponent) IsValid() bool {
|
|
return m.instance != 0
|
|
}
|