energy/cef/application-config.go

1231 lines
39 KiB
Go
Raw Normal View History

2022-10-04 13:21:05 +08:00
//----------------------------------------
//
// Copyright © yanghy. All Rights Reserved.
//
// 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-02-28 21:10:16 +08:00
// 应用程序的属性配置
2023-05-31 17:41:14 +08:00
2022-10-04 13:21:05 +08:00
package cef
import (
2023-05-31 18:00:34 +08:00
"github.com/energye/energy/v2/cef/i18n"
"github.com/energye/energy/v2/cef/internal/def"
2023-06-02 16:18:58 +08:00
"github.com/energye/energy/v2/cef/internal/version"
2023-05-31 18:00:34 +08:00
"github.com/energye/energy/v2/common"
"github.com/energye/energy/v2/common/imports"
. "github.com/energye/energy/v2/consts"
"github.com/energye/energy/v2/types"
2022-12-05 10:44:24 +08:00
"github.com/energye/golcl/energy/tools"
2022-10-04 13:21:05 +08:00
"github.com/energye/golcl/lcl/api"
2022-11-17 11:12:42 +08:00
"os"
2023-03-13 12:54:05 +08:00
"path"
2023-02-28 18:41:12 +08:00
"unsafe"
2022-10-04 13:21:05 +08:00
)
2023-03-02 18:47:39 +08:00
// SetObjectRootName
2023-02-28 18:41:12 +08:00
//
// GO绑定JS对象类型所属对象名定义
func (m *TCEFApplication) SetObjectRootName(name string) {
if name == "" {
2023-03-02 18:47:39 +08:00
//默认值
name = internalObjectRootName
2023-02-28 18:41:12 +08:00
} else {
2023-03-02 18:47:39 +08:00
//自定义
internalObjectRootName = name
2023-02-28 18:41:12 +08:00
}
//imports.Proc(CEFV8ValueRef_SetObjectRootName).Call(api.PascalStr(internalObjectRootName))
2023-02-28 18:41:12 +08:00
}
2023-03-05 16:17:40 +08:00
//initDefaultSettings 初始 energy 默认设置
func (m *TCEFApplication) initDefaultSettings() {
2023-06-22 15:47:57 +08:00
if m.FrameworkDirPath() == "" {
lp := libPath()
if lp != "" {
m.SetFrameworkDirPath(lp)
}
2023-03-13 12:54:05 +08:00
}
2023-05-31 17:41:14 +08:00
m.SetLocale(LANGUAGE_zh_CN)
2022-10-04 13:21:05 +08:00
m.SetLogSeverity(LOGSEVERITY_DISABLE)
2023-05-31 17:41:14 +08:00
m.SetEnablePrintPreview(true)
// 以下条件判断根据不同平台, 启动不同的窗口组件
2023-02-28 21:10:16 +08:00
// ViewsFrameworkBrowserWindow 简称(VF)窗口组件, 同时支持 Windows/Linux/MacOSX
// LCL 窗口组件,同时支持 Windows/MacOSX, CEF版本<=106.xx时支持GTK2, CEF版本 >= 107.xx时默认开启 GTK3 且不支持 GTK2 和 LCL提供的各种组件
2023-06-12 13:01:51 +08:00
if common.IsLinux() { // Linux => (VF)View Framework 窗口
// Linux CEF >= 107.xxx 版本以后默认启用的GTK3106及以前版本默认支持GTK2但无法正常输入中文
// Linux平台默认设置为false,将启用 ViewsFrameworkBrowserWindow 窗口
m.SetExternalMessagePump(false)
m.SetMultiThreadedMessageLoop(false)
2023-02-28 18:41:12 +08:00
// 这是一个解决“GPU不可用错误”问题的方法 linux
// https://bitbucket.org/chromiumembedded/cef/issues/2964/gpu-is-not-usable-error-during-cef
m.SetDisableZygote(true)
2023-06-12 13:01:51 +08:00
} else if common.IsDarwin() { // Darwin => LCL窗口
2023-02-28 18:41:12 +08:00
m.AddCrDelegate()
2023-06-12 13:01:51 +08:00
GlobalWorkSchedulerCreate(nil)
m.SetOnScheduleMessagePumpWork(nil)
2023-02-28 21:10:16 +08:00
// MacOSX 在使用LCL窗口组件必须将 ExternalMessagePump=true 和 MultiThreadedMessageLoop=false
// 或
// 同 Linux 一样使用 ViewsFrameworkBrowserWindow 窗口组件
m.SetExternalMessagePump(true)
m.SetMultiThreadedMessageLoop(false)
2023-06-12 13:01:51 +08:00
} else { // Windows => LCL窗口
m.SetExternalMessagePump(false)
m.SetMultiThreadedMessageLoop(true)
}
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func libCef() string {
if common.IsWindows() {
return "libcef.dll"
} else if common.IsLinux() {
return "libcef.so"
}
return ""
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func libPath() string {
var lib = libCef()
if lib != "" {
//当前目录
if tools.IsExist(ExePath + Separator + lib) {
return ExePath
}
//环境变量
var env = os.Getenv(ENERGY_HOME_KEY)
if tools.IsExist(env + Separator + lib) {
return env
}
}
return ""
2022-10-04 13:21:05 +08:00
}
2023-02-28 21:10:16 +08:00
/*** 设置 TCefSettings (cef_settings_t) 属性 ***/
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) NoSandbox() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_NoSandbox).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetNoSandbox(value bool) {
imports.Proc(def.CEFAppConfig_SetNoSandbox).Call(api.PascalBool(value))
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) BrowserSubprocessPath() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_BrowserSubprocessPath).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetBrowserSubprocessPath(value string) {
imports.Proc(def.CEFAppConfig_SetBrowserSubprocessPath).Call(api.PascalStr(value))
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) FrameworkDirPath() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_FrameworkDirPath).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetFrameworkDirPath(value string) {
imports.Proc(def.CEFAppConfig_SetFrameworkDirPath).Call(api.PascalStr(value))
2023-06-22 15:47:57 +08:00
// 默认 resources 和 locals 在同一目录
m.SetResourcesDirPath(value)
m.SetLocalesDirPath(path.Join(value, "locales"))
2022-10-04 13:21:05 +08:00
}
2023-03-05 12:31:33 +08:00
// MainBundlePath 仅用于macOS
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) MainBundlePath() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_MainBundlePath).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
2022-10-04 13:21:05 +08:00
}
2023-03-05 12:31:33 +08:00
// SetMainBundlePath 仅用于macOS
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetMainBundlePath(value string) {
imports.Proc(def.CEFAppConfig_SetMainBundlePath).Call(api.PascalStr(value))
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) ChromeRuntime() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_ChromeRuntime).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetChromeRuntime(value bool) {
imports.Proc(def.CEFAppConfig_SetChromeRuntime).Call(api.PascalBool(value))
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) MultiThreadedMessageLoop() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_MultiThreadedMessageLoop).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetMultiThreadedMessageLoop(value bool) {
imports.Proc(def.CEFAppConfig_SetMultiThreadedMessageLoop).Call(api.PascalBool(value))
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) ExternalMessagePump() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_ExternalMessagePump).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetExternalMessagePump(value bool) {
imports.Proc(def.CEFAppConfig_SetExternalMessagePump).Call(api.PascalBool(value))
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) WindowlessRenderingEnabled() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_WindowlessRenderingEnabled).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetWindowlessRenderingEnabled(value bool) {
imports.Proc(def.CEFAppConfig_SetWindowlessRenderingEnabled).Call(api.PascalBool(value))
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) CommandLineArgsDisabled() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_CommandLineArgsDisabled).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
2023-03-05 12:31:33 +08:00
// SetCommandLineArgsDisabled 开启/禁用设置命令行参数
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetCommandLineArgsDisabled(value bool) {
imports.Proc(def.CEFAppConfig_SetCommandLineArgsDisabled).Call(api.PascalBool(value))
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) Cache() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_Cache).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetCache(value string) {
imports.Proc(def.CEFAppConfig_SetCache).Call(api.PascalStr(value))
2022-10-04 13:21:05 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) RootCache() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_RootCache).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
2022-10-04 13:21:05 +08:00
}
2022-11-17 11:12:42 +08:00
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetRootCache(value string) {
imports.Proc(def.CEFAppConfig_SetRootCache).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) UserDataPath() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_UserDataPath).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetUserDataPath(value string) {
imports.Proc(def.CEFAppConfig_SetUserDataPath).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) PersistSessionCookies() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_PersistSessionCookies).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetPersistSessionCookies(value bool) {
imports.Proc(def.CEFAppConfig_SetPersistSessionCookies).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) PersistUserPreferences() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_PersistUserPreferences).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetPersistUserPreferences(value bool) {
imports.Proc(def.CEFAppConfig_SetPersistUserPreferences).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) UserAgent() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_UserAgent).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetUserAgent(value string) {
imports.Proc(def.CEFAppConfig_SetUserAgent).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) UserAgentProduct() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_UserAgentProduct).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetUserAgentProduct(value string) {
imports.Proc(def.CEFAppConfig_SetUserAgentProduct).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) Locale() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_Locale).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
2023-05-31 17:41:14 +08:00
func (m *TCEFApplication) SetLocale(value LANGUAGE) {
i18n.Switch(value)
imports.Proc(def.CEFAppConfig_SetLocale).Call(value.ToPtr())
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) LogFile() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_LogFile).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetLogFile(value string) {
imports.Proc(def.CEFAppConfig_SetLogFile).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) LogSeverity() LogSeverity {
r1, _, _ := imports.Proc(def.CEFAppConfig_LogSeverity).Call()
2023-02-28 18:41:12 +08:00
return LogSeverity(r1)
}
func (m *TCEFApplication) SetLogSeverity(value LogSeverity) {
imports.Proc(def.CEFAppConfig_SetLogSeverity).Call(value.ToPtr())
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) JavaScriptFlags() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_JavaScriptFlags).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetJavaScriptFlags(value string) {
imports.Proc(def.CEFAppConfig_SetJavaScriptFlags).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) ResourcesDirPath() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_ResourcesDirPath).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetResourcesDirPath(value string) {
imports.Proc(def.CEFAppConfig_SetResourcesDirPath).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) LocalesDirPath() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_LocalesDirPath).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetLocalesDirPath(value string) {
imports.Proc(def.CEFAppConfig_SetLocalesDirPath).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) PackLoadingDisabled() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_PackLoadingDisabled).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetPackLoadingDisabled(value bool) {
imports.Proc(def.CEFAppConfig_SetPackLoadingDisabled).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) RemoteDebuggingPort() int32 {
r1, _, _ := imports.Proc(def.CEFAppConfig_RemoteDebuggingPort).Call()
2023-02-28 18:41:12 +08:00
return int32(r1)
}
func (m *TCEFApplication) SetRemoteDebuggingPort(value int32) {
if value > 1024 && value < 65535 {
imports.Proc(def.CEFAppConfig_SetRemoteDebuggingPort).Call(uintptr(value))
2022-11-17 11:12:42 +08:00
}
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) UncaughtExceptionStackSize() int32 {
r1, _, _ := imports.Proc(def.CEFAppConfig_UncaughtExceptionStackSize).Call()
2023-02-28 18:41:12 +08:00
return int32(r1)
}
func (m *TCEFApplication) SetUncaughtExceptionStackSize(value int32) {
imports.Proc(def.CEFAppConfig_SetUncaughtExceptionStackSize).Call(uintptr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) IgnoreCertificateErrors() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_IgnoreCertificateErrors).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetIgnoreCertificateErrors(value bool) {
imports.Proc(def.CEFAppConfig_SetIgnoreCertificateErrors).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) BackgroundColor() types.TCefColor {
r1, _, _ := imports.Proc(def.CEFAppConfig_BackgroundColor).Call()
2023-02-28 18:41:12 +08:00
return types.TCefColor(r1)
}
func (m *TCEFApplication) SetBackgroundColor(value types.TCefColor) {
imports.Proc(def.CEFAppConfig_SetBackgroundColor).Call(value.ToPtr())
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) AcceptLanguageList() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_AcceptLanguageList).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetAcceptLanguageList(value string) {
imports.Proc(def.CEFAppConfig_SetAcceptLanguageList).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) CookieableSchemesList() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_CookieableSchemesList).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetCookieableSchemesList(value string) {
imports.Proc(def.CEFAppConfig_SetCookieableSchemesList).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) CookieableSchemesExcludeDefaults() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_CookieableSchemesExcludeDefaults).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetCookieableSchemesExcludeDefaults(value bool) {
imports.Proc(def.CEFAppConfig_SetCookieableSchemesExcludeDefaults).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
2023-02-28 21:10:16 +08:00
/*** 设置常用的命令行参数属性 ***/
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SingleProcess() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_SingleProcess).Call()
2023-05-31 17:41:14 +08:00
return api.GoBool(r1)
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) SetSingleProcess(value bool) {
imports.Proc(def.CEFAppConfig_SetSingleProcess).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) EnableMediaStream() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_EnableMediaStream).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetEnableMediaStream(value bool) {
imports.Proc(def.CEFAppConfig_SetEnableMediaStream).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) EnableSpeechInput() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_EnableSpeechInput).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetEnableSpeechInput(value bool) {
imports.Proc(def.CEFAppConfig_SetEnableSpeechInput).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) UseFakeUIForMediaStream() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_UseFakeUIForMediaStream).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetUseFakeUIForMediaStream(value bool) {
imports.Proc(def.CEFAppConfig_SetUseFakeUIForMediaStream).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) EnableUsermediaScreenCapturing() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_EnableUsermediaScreenCapturing).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetEnableUsermediaScreenCapturing(value bool) {
imports.Proc(def.CEFAppConfig_SetEnableUsermediaScreenCapturing).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) EnableGPU() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_EnableGPU).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetEnableGPU(value bool) {
imports.Proc(def.CEFAppConfig_SetEnableGPU).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) EnableFeatures() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_EnableFeatures).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetEnableFeatures(value string) {
imports.Proc(def.CEFAppConfig_SetEnableFeatures).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableFeatures() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableFeatures).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetDisableFeatures(value string) {
imports.Proc(def.CEFAppConfig_SetDisableFeatures).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) EnableBlinkFeatures() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_EnableBlinkFeatures).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetEnableBlinkFeatures(value string) {
imports.Proc(def.CEFAppConfig_SetEnableBlinkFeatures).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableBlinkFeatures() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableBlinkFeatures).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetDisableBlinkFeatures(value string) {
imports.Proc(def.CEFAppConfig_SetDisableBlinkFeatures).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) BlinkSettings() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_BlinkSettings).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetBlinkSettings(value string) {
imports.Proc(def.CEFAppConfig_SetBlinkSettings).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) ForceFieldTrials() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_ForceFieldTrials).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetForceFieldTrials(value string) {
imports.Proc(def.CEFAppConfig_SetForceFieldTrials).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) ForceFieldTrialParams() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_ForceFieldTrialParams).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetForceFieldTrialParams(value string) {
imports.Proc(def.CEFAppConfig_SetForceFieldTrialParams).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) SmoothScrolling() TCefState {
r1, _, _ := imports.Proc(def.CEFAppConfig_SmoothScrolling).Call()
2023-02-28 18:41:12 +08:00
return TCefState(r1)
}
func (m *TCEFApplication) SetSmoothScrolling(value TCefState) {
imports.Proc(def.CEFAppConfig_SetSmoothScrolling).Call(value.ToPtr())
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) FastUnload() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_FastUnload).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetFastUnload(value bool) {
imports.Proc(def.CEFAppConfig_SetFastUnload).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableSafeBrowsing() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableSafeBrowsing).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableSafeBrowsing(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableSafeBrowsing).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) MuteAudio() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_MuteAudio).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetMuteAudio(value bool) {
imports.Proc(def.CEFAppConfig_SetMuteAudio).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) SitePerProcess() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_SitePerProcess).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetSitePerProcess(value bool) {
imports.Proc(def.CEFAppConfig_SetSitePerProcess).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableWebSecurity() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableWebSecurity).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableWebSecurity(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableWebSecurity).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisablePDFExtension() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisablePDFExtension).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisablePDFExtension(value bool) {
imports.Proc(def.CEFAppConfig_SetDisablePDFExtension).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableSiteIsolationTrials() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableSiteIsolationTrials).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableSiteIsolationTrials(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableSiteIsolationTrials).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableChromeLoginPrompt() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableChromeLoginPrompt).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableChromeLoginPrompt(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableChromeLoginPrompt).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableExtensions() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableExtensions).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableExtensions(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableExtensions).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) AutoplayPolicy() TCefAutoplayPolicy {
r1, _, _ := imports.Proc(def.CEFAppConfig_AutoplayPolicy).Call()
2023-02-28 18:41:12 +08:00
return TCefAutoplayPolicy(r1)
}
func (m *TCEFApplication) SetAutoplayPolicy(value TCefAutoplayPolicy) {
imports.Proc(def.CEFAppConfig_SetAutoplayPolicy).Call(value.ToPtr())
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableBackgroundNetworking() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableBackgroundNetworking).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableBackgroundNetworking(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableBackgroundNetworking).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) MetricsRecordingOnly() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_MetricsRecordingOnly).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetMetricsRecordingOnly(value bool) {
imports.Proc(def.CEFAppConfig_SetMetricsRecordingOnly).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) AllowFileAccessFromFiles() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_AllowFileAccessFromFiles).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetAllowFileAccessFromFiles(value bool) {
imports.Proc(def.CEFAppConfig_SetAllowFileAccessFromFiles).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) AllowRunningInsecureContent() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_AllowRunningInsecureContent).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetAllowRunningInsecureContent(value bool) {
imports.Proc(def.CEFAppConfig_SetAllowRunningInsecureContent).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) EnablePrintPreview() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_EnablePrintPreview).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetEnablePrintPreview(value bool) {
imports.Proc(def.CEFAppConfig_SetEnablePrintPreview).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DefaultEncoding() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_DefaultEncoding).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetDefaultEncoding(value string) {
imports.Proc(def.CEFAppConfig_SetDefaultEncoding).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableJavascript() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableJavascript).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableJavascript(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableJavascript).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableJavascriptCloseWindows() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableJavascriptCloseWindows).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableJavascriptCloseWindows(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableJavascriptCloseWindows).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableJavascriptAccessClipboard() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableJavascriptAccessClipboard).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableJavascriptAccessClipboard(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableJavascriptAccessClipboard).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableJavascriptDomPaste() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableJavascriptDomPaste).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableJavascriptDomPaste(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableJavascriptDomPaste).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) AllowUniversalAccessFromFileUrls() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_AllowUniversalAccessFromFileUrls).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetAllowUniversalAccessFromFileUrls(value bool) {
imports.Proc(def.CEFAppConfig_SetAllowUniversalAccessFromFileUrls).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableImageLoading() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableImageLoading).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableImageLoading(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableImageLoading).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) ImageShrinkStandaloneToFit() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_ImageShrinkStandaloneToFit).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetImageShrinkStandaloneToFit(value bool) {
imports.Proc(def.CEFAppConfig_SetImageShrinkStandaloneToFit).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableTextAreaResize() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableTextAreaResize).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableTextAreaResize(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableTextAreaResize).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableTabToLinks() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableTabToLinks).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableTabToLinks(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableTabToLinks).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) EnableProfanityFilter() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_EnableProfanityFilter).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetEnableProfanityFilter(value bool) {
imports.Proc(def.CEFAppConfig_SetEnableProfanityFilter).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableSpellChecking() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableSpellChecking).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableSpellChecking(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableSpellChecking).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) OverrideSpellCheckLang() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_OverrideSpellCheckLang).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetOverrideSpellCheckLang(value string) {
imports.Proc(def.CEFAppConfig_SetOverrideSpellCheckLang).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) TouchEvents() TCefState {
r1, _, _ := imports.Proc(def.CEFAppConfig_TouchEvents).Call()
2023-02-28 18:41:12 +08:00
return TCefState(r1)
}
func (m *TCEFApplication) SetTouchEvents(value TCefState) {
imports.Proc(def.CEFAppConfig_SetTouchEvents).Call(value.ToPtr())
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableReadingFromCanvas() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableReadingFromCanvas).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableReadingFromCanvas(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableReadingFromCanvas).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) HyperlinkAuditing() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_HyperlinkAuditing).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetHyperlinkAuditing(value bool) {
imports.Proc(def.CEFAppConfig_SetHyperlinkAuditing).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableNewBrowserInfoTimeout() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableNewBrowserInfoTimeout).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableNewBrowserInfoTimeout(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableNewBrowserInfoTimeout).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DevToolsProtocolLogFile() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_DevToolsProtocolLogFile).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetDevToolsProtocolLogFile(value string) {
imports.Proc(def.CEFAppConfig_SetDevToolsProtocolLogFile).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) ForcedDeviceScaleFactor() float32 { //single
var result uintptr
imports.Proc(def.CEFAppConfig_ForcedDeviceScaleFactor).Call(uintptr(unsafe.Pointer(&result)))
2023-02-28 18:41:12 +08:00
return *(*float32)(unsafe.Pointer(result))
}
func (m *TCEFApplication) SetForcedDeviceScaleFactor(value float32) { //single
imports.Proc(def.CEFAppConfig_SetForcedDeviceScaleFactor).Call(uintptr(unsafe.Pointer(&value)))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableZygote() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableZygote).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableZygote(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableZygote).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) UseMockKeyChain() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_UseMockKeyChain).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetUseMockKeyChain(value bool) {
imports.Proc(def.CEFAppConfig_SetUseMockKeyChain).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableRequestHandlingForTesting() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableRequestHandlingForTesting).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableRequestHandlingForTesting(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableRequestHandlingForTesting).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisablePopupBlocking() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisablePopupBlocking).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisablePopupBlocking(value bool) {
imports.Proc(def.CEFAppConfig_SetDisablePopupBlocking).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableBackForwardCache() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableBackForwardCache).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableBackForwardCache(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableBackForwardCache).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DisableComponentUpdate() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DisableComponentUpdate).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDisableComponentUpdate(value bool) {
imports.Proc(def.CEFAppConfig_SetDisableComponentUpdate).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) AllowInsecureLocalhost() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_AllowInsecureLocalhost).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetAllowInsecureLocalhost(value bool) {
imports.Proc(def.CEFAppConfig_SetAllowInsecureLocalhost).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) KioskPrinting() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_KioskPrinting).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetKioskPrinting(value bool) {
imports.Proc(def.CEFAppConfig_SetKioskPrinting).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) TreatInsecureOriginAsSecure() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_TreatInsecureOriginAsSecure).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetTreatInsecureOriginAsSecure(value string) {
imports.Proc(def.CEFAppConfig_SetTreatInsecureOriginAsSecure).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) NetLogEnabled() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_NetLogEnabled).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetNetLogEnabled(value bool) {
imports.Proc(def.CEFAppConfig_SetNetLogEnabled).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) NetLogFile() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_NetLogFile).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetNetLogFile(value string) {
imports.Proc(def.CEFAppConfig_SetNetLogFile).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) NetLogCaptureMode() TCefNetLogCaptureMode {
r1, _, _ := imports.Proc(def.CEFAppConfig_NetLogCaptureMode).Call()
2023-02-28 18:41:12 +08:00
return TCefNetLogCaptureMode(r1)
}
func (m *TCEFApplication) SetNetLogCaptureMode(value TCefNetLogCaptureMode) {
imports.Proc(def.CEFAppConfig_SetNetLogCaptureMode).Call(value.ToPtr())
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) EnableHighDPISupport() bool {
2022-11-17 11:12:42 +08:00
if common.IsWindows() {
r1, _, _ := imports.Proc(def.CEFAppConfig_EnableHighDPISupport).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
2022-11-17 11:12:42 +08:00
}
2023-02-28 18:41:12 +08:00
return false
2022-11-17 11:12:42 +08:00
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) SetEnableHighDPISupport(value bool) {
if common.IsWindows() {
imports.Proc(def.CEFAppConfig_SetEnableHighDPISupport).Call(api.PascalBool(value))
2022-11-17 11:12:42 +08:00
}
2023-02-28 18:41:12 +08:00
}
2023-02-28 21:10:16 +08:00
/*** 自定义属性 ***/
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) DeleteCache() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DeleteCache).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDeleteCache(value bool) {
imports.Proc(def.CEFAppConfig_SetDeleteCache).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) DeleteCookies() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_DeleteCookies).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetDeleteCookies(value bool) {
imports.Proc(def.CEFAppConfig_SetDeleteCookies).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) CheckCEFFiles() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_CheckCEFFiles).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetCheckCEFFiles(value bool) {
imports.Proc(def.CEFAppConfig_SetCheckCEFFiles).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) ShowMessageDlg() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_ShowMessageDlg).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetShowMessageDlg(value bool) {
imports.Proc(def.CEFAppConfig_SetShowMessageDlg).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) MissingBinariesException() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_MissingBinariesException).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetMissingBinariesException(value bool) {
imports.Proc(def.CEFAppConfig_SetMissingBinariesException).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) SetCurrentDir() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_SetCurrentDir).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetSetCurrentDir(value bool) {
imports.Proc(def.CEFAppConfig_SetSetCurrentDir).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) GlobalContextInitialized() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_GlobalContextInitialized).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) ChromeMajorVer() uint16 {
r1, _, _ := imports.Proc(def.CEFAppConfig_ChromeMajorVer).Call()
2023-02-28 18:41:12 +08:00
return uint16(r1)
}
func (m *TCEFApplication) ChromeMinorVer() uint16 {
r1, _, _ := imports.Proc(def.CEFAppConfig_ChromeMinorVer).Call()
2023-02-28 18:41:12 +08:00
return uint16(r1)
}
func (m *TCEFApplication) ChromeRelease() uint16 {
r1, _, _ := imports.Proc(def.CEFAppConfig_ChromeRelease).Call()
2023-02-28 18:41:12 +08:00
return uint16(r1)
}
func (m *TCEFApplication) ChromeBuild() uint16 {
r1, _, _ := imports.Proc(def.CEFAppConfig_ChromeBuild).Call()
2023-02-28 18:41:12 +08:00
return uint16(r1)
}
func (m *TCEFApplication) ChromeVersion() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_ChromeVersion).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) LibCefVersion() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_LibCefVersion).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
2023-06-02 16:18:58 +08:00
// Version 返回 Energy 版本
func (m *TCEFApplication) Version() string {
return version.Version()
}
// LibVersion 返回 lib-lcl 版本
func (m *TCEFApplication) LibVersion() string {
return version.LibVersion()
}
// LibBuildVersion 返回 lib-lcl 构建版本
func (m *TCEFApplication) LibBuildVersion() string {
return version.LibBuildVersion()
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) LibCefPath() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_LibCefPath).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) ChromeElfPath() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_ChromeElfPath).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) LibLoaded() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_LibLoaded).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) LogProcessInfo() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_LogProcessInfo).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetLogProcessInfo(value bool) {
imports.Proc(def.CEFAppConfig_SetLogProcessInfo).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) ReRaiseExceptions() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_ReRaiseExceptions).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetReRaiseExceptions(value bool) {
imports.Proc(def.CEFAppConfig_SetReRaiseExceptions).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
2023-03-01 13:38:43 +08:00
func (m *TCEFApplication) DeviceScaleFactor() float32 {
var result uintptr
imports.Proc(def.CEFAppConfig_DeviceScaleFactor).Call(uintptr(unsafe.Pointer(&result)))
2023-03-01 13:38:43 +08:00
return *(*float32)(unsafe.Pointer(result))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) LocalesRequired() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_LocalesRequired).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) SetLocalesRequired(value string) {
imports.Proc(def.CEFAppConfig_SetLocalesRequired).Call(api.PascalStr(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) ProcessType() TCefProcessType {
r1, _, _ := imports.Proc(def.CEFAppConfig_ProcessType).Call()
2023-02-28 18:41:12 +08:00
return TCefProcessType(r1)
}
2023-02-28 21:10:16 +08:00
func (m *TCEFApplication) ProcessTypeValue() (processTypeValue TCefProcessTypeValue) {
switch m.ProcessType() {
case PtBrowser:
processTypeValue = PtvBrowser
case PtRenderer:
processTypeValue = PtvRenderer
case PtZygote:
processTypeValue = PtvZygote
case PtGPU:
processTypeValue = PtvGPU
case PtUtility:
processTypeValue = PtvUtility
case PtBroker:
processTypeValue = PtvBroker
case PtCrashpad:
processTypeValue = PtvCrashpad
case PtOther:
processTypeValue = PtvOther
default:
processTypeValue = ""
}
return
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) MustCreateResourceBundleHandler() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_MustCreateResourceBundleHandler).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetMustCreateResourceBundleHandler(value bool) {
imports.Proc(def.CEFAppConfig_SetMustCreateResourceBundleHandler).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) MustCreateBrowserProcessHandler() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_MustCreateBrowserProcessHandler).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetMustCreateBrowserProcessHandler(value bool) {
imports.Proc(def.CEFAppConfig_SetMustCreateBrowserProcessHandler).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) MustCreateRenderProcessHandler() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_MustCreateRenderProcessHandler).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetMustCreateRenderProcessHandler(value bool) {
imports.Proc(def.CEFAppConfig_SetMustCreateRenderProcessHandler).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) MustCreateLoadHandler() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_MustCreateLoadHandler).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetMustCreateLoadHandler(value bool) {
imports.Proc(def.CEFAppConfig_SetMustCreateLoadHandler).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
func (m *TCEFApplication) Status() TCefApplicationStatus {
// type = TCefAplicationStatus = asLoading asLoaded asInitialized asShuttingDown asUnloaded asErrorMissingFiles asErrorDLLVersion asErrorLoadingLibrary asErrorInitializingLibrary asErrorExecutingProcess
r1, _, _ := imports.Proc(def.CEFAppConfig_Status).Call()
2023-02-28 18:41:12 +08:00
return TCefApplicationStatus(r1)
}
func (m *TCEFApplication) MissingLibFiles() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_MissingLibFiles).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) MustFreeLibrary() bool {
r1, _, _ := imports.Proc(def.CEFAppConfig_MustFreeLibrary).Call()
2023-02-28 18:41:12 +08:00
return api.GoBool(r1)
}
func (m *TCEFApplication) SetMustFreeLibrary(value bool) {
imports.Proc(def.CEFAppConfig_SetMustFreeLibrary).Call(api.PascalBool(value))
2023-02-28 18:41:12 +08:00
}
2023-06-12 22:24:03 +08:00
func (m *TCEFApplication) UpdateDeviceScaleFactor() {
imports.Proc(def.CEFAppConfig_UpdateDeviceScaleFactor).Call()
}
2023-02-28 18:41:12 +08:00
func (m *TCEFApplication) ChildProcessesCount() int32 {
r1, _, _ := imports.Proc(def.CEFAppConfig_ChildProcessesCount).Call()
2023-02-28 18:41:12 +08:00
return int32(r1)
}
func (m *TCEFApplication) UsedMemory() uint64 {
r1, _, _ := imports.Proc(def.CEFAppConfig_UsedMemory).Call()
2023-02-28 18:41:12 +08:00
return uint64(r1)
}
func (m *TCEFApplication) TotalSystemMemory() uint64 {
r1, _, _ := imports.Proc(def.CEFAppConfig_TotalSystemMemory).Call()
2023-02-28 18:41:12 +08:00
return uint64(r1)
}
func (m *TCEFApplication) AvailableSystemMemory() uint64 {
r1, _, _ := imports.Proc(def.CEFAppConfig_AvailableSystemMemory).Call()
2023-02-28 18:41:12 +08:00
return uint64(r1)
}
func (m *TCEFApplication) SystemMemoryLoad() types.Cardinal {
r1, _, _ := imports.Proc(def.CEFAppConfig_SystemMemoryLoad).Call()
2023-02-28 18:41:12 +08:00
return types.Cardinal(r1)
}
func (m *TCEFApplication) ApiHashUniversal() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_ApiHashUniversal).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) ApiHashPlatform() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_ApiHashPlatform).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) ApiHashCommit() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_ApiHashCommit).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
}
func (m *TCEFApplication) LastErrorMessage() string {
r1, _, _ := imports.Proc(def.CEFAppConfig_LastErrorMessage).Call()
2023-02-28 18:41:12 +08:00
return api.GoStr(r1)
2022-11-17 11:12:42 +08:00
}