chrome

package module
Version: v0.1.1-0...-8d55ffe Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2015 License: BSD-3-Clause Imports: 6 Imported by: 0

README

Chrome - Go binding to CEF Build Status Coverage Status

Table of contents:

Introduction

Chrome is a project forked from CEF2go by Czarek Tomczak and FromKeith. This fork aim to have similar role with PhantomJs

Currently the Chrome only allow simple programming such as opening a browser.

CEF2go is licensed under the BSD 3-clause license, see the LICENSE file.

Compatibility

Supported platforms: Windows, Linux, Mac OSX.

Build

Getting started on Windows

  1. The instruction should work in Windows 8.1 64bit

  2. Install TDM-GCC for cgo.

  3. Download CEF3 Branch 2171 binaries: release_windows.zip Extract the file to `GOPATH/Release/*

  4. Copy GOPATH/github.com/24hours/chrome/doc/build.bat to GOPATH/build.bat
    Copy GOPATH/github.com/24hours/chrome/doc/minimum/main_linux.go to GOPATH/main_windows.go

  5. Run build.bat command.

Getting started on Linux

  1. These instructions work fine with Ubuntu 12.04 64-bit. On Ubuntu 13/14 libudev.so.0 is missing and it is required to create a symbolic link to libudev.so.1. For example on Ubuntu 14.04 64-bit run this command: cd /lib/x86_64-linux-gnu/ && sudo ln -sf libudev.so.1 libudev.so.0.

  2. Install CEF dependencies:
    sudo apt-get install libatk1.0-0 libc6 libasound2 libcairo2 libcap2 libcups2 libexpat1 libexif12 libfontconfig1 libfreetype6 libglib2.0-0 libgnome-keyring0 libgtk2.0-0 libpam0g libpango1.0-0 libpci3 libpcre3 libpixman-1-0 libpng12-0 libspeechd2 libstdc++6 libsqlite3-0 libx11-6 libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 libxrandr2 libxrender1 libxtst6 zlib1g libgtk2.0-dev libpulse0 libbz2-1.0 libnss3-dev libgconf2-dev

  3. Download CEF 3 Branch 2171 binaries: release_linux.zip
    Extract the file to GOPATH/release/*

  4. Copy GOPATH/github.com/24hours/chrome/doc/Makefile to GOPATH/Makefile
    Copy GOPATH/github.com/24hours/chrome/doc/minimum/main_linux.go to GOPATH/main_linux.go

  5. Run make command.

Getting started on Mac OS X

  1. These instructions work fine with OS X 10.10 Yosemite.

  2. Install command line tools (make is required) from:
    https://developer.apple.com/downloads/
    (In my case command line tools for Mountain Yosemite from 2 Dec 2014)

  3. Install XCode (gcc that comes with XCode is required).
    My version is Version 6.1.1

  4. Download CEF 3 Branch 2171 binaries: release_mac.zip
    Extract the file to GOPATH/release/*

  5. Copy GOPATH/github.com/24hours/chrome/doc/Makefile to GOPATH/Makefile
    Copy GOPATH/github.com/24hours/chrome/doc/minimum/main_mac.go to GOPATH/main_mac.go

  6. Run make command.

Documentation

Overview

TODO : figure out why crash on shutdown()

     Shutdown() already calld in UI thread,
	 but it complain regardless, maybe a bug in CEF
	 leave it untill next release come out

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_DISABLE = C.LOGSEVERITY_DISABLE
)

Variables

This section is empty.

Functions

func AddRef

func AddRef(it unsafe.Pointer)

func CreateBrowser

func CreateBrowser(hwnd WindowInfo,
	clientHandler ClientHandler,
	browserSettings BrowserSettings,
	url string) bool

func CreateRef

func CreateRef(it unsafe.Pointer, name string)

func DisableLog

func DisableLog()

func DumpRefs

func DumpRefs()

func EnableLog

func EnableLog()

func ExecuteProcess

func ExecuteProcess(programHandle unsafe.Pointer, appHandler AppHandler) int

func FillMainArgs

func FillMainArgs(mainArgs *C.struct__cef_main_args_t,
	appHandle unsafe.Pointer)

func FillWindowInfo

func FillWindowInfo(windowInfo *C.cef_window_info_t, hwnd WindowInfo)

func Initialize

func Initialize(settings Settings, appHandler AppHandler) int

func OnBeforeChildProcessLaunch

func OnBeforeChildProcessLaunch(self *C.struct__cef_browser_process_handler_t, commandLine *C.struct__cef_command_line_t)

export OnBeforeChildProcessLaunch

func OnContextInitialized

func OnContextInitialized(self *C.struct__cef_browser_process_handler_t)

export OnContextInitialized

func OnRenderProcessThreadCreated

func OnRenderProcessThreadCreated(self *C.struct__cef_browser_process_handler_t, extraInfo *C.struct__cef_list_value_t)

export OnRenderProcessThreadCreated

func OnThreadID

func OnThreadID(id ThreadId) bool

func PostTask

func PostTask(thread ThreadId, t TaskToExecute)

allows you to execute a task on the specified thread

func QuitMessageLoop

func QuitMessageLoop()

func RegisterDestructor

func RegisterDestructor(it unsafe.Pointer, decon func(it unsafe.Pointer)) bool

func Release

func Release(w unsafe.Pointer) int

func RunMessageLoop

func RunMessageLoop()

func Shutdown

func Shutdown()

Types

type AppHandler

type AppHandler interface {
	// TODO implement these thing
	OnBeforeCommandLineProcessing(processType string, commandLine CommandLineT)
	OnRegisterCustomSchemes()
	GetResourceBundleHandler()
	GetRenderProcessHandler()
	// called to get the underlying c struct.
	GetAppHandlerT() AppHandlerT
	GetBrowserProcessHandler() BrowserProcessHandler
}

type AppHandlerT

type AppHandlerT struct {
	CStruct *C.cef_app_t
}

func NewAppHandlerT

func NewAppHandlerT(handler AppHandler) AppHandlerT

create the underlying C structure for an App Handler.

type BaseAppHandler

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

base Handler

func (*BaseAppHandler) GetAppHandlerT

func (app *BaseAppHandler) GetAppHandlerT() AppHandlerT

func (*BaseAppHandler) GetBrowserProcessHandler

func (app *BaseAppHandler) GetBrowserProcessHandler() BrowserProcessHandler

func (*BaseAppHandler) GetRenderProcessHandler

func (app *BaseAppHandler) GetRenderProcessHandler()

func (*BaseAppHandler) GetResourceBundleHandler

func (app *BaseAppHandler) GetResourceBundleHandler()

func (*BaseAppHandler) OnBeforeCommandLineProcessing

func (app *BaseAppHandler) OnBeforeCommandLineProcessing(processType string,
	commandLine CommandLineT)

func (*BaseAppHandler) OnRegisterCustomSchemes

func (app *BaseAppHandler) OnRegisterCustomSchemes()

type BaseBrowserProcessHandler

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

BaseBrowserProcessHandler

func (*BaseBrowserProcessHandler) GetBrowserProcessHandlerT

func (bph *BaseBrowserProcessHandler) GetBrowserProcessHandlerT() BrowserProcessHandlerT

func (*BaseBrowserProcessHandler) OnBeforeChildProcessLaunch

func (bph *BaseBrowserProcessHandler) OnBeforeChildProcessLaunch(commandLine CommandLineT)

func (*BaseBrowserProcessHandler) OnContextInitialized

func (bph *BaseBrowserProcessHandler) OnContextInitialized()

func (*BaseBrowserProcessHandler) OnRenderProcessThreadCreated

func (bph *BaseBrowserProcessHandler) OnRenderProcessThreadCreated(extraInfo CefListValueT)

type BaseClientHandler

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

func (*BaseClientHandler) GetClientHandlerT

func (ch *BaseClientHandler) GetClientHandlerT() ClientHandlerT

func (*BaseClientHandler) GetContextMenuHandler

func (ch *BaseClientHandler) GetContextMenuHandler() ContextMenuHandlerT

func (*BaseClientHandler) GetDialogHandler

func (ch *BaseClientHandler) GetDialogHandler() DialogHandlerT

func (*BaseClientHandler) GetDisplayHandler

func (ch *BaseClientHandler) GetDisplayHandler() DisplayHandlerT

func (*BaseClientHandler) GetDownloadHandler

func (ch *BaseClientHandler) GetDownloadHandler() DownloadHandlerT

func (*BaseClientHandler) GetDragHandler

func (ch *BaseClientHandler) GetDragHandler() DragHandlerT

func (*BaseClientHandler) GetFocusHandler

func (ch *BaseClientHandler) GetFocusHandler() FocusHandlerT

func (*BaseClientHandler) GetGeoLocationHandler

func (ch *BaseClientHandler) GetGeoLocationHandler() GeolocationHandlerT

func (*BaseClientHandler) GetJsDialogHandler

func (ch *BaseClientHandler) GetJsDialogHandler() JsdialogHandlerT

func (*BaseClientHandler) GetKeyboardHandler

func (ch *BaseClientHandler) GetKeyboardHandler() KeyboardHandlerT

func (*BaseClientHandler) GetLifeSpanHandler

func (ch *BaseClientHandler) GetLifeSpanHandler() LifeSpanHandlerT

func (*BaseClientHandler) GetLoadHandler

func (ch *BaseClientHandler) GetLoadHandler() LoadHandlerT

func (*BaseClientHandler) GetRenderHandler

func (ch *BaseClientHandler) GetRenderHandler() RenderHandlerT

func (*BaseClientHandler) GetRequestHandler

func (ch *BaseClientHandler) GetRequestHandler() RequestHandlerT

func (*BaseClientHandler) SetClientHandlerT

func (ch *BaseClientHandler) SetClientHandlerT(cht ClientHandlerT)

func (*BaseClientHandler) SetDisplayHandler

func (ch *BaseClientHandler) SetDisplayHandler(dsp DisplayHandlerT)

func (*BaseClientHandler) SetDownloadHandler

func (ch *BaseClientHandler) SetDownloadHandler(download DownloadHandlerT)

func (*BaseClientHandler) SetLifeSpanHandler

func (ch *BaseClientHandler) SetLifeSpanHandler(lsh LifeSpanHandlerT)

func (*BaseClientHandler) SetRenderHandler

func (ch *BaseClientHandler) SetRenderHandler(render RenderHandlerT)

func (*BaseClientHandler) SetRequestHandler

func (ch *BaseClientHandler) SetRequestHandler(rqh RequestHandlerT)

type BeforeDownloadCallback

type BeforeDownloadCallback struct {
	Self *C.struct__cef_before_download_callback_t
}

func (BeforeDownloadCallback) Cont

func (c BeforeDownloadCallback) Cont(downloadPath string, showDialog bool)

func (BeforeDownloadCallback) Release

func (c BeforeDownloadCallback) Release()

type Browser

type Browser struct {
	CStruct *C.struct__cef_browser_t
}

func (Browser) AddRef

func (b Browser) AddRef()

func (Browser) CanGoBack

func (b Browser) CanGoBack() bool

func (Browser) CanGoForward

func (b Browser) CanGoForward() bool

func (Browser) GetFocusedFrame

func (b Browser) GetFocusedFrame() Frame

func (Browser) GetFrame

func (b Browser) GetFrame(name string) Frame

func (Browser) GetFrameByIdent

func (b Browser) GetFrameByIdent(identifier int64) Frame

func (Browser) GetFrameCount

func (b Browser) GetFrameCount() int64

func (Browser) GetFrameIdentifiers

func (b Browser) GetFrameIdentifiers() []int64

func (Browser) GetFrameNames

func (b Browser) GetFrameNames() []string

func (Browser) GetHost

func (b Browser) GetHost() CefBrowserHostT

func (Browser) GetIdentifier

func (b Browser) GetIdentifier() int

func (Browser) GetMainFrame

func (b Browser) GetMainFrame() Frame

func (Browser) GoBack

func (b Browser) GoBack()

func (Browser) GoForward

func (b Browser) GoForward()

func (Browser) HasDocument

func (b Browser) HasDocument() bool

func (Browser) IsLoading

func (b Browser) IsLoading() bool

func (Browser) IsPopup

func (b Browser) IsPopup() bool

func (Browser) IsSame

func (b Browser) IsSame(other Browser) bool

func (Browser) Release

func (b Browser) Release()

func (Browser) Reload

func (b Browser) Reload()

func (Browser) ReloadIgnoreCache

func (b Browser) ReloadIgnoreCache()

func (Browser) StopLoad

func (b Browser) StopLoad()

type BrowserProcessHandler

type BrowserProcessHandler interface {
	OnContextInitialized()
	OnBeforeChildProcessLaunch(commandLine CommandLineT)
	OnRenderProcessThreadCreated(extraInfo CefListValueT)
	GetBrowserProcessHandlerT() BrowserProcessHandlerT
}

type BrowserProcessHandlerT

type BrowserProcessHandlerT struct {
	CStruct *C.struct__cef_browser_process_handler_t
}

func NewBrowserProcessHandlerT

func NewBrowserProcessHandlerT(handler BrowserProcessHandler) BrowserProcessHandlerT

func (BrowserProcessHandlerT) AddRef

func (c BrowserProcessHandlerT) AddRef()

func (BrowserProcessHandlerT) Release

func (c BrowserProcessHandlerT) Release()

type BrowserSettings

type BrowserSettings struct {
	StandardFontFamily          string
	FixedFontFamily             string
	SerifFontFamily             string
	SansSerifFontFamily         string
	CursiveFontFamily           string
	FantasyFontFamily           string
	DefaultFontSize             int
	DefaultFixedFontSize        int
	MinimumFontSize             int
	MinimumLogicalFontSize      int
	DefaultEncoding             string
	RemoteFonts                 CefState
	Javascript                  CefState
	JavascriptOpenWindows       CefState
	JavascriptCloseWindows      CefState
	JavascriptAccessClipboard   CefState
	JavascriptDomPaste          CefState
	CaretBrowsing               CefState
	Java                        CefState
	Plugins                     CefState
	UniversalAccessFromFileUrls CefState
	FileAccessFromFileUrls      CefState
	WebSecurity                 CefState
	ImageLoading                CefState
	ImageShrinkStandaloneToFit  CefState
	TextAreaResize              CefState
	TabToLinks                  CefState
	LocalStorage                CefState
	Databases                   CefState
	ApplicationCache            CefState
	Webgl                       CefState
	BackgroundColor             uint32
}

type CefBrowserHostT

type CefBrowserHostT struct {
	CStruct *C.struct__cef_browser_host_t
}

func (CefBrowserHostT) AddRef

func (c CefBrowserHostT) AddRef()

func (CefBrowserHostT) CloseBrowser

func (b CefBrowserHostT) CloseBrowser(forceClose int)

func (CefBrowserHostT) Find

func (b CefBrowserHostT) Find(identifier int, search string, forward int, matchCase int, findNext int)

func (CefBrowserHostT) GetBrowser

func (b CefBrowserHostT) GetBrowser() Browser

func (CefBrowserHostT) GetClient

func (b CefBrowserHostT) GetClient() CefClientT

func (CefBrowserHostT) GetNstextInputContext

func (b CefBrowserHostT) GetNstextInputContext()

func (CefBrowserHostT) GetOpenerWindowHandle

func (b CefBrowserHostT) GetOpenerWindowHandle() C.cef_window_handle_t

func (CefBrowserHostT) GetRequestContext

func (b CefBrowserHostT) GetRequestContext() CefRequestContextT

func (CefBrowserHostT) GetWindowHandle

func (b CefBrowserHostT) GetWindowHandle() C.cef_window_handle_t

func (CefBrowserHostT) GetZoomLevel

func (b CefBrowserHostT) GetZoomLevel() float64

func (CefBrowserHostT) Invalidate

func (b CefBrowserHostT) Invalidate(paintType C.cef_paint_element_type_t)

func (CefBrowserHostT) IsMouseCursorChangeDisabled

func (b CefBrowserHostT) IsMouseCursorChangeDisabled() int

func (CefBrowserHostT) IsWindowRenderingDisabled

func (b CefBrowserHostT) IsWindowRenderingDisabled() int

func (CefBrowserHostT) NotifyScreenInfoChange

func (b CefBrowserHostT) NotifyScreenInfoChange()

func (CefBrowserHostT) Print

func (b CefBrowserHostT) Print()

func (CefBrowserHostT) Release

func (c CefBrowserHostT) Release()

func (CefBrowserHostT) RunFileDialog

func (b CefBrowserHostT) RunFileDialog(mode int, title string, defaultFileName string, acceptTypes []string, callback CefRunFileDialogCallbackT)

func (CefBrowserHostT) SendCaptureLostEvent

func (b CefBrowserHostT) SendCaptureLostEvent()

func (CefBrowserHostT) SendFocusEvent

func (b CefBrowserHostT) SendFocusEvent(setFocus int)

func (CefBrowserHostT) SendKeyEvent

func (b CefBrowserHostT) SendKeyEvent(event CefKeyEventT)

func (CefBrowserHostT) SendMouseClickEvent

func (b CefBrowserHostT) SendMouseClickEvent(event CefMouseEventT, buttonType C.cef_mouse_button_type_t, mouseUp, clickCount int)

func (CefBrowserHostT) SendMouseMoveEvent

func (b CefBrowserHostT) SendMouseMoveEvent(event CefMouseEventT, mouseLeave int)

func (CefBrowserHostT) SendMouseWheelEVent

func (b CefBrowserHostT) SendMouseWheelEVent(event CefMouseEventT, deltaX, deltaY int)

func (CefBrowserHostT) SetFocus

func (b CefBrowserHostT) SetFocus(enable int)

func (CefBrowserHostT) SetMouseCursorChangeDisabled

func (b CefBrowserHostT) SetMouseCursorChangeDisabled(disabled int)

func (CefBrowserHostT) SetZoomLevel

func (b CefBrowserHostT) SetZoomLevel(zoomLevel float64)

func (CefBrowserHostT) StartDownload

func (b CefBrowserHostT) StartDownload(url string)

func (CefBrowserHostT) StopFinding

func (b CefBrowserHostT) StopFinding(clearSelection int)

func (CefBrowserHostT) WasHidden

func (b CefBrowserHostT) WasHidden(hidden int)

func (CefBrowserHostT) WasResized

func (b CefBrowserHostT) WasResized()

type CefCertErrorCallbackT

type CefCertErrorCallbackT struct {
	CStruct *C.struct__cef_allow_certificate_error_callback_t
}

func (CefCertErrorCallbackT) Cont

func (c CefCertErrorCallbackT) Cont(allow int)

func (CefCertErrorCallbackT) Release

func (c CefCertErrorCallbackT) Release()

type CefClientT

type CefClientT struct {
	CStruct *C.struct__cef_client_t
}

type CefDomVisitorT

type CefDomVisitorT struct {
	CStruct *C.struct__cef_domvisitor_t
}

type CefErrorCode

type CefErrorCode int
const (
	ERR_NONE                            CefErrorCode = 0
	ERR_FAILED                          CefErrorCode = -2
	ERR_ABORTED                         CefErrorCode = -3
	ERR_INVALID_ARGUMENT                CefErrorCode = -4
	ERR_INVALID_HANDLE                  CefErrorCode = -5
	ERR_FILE_NOT_FOUND                  CefErrorCode = -6
	ERR_TIMED_OUT                       CefErrorCode = -7
	ERR_FILE_TOO_BIG                    CefErrorCode = -8
	ERR_UNEXPECTED                      CefErrorCode = -9
	ERR_ACCESS_DENIED                   CefErrorCode = -10
	ERR_NOT_IMPLEMENTED                 CefErrorCode = -11
	ERR_CONNECTION_CLOSED               CefErrorCode = -100
	ERR_CONNECTION_RESET                CefErrorCode = -101
	ERR_CONNECTION_REFUSED              CefErrorCode = -102
	ERR_CONNECTION_ABORTED              CefErrorCode = -103
	ERR_CONNECTION_FAILED               CefErrorCode = -104
	ERR_NAME_NOT_RESOLVED               CefErrorCode = -105
	ERR_INTERNET_DISCONNECTED           CefErrorCode = -106
	ERR_SSL_PROTOCOL_ERROR              CefErrorCode = -107
	ERR_ADDRESS_INVALID                 CefErrorCode = -108
	ERR_ADDRESS_UNREACHABLE             CefErrorCode = -109
	ERR_SSL_CLIENT_AUTH_CERT_NEEDED     CefErrorCode = -110
	ERR_TUNNEL_CONNECTION_FAILED        CefErrorCode = -111
	ERR_NO_SSL_VERSIONS_ENABLED         CefErrorCode = -112
	ERR_SSL_VERSION_OR_CIPHER_MISMATCH  CefErrorCode = -113
	ERR_SSL_RENEGOTIATION_REQUESTED     CefErrorCode = -114
	ERR_CERT_COMMON_NAME_INVALID        CefErrorCode = -200
	ERR_CERT_DATE_INVALID               CefErrorCode = -201
	ERR_CERT_AUTHORITY_INVALID          CefErrorCode = -202
	ERR_CERT_CONTAINS_ERRORS            CefErrorCode = -203
	ERR_CERT_NO_REVOCATION_MECHANISM    CefErrorCode = -204
	ERR_CERT_UNABLE_TO_CHECK_REVOCATION CefErrorCode = -205
	ERR_CERT_REVOKED                    CefErrorCode = -206
	ERR_CERT_INVALID                    CefErrorCode = -207
	ERR_CERT_END                        CefErrorCode = -208
	ERR_INVALID_URL                     CefErrorCode = -300
	ERR_DISALLOWED_URL_SCHEME           CefErrorCode = -301
	ERR_UNKNOWN_URL_SCHEME              CefErrorCode = -302
	ERR_TOO_MANY_REDIRECTS              CefErrorCode = -310
	ERR_UNSAFE_REDIRECT                 CefErrorCode = -311
	ERR_UNSAFE_PORT                     CefErrorCode = -312
	ERR_INVALID_RESPONSE                CefErrorCode = -320
	ERR_INVALID_CHUNKED_ENCODING        CefErrorCode = -321
	ERR_METHOD_NOT_SUPPORTED            CefErrorCode = -322
	ERR_UNEXPECTED_PROXY_AUTH           CefErrorCode = -323
	ERR_EMPTY_RESPONSE                  CefErrorCode = -324
	ERR_RESPONSE_HEADERS_TOO_BIG        CefErrorCode = -325
	ERR_CACHE_MISS                      CefErrorCode = -400
	ERR_INSECURE_RESPONSE               CefErrorCode = -501
)

type CefEventHandleT

type CefEventHandleT struct {
}

type CefKeyEventT

type CefKeyEventT struct {
	CStruct *C.struct__cef_key_event_t
}

type CefListValueT

type CefListValueT struct {
	CStruct *C.struct__cef_list_value_t
}

func (CefListValueT) AddRef

func (c CefListValueT) AddRef()

func (CefListValueT) Release

func (c CefListValueT) Release()

type CefMouseEventT

type CefMouseEventT struct {
	CStruct *C.struct__cef_mouse_event_t
}

type CefPostDataElementT

type CefPostDataElementT struct {
	CStruct *C.struct__cef_post_data_element_t
}

func (CefPostDataElementT) AddRef

func (b CefPostDataElementT) AddRef()

func (CefPostDataElementT) GetBytes

func (e CefPostDataElementT) GetBytes(b []byte) int

func (CefPostDataElementT) GetBytesCount

func (e CefPostDataElementT) GetBytesCount() int

func (CefPostDataElementT) GetFile

func (e CefPostDataElementT) GetFile() string

func (CefPostDataElementT) GetType

func (CefPostDataElementT) IsReadOnly

func (e CefPostDataElementT) IsReadOnly() bool

post data element

func (CefPostDataElementT) Release

func (b CefPostDataElementT) Release()

func (CefPostDataElementT) SetToBytes

func (e CefPostDataElementT) SetToBytes(b []byte)

func (CefPostDataElementT) SetToEmpty

func (e CefPostDataElementT) SetToEmpty()

func (CefPostDataElementT) SetToFile

func (e CefPostDataElementT) SetToFile(fileName string)

type CefPostDataT

type CefPostDataT struct {
	CStruct *C.struct__cef_post_data_t
}

func (CefPostDataT) AddElement

func (p CefPostDataT) AddElement(element CefPostDataElementT) bool

func (CefPostDataT) AddRef

func (b CefPostDataT) AddRef()

func (CefPostDataT) GetElementCount

func (p CefPostDataT) GetElementCount() int

func (CefPostDataT) GetElements

func (p CefPostDataT) GetElements(numToGet int) []CefPostDataElementT

func (CefPostDataT) IsReadOnly

func (p CefPostDataT) IsReadOnly() bool

func (CefPostDataT) Release

func (b CefPostDataT) Release()

func (CefPostDataT) RemoveElement

func (p CefPostDataT) RemoveElement(element CefPostDataElementT) bool

func (CefPostDataT) RemoveElements

func (p CefPostDataT) RemoveElements()

type CefRectT

type CefRectT struct {
	CStruct *C.cef_rect_t
}

type CefRequestContextT

type CefRequestContextT struct {
	CStruct *C.struct__cef_request_context_t
}

type CefRequestT

type CefRequestT struct {
	CStruct *C.struct__cef_request_t
}

func (CefRequestT) AddRef

func (b CefRequestT) AddRef()

func (CefRequestT) GetFirstPartyForCookies

func (r CefRequestT) GetFirstPartyForCookies() string

func (CefRequestT) GetFlags

func (r CefRequestT) GetFlags() int

func (CefRequestT) GetHeaderMap

func (r CefRequestT) GetHeaderMap() map[string][]string

func (CefRequestT) GetMethod

func (r CefRequestT) GetMethod() string

func (CefRequestT) GetPostData

func (r CefRequestT) GetPostData() CefPostDataT

func (CefRequestT) GetResourceType

func (r CefRequestT) GetResourceType() int

func (CefRequestT) GetTransitionType

func (r CefRequestT) GetTransitionType() int

func (CefRequestT) GetUrl

func (r CefRequestT) GetUrl() string

func (CefRequestT) IsReadOnly

func (r CefRequestT) IsReadOnly() bool

func (CefRequestT) Release

func (b CefRequestT) Release()

func (CefRequestT) Set

func (r CefRequestT) Set(url, method string, postData CefPostDataT, headerMap map[string]string)

func (CefRequestT) SetFirstPartyForCookies

func (r CefRequestT) SetFirstPartyForCookies(url string)

func (CefRequestT) SetFlags

func (r CefRequestT) SetFlags(flags int)

func (CefRequestT) SetHeaderMap

func (r CefRequestT) SetHeaderMap(headerMap map[string]string)

func (CefRequestT) SetMethod

func (r CefRequestT) SetMethod(method string)

func (CefRequestT) SetPostData

func (r CefRequestT) SetPostData(data CefPostDataT)

func (CefRequestT) SetUrl

func (r CefRequestT) SetUrl(newUrl string)

type CefRunFileDialogCallbackT

type CefRunFileDialogCallbackT struct {
	CStruct *C.struct__cef_run_file_dialog_callback_t
}

type CefState

type CefState int
var (
	STATE_DEFAULT  CefState = 0
	STATE_ENABLED  CefState = 1
	STATE_DISABLED CefState = 2
)

type CefStringVisitorT

type CefStringVisitorT struct {
	CStruct *C.struct__cef_string_visitor_t
}

type CefTimeT

type CefTimeT struct {
	Self C.cef_time_t
}

type CefV8ContextT

type CefV8ContextT struct {
	CStruct *C.struct__cef_v8context_t
}

type ClientHandler

type ClientHandler interface {
	GetContextMenuHandler() ContextMenuHandlerT
	GetDialogHandler() DialogHandlerT
	SetDisplayHandler(DisplayHandlerT)
	GetDisplayHandler() DisplayHandlerT
	GetDownloadHandler() DownloadHandlerT
	SetDownloadHandler(DownloadHandlerT)

	GetDragHandler() DragHandlerT
	GetFocusHandler() FocusHandlerT
	GetGeoLocationHandler() GeolocationHandlerT
	GetJsDialogHandler() JsdialogHandlerT
	GetKeyboardHandler() KeyboardHandlerT
	SetLifeSpanHandler(LifeSpanHandlerT)
	GetLifeSpanHandler() LifeSpanHandlerT
	GetLoadHandler() LoadHandlerT
	GetRenderHandler() RenderHandlerT
	SetRenderHandler(RenderHandlerT)

	SetRequestHandler(RequestHandlerT)
	GetRequestHandler() RequestHandlerT
	SetClientHandlerT(ClientHandlerT)
	GetClientHandlerT() ClientHandlerT
}

type ClientHandlerT

type ClientHandlerT struct {
	CStruct *C.struct__cef_client_t
}

func NewClientHandlerT

func NewClientHandlerT(handler ClientHandler) ClientHandlerT

func (ClientHandlerT) AddRef

func (c ClientHandlerT) AddRef()

func (ClientHandlerT) Release

func (c ClientHandlerT) Release()

type CommandLineT

type CommandLineT struct {
	CStruct *C.struct__cef_command_line_t
}

func (CommandLineT) Release

func (c CommandLineT) Release()

type ContextMenuHandlerT

type ContextMenuHandlerT struct {
	CStruct *C.struct__cef_context_menu_handler_t
}

these structs haven't been defined yet

type DialogHandlerT

type DialogHandlerT struct {
	CStruct *C.struct__cef_dialog_handler_t
}

type DisplayHandler

type DisplayHandler interface {
	OnAddressChange(browser Browser, frame Frame, url string)
	OnTitleChange(browser Browser, title string)
	OnToolTip(browser Browser, text string) bool
	OnStatusMessage(browser Browser, value string)
	OnConsoleMessage(browser Browser, message, source string, line int) bool

	GetDisplayHandler() DisplayHandlerT
}

type DisplayHandlerT

type DisplayHandlerT struct {
	CStruct *C.struct__cef_display_handler_t
}

func NewDisplayHandlerT

func NewDisplayHandlerT(display DisplayHandler) DisplayHandlerT

func (DisplayHandlerT) AddRef

func (r DisplayHandlerT) AddRef()

func (DisplayHandlerT) Release

func (r DisplayHandlerT) Release()

type DownloadHandler

type DownloadHandler interface {
	OnBeforeDownload(browser Browser, downloadItem DownloadItem, suggestedName string, callback BeforeDownloadCallback)
	OnDownloadUpdated(browser Browser, downloadItem DownloadItem, callback DownloadItemCallback)

	GetDownloadHandlerT() DownloadHandlerT
}

type DownloadHandlerT

type DownloadHandlerT struct {
	CStruct *C.struct__cef_download_handler_t
}

func NewDownloadHandlerT

func NewDownloadHandlerT(download DownloadHandler) DownloadHandlerT

func (DownloadHandlerT) AddRef

func (r DownloadHandlerT) AddRef()

TODO: implement house keeping code elsewhere

func (DownloadHandlerT) Release

func (r DownloadHandlerT) Release()

type DownloadItem

type DownloadItem struct {
	Self *C.struct__cef_download_item_t
}

func (DownloadItem) GetContentDisposition

func (c DownloadItem) GetContentDisposition() string

func (DownloadItem) GetCurrentSpeed

func (c DownloadItem) GetCurrentSpeed() int64

func (DownloadItem) GetEndTime

func (c DownloadItem) GetEndTime() CefTimeT

func (DownloadItem) GetFullPath

func (c DownloadItem) GetFullPath() string

func (DownloadItem) GetId

func (c DownloadItem) GetId() uint32

func (DownloadItem) GetMimeType

func (c DownloadItem) GetMimeType() string

func (DownloadItem) GetPercentComplete

func (c DownloadItem) GetPercentComplete() int

func (DownloadItem) GetReceivedBytes

func (c DownloadItem) GetReceivedBytes() int64

func (DownloadItem) GetStartTime

func (c DownloadItem) GetStartTime() CefTimeT

func (DownloadItem) GetSuggestedFileName

func (c DownloadItem) GetSuggestedFileName() string

func (DownloadItem) GetTotalBytes

func (c DownloadItem) GetTotalBytes() int64

func (DownloadItem) GetUrl

func (c DownloadItem) GetUrl() string

func (DownloadItem) IsCanceled

func (c DownloadItem) IsCanceled() bool

func (DownloadItem) IsComplete

func (c DownloadItem) IsComplete() bool

func (DownloadItem) IsInProgress

func (c DownloadItem) IsInProgress() bool

func (DownloadItem) IsValid

func (c DownloadItem) IsValid() bool

func (DownloadItem) Release

func (c DownloadItem) Release()

type DownloadItemCallback

type DownloadItemCallback struct {
	Self *C.struct__cef_download_item_callback_t
}

func (DownloadItemCallback) Cancel

func (c DownloadItemCallback) Cancel()

func (DownloadItemCallback) Release

func (c DownloadItemCallback) Release()

type DragHandlerT

type DragHandlerT struct {
	CStruct *C.struct__cef_drag_handler_t
}

type FocusHandlerT

type FocusHandlerT struct {
	CStruct *C.struct__cef_focus_handler_t
}

type Frame

type Frame struct {
	CStruct *C.struct__cef_frame_t
}

func (Frame) AddRef

func (b Frame) AddRef()

func (Frame) Copy

func (f Frame) Copy()

func (Frame) Cut

func (f Frame) Cut()

func (Frame) Del

func (f Frame) Del()

func (Frame) ExecuteJavaScript

func (f Frame) ExecuteJavaScript(code, url string, startLine int)

func (Frame) GetBrowser

func (f Frame) GetBrowser() Browser

func (Frame) GetIdentifier

func (f Frame) GetIdentifier() int64

func (Frame) GetName

func (f Frame) GetName() string

func (Frame) GetParent

func (f Frame) GetParent() Frame

func (Frame) GetSource

func (f Frame) GetSource(visitor CefStringVisitorT)

func (Frame) GetText

func (f Frame) GetText(visitor CefStringVisitorT)

func (Frame) GetUrl

func (f Frame) GetUrl() string

func (Frame) GetV8context

func (f Frame) GetV8context() CefV8ContextT

func (Frame) IsFocused

func (f Frame) IsFocused() bool

func (Frame) IsMain

func (f Frame) IsMain() bool

func (Frame) IsValid

func (f Frame) IsValid() bool

func (Frame) LoadRequest

func (f Frame) LoadRequest(request CefRequestT)

func (Frame) LoadString

func (f Frame) LoadString(contents, url string)

func (Frame) LoadUrl

func (f Frame) LoadUrl(url string)

func (Frame) Paste

func (f Frame) Paste()

func (Frame) Redo

func (f Frame) Redo()

func (Frame) Release

func (b Frame) Release()

func (Frame) SelectAll

func (f Frame) SelectAll()

func (Frame) Undo

func (f Frame) Undo()

func (Frame) ViewSource

func (f Frame) ViewSource()

func (Frame) VisitDom

func (f Frame) VisitDom(visitor CefDomVisitorT)

type GeolocationHandlerT

type GeolocationHandlerT struct {
	CStruct *C.struct__cef_geolocation_handler_t
}

type JsdialogHandlerT

type JsdialogHandlerT struct {
	CStruct *C.struct__cef_jsdialog_handler_t
}

type KeyboardHandlerT

type KeyboardHandlerT struct {
	CStruct *C.struct__cef_keyboard_handler_t
}

type LifeSpanHandler

type LifeSpanHandler interface {
	OnAfterCreated(browser Browser)
	RunModal(browser Browser) int
	DoClose(browser Browser) int
	BeforeClose(browser Browser)

	GetLifeSpanHandler() LifeSpanHandlerT
}

type LifeSpanHandlerT

type LifeSpanHandlerT struct {
	CStruct *C.struct__cef_life_span_handler_t
}

func NewLifeSpanHandlerT

func NewLifeSpanHandlerT(life LifeSpanHandler) LifeSpanHandlerT

func (LifeSpanHandlerT) AddRef

func (r LifeSpanHandlerT) AddRef()

func (LifeSpanHandlerT) Release

func (r LifeSpanHandlerT) Release()

type LoadHandlerT

type LoadHandlerT struct {
	CStruct *C.struct__cef_load_handler_t
}

type MemoryManagedBridge

type MemoryManagedBridge struct {
	Count         int
	Deconstructor func(it unsafe.Pointer)
	Name          string
}

a niave memory management. allows us to keep track of allocated resources, and their counts furthermore, the deconstructor lets us free any go resources once their C versions have been released General info about the ref count in CEF:

http://code.google.com/p/chromiumembedded/wiki/UsingTheCAPI

type RenderHandler

type RenderHandler interface {
	GetRenderHandler() RenderHandlerT
}

type RenderHandlerT

type RenderHandlerT struct {
	CStruct *C.struct__cef_render_handler_t
}

func NewRenderHandlerT

func NewRenderHandlerT(render RenderHandler) RenderHandlerT

func (RenderHandlerT) AddRef

func (r RenderHandlerT) AddRef()

func (RenderHandlerT) Release

func (r RenderHandlerT) Release()

type RequestHandler

type RequestHandler interface {
	/** Triggered before browsing to page. Return 1 to cancel transition. 0 to continue. */
	OnBeforeBrowse(browser Browser, frame Frame, request CefRequestT, isRedirect int) int
	OnBeforeResourceLoad(browser Browser, frame Frame, request CefRequestT) int
	/** Triggered when we encounter an invalid SSL cert. Return 1 to and call callback.cont() to continue or cancel the request.
	  Return 0 to immediatly cancel the request.*/
	OnCertificateError(errorCode CefErrorCode, requestUrl string, errorCallback CefCertErrorCallbackT) int

	GetRequestHandler() RequestHandlerT
}

Wraps the callbacks done to _cef_request_handler_t (partial implementation of callbacks)

type RequestHandlerT

type RequestHandlerT struct {
	CStruct *C.struct__cef_request_handler_t
}

func NewRequestHandlerT

func NewRequestHandlerT(request RequestHandler) RequestHandlerT

func (RequestHandlerT) AddRef

func (r RequestHandlerT) AddRef()

func (RequestHandlerT) Release

func (r RequestHandlerT) Release()

type Settings

type Settings struct {
	SingleProcess               int
	NoSandbox                   int
	BrowserSubprocessPath       string
	MultiThreadedMessageLoop    int
	WindowlessRenderingEnabled  int
	CommandLineArgsDisabled     int
	CachePath                   string
	PersistSessionCookies       int
	UserAgent                   string
	ProductVersion              string
	Locale                      string
	LogFile                     string
	LogSeverity                 int
	JavascriptFlags             string
	ResourcesDirPath            string
	LocalesDirPath              string
	PackLoadingDisabled         int
	RemoteDebuggingPort         int
	UncaughtExceptionStackSize  int
	ContextSafetyImplementation int
	IgnoreCertificateErrors     int
	BackgroundColor             int
	// contains filtered or unexported fields
}

func NewSettings

func NewSettings() Settings

type TaskToExecute

type TaskToExecute func()

type ThreadId

type ThreadId int
const (
	TID_UI ThreadId = iota
	TID_DB
	TID_FILE
	TID_FILE_USER_BLOCKING
	TID_PROCESS_LAUNCHER
	TID_CACHE
	TID_IO
	TID_RENDERER
)

type WindowInfo

type WindowInfo struct {
	Ptr                 unsafe.Pointer
	Hdl                 uint64
	WindowlessRendering int
	Height              int
	Width               int
}

func NewWindowInfo

func NewWindowInfo(height, width int) WindowInfo

Directories

Path Synopsis
doc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL