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-05-31 17:41:14 +08:00
|
|
|
|
// cef -> energy 所有结构类型定义
|
|
|
|
|
// 每个结构对象创建 XXXRef.New() 创建并返回CEF对象, 创建后的对象是
|
|
|
|
|
// 引用CEF指针在不使用时,使用Free函数合理的释放掉该对象
|
|
|
|
|
|
2022-10-04 13:21:05 +08:00
|
|
|
|
package cef
|
|
|
|
|
|
|
|
|
|
import (
|
2023-06-18 16:50:45 +08:00
|
|
|
|
"github.com/energye/energy/v2/common"
|
2023-05-31 18:00:34 +08:00
|
|
|
|
. "github.com/energye/energy/v2/consts"
|
|
|
|
|
. "github.com/energye/energy/v2/types"
|
2023-03-03 10:00:29 +08:00
|
|
|
|
"github.com/energye/golcl/lcl"
|
2023-03-06 12:26:25 +08:00
|
|
|
|
"github.com/energye/golcl/lcl/api"
|
2023-07-14 18:50:14 +08:00
|
|
|
|
"github.com/energye/golcl/lcl/types"
|
2022-10-04 13:21:05 +08:00
|
|
|
|
"time"
|
|
|
|
|
"unsafe"
|
|
|
|
|
)
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// ICefCookie CEF Cookie
|
2022-10-04 13:21:05 +08:00
|
|
|
|
type ICefCookie struct {
|
|
|
|
|
Url, Name, Value, Domain, Path string
|
|
|
|
|
Secure, Httponly, HasExpires bool
|
|
|
|
|
Creation, LastAccess, Expires time.Time
|
|
|
|
|
Count, Total, ID int32
|
|
|
|
|
SameSite TCefCookieSameSite
|
|
|
|
|
Priority TCefCookiePriority
|
|
|
|
|
SetImmediately bool
|
|
|
|
|
DeleteCookie bool
|
|
|
|
|
Result bool
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCefKeyEvent CEF 键盘事件
|
2022-10-04 13:21:05 +08:00
|
|
|
|
type TCefKeyEvent struct {
|
|
|
|
|
Kind TCefKeyEventType // called 'type' in the original CEF source code
|
|
|
|
|
Modifiers TCefEventFlags
|
2022-12-14 11:11:33 +08:00
|
|
|
|
WindowsKeyCode Int32
|
|
|
|
|
NativeKeyCode Int32
|
|
|
|
|
IsSystemKey Int32
|
|
|
|
|
Character UInt16
|
|
|
|
|
UnmodifiedCharacter UInt16
|
|
|
|
|
FocusOnEditableField Int32
|
2022-10-04 13:21:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCefRequestContextSettings CEF 请求上下文配置
|
2022-12-13 22:43:31 +08:00
|
|
|
|
type TCefRequestContextSettings struct {
|
2022-12-14 11:11:33 +08:00
|
|
|
|
Size UInt32
|
2022-12-13 22:43:31 +08:00
|
|
|
|
CachePath TCefString
|
2022-12-14 11:11:33 +08:00
|
|
|
|
PersistSessionCookies Int32
|
|
|
|
|
PersistUserPreferences Int32
|
2022-12-13 22:43:31 +08:00
|
|
|
|
AcceptLanguageList TCefString
|
|
|
|
|
CookieableSchemesList TCefString
|
2022-12-14 11:11:33 +08:00
|
|
|
|
CookieableSchemesExcludeDefaults Int32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *TCefRequestContextSettings) ToPtr() *tCefRequestContextSettingsPtr {
|
|
|
|
|
return &tCefRequestContextSettingsPtr{
|
2023-03-06 12:26:25 +08:00
|
|
|
|
Size: uintptr(m.Size),
|
|
|
|
|
CachePath: api.PascalStr(string(m.CachePath)),
|
|
|
|
|
PersistSessionCookies: uintptr(m.PersistSessionCookies),
|
|
|
|
|
PersistUserPreferences: uintptr(m.PersistUserPreferences),
|
|
|
|
|
AcceptLanguageList: api.PascalStr(string(m.AcceptLanguageList)),
|
|
|
|
|
CookieableSchemesList: api.PascalStr(string(m.CookieableSchemesList)),
|
|
|
|
|
CookieableSchemesExcludeDefaults: uintptr(m.CookieableSchemesExcludeDefaults),
|
2022-12-14 11:11:33 +08:00
|
|
|
|
}
|
2022-12-13 22:43:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCefBrowserSettings CEF Browser配置
|
2022-12-13 22:43:31 +08:00
|
|
|
|
type TCefBrowserSettings struct {
|
|
|
|
|
Size NativeUInt
|
|
|
|
|
WindowlessFrameRate Integer
|
|
|
|
|
StandardFontFamily TCefString
|
|
|
|
|
FixedFontFamily TCefString
|
|
|
|
|
SerifFontFamily TCefString
|
|
|
|
|
SansSerifFontFamily TCefString
|
|
|
|
|
CursiveFontFamily TCefString
|
|
|
|
|
FantasyFontFamily TCefString
|
|
|
|
|
DefaultFontSize Integer
|
|
|
|
|
DefaultFixedFontSize Integer
|
|
|
|
|
MinimumFontSize Integer
|
|
|
|
|
MinimumLogicalFontSize Integer
|
|
|
|
|
DefaultEncoding TCefString
|
|
|
|
|
RemoteFonts TCefState
|
|
|
|
|
Javascript TCefState
|
|
|
|
|
JavascriptCloseWindows TCefState
|
|
|
|
|
JavascriptAccessClipboard TCefState
|
|
|
|
|
JavascriptDomPaste TCefState
|
|
|
|
|
ImageLoading TCefState
|
|
|
|
|
ImageShrinkStandaLonetoFit TCefState
|
|
|
|
|
TextAreaResize TCefState
|
|
|
|
|
TabToLinks TCefState
|
|
|
|
|
LocalStorage TCefState
|
|
|
|
|
Databases TCefState
|
|
|
|
|
Webgl TCefState
|
|
|
|
|
BackgroundColor TCefColor
|
|
|
|
|
AcceptLanguageList TCefString
|
|
|
|
|
ChromeStatusBubble TCefState
|
2022-10-04 13:21:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCefCommandLine 进程启动命令行参数设置
|
2022-12-13 22:43:31 +08:00
|
|
|
|
type TCefCommandLine struct {
|
|
|
|
|
commandLines map[string]string
|
2022-10-04 13:21:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-14 11:06:08 +08:00
|
|
|
|
// ICefCommandLine
|
|
|
|
|
type ICefCommandLine struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCefProxy 代理配置
|
2022-10-04 13:21:05 +08:00
|
|
|
|
type TCefProxy struct {
|
|
|
|
|
ProxyType TCefProxyType
|
|
|
|
|
ProxyScheme TCefProxyScheme
|
|
|
|
|
ProxyServer string
|
|
|
|
|
ProxyPort int32
|
|
|
|
|
ProxyUsername string
|
|
|
|
|
ProxyPassword string
|
|
|
|
|
ProxyScriptURL string
|
|
|
|
|
ProxyByPassList string
|
|
|
|
|
MaxConnectionsPerProxy int32
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCefTouchEvent 触摸事件
|
2022-10-04 13:21:05 +08:00
|
|
|
|
type TCefTouchEvent struct {
|
|
|
|
|
Id int32
|
|
|
|
|
X float32
|
|
|
|
|
Y float32
|
|
|
|
|
RadiusX float32
|
|
|
|
|
RadiusY float32
|
|
|
|
|
RotationAngle float32
|
|
|
|
|
Pressure float32
|
|
|
|
|
Type TCefTouchEeventType
|
|
|
|
|
Modifiers TCefEventFlags
|
|
|
|
|
PointerType TCefPointerType
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCustomHeader 自定义请求头
|
2023-02-04 23:52:15 +08:00
|
|
|
|
type TCustomHeader struct {
|
|
|
|
|
CustomHeaderName string
|
|
|
|
|
CustomHeaderValue string
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCefMouseEvent 鼠标事件
|
2022-10-04 13:21:05 +08:00
|
|
|
|
type TCefMouseEvent struct {
|
|
|
|
|
X int32
|
|
|
|
|
Y int32
|
|
|
|
|
Modifiers TCefEventFlags
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// BeforePopupInfo 弹出子窗口信息
|
2022-10-04 13:21:05 +08:00
|
|
|
|
type BeforePopupInfo struct {
|
|
|
|
|
TargetUrl string
|
|
|
|
|
TargetFrameName string
|
|
|
|
|
TargetDisposition TCefWindowOpenDisposition
|
|
|
|
|
UserGesture bool
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefRect
|
|
|
|
|
// /include/internal/cef_types_geometry.h (cef_rect_t)
|
2022-10-04 13:21:05 +08:00
|
|
|
|
type TCefRect struct {
|
|
|
|
|
X int32
|
|
|
|
|
Y int32
|
|
|
|
|
Width int32
|
|
|
|
|
Height int32
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-18 16:50:45 +08:00
|
|
|
|
type TCefRectArray struct {
|
|
|
|
|
ptr uintptr
|
|
|
|
|
sizeOf uintptr
|
|
|
|
|
count uint32
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-18 22:36:57 +08:00
|
|
|
|
type TRGBQuad struct {
|
|
|
|
|
RgbBlue byte
|
|
|
|
|
RgbGreen byte
|
|
|
|
|
RgbRed byte
|
|
|
|
|
RgbReserved byte
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-18 16:50:45 +08:00
|
|
|
|
// NewTCefRectArray
|
|
|
|
|
// TCefRect 动态数组结构, 通过指针引用取值
|
|
|
|
|
func NewTCefRectArray(ptr uintptr, count uint32) *TCefRectArray {
|
|
|
|
|
return &TCefRectArray{
|
|
|
|
|
ptr: ptr,
|
|
|
|
|
sizeOf: unsafe.Sizeof(TCefRect{}),
|
|
|
|
|
count: count,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-18 22:36:57 +08:00
|
|
|
|
func (m *TCefRectArray) Count() int {
|
|
|
|
|
return int(m.count)
|
2023-06-18 16:50:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *TCefRectArray) Get(index int) *TCefRect {
|
|
|
|
|
if m.count == 0 || index < 0 || index >= int(m.count) {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
return (*TCefRect)(common.GetParamPtr(m.ptr, index*int(m.sizeOf)))
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefSize
|
|
|
|
|
// /include/internal/cef_types_geometry.h (cef_size_t)
|
2023-01-07 11:48:19 +08:00
|
|
|
|
type TCefSize struct {
|
|
|
|
|
Width int32
|
|
|
|
|
Height int32
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefPoint
|
|
|
|
|
// /include/internal/cef_types_geometry.h (cef_point_t)
|
2022-12-12 17:34:57 +08:00
|
|
|
|
type TCefPoint struct {
|
|
|
|
|
X int32
|
|
|
|
|
Y int32
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefCursorInfo
|
|
|
|
|
// /include/internal/cef_types.h (cef_cursor_info_t)
|
|
|
|
|
type TCefCursorInfo struct {
|
|
|
|
|
Hotspot TCefPoint
|
|
|
|
|
ImageScaleFactor Single
|
|
|
|
|
Buffer uintptr
|
|
|
|
|
Size TCefSize
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-13 22:40:20 +08:00
|
|
|
|
// TCefSchemeRegistrarRef
|
|
|
|
|
type TCefSchemeRegistrarRef struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefBaseRefCounted
|
|
|
|
|
type TCefBaseRefCounted struct {
|
2023-03-13 17:09:09 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// ICefRequestContext
|
|
|
|
|
type ICefRequestContext struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefCookieManager
|
|
|
|
|
type ICefCookieManager struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefCookieVisitor
|
|
|
|
|
type ICefCookieVisitor struct {
|
|
|
|
|
base TCefBaseRefCounted
|
2023-03-08 23:32:52 +08:00
|
|
|
|
instance unsafe.Pointer
|
2023-03-07 22:25:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// ICefBrowser
|
2023-03-03 17:08:06 +08:00
|
|
|
|
type ICefBrowser struct {
|
2023-05-31 17:41:14 +08:00
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
mainFrame *ICefFrame
|
|
|
|
|
requestContext *ICefRequestContext
|
2023-07-14 18:50:14 +08:00
|
|
|
|
windowHandle types.HWND
|
2023-05-31 17:41:14 +08:00
|
|
|
|
idFrames map[int64]*ICefFrame
|
|
|
|
|
nameFrames map[string]*ICefFrame
|
2023-03-03 17:08:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefFrame
|
|
|
|
|
// Html <iframe></iframe>
|
|
|
|
|
type ICefFrame struct {
|
2023-03-09 23:17:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-03-03 17:08:06 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-01 13:38:43 +08:00
|
|
|
|
// ICefImage
|
|
|
|
|
type ICefImage struct {
|
2023-03-14 22:20:08 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-03-01 13:38:43 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCefDraggableRegions 拖拽区域集合
|
2023-01-07 23:39:34 +08:00
|
|
|
|
type TCefDraggableRegions struct {
|
2023-01-08 18:05:03 +08:00
|
|
|
|
regions []TCefDraggableRegion
|
2023-01-08 21:38:39 +08:00
|
|
|
|
regionsCount int
|
2023-01-07 23:39:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// TCefDraggableRegion 拖拽区域集
|
2022-12-12 18:09:31 +08:00
|
|
|
|
type TCefDraggableRegion struct {
|
|
|
|
|
Bounds TCefRect
|
2023-01-07 23:39:34 +08:00
|
|
|
|
Draggable bool
|
2022-12-12 18:09:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-24 19:28:56 +08:00
|
|
|
|
// ICefProcessMessage
|
|
|
|
|
type ICefProcessMessage struct {
|
2023-03-12 15:29:46 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-03-01 14:18:39 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
argumentList *ICefListValue
|
2023-03-03 15:26:27 +08:00
|
|
|
|
name string
|
2023-02-24 19:28:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefBinaryValueArray
|
|
|
|
|
// []ICefBinaryValue
|
|
|
|
|
type TCefBinaryValueArray struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
binaryValues []*ICefBinaryValue
|
|
|
|
|
count uint32
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-09 16:35:38 +08:00
|
|
|
|
// ICefBinaryValue -> ArgumentList
|
|
|
|
|
type ICefBinaryValue struct {
|
2023-03-09 23:17:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-03-09 16:35:38 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-24 19:28:56 +08:00
|
|
|
|
// ICefValue -> ArgumentList
|
|
|
|
|
type ICefValue struct {
|
2023-03-09 23:17:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-03-09 16:35:38 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
binaryValue *ICefBinaryValue
|
|
|
|
|
dictionaryValue *ICefDictionaryValue
|
|
|
|
|
listValue *ICefListValue
|
2023-02-24 19:28:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefListValue -> ArgumentList
|
|
|
|
|
type ICefListValue struct {
|
2023-03-09 23:17:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-03-09 16:35:38 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
values map[int]*ICefValue
|
|
|
|
|
binaryValues map[int]*ICefBinaryValue
|
|
|
|
|
dictionaryValues map[int]*ICefDictionaryValue
|
|
|
|
|
listValues map[int]*ICefListValue
|
2023-02-24 19:28:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefDictionaryValue -> ArgumentList
|
|
|
|
|
type ICefDictionaryValue struct {
|
2023-03-09 23:17:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-03-09 16:35:38 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
values map[string]*ICefValue
|
|
|
|
|
binaryValues map[string]*ICefBinaryValue
|
|
|
|
|
dictionaryValues map[string]*ICefDictionaryValue
|
|
|
|
|
listValues map[string]*ICefListValue
|
2023-02-24 19:28:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-25 16:59:40 +08:00
|
|
|
|
// ICefDisplayArray
|
|
|
|
|
// []ICefDisplayArray
|
|
|
|
|
type ICefDisplayArray struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
binaryValues []*ICefDisplayArray
|
|
|
|
|
count uint32
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// ICefDisplay
|
2022-12-13 09:14:59 +08:00
|
|
|
|
type ICefDisplay struct {
|
2023-03-13 18:12:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2022-12-13 09:14:59 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// ICefWindow
|
2022-12-13 11:49:32 +08:00
|
|
|
|
type ICefWindow struct {
|
2023-03-14 22:20:08 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2022-12-13 11:49:32 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// ICefExtensionHandler
|
|
|
|
|
type ICefExtensionHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TCustomExtensionHandler
|
|
|
|
|
type TCustomExtensionHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
2023-07-03 17:23:26 +08:00
|
|
|
|
ct CefCreateType
|
2023-05-31 17:41:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefExtension
|
|
|
|
|
type ICefExtension struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefSchemeHandlerFactory
|
|
|
|
|
// /include/capi/cef_scheme_capi.h (cef_scheme_handler_factory_t)
|
|
|
|
|
type ICefSchemeHandlerFactory struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TCefResourceHandlerClass
|
|
|
|
|
type TCefResourceHandlerClass uintptr
|
|
|
|
|
|
2023-02-26 22:29:03 +08:00
|
|
|
|
// ICefRequest
|
|
|
|
|
type ICefRequest struct {
|
2023-05-31 17:41:14 +08:00
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefResponse
|
2023-02-26 22:29:03 +08:00
|
|
|
|
type ICefResponse struct {
|
2023-05-31 17:41:14 +08:00
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefDomVisitor
|
|
|
|
|
type ICefDomVisitor struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefDomDocument
|
|
|
|
|
type ICefDomDocument struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TCefScreenInfo
|
|
|
|
|
// /include/internal/cef_types.h (cef_screen_info_t)
|
|
|
|
|
type TCefScreenInfo struct {
|
2023-06-20 10:54:38 +08:00
|
|
|
|
DeviceScaleFactor Single
|
2023-05-31 17:41:14 +08:00
|
|
|
|
Depth int32
|
|
|
|
|
DepthPerComponent int32
|
|
|
|
|
IsMonochrome int32
|
|
|
|
|
Rect TCefRect
|
|
|
|
|
AvailableRect TCefRect
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TCefTouchHandleState
|
|
|
|
|
// /include/internal/cef_types.h (cef_touch_handle_state_t)
|
|
|
|
|
type TCefTouchHandleState struct {
|
|
|
|
|
TouchHandleId int32
|
|
|
|
|
Flags uint32
|
|
|
|
|
Enabled int32
|
|
|
|
|
Orientation TCefHorizontalAlignment
|
|
|
|
|
MirrorVertical int32
|
|
|
|
|
MirrorHorizontal int32
|
|
|
|
|
Origin TCefPoint
|
|
|
|
|
Alpha float32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefRequestContextHandler
|
|
|
|
|
type ICefRequestContextHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
2023-07-03 17:23:26 +08:00
|
|
|
|
ct CefCreateType
|
2023-02-26 22:29:03 +08:00
|
|
|
|
}
|
2023-03-13 11:54:52 +08:00
|
|
|
|
|
|
|
|
|
// ICefMenuModel 菜单
|
|
|
|
|
type ICefMenuModel struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
CefMis *keyEventAccelerator
|
|
|
|
|
}
|
2023-02-26 22:29:03 +08:00
|
|
|
|
|
2023-07-02 15:27:34 +08:00
|
|
|
|
// ICefMenuModelDelegate
|
|
|
|
|
// /include/capi/cef_menu_model_delegate_capi.h (cef_menu_model_delegate_t)
|
|
|
|
|
type ICefMenuModelDelegate struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-27 09:15:37 +08:00
|
|
|
|
// ICefStringMultiMap 实例
|
|
|
|
|
type ICefStringMultiMap struct {
|
2023-08-25 18:15:25 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-02-27 09:15:37 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-26 23:21:44 +08:00
|
|
|
|
// ICefPostData
|
|
|
|
|
type ICefPostData struct {
|
2023-08-25 18:15:25 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-02-26 23:21:44 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-27 11:33:00 +08:00
|
|
|
|
// ICefPostDataElement
|
|
|
|
|
type ICefPostDataElement struct {
|
2023-08-25 18:15:25 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-02-27 11:33:00 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TCefPostDataElementArray
|
|
|
|
|
type TCefPostDataElementArray struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
postDataElement uintptr
|
|
|
|
|
postDataElementLength uint32
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-28 21:52:13 +08:00
|
|
|
|
// ICefBrowserView
|
2023-07-02 20:54:43 +08:00
|
|
|
|
// /include/capi/views/cef_browser_view_capi.h (cef_browser_view_t)
|
2023-02-28 21:52:13 +08:00
|
|
|
|
type ICefBrowserView struct {
|
2023-07-02 20:54:43 +08:00
|
|
|
|
*ICefView
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefButton
|
|
|
|
|
// /include/capi/views/cef_button_capi.h (cef_button_t)
|
|
|
|
|
type ICefButton struct {
|
|
|
|
|
*ICefView
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-03 13:35:38 +08:00
|
|
|
|
// ICefLabelButton
|
|
|
|
|
// /include/capi/views/cef_label_button_capi.h (cef_label_button_t)
|
|
|
|
|
type ICefLabelButton struct {
|
|
|
|
|
*ICefButton
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 09:08:55 +08:00
|
|
|
|
// ICefMenuButton
|
|
|
|
|
// /include/capi/views/cef_menu_button_capi.h (cef_menu_button_t)
|
|
|
|
|
type ICefMenuButton struct {
|
|
|
|
|
*ICefLabelButton
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-02 20:54:43 +08:00
|
|
|
|
// ICefPanel
|
|
|
|
|
// /include/capi/views/cef_panel_capi.h (cef_panel_t)
|
|
|
|
|
type ICefPanel struct {
|
|
|
|
|
*ICefView
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefScrollView
|
|
|
|
|
// /include/capi/views/cef_scroll_view_capi.h (cef_scroll_view_t)
|
|
|
|
|
type ICefScrollView struct {
|
|
|
|
|
*ICefView
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefTextfield
|
|
|
|
|
// /include/capi/views/cef_textfield_capi.h (cef_textfield_t)
|
|
|
|
|
type ICefTextfield struct {
|
|
|
|
|
*ICefView
|
2023-02-28 21:52:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// ICefView
|
2023-07-02 20:54:43 +08:00
|
|
|
|
// /include/capi/views/cef_view_capi.h (cef_view_t)
|
2022-12-31 13:16:30 +08:00
|
|
|
|
type ICefView struct {
|
2023-07-02 20:54:43 +08:00
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefViewDelegate
|
|
|
|
|
// /include/capi/views/cef_view_delegate_capi.h (cef_view_delegate_t)
|
|
|
|
|
type ICefViewDelegate struct {
|
|
|
|
|
base TCefBaseRefCounted
|
2022-12-31 13:16:30 +08:00
|
|
|
|
instance unsafe.Pointer
|
2023-07-03 17:23:26 +08:00
|
|
|
|
ct CefCreateType
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 15:11:45 +08:00
|
|
|
|
// ICefOverlayController TODO 未实现
|
|
|
|
|
// /include/capi/views/cef_overlay_controller_capi.h (cef_overlay_controller_t)
|
|
|
|
|
type ICefOverlayController struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefLayout
|
|
|
|
|
// /include/capi/views/cef_layout_capi.h (cef_layout_t)
|
|
|
|
|
type ICefLayout struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefFillLayout
|
|
|
|
|
// /include/capi/views/cef_fill_layout_capi.h (cef_fill_layout_t)
|
|
|
|
|
type ICefFillLayout struct {
|
|
|
|
|
*ICefLayout
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefBoxLayout
|
|
|
|
|
// /include/capi/views/cef_box_layout_capi.h (cef_box_layout_t)
|
|
|
|
|
type ICefBoxLayout struct {
|
|
|
|
|
*ICefLayout
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-03 17:23:26 +08:00
|
|
|
|
// ICefBrowserViewDelegate
|
|
|
|
|
type ICefBrowserViewDelegate struct {
|
|
|
|
|
*ICefViewDelegate
|
2022-12-31 13:16:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-03 21:41:05 +08:00
|
|
|
|
// ICefButtonDelegate
|
|
|
|
|
type ICefButtonDelegate struct {
|
|
|
|
|
*ICefViewDelegate
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 15:11:45 +08:00
|
|
|
|
// ICefMenuButtonDelegate
|
2023-07-04 11:21:53 +08:00
|
|
|
|
type ICefMenuButtonDelegate struct {
|
|
|
|
|
*ICefButtonDelegate
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 15:11:45 +08:00
|
|
|
|
// ICefPanelDelegate
|
|
|
|
|
type ICefPanelDelegate struct {
|
|
|
|
|
*ICefViewDelegate
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-05 12:47:22 +08:00
|
|
|
|
// ICefTextFieldDelegate
|
|
|
|
|
type ICefTextFieldDelegate struct {
|
2023-07-04 22:35:28 +08:00
|
|
|
|
*ICefViewDelegate
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-03 12:09:25 +08:00
|
|
|
|
// TCEFViewComponent
|
|
|
|
|
type TCEFViewComponent struct {
|
2023-07-04 09:52:50 +08:00
|
|
|
|
lcl.IComponent
|
2023-07-03 12:09:25 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 19:48:30 +08:00
|
|
|
|
// TCEFScrollViewComponent
|
|
|
|
|
type TCEFScrollViewComponent struct {
|
|
|
|
|
*TCEFViewComponent
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 11:59:45 +08:00
|
|
|
|
// TCEFBrowserViewComponent
|
|
|
|
|
type TCEFBrowserViewComponent struct {
|
|
|
|
|
*TCEFViewComponent
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type TCEFPanelComponent struct {
|
|
|
|
|
*TCEFViewComponent
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TCEFWindowComponent 窗口组件
|
|
|
|
|
type TCEFWindowComponent struct {
|
|
|
|
|
*TCEFPanelComponent
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-03 13:35:38 +08:00
|
|
|
|
// TCEFButtonComponent
|
|
|
|
|
type TCEFButtonComponent struct {
|
|
|
|
|
*TCEFViewComponent
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-05 11:08:04 +08:00
|
|
|
|
// TCEFTextFieldComponent
|
|
|
|
|
type TCEFTextFieldComponent struct {
|
|
|
|
|
*TCEFViewComponent
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 09:52:50 +08:00
|
|
|
|
// TCEFLabelButtonComponent
|
|
|
|
|
type TCEFLabelButtonComponent struct {
|
|
|
|
|
*TCEFButtonComponent
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 11:21:53 +08:00
|
|
|
|
// TCEFMenuButtonComponent
|
|
|
|
|
type TCEFMenuButtonComponent struct {
|
|
|
|
|
*TCEFLabelButtonComponent
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefMenuButtonPressedLock
|
|
|
|
|
// /include/capi/views/cef_menu_button_delegate_capi.h (cef_menu_button_pressed_lock_t)
|
|
|
|
|
type ICefMenuButtonPressedLock struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefX509CertificateArray
|
|
|
|
|
// []ICefX509Certificate
|
|
|
|
|
type TCefX509CertificateArray struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
certificates []*ICefX509Certificate
|
|
|
|
|
count uint32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefX509Certificate
|
|
|
|
|
// /include/capi/cef_x509_certificate_capi.h (cef_x509certificate_t)
|
|
|
|
|
type ICefX509Certificate struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefX509CertPrincipal
|
|
|
|
|
// /include/capi/cef_x509_certificate_capi.h (cef_x509cert_principal_t)
|
|
|
|
|
type ICefX509CertPrincipal struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefSslInfo
|
|
|
|
|
// /include/capi/cef_ssl_info_capi.h (cef_sslinfo_t)
|
|
|
|
|
type ICefSslInfo struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// ICefClient
|
2022-10-04 13:21:05 +08:00
|
|
|
|
type ICefClient struct {
|
2023-05-31 17:41:14 +08:00
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
2023-07-03 17:23:26 +08:00
|
|
|
|
ct CefCreateType
|
2023-05-31 17:41:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefAudioHandler
|
|
|
|
|
type ICefAudioHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefCommandHandler
|
|
|
|
|
type ICefCommandHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefContextMenuHandler
|
|
|
|
|
type ICefContextMenuHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefDialogHandler
|
|
|
|
|
type ICefDialogHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefDisplayHandler
|
|
|
|
|
type ICefDisplayHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefDownloadHandler
|
|
|
|
|
type ICefDownloadHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefDownloadItem 下载项
|
|
|
|
|
type ICefDownloadItem struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefDragHandler
|
|
|
|
|
type ICefDragHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefFindHandler
|
|
|
|
|
type ICefFindHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefFocusHandler
|
|
|
|
|
type ICefFocusHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefFrameHandler
|
|
|
|
|
type ICefFrameHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefPermissionHandler
|
|
|
|
|
type ICefPermissionHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefJsDialogHandler
|
|
|
|
|
type ICefJsDialogHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefKeyboardHandler
|
|
|
|
|
type ICefKeyboardHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefLifeSpanHandler
|
|
|
|
|
type ICefLifeSpanHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefLoadHandler
|
|
|
|
|
type ICefLoadHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefPrintHandler
|
|
|
|
|
type ICefPrintHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefRenderHandler
|
|
|
|
|
type ICefRenderHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefRequestHandler
|
|
|
|
|
type ICefRequestHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefAccessibilityHandler
|
|
|
|
|
// /include/capi/cef_accessibility_handler_capi.h (cef_accessibility_handler_t)
|
|
|
|
|
type ICefAccessibilityHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefResourceRequestHandler
|
|
|
|
|
// /include/capi/cef_resource_request_handler_capi.h (cef_resource_request_handler_t)
|
|
|
|
|
type ICefResourceRequestHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
2023-07-03 17:23:26 +08:00
|
|
|
|
ct CefCreateType
|
2023-05-31 17:41:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefCookieAccessFilter
|
|
|
|
|
// /include/capi/cef_resource_request_handler_capi.h (cef_cookie_access_filter_t)
|
|
|
|
|
type ICefCookieAccessFilter struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
2023-07-03 17:23:26 +08:00
|
|
|
|
ct CefCreateType
|
2023-05-31 17:41:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefResourceHandler
|
|
|
|
|
// /include/capi/cef_resource_handler_capi.h (cef_resource_handler_t)
|
|
|
|
|
type ICefResourceHandler struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefResponseFilter
|
|
|
|
|
// /include/capi/cef_response_filter_capi.h (cef_response_filter_t)
|
|
|
|
|
type ICefResponseFilter struct {
|
|
|
|
|
base TCefBaseRefCounted
|
2022-12-12 17:34:57 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// ICefDragData
|
2023-01-08 17:04:39 +08:00
|
|
|
|
type ICefDragData struct {
|
2023-05-31 17:41:14 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-01-08 17:04:39 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-24 10:12:55 +08:00
|
|
|
|
// ICefV8Exception
|
|
|
|
|
type ICefV8Exception struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// ICefStreamWriter
|
|
|
|
|
// /include/capi/cef_stream_capi.h (cef_stream_writer_t)
|
|
|
|
|
type ICefStreamWriter struct {
|
|
|
|
|
*TCefBaseRefCounted
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-23 14:34:23 +08:00
|
|
|
|
// ICefV8Context
|
2023-03-01 23:15:39 +08:00
|
|
|
|
//
|
|
|
|
|
// v8上下文对象
|
|
|
|
|
//
|
|
|
|
|
// 生命周期
|
|
|
|
|
// 1. 在回调函数中有效
|
|
|
|
|
// 2. 回调函数外使用 cef.V8ContextRef.Current() 获取上下文对象
|
2023-02-23 14:34:23 +08:00
|
|
|
|
type ICefV8Context struct {
|
2023-03-09 23:17:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-02-23 14:34:23 +08:00
|
|
|
|
instance unsafe.Pointer
|
2023-03-02 18:47:39 +08:00
|
|
|
|
browser *ICefBrowser
|
|
|
|
|
frame *ICefFrame
|
|
|
|
|
global *ICefV8Value
|
2023-02-23 14:34:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefV8Value
|
2023-08-23 19:27:42 +08:00
|
|
|
|
// CEF V8 值类型, 对应到 JavaScrip 的类型, 使用该对象时需要合理的管理释放
|
2023-02-23 14:34:23 +08:00
|
|
|
|
type ICefV8Value struct {
|
2023-03-13 10:50:45 +08:00
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
2023-08-23 19:27:42 +08:00
|
|
|
|
valueType V8ValueType // 值类型
|
|
|
|
|
valueByIndex []*ICefV8Value // 当前对象的所有数组集合
|
|
|
|
|
valueByKeys map[string]*ICefV8Value // 当前对象的所有key=value子集合
|
|
|
|
|
cantNotFree bool // 是否允许释放, false时允许释放
|
2023-02-23 14:34:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-03 10:00:29 +08:00
|
|
|
|
// ICefV8ValueKeys
|
|
|
|
|
type ICefV8ValueKeys struct {
|
2023-03-03 11:43:19 +08:00
|
|
|
|
keys *lcl.TStrings
|
|
|
|
|
count int
|
|
|
|
|
keyArray []string
|
2023-03-03 10:00:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-27 11:33:00 +08:00
|
|
|
|
// TCefV8ValueArray ICefV8Value 数组的替代结构
|
|
|
|
|
type TCefV8ValueArray struct {
|
2023-03-02 22:20:42 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
arguments uintptr
|
|
|
|
|
argumentsLength int
|
|
|
|
|
argumentsCollect []*ICefV8Value
|
2023-02-27 11:33:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-23 14:34:23 +08:00
|
|
|
|
// ICefV8Handler
|
|
|
|
|
type ICefV8Handler struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefV8Interceptor
|
|
|
|
|
type ICefV8Interceptor struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//ICefV8Accessor
|
|
|
|
|
type ICefV8Accessor struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// ICefStreamReader
|
|
|
|
|
type ICefStreamReader struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefPrintSettings
|
|
|
|
|
type ICefPrintSettings struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefSelectClientCertificateCallback
|
|
|
|
|
// /include/capi/cef_request_handler_capi.h (cef_select_client_certificate_callback_t)
|
|
|
|
|
type ICefSelectClientCertificateCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefResourceReadCallback
|
|
|
|
|
// /include/capi/cef_resource_handler_capi.h (cef_resource_read_callback_t)
|
|
|
|
|
type ICefResourceReadCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefResourceSkipCallback
|
|
|
|
|
// /include/capi/cef_resource_handler_capi.h (cef_resource_skip_callback_t)
|
|
|
|
|
type ICefResourceSkipCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefDeleteCookiesCallback
|
|
|
|
|
type ICefDeleteCookiesCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
2023-07-03 17:23:26 +08:00
|
|
|
|
ct CefCreateType
|
2023-05-31 17:41:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefSetCookieCallback
|
|
|
|
|
type ICefSetCookieCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
2023-07-03 17:23:26 +08:00
|
|
|
|
ct CefCreateType
|
2023-05-31 17:41:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefPrintDialogCallback
|
|
|
|
|
type ICefPrintDialogCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefPrintJobCallback
|
|
|
|
|
type ICefPrintJobCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefCallback
|
|
|
|
|
type ICefCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefAuthCallback 授权回调
|
|
|
|
|
type ICefAuthCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-23 14:34:23 +08:00
|
|
|
|
//ICefV8ArrayBufferReleaseCallback
|
|
|
|
|
type ICefV8ArrayBufferReleaseCallback struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// ICefGetExtensionResourceCallback
|
|
|
|
|
type ICefGetExtensionResourceCallback struct {
|
2023-03-13 18:12:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-02-28 09:55:20 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefDownloadItemCallback
|
|
|
|
|
//
|
|
|
|
|
// 下载中回调
|
|
|
|
|
type ICefDownloadItemCallback struct {
|
2023-03-13 18:12:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-02-28 09:55:20 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefBeforeDownloadCallback
|
|
|
|
|
//
|
|
|
|
|
// 下载之前回调
|
|
|
|
|
type ICefBeforeDownloadCallback struct {
|
2023-03-13 18:12:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-02-28 09:55:20 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-01 23:02:14 +08:00
|
|
|
|
// ICefPdfPrintCallback
|
|
|
|
|
type ICefPdfPrintCallback struct {
|
2023-03-13 18:12:55 +08:00
|
|
|
|
base TCefBaseRefCounted
|
2023-03-01 23:02:14 +08:00
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// ICefCompletionCallback
|
|
|
|
|
type ICefCompletionCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefRunContextMenuCallback
|
|
|
|
|
// /include/capi/cef_context_menu_handler_capi.h (cef_run_context_menu_callback_t)
|
|
|
|
|
type ICefRunContextMenuCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefRunQuickMenuCallback
|
|
|
|
|
// /include/capi/cef_context_menu_handler_capi.h (cef_run_quick_menu_callback_t)
|
|
|
|
|
type ICefRunQuickMenuCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefFileDialogCallback
|
|
|
|
|
// /include/capi/cef_dialog_handler_capi.h (cef_file_dialog_callback_t)
|
|
|
|
|
type ICefFileDialogCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-02 10:58:21 +08:00
|
|
|
|
// TCefRunFileDialogCallback
|
|
|
|
|
// /include/capi/cef_browser_capi.h (cef_run_file_dialog_callback_t)
|
|
|
|
|
type ICefRunFileDialogCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-02 13:58:45 +08:00
|
|
|
|
// TCefDownloadImageCallback
|
|
|
|
|
// /include/capi/cef_browser_capi.h (cef_download_image_callback_t)
|
|
|
|
|
type ICefDownloadImageCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// ICefMediaAccessCallback
|
|
|
|
|
// This interface is declared twice with almost identical parameters. "allowed_permissions" is defined as int and uint32.
|
|
|
|
|
// /include/capi/cef_media_access_handler_capi.h (cef_media_access_callback_t)
|
|
|
|
|
// /include/capi/cef_permission_handler_capi.h (cef_media_access_callback_t)
|
|
|
|
|
type ICefMediaAccessCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefPermissionPromptCallback
|
|
|
|
|
// /include/capi/cef_permission_handler_capi.h (cef_permission_prompt_callback_t)
|
|
|
|
|
type ICefPermissionPromptCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefJsDialogCallback
|
|
|
|
|
// /include/capi/cef_jsdialog_handler_capi.h (cef_jsdialog_callback_t)
|
|
|
|
|
type ICefJsDialogCallback struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-14 11:06:08 +08:00
|
|
|
|
// ICefV8StackTrace
|
|
|
|
|
type ICefV8StackTrace struct {
|
2023-03-13 22:40:20 +08:00
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// ICefContextMenuParams 菜单显示时参数,当前鼠标右键的frame & html元素参数
|
|
|
|
|
type ICefContextMenuParams struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-14 11:06:08 +08:00
|
|
|
|
// ICefDomNode
|
|
|
|
|
type ICefDomNode struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefMediaRouteArray
|
|
|
|
|
// []ICefMediaRoute
|
|
|
|
|
type TCefMediaRouteArray struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
mediaRoute []*ICefMediaRoute
|
|
|
|
|
count uint32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefMediaRoute
|
|
|
|
|
// /include/capi/cef_media_router_capi.h (cef_media_observer_t)
|
|
|
|
|
type ICefMediaRoute struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TCefMediaSinkArray
|
|
|
|
|
// []ICefMediaSink
|
|
|
|
|
type TCefMediaSinkArray struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
mediaSink []*ICefMediaSink
|
|
|
|
|
count uint32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefMediaSink
|
|
|
|
|
// /include/capi/cef_media_router_capi.h (cef_media_sink_t)
|
|
|
|
|
type ICefMediaSink struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ICefNavigationEntry
|
|
|
|
|
// /include/capi/cef_navigation_entry_capi.h (cef_navigation_entry_t)
|
|
|
|
|
type ICefNavigationEntry struct {
|
|
|
|
|
base TCefBaseRefCounted
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-14 11:06:08 +08:00
|
|
|
|
// TCefPreferenceRegistrarRef
|
|
|
|
|
type TCefPreferenceRegistrarRef struct {
|
|
|
|
|
instance unsafe.Pointer
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefRange
|
|
|
|
|
// /include/internal/cef_types_geometry.h (cef_range_t)
|
|
|
|
|
type TCefRange struct {
|
|
|
|
|
From int32
|
|
|
|
|
To int32
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-02 20:54:43 +08:00
|
|
|
|
// /include/internal/cef_types_geometry.h (cef_insets_t)
|
|
|
|
|
type TCefInsets struct {
|
|
|
|
|
Top int32
|
|
|
|
|
Left int32
|
|
|
|
|
Bottom int32
|
|
|
|
|
Right int32
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// TCefAudioParameters
|
|
|
|
|
// /include/internal/cef_types.h (cef_audio_parameters_t)
|
|
|
|
|
type TCefAudioParameters struct {
|
|
|
|
|
channelLayout TCefChannelLayout
|
|
|
|
|
sampleRate int32
|
|
|
|
|
framesPerBuffer int32
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-01 20:25:21 +08:00
|
|
|
|
type CefPdfPrintSettings struct {
|
2023-03-01 23:02:14 +08:00
|
|
|
|
Landscape int32 // Integer
|
|
|
|
|
PrintBackground int32 // Integer
|
|
|
|
|
Scale float64 // double
|
|
|
|
|
PaperWidth float64 // double
|
|
|
|
|
PaperHeight float64 // double
|
|
|
|
|
PreferCssPageSize int32 // Integer
|
|
|
|
|
MarginType TCefPdfPrintMarginType // TCefPdfPrintMarginType
|
|
|
|
|
MarginTop float64 // double
|
|
|
|
|
MarginRight float64 // double
|
|
|
|
|
MarginBottom float64 // double
|
|
|
|
|
MarginLeft float64 // double
|
|
|
|
|
PageRanges string // TCefString
|
|
|
|
|
DisplayHeaderFooter int32 // Integer
|
|
|
|
|
HeaderTemplate string // TCefString
|
|
|
|
|
FooterTemplate string // TCefString
|
2023-03-01 20:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 17:41:14 +08:00
|
|
|
|
// /include/internal/cef_types.h (cef_popup_features_t)
|
|
|
|
|
type TCefPopupFeatures struct {
|
|
|
|
|
X int32
|
|
|
|
|
XSet int32
|
|
|
|
|
Y int32
|
|
|
|
|
YSet int32
|
|
|
|
|
Width int32
|
|
|
|
|
WidthSet int32
|
|
|
|
|
Height int32
|
|
|
|
|
HeightSet int32
|
|
|
|
|
MenuBarVisible int32
|
|
|
|
|
StatusBarVisible int32
|
|
|
|
|
ToolBarVisible int32
|
|
|
|
|
ScrollbarsVisible int32
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-02 12:48:15 +08:00
|
|
|
|
// /include/internal/cef_types.h (cef_composition_underline_t)
|
|
|
|
|
type TCefCompositionUnderline struct {
|
|
|
|
|
Range TCefRange
|
2023-07-04 18:13:32 +08:00
|
|
|
|
Color TCefColor
|
|
|
|
|
BackgroundColor TCefColor
|
2023-06-02 12:48:15 +08:00
|
|
|
|
Thick int32
|
|
|
|
|
Style TCefCompositionUnderlineStyle
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 18:13:32 +08:00
|
|
|
|
type TCefCompositionUnderlineArray struct {
|
|
|
|
|
count int
|
|
|
|
|
ptr uintptr
|
|
|
|
|
sizeOf uintptr
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 15:11:45 +08:00
|
|
|
|
// /include/internal/cef_types.h (cef_box_layout_settings_t)
|
|
|
|
|
type TCefBoxLayoutSettings struct {
|
|
|
|
|
Horizontal Integer
|
|
|
|
|
InsideBorderHorizontalSpacing Integer
|
|
|
|
|
InsideBorderVerticalSpacing Integer
|
|
|
|
|
InsideBorderInsets TCefInsets
|
|
|
|
|
BetweenChildSpacing Integer
|
|
|
|
|
MainAxisAlignment TCefMainAxisAlignment
|
|
|
|
|
CrossAxisAlignment TCefCrossAxisAlignment
|
|
|
|
|
MinimumCrossAxisSize Integer
|
|
|
|
|
DefaultFlex Integer
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-14 11:06:08 +08:00
|
|
|
|
// ResultString 字符串返回值
|
|
|
|
|
type ResultString struct {
|
|
|
|
|
value string
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-19 12:41:52 +08:00
|
|
|
|
type TChromiumOptions struct {
|
|
|
|
|
Chromium IChromium
|
|
|
|
|
javascript TCefState
|
|
|
|
|
javascriptCloseWindows TCefState
|
|
|
|
|
javascriptAccessClipboard TCefState
|
|
|
|
|
javascriptDomPaste TCefState
|
|
|
|
|
imageLoading TCefState
|
|
|
|
|
imageShrinkStandaloneToFit TCefState
|
|
|
|
|
textAreaResize TCefState
|
|
|
|
|
tabToLinks TCefState
|
|
|
|
|
localStorage TCefState
|
|
|
|
|
databases TCefState
|
|
|
|
|
webgl TCefState
|
|
|
|
|
backgroundColor TCefColor
|
|
|
|
|
acceptLanguageList String
|
|
|
|
|
windowlessFrameRate Integer
|
|
|
|
|
chromeStatusBubble TCefState
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-04 19:48:30 +08:00
|
|
|
|
func (m *TCefCompositionUnderlineArray) Count() int {
|
|
|
|
|
return m.count
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *TCefCompositionUnderlineArray) Get(index int) *TCefCompositionUnderline {
|
|
|
|
|
if index >= 0 && index < m.count {
|
|
|
|
|
return (*TCefCompositionUnderline)(common.GetParamPtr(m.ptr, index*int(m.sizeOf)))
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-14 11:06:08 +08:00
|
|
|
|
func (m *ResultString) SetValue(value string) {
|
|
|
|
|
m.value = value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *ResultString) Value() string {
|
|
|
|
|
return m.value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ResultBool bool返回值
|
|
|
|
|
type ResultBool struct {
|
|
|
|
|
value bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *ResultBool) SetValue(value bool) {
|
|
|
|
|
m.value = value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *ResultBool) Value() bool {
|
|
|
|
|
return m.value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ResultBytes []byte返回值
|
|
|
|
|
type ResultBytes struct {
|
|
|
|
|
value []byte
|
2023-02-23 22:19:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-14 11:06:08 +08:00
|
|
|
|
func (m *ResultBytes) SetValue(value []byte) {
|
|
|
|
|
m.value = value
|
2023-02-23 22:19:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-14 11:06:08 +08:00
|
|
|
|
func (m *ResultBytes) Value() []byte {
|
|
|
|
|
return m.value
|
2023-02-23 22:19:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// NewCefRect
|
2023-01-07 11:48:19 +08:00
|
|
|
|
func NewCefRect(x, y, width, height int32) *TCefRect {
|
|
|
|
|
return &TCefRect{
|
|
|
|
|
X: x,
|
|
|
|
|
Y: y,
|
|
|
|
|
Width: width,
|
|
|
|
|
Height: height,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// NewCefSize
|
2022-12-27 21:38:01 +08:00
|
|
|
|
func NewCefSize(width, height int32) *TCefSize {
|
|
|
|
|
return &TCefSize{
|
|
|
|
|
Width: width,
|
|
|
|
|
Height: height,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 14:42:17 +08:00
|
|
|
|
// NewCefPoint
|
2023-01-07 11:48:19 +08:00
|
|
|
|
func NewCefPoint(x, y int32) *TCefPoint {
|
|
|
|
|
return &TCefPoint{
|
|
|
|
|
X: x,
|
|
|
|
|
Y: y,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-04 13:21:05 +08:00
|
|
|
|
func (m *TCefKeyEvent) KeyDown() bool {
|
|
|
|
|
return m.Kind == KEYEVENT_RAW_KEYDOWN || m.Kind == KEYEVENT_KEYDOWN
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *TCefKeyEvent) KeyUp() bool {
|
|
|
|
|
return m.Kind == KEYEVENT_KEYUP
|
|
|
|
|
}
|