Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
energye
energy
提交
df99fca5
energy
项目概览
energye
/
energy
通知
13
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
energy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
df99fca5
编写于
2月 25, 2023
作者:
yanghye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
升级和优化,绑定和进程通信 v7
上级
98ce4aaf
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
240 addition
and
177 deletion
+240
-177
cef/cef-proc-def.go
cef/cef-proc-def.go
+74
-0
cef/cef-types-binary-value.go
cef/cef-types-binary-value.go
+57
-0
cef/cef-types-dictionary-value.go
cef/cef-types-dictionary-value.go
+18
-0
cef/cef-types-v8-value.go
cef/cef-types-v8-value.go
+0
-135
cef/cef-types-value.go
cef/cef-types-value.go
+74
-40
example/browser-frameless/frameless.go
example/browser-frameless/frameless.go
+1
-1
example/dev-test/process-message/process-message.go
example/dev-test/process-message/process-message.go
+16
-1
未找到文件。
cef/cef-proc-def.go
浏览文件 @
df99fca5
...
...
@@ -718,6 +718,43 @@ func init() {
dllimports
.
NewEnergyImport
(
"CefValue_SetBinary"
,
0
),
dllimports
.
NewEnergyImport
(
"CefValue_SetDictionary"
,
0
),
dllimports
.
NewEnergyImport
(
"CefValue_SetList"
,
0
),
//ICefBinaryValue
dllimports
.
NewEnergyImport
(
"CefBinaryValueRef_New"
,
0
),
dllimports
.
NewEnergyImport
(
"CefBinaryValueRef_Create"
,
0
),
dllimports
.
NewEnergyImport
(
"CefBinaryValue_IsValid"
,
0
),
dllimports
.
NewEnergyImport
(
"CefBinaryValue_IsOwned"
,
0
),
dllimports
.
NewEnergyImport
(
"CefBinaryValue_Copy"
,
0
),
dllimports
.
NewEnergyImport
(
"CefBinaryValue_GetSize"
,
0
),
dllimports
.
NewEnergyImport
(
"CefBinaryValue_GetData"
,
0
),
//ICefDictionaryValue
dllimports
.
NewEnergyImport
(
"CefDictionaryValueRef_New"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_IsValid"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_isOwned"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_IsReadOnly"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_Copy"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetSize"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_Clear"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_HasKey"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetKeys"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_Remove"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetType"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetValue"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetBool"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetInt"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetDouble"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetString"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetBinary"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetDictionary"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_GetList"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_SetValue"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_SetNull"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_SetBool"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_SetInt"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_SetDouble"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_SetString"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_SetBinary"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_SetDictionary"
,
0
),
dllimports
.
NewEnergyImport
(
"CefDictionaryValue_SetList"
,
0
),
}
imports
.
SetEnergyImportDefs
(
energyImportDefs
)
}
...
...
@@ -1424,4 +1461,41 @@ const (
internale_CefValue_SetBinary
internale_CefValue_SetDictionary
internale_CefValue_SetList
//ICefBinaryValue
internale_CefBinaryValueRef_New
internale_CefBinaryValueRef_Create
internale_CefBinaryValue_IsValid
internale_CefBinaryValue_IsOwned
internale_CefBinaryValue_Copy
internale_CefBinaryValue_GetSize
internale_CefBinaryValue_GetData
//ICefDictionaryValue
internale_CefDictionaryValueRef_New
internale_CefDictionaryValue_IsValid
internale_CefDictionaryValue_isOwned
internale_CefDictionaryValue_IsReadOnly
internale_CefDictionaryValue_Copy
internale_CefDictionaryValue_GetSize
internale_CefDictionaryValue_Clear
internale_CefDictionaryValue_HasKey
internale_CefDictionaryValue_GetKeys
internale_CefDictionaryValue_Remove
internale_CefDictionaryValue_GetType
internale_CefDictionaryValue_GetValue
internale_CefDictionaryValue_GetBool
internale_CefDictionaryValue_GetInt
internale_CefDictionaryValue_GetDouble
internale_CefDictionaryValue_GetString
internale_CefDictionaryValue_GetBinary
internale_CefDictionaryValue_GetDictionary
internale_CefDictionaryValue_GetList
internale_CefDictionaryValue_SetValue
internale_CefDictionaryValue_SetNull
internale_CefDictionaryValue_SetBool
internale_CefDictionaryValue_SetInt
internale_CefDictionaryValue_SetDouble
internale_CefDictionaryValue_SetString
internale_CefDictionaryValue_SetBinary
internale_CefDictionaryValue_SetDictionary
internale_CefDictionaryValue_SetList
)
cef/cef-types-binary-value.go
浏览文件 @
df99fca5
package
cef
import
(
"github.com/energye/energy/common/imports"
"github.com/energye/energy/types"
"github.com/energye/golcl/lcl/api"
"unsafe"
)
// BinaryValueRef -> ICefBinaryValue
var
BinaryValueRef
cefBinaryValue
//cefBinaryValue
type
cefBinaryValue
uintptr
func
(
*
cefBinaryValue
)
New
(
data
[]
byte
)
*
ICefBinaryValue
{
var
result
uintptr
imports
.
Proc
(
internale_CefBinaryValueRef_New
)
.
Call
(
uintptr
(
unsafe
.
Pointer
(
&
data
[
0
])),
uintptr
(
uint32
(
len
(
data
))),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefBinaryValue
{
instance
:
unsafe
.
Pointer
(
result
),
}
}
func
(
*
cefBinaryValue
)
Create
()
*
ICefBinaryValue
{
var
result
uintptr
imports
.
Proc
(
internale_CefBinaryValueRef_Create
)
.
Call
(
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefBinaryValue
{
instance
:
unsafe
.
Pointer
(
result
),
}
}
// Instance 实例
func
(
m
*
ICefBinaryValue
)
Instance
()
uintptr
{
if
m
==
nil
{
...
...
@@ -7,3 +36,31 @@ func (m *ICefBinaryValue) Instance() uintptr {
}
return
uintptr
(
m
.
instance
)
}
func
(
m
*
ICefBinaryValue
)
IsValid
()
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefBinaryValue_IsValid
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefBinaryValue
)
IsOwned
()
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefBinaryValue_IsOwned
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefBinaryValue
)
Copy
()
*
ICefBinaryValue
{
var
result
uintptr
imports
.
Proc
(
internale_CefBinaryValue_Copy
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefBinaryValue
{
instance
:
unsafe
.
Pointer
(
result
),
}
}
func
(
m
*
ICefBinaryValue
)
GetSize
()
uint32
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefBinaryValue_GetSize
)
.
Call
(
m
.
Instance
())
return
uint32
(
r1
)
}
func
(
m
*
ICefBinaryValue
)
GetData
(
buffer
[]
byte
,
dataOffset
types
.
NativeUInt
)
uint32
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefBinaryValue_GetData
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
buffer
[
0
])),
uintptr
(
uint32
(
len
(
buffer
))),
dataOffset
.
ToPtr
())
return
uint32
(
r1
)
}
cef/cef-types-dictionary-value.go
浏览文件 @
df99fca5
package
cef
import
(
"unsafe"
)
// DictionaryValueRef -> ICefDictionaryValue
var
DictionaryValueRef
cefDictionaryValue
//cefDictionaryValue
type
cefDictionaryValue
uintptr
func
(
*
cefDictionaryValue
)
New
()
*
ICefDictionaryValue
{
var
result
uintptr
//imports.Proc(internale_CefBinaryValueRef_New).Call(uintptr(unsafe.Pointer(&data[0])), uintptr(uint32(len(data))), uintptr(unsafe.Pointer(&result)))
return
&
ICefDictionaryValue
{
instance
:
unsafe
.
Pointer
(
result
),
}
}
// Instance 实例
func
(
m
*
ICefDictionaryValue
)
Instance
()
uintptr
{
if
m
==
nil
{
...
...
cef/cef-types-v8-value.go
浏览文件 @
df99fca5
...
...
@@ -25,170 +25,107 @@ func (m *ICefV8Value) IsValid() bool {
}
func
(
m
*
ICefV8Value
)
IsUndefined
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsUndefined
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsNull
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsNull
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsBool
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsBool
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsInt
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsInt
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsUInt
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsUInt
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsDouble
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsDouble
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsDate
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsDate
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsString
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsString
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsObject
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsObject
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsArray
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsArray
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsArrayBuffer
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsArrayBuffer
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsFunction
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsFunction
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsPromise
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsPromise
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsSame
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsSame
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
GetBoolValue
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_GetBoolValue
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
GetIntValue
()
int32
{
if
!
m
.
IsValid
()
{
return
0
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_GetIntValue
)
.
Call
(
m
.
Instance
())
return
int32
(
r1
)
}
func
(
m
*
ICefV8Value
)
GetUIntValue
()
uint32
{
if
!
m
.
IsValid
()
{
return
0
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_GetIntValue
)
.
Call
(
m
.
Instance
())
return
uint32
(
r1
)
}
func
(
m
*
ICefV8Value
)
GetDoubleValue
()
(
result
float64
)
{
if
!
m
.
IsValid
()
{
return
0
}
imports
.
Proc
(
internale_CefV8Value_GetDoubleValue
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
result
}
func
(
m
*
ICefV8Value
)
GetDateValue
()
time
.
Time
{
if
!
m
.
IsValid
()
{
return
time
.
Time
{}
}
var
result
float64
imports
.
Proc
(
internale_CefV8Value_GetDateValue
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
common
.
DDateTimeToGoDateTime
(
result
)
}
func
(
m
*
ICefV8Value
)
GetStringValue
()
string
{
if
!
m
.
IsValid
()
{
return
""
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_GetStringValue
)
.
Call
(
m
.
Instance
())
return
api
.
GoStr
(
r1
)
}
func
(
m
*
ICefV8Value
)
IsUserCreated
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_IsUserCreated
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
...
...
@@ -203,65 +140,41 @@ func (m *ICefV8Value) IsUserCreated() bool {
//}
func
(
m
*
ICefV8Value
)
ClearException
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_ClearException
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
WillRethrowExceptions
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_WillRethrowExceptions
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
SetRethrowExceptions
(
reThrow
bool
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_SetRethrowExceptions
)
.
Call
(
m
.
Instance
(),
api
.
PascalBool
(
reThrow
))
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
HasValueByKey
(
key
string
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_HasValueByKey
)
.
Call
(
m
.
Instance
(),
api
.
PascalStr
(
key
))
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
HasValueByIndex
(
index
int32
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_HasValueByIndex
)
.
Call
(
m
.
Instance
(),
uintptr
(
index
))
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
DeleteValueByKey
(
key
string
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_DeleteValueByKey
)
.
Call
(
m
.
Instance
(),
api
.
PascalStr
(
key
))
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
DeleteValueByIndex
(
index
int32
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_DeleteValueByIndex
)
.
Call
(
m
.
Instance
(),
uintptr
(
index
))
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
GetValueByKey
(
key
string
)
*
ICefV8Value
{
if
!
m
.
IsValid
()
{
return
nil
}
var
result
uintptr
imports
.
Proc
(
internale_CefV8Value_GetValueByKey
)
.
Call
(
m
.
Instance
(),
api
.
PascalStr
(
key
),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefV8Value
{
...
...
@@ -270,9 +183,6 @@ func (m *ICefV8Value) GetValueByKey(key string) *ICefV8Value {
}
func
(
m
*
ICefV8Value
)
GetValueByIndex
(
index
int32
)
*
ICefV8Value
{
if
!
m
.
IsValid
()
{
return
nil
}
var
result
uintptr
imports
.
Proc
(
internale_CefV8Value_GetValueByIndex
)
.
Call
(
m
.
Instance
(),
uintptr
(
index
),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefV8Value
{
...
...
@@ -281,25 +191,16 @@ func (m *ICefV8Value) GetValueByIndex(index int32) *ICefV8Value {
}
func
(
m
*
ICefV8Value
)
SetValueByKey
(
key
string
,
value
*
ICefV8Value
,
attribute
consts
.
TCefV8PropertyAttributes
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_SetValueByKey
)
.
Call
(
m
.
Instance
(),
api
.
PascalStr
(
key
),
value
.
Instance
(),
attribute
.
ToPtr
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
SetValueByIndex
(
index
int32
,
value
*
ICefV8Value
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_SetValueByIndex
)
.
Call
(
m
.
Instance
(),
uintptr
(
index
),
value
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
SetValueByAccessor
(
key
string
,
settings
consts
.
TCefV8AccessControls
,
attribute
consts
.
TCefV8PropertyAttributes
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_SetValueByAccessor
)
.
Call
(
m
.
Instance
(),
api
.
PascalStr
(
key
),
settings
.
ToPtr
(),
attribute
.
ToPtr
())
return
api
.
GoBool
(
r1
)
}
...
...
@@ -310,17 +211,11 @@ func (m *ICefV8Value) SetValueByAccessor(key string, settings consts.TCefV8Acces
//}
func
(
m
*
ICefV8Value
)
SetUserData
(
data
*
ICefV8Value
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_SetUserData
)
.
Call
(
m
.
Instance
(),
data
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
GetUserData
()
*
ICefV8Value
{
if
!
m
.
IsValid
()
{
return
nil
}
var
result
uintptr
imports
.
Proc
(
internale_CefV8Value_GetUserData
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefV8Value
{
...
...
@@ -329,25 +224,16 @@ func (m *ICefV8Value) GetUserData() *ICefV8Value {
}
func
(
m
*
ICefV8Value
)
GetExternallyAllocatedMemory
()
int32
{
if
!
m
.
IsValid
()
{
return
0
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_GetExternallyAllocatedMemory
)
.
Call
(
m
.
Instance
())
return
int32
(
r1
)
}
func
(
m
*
ICefV8Value
)
AdjustExternallyAllocatedMemory
(
changeInBytes
int32
)
int32
{
if
!
m
.
IsValid
()
{
return
0
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_AdjustExternallyAllocatedMemory
)
.
Call
(
m
.
Instance
(),
uintptr
(
changeInBytes
))
return
int32
(
r1
)
}
func
(
m
*
ICefV8Value
)
GetArrayLength
()
int32
{
if
!
m
.
IsValid
()
{
return
0
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_GetArrayLength
)
.
Call
(
m
.
Instance
())
return
int32
(
r1
)
}
...
...
@@ -357,25 +243,16 @@ func (m *ICefV8Value) GetArrayLength() int32 {
//}
func
(
m
*
ICefV8Value
)
NeuterArrayBuffer
()
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_NeuterArrayBuffer
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
GetFunctionName
()
string
{
if
!
m
.
IsValid
()
{
return
""
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_GetFunctionName
)
.
Call
(
m
.
Instance
())
return
api
.
GoStr
(
r1
)
}
func
(
m
*
ICefV8Value
)
GetFunctionHandler
()
*
ICefV8Handler
{
if
!
m
.
IsValid
()
{
return
nil
}
var
result
uintptr
imports
.
Proc
(
internale_CefV8Value_GetFunctionHandler
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefV8Handler
{
...
...
@@ -384,9 +261,6 @@ func (m *ICefV8Value) GetFunctionHandler() *ICefV8Handler {
}
func
(
m
*
ICefV8Value
)
ExecuteFunction
(
obj
*
ICefV8Value
,
arguments
[]
*
ICefV8Value
)
*
ICefV8Value
{
if
!
m
.
IsValid
()
{
return
nil
}
var
result
uintptr
imports
.
Proc
(
internale_CefV8Value_ExecuteFunction
)
.
Call
(
m
.
Instance
(),
obj
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)),
uintptr
(
unsafe
.
Pointer
(
arguments
[
0
])),
uintptr
(
int32
(
len
(
arguments
))))
return
&
ICefV8Value
{
...
...
@@ -395,9 +269,6 @@ func (m *ICefV8Value) ExecuteFunction(obj *ICefV8Value, arguments []*ICefV8Value
}
func
(
m
*
ICefV8Value
)
ExecuteFunctionWithContext
(
v8Context
*
ICefV8Context
,
obj
*
ICefV8Value
,
arguments
[]
*
ICefV8Value
)
*
ICefV8Value
{
if
!
m
.
IsValid
()
{
return
nil
}
var
result
uintptr
imports
.
Proc
(
internale_CefV8Value_ExecuteFunctionWithContext
)
.
Call
(
m
.
Instance
(),
v8Context
.
Instance
(),
obj
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)),
uintptr
(
unsafe
.
Pointer
(
arguments
[
0
])),
uintptr
(
int32
(
len
(
arguments
))))
return
&
ICefV8Value
{
...
...
@@ -406,17 +277,11 @@ func (m *ICefV8Value) ExecuteFunctionWithContext(v8Context *ICefV8Context, obj *
}
func
(
m
*
ICefV8Value
)
ResolvePromise
(
arg
*
ICefV8Value
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_ResolvePromise
)
.
Call
(
m
.
Instance
(),
arg
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefV8Value
)
RejectPromise
(
errorMsg
string
)
bool
{
if
!
m
.
IsValid
()
{
return
false
}
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefV8Value_RejectPromise
)
.
Call
(
m
.
Instance
(),
api
.
PascalStr
(
errorMsg
))
return
api
.
GoBool
(
r1
)
}
...
...
cef/cef-types-value.go
浏览文件 @
df99fca5
...
...
@@ -2,6 +2,8 @@ package cef
import
(
"github.com/energye/energy/common/imports"
"github.com/energye/energy/consts"
"github.com/energye/golcl/lcl/api"
"unsafe"
)
...
...
@@ -27,82 +29,114 @@ func (m *ICefValue) Instance() uintptr {
return
uintptr
(
m
.
instance
)
}
func
(
m
*
ICefValue
)
IsValid
()
{
func
(
m
*
ICefValue
)
IsValid
()
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_IsValid
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
IsOwned
()
{
func
(
m
*
ICefValue
)
IsOwned
()
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_IsOwned
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
IsReadOnly
()
{
func
(
m
*
ICefValue
)
IsReadOnly
()
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_IsReadOnly
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
Copy
()
{
func
(
m
*
ICefValue
)
Copy
()
*
ICefValue
{
var
result
uintptr
imports
.
Proc
(
internale_CefValue_Copy
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefValue
{
instance
:
unsafe
.
Pointer
(
result
),
}
}
func
(
m
*
ICefValue
)
GetType
()
{
func
(
m
*
ICefValue
)
GetType
()
consts
.
TCefValueType
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_GetType
)
.
Call
(
m
.
Instance
())
return
consts
.
TCefValueType
(
r1
)
}
func
(
m
*
ICefValue
)
GetBool
()
{
func
(
m
*
ICefValue
)
GetBool
()
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_GetBool
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
GetInt
()
{
func
(
m
*
ICefValue
)
GetInt
()
int32
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_GetInt
)
.
Call
(
m
.
Instance
())
return
int32
(
r1
)
}
func
(
m
*
ICefValue
)
GetDouble
()
{
func
(
m
*
ICefValue
)
GetDouble
()
(
result
float64
)
{
imports
.
Proc
(
internale_CefValue_GetDouble
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
result
}
func
(
m
*
ICefValue
)
GetString
()
{
func
(
m
*
ICefValue
)
GetString
()
string
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_GetString
)
.
Call
(
m
.
Instance
())
return
api
.
GoStr
(
r1
)
}
func
(
m
*
ICefValue
)
GetBinary
()
{
func
(
m
*
ICefValue
)
GetBinary
()
*
ICefBinaryValue
{
var
result
uintptr
imports
.
Proc
(
internale_CefValue_GetBinary
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefBinaryValue
{
instance
:
unsafe
.
Pointer
(
result
),
}
}
func
(
m
*
ICefValue
)
GetDictionary
()
{
func
(
m
*
ICefValue
)
GetDictionary
()
*
ICefDictionaryValue
{
var
result
uintptr
imports
.
Proc
(
internale_CefValue_GetDictionary
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefDictionaryValue
{
instance
:
unsafe
.
Pointer
(
result
),
}
}
func
(
m
*
ICefValue
)
GetList
()
{
func
(
m
*
ICefValue
)
GetList
()
*
ICefListValue
{
var
result
uintptr
imports
.
Proc
(
internale_CefValue_GetList
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
result
)))
return
&
ICefListValue
{
instance
:
unsafe
.
Pointer
(
result
),
}
}
func
(
m
*
ICefValue
)
SetNull
()
{
func
(
m
*
ICefValue
)
SetNull
()
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_SetNull
)
.
Call
(
m
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
SetBool
()
{
func
(
m
*
ICefValue
)
SetBool
(
value
bool
)
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_SetBool
)
.
Call
(
m
.
Instance
(),
api
.
PascalBool
(
value
))
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
SetInt
()
{
func
(
m
*
ICefValue
)
SetInt
(
value
int32
)
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_SetInt
)
.
Call
(
m
.
Instance
(),
uintptr
(
value
))
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
SetDouble
()
{
func
(
m
*
ICefValue
)
SetDouble
(
value
float64
)
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_SetDouble
)
.
Call
(
m
.
Instance
(),
uintptr
(
unsafe
.
Pointer
(
&
value
)))
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
SetString
()
{
func
(
m
*
ICefValue
)
SetString
(
value
string
)
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_SetString
)
.
Call
(
m
.
Instance
(),
api
.
PascalStr
(
value
))
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
SetBinary
()
{
func
(
m
*
ICefValue
)
SetBinary
(
value
*
ICefBinaryValue
)
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_SetBinary
)
.
Call
(
m
.
Instance
(),
value
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
SetDictionary
()
{
func
(
m
*
ICefValue
)
SetDictionary
(
value
*
ICefDictionaryValue
)
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_SetDictionary
)
.
Call
(
m
.
Instance
(),
value
.
Instance
())
return
api
.
GoBool
(
r1
)
}
func
(
m
*
ICefValue
)
SetList
()
{
func
(
m
*
ICefValue
)
SetList
(
value
*
ICefListValue
)
bool
{
r1
,
_
,
_
:=
imports
.
Proc
(
internale_CefValue_SetList
)
.
Call
(
m
.
Instance
(),
value
.
Instance
())
return
api
.
GoBool
(
r1
)
}
example/browser-frameless/frameless.go
浏览文件 @
df99fca5
...
...
@@ -33,7 +33,7 @@ func main() {
cefApp
:=
cef
.
NewApplication
(
config
)
//指定一个URL地址,或本地html文件目录
cef
.
BrowserWindow
.
Config
.
Url
=
"http://localhost:22022/index.html"
cef
.
BrowserWindow
.
Config
.
IconFS
=
"resources/icon.
png
"
cef
.
BrowserWindow
.
Config
.
IconFS
=
"resources/icon.
ico
"
cef
.
BrowserWindow
.
Config
.
EnableHideCaption
=
true
cef
.
BrowserWindow
.
Config
.
Title
=
"Energy Vue + ElementUI 示例"
cef
.
BrowserWindow
.
Config
.
Width
=
1200
...
...
example/dev-test/process-message/process-message.go
浏览文件 @
df99fca5
...
...
@@ -42,7 +42,22 @@ func main() {
message
:=
cef
.
ProcessMessage
.
New
(
"testname"
)
fmt
.
Println
(
"ProcessMessageRef IsValid"
,
message
.
IsValid
(),
message
.
Name
())
list
:=
message
.
ArgumentList
()
fmt
.
Println
(
"ArgumentList IsValid"
,
list
.
IsValid
())
list
.
SetString
(
0
,
"值?"
)
fmt
.
Println
(
"list IsValid"
,
list
.
IsValid
(),
list
.
GetSize
(),
list
.
GetString
(
0
))
listCopy
:=
list
.
Copy
()
fmt
.
Println
(
"listCopy GetString"
,
listCopy
.
IsValid
(),
list
.
GetSize
(),
list
.
GetString
(
0
),
list
.
GetValue
(
0
)
.
GetType
())
listCopy
.
SetDouble
(
1
,
112211.22
)
fmt
.
Println
(
"listCopy GetDouble"
,
listCopy
.
GetDouble
(
1
),
listCopy
.
GetType
(
1
))
data
:=
make
([]
byte
,
1024
,
1024
)
for
i
:=
0
;
i
<
len
(
data
);
i
++
{
data
[
i
]
=
byte
(
i
%
255
)
}
value
:=
cef
.
BinaryValueRef
.
New
(
data
)
fmt
.
Println
(
"BinaryValueNew IsValid"
,
value
.
IsValid
())
fmt
.
Println
(
"BinaryValueNew size"
,
value
.
GetSize
())
buf
:=
make
([]
byte
,
300
)
fmt
.
Println
(
"BinaryValueNew GetData"
,
value
.
GetData
(
buf
,
0
))
fmt
.
Println
(
"BinaryValueNew GetData buf"
,
buf
)
return
true
})
//
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录