cef

package
v0.0.0-...-d185fe8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOGSEVERITY_DEFAULT = C.LOGSEVERITY_DEFAULT
	LOGSEVERITY_VERBOSE = C.LOGSEVERITY_VERBOSE
	LOGSEVERITY_INFO    = C.LOGSEVERITY_INFO
	LOGSEVERITY_WARNING = C.LOGSEVERITY_WARNING
	LOGSEVERITY_ERROR   = C.LOGSEVERITY_ERROR
	LOGSEVERITY_FATAL   = C.LOGSEVERITY_FATAL
	LOGSEVERITY_DISABLE = C.LOGSEVERITY_DISABLE
)

Variables

View Source
var ConsoleMessageCallback consoleMessageCallbackI

Functions

func BindFunctionCallback

func BindFunctionCallback(name *C.char, argumentCount C.size_t, arguments *[]C.cef_v8value_t) *C.cef_v8value_t

func ConsoleMessage

func ConsoleMessage(level C.int, source *C.char, line C.int, message *C.char)

func GetJSONString

func GetJSONString(argLength int, arguments *[]C.cef_v8value_t) string

Types

type CEF

type CEF struct {
	// contains filtered or unexported fields
}

func New

func New(settings GuiSettings, logger *log.Logger) *CEF

func (*CEF) Eval

func (cefClient *CEF) Eval(js string)

func (*CEF) InitSubprocess

func (cefClient *CEF) InitSubprocess() int

func (*CEF) OpenWindow

func (cefClient *CEF) OpenWindow()

func (*CEF) Run

func (cefClient *CEF) Run()

func (*CEF) SetLogger

func (cefClient *CEF) SetLogger(logger *log.Logger)

func (*CEF) WindowCenter

func (cefClient *CEF) WindowCenter(width int, height int)

func (*CEF) WindowClose

func (cefClient *CEF) WindowClose()

func (*CEF) WindowFullscreen

func (cefClient *CEF) WindowFullscreen(fullscreen bool)

func (*CEF) WindowHide

func (cefClient *CEF) WindowHide()

func (*CEF) WindowIsActive

func (cefClient *CEF) WindowIsActive() bool

func (*CEF) WindowIsAlwaysOnTop

func (cefClient *CEF) WindowIsAlwaysOnTop() bool

func (*CEF) WindowIsFullscreen

func (cefClient *CEF) WindowIsFullscreen() bool

func (*CEF) WindowIsMaximize

func (cefClient *CEF) WindowIsMaximize() bool

func (*CEF) WindowIsMinimized

func (cefClient *CEF) WindowIsMinimized() bool

func (*CEF) WindowMaximize

func (cefClient *CEF) WindowMaximize()

func (*CEF) WindowMinimize

func (cefClient *CEF) WindowMinimize()

func (*CEF) WindowRestore

func (cefClient *CEF) WindowRestore()

func (*CEF) WindowSetAlwaysOnTop

func (cefClient *CEF) WindowSetAlwaysOnTop(state bool)

func (*CEF) WindowSetTitle

func (cefClient *CEF) WindowSetTitle(title string)

func (*CEF) WindowShow

func (cefClient *CEF) WindowShow()

func (*CEF) WindowToTop

func (cefClient *CEF) WindowToTop()

type GuiSettings

type GuiSettings struct {
	WindowName      string
	StartURL        string
	IsFrameless     bool
	IsMaximized     bool
	IsFullscreen    bool
	CanMaximize     bool
	CanMinimize     bool
	CanResize       bool
	Height          int
	Width           int
	SubExecutable   bool
	WindowIcon      string
	WindowAppIcon   string
	BackgroundColor color.Color
	Settings        Settings
	BindFunc        map[string]interface{}
}

type SecurityLogLevel

type SecurityLogLevel int
const (
	///
	// Default logging (currently INFO logging).
	///
	LEVEL_DEFAULT SecurityLogLevel = 0

	///
	// DEBUG logging.
	///
	LEVEL_DEBUG SecurityLogLevel = 1

	///
	// INFO logging.
	///
	LEVEL_INFO SecurityLogLevel = 2

	///
	// WARNING logging.
	///
	LEVEL_WARNING SecurityLogLevel = 3

	///
	// ERROR logging.
	///
	LEVEL_ERROR SecurityLogLevel = 4

	///
	// FATAL logging.
	///
	LEVEL_FATAL SecurityLogLevel = 5

	///
	// Disable logging to file for all messages, and to stderr for messages with
	// severity less than FATAL.
	///
	LEVEL_DISABLE SecurityLogLevel = 99
)

type Settings

type Settings struct {
	CachePath               string
	LogSeverity             C.cef_log_severity_t
	LogFile                 string
	ResourcesDirPath        string
	LocalesDirPath          string
	UserAgent               string
	RemoteDebuggingPort     int
	IgnoreCertificateErrors bool
	CommandLineArgsDisabled bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL