mirror of
https://gitee.com/energye/energy.git
synced 2024-12-02 03:37:48 +08:00
U: Chromium CreateBrowser
This commit is contained in:
parent
1216e83594
commit
35fcdb761b
@ -401,35 +401,7 @@ func (m *TCEFChromium) CreateBrowser(window ICEFWindowParent, windowName string,
|
||||
if !m.IsValid() {
|
||||
return false
|
||||
}
|
||||
//var (
|
||||
// windowParent uintptr
|
||||
// windowNamePtr uintptr
|
||||
// contextPtr uintptr
|
||||
// extraInfoPtr uintptr
|
||||
//)
|
||||
//if window != nil {
|
||||
// windowParent = m.Instance()
|
||||
//}
|
||||
//if windowName != "" {
|
||||
// windowNamePtr = api.PascalStr(windowName)
|
||||
//}
|
||||
//if context != nil && context.IsValid() {
|
||||
// contextPtr = context.Instance()
|
||||
//}
|
||||
//if extraInfo != nil && extraInfo.IsValid() {
|
||||
// extraInfoPtr = extraInfo.Instance()
|
||||
//}
|
||||
//return _CEFChromium_CreateBrowse(m.Instance(), windowParent, windowNamePtr, contextPtr, extraInfoPtr)
|
||||
//if window == nil {
|
||||
//return _CEFChromium_CreateBrowse(m.Instance(), windowParent, windowNamePtr, contextPtr, extraInfoPtr)
|
||||
//} else {
|
||||
if window.Type() == Wht_WindowParent {
|
||||
return _CEFChromium_CreateBrowseByWindow(m.Instance(), window.Instance())
|
||||
} else if window.Type() == Wht_LinkedWindowParent {
|
||||
return _CEFChromium_CreateBrowseByLinkedWindow(m.Instance(), window.Instance())
|
||||
}
|
||||
//}
|
||||
return false
|
||||
return _CEFChromium_CreateBrowse(m.Instance(), window.Instance(), api.PascalStr(windowName), context.Instance(), extraInfo.Instance())
|
||||
}
|
||||
|
||||
func (m *TCEFChromium) CreateBrowserByBrowserViewComponent(homePage string, browserViewComponent *TCEFBrowserViewComponent) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user