mirror of
https://gitee.com/energye/energy.git
synced 2024-11-30 02:37:46 +08:00
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
//----------------------------------------
|
|
//
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
//
|
|
// Licensed under Apache License Version 2.0, January 2004
|
|
//
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
//----------------------------------------
|
|
|
|
// CEF Browser View
|
|
|
|
package cef
|
|
|
|
import (
|
|
"github.com/energye/energy/v2/cef/internal/def"
|
|
"github.com/energye/energy/v2/common/imports"
|
|
"github.com/energye/golcl/lcl/api"
|
|
"unsafe"
|
|
)
|
|
|
|
func (m *ICefBrowserView) Instance() uintptr {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
return uintptr(m.instance)
|
|
}
|
|
|
|
func (m *ICefBrowserView) Browser() *ICefBrowser {
|
|
var result uintptr
|
|
imports.Proc(def.CefBrowserView_Browser).Call(m.Instance(), uintptr(unsafe.Pointer(&result)))
|
|
return &ICefBrowser{instance: unsafe.Pointer(result)}
|
|
}
|
|
|
|
func (m *ICefBrowserView) ChromeToolbar() *ICefView {
|
|
var result uintptr
|
|
imports.Proc(def.CefBrowserView_ChromeToolbar).Call(m.Instance(), uintptr(unsafe.Pointer(&result)))
|
|
return &ICefView{instance: unsafe.Pointer(result)}
|
|
}
|
|
|
|
func (m *ICefBrowserView) SetPreferAccelerators(preferAccelerators bool) {
|
|
imports.Proc(def.CefBrowserView_SetPreferAccelerators).Call(m.Instance(), api.PascalBool(preferAccelerators))
|
|
}
|