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
- func AddRef(it unsafe.Pointer)
- func CreateBrowser(hwnd WindowInfo, clientHandler ClientHandler, browserSettings BrowserSettings, ...) bool
- func CreateRef(it unsafe.Pointer, name string)
- func DisableLog()
- func DumpRefs()
- func EnableLog()
- func ExecuteProcess(programHandle unsafe.Pointer, appHandler AppHandler) int
- func FillMainArgs(mainArgs *C.struct__cef_main_args_t, appHandle unsafe.Pointer)
- func FillWindowInfo(windowInfo *C.cef_window_info_t, hwnd WindowInfo)
- func Initialize(settings Settings, appHandler AppHandler) int
- func OnBeforeChildProcessLaunch(self *C.struct__cef_browser_process_handler_t, ...)
- func OnContextInitialized(self *C.struct__cef_browser_process_handler_t)
- func OnRenderProcessThreadCreated(self *C.struct__cef_browser_process_handler_t, ...)
- func OnThreadID(id ThreadId) bool
- func PostTask(thread ThreadId, t TaskToExecute)
- func QuitMessageLoop()
- func RegisterDestructor(it unsafe.Pointer, decon func(it unsafe.Pointer)) bool
- func Release(w unsafe.Pointer) int
- func RunMessageLoop()
- func Shutdown()
- type AppHandler
- type AppHandlerT
- type BaseAppHandler
- func (app *BaseAppHandler) GetAppHandlerT() AppHandlerT
- func (app *BaseAppHandler) GetBrowserProcessHandler() BrowserProcessHandler
- func (app *BaseAppHandler) GetRenderProcessHandler()
- func (app *BaseAppHandler) GetResourceBundleHandler()
- func (app *BaseAppHandler) OnBeforeCommandLineProcessing(processType string, commandLine CommandLineT)
- func (app *BaseAppHandler) OnRegisterCustomSchemes()
- type BaseBrowserProcessHandler
- func (bph *BaseBrowserProcessHandler) GetBrowserProcessHandlerT() BrowserProcessHandlerT
- func (bph *BaseBrowserProcessHandler) OnBeforeChildProcessLaunch(commandLine CommandLineT)
- func (bph *BaseBrowserProcessHandler) OnContextInitialized()
- func (bph *BaseBrowserProcessHandler) OnRenderProcessThreadCreated(extraInfo CefListValueT)
- type BaseClientHandler
- func (ch *BaseClientHandler) GetClientHandlerT() ClientHandlerT
- func (ch *BaseClientHandler) GetContextMenuHandler() ContextMenuHandlerT
- func (ch *BaseClientHandler) GetDialogHandler() DialogHandlerT
- func (ch *BaseClientHandler) GetDisplayHandler() DisplayHandlerT
- func (ch *BaseClientHandler) GetDownloadHandler() DownloadHandlerT
- func (ch *BaseClientHandler) GetDragHandler() DragHandlerT
- func (ch *BaseClientHandler) GetFocusHandler() FocusHandlerT
- func (ch *BaseClientHandler) GetGeoLocationHandler() GeolocationHandlerT
- func (ch *BaseClientHandler) GetJsDialogHandler() JsdialogHandlerT
- func (ch *BaseClientHandler) GetKeyboardHandler() KeyboardHandlerT
- func (ch *BaseClientHandler) GetLifeSpanHandler() LifeSpanHandlerT
- func (ch *BaseClientHandler) GetLoadHandler() LoadHandlerT
- func (ch *BaseClientHandler) GetRenderHandler() RenderHandlerT
- func (ch *BaseClientHandler) GetRequestHandler() RequestHandlerT
- func (ch *BaseClientHandler) SetClientHandlerT(cht ClientHandlerT)
- func (ch *BaseClientHandler) SetDisplayHandler(dsp DisplayHandlerT)
- func (ch *BaseClientHandler) SetDownloadHandler(download DownloadHandlerT)
- func (ch *BaseClientHandler) SetLifeSpanHandler(lsh LifeSpanHandlerT)
- func (ch *BaseClientHandler) SetRenderHandler(render RenderHandlerT)
- func (ch *BaseClientHandler) SetRequestHandler(rqh RequestHandlerT)
- type BeforeDownloadCallback
- type Browser
- func (b Browser) AddRef()
- func (b Browser) CanGoBack() bool
- func (b Browser) CanGoForward() bool
- func (b Browser) GetFocusedFrame() Frame
- func (b Browser) GetFrame(name string) Frame
- func (b Browser) GetFrameByIdent(identifier int64) Frame
- func (b Browser) GetFrameCount() int64
- func (b Browser) GetFrameIdentifiers() []int64
- func (b Browser) GetFrameNames() []string
- func (b Browser) GetHost() CefBrowserHostT
- func (b Browser) GetIdentifier() int
- func (b Browser) GetMainFrame() Frame
- func (b Browser) GoBack()
- func (b Browser) GoForward()
- func (b Browser) HasDocument() bool
- func (b Browser) IsLoading() bool
- func (b Browser) IsPopup() bool
- func (b Browser) IsSame(other Browser) bool
- func (b Browser) Release()
- func (b Browser) Reload()
- func (b Browser) ReloadIgnoreCache()
- func (b Browser) StopLoad()
- type BrowserProcessHandler
- type BrowserProcessHandlerT
- type BrowserSettings
- type CefBrowserHostT
- func (c CefBrowserHostT) AddRef()
- func (b CefBrowserHostT) CloseBrowser(forceClose int)
- func (b CefBrowserHostT) Find(identifier int, search string, forward int, matchCase int, findNext int)
- func (b CefBrowserHostT) GetBrowser() Browser
- func (b CefBrowserHostT) GetClient() CefClientT
- func (b CefBrowserHostT) GetNstextInputContext()
- func (b CefBrowserHostT) GetOpenerWindowHandle() C.cef_window_handle_t
- func (b CefBrowserHostT) GetRequestContext() CefRequestContextT
- func (b CefBrowserHostT) GetWindowHandle() C.cef_window_handle_t
- func (b CefBrowserHostT) GetZoomLevel() float64
- func (b CefBrowserHostT) Invalidate(paintType C.cef_paint_element_type_t)
- func (b CefBrowserHostT) IsMouseCursorChangeDisabled() int
- func (b CefBrowserHostT) IsWindowRenderingDisabled() int
- func (b CefBrowserHostT) NotifyScreenInfoChange()
- func (b CefBrowserHostT) Print()
- func (c CefBrowserHostT) Release()
- func (b CefBrowserHostT) RunFileDialog(mode int, title string, defaultFileName string, acceptTypes []string, ...)
- func (b CefBrowserHostT) SendCaptureLostEvent()
- func (b CefBrowserHostT) SendFocusEvent(setFocus int)
- func (b CefBrowserHostT) SendKeyEvent(event CefKeyEventT)
- func (b CefBrowserHostT) SendMouseClickEvent(event CefMouseEventT, buttonType C.cef_mouse_button_type_t, ...)
- func (b CefBrowserHostT) SendMouseMoveEvent(event CefMouseEventT, mouseLeave int)
- func (b CefBrowserHostT) SendMouseWheelEVent(event CefMouseEventT, deltaX, deltaY int)
- func (b CefBrowserHostT) SetFocus(enable int)
- func (b CefBrowserHostT) SetMouseCursorChangeDisabled(disabled int)
- func (b CefBrowserHostT) SetZoomLevel(zoomLevel float64)
- func (b CefBrowserHostT) StartDownload(url string)
- func (b CefBrowserHostT) StopFinding(clearSelection int)
- func (b CefBrowserHostT) WasHidden(hidden int)
- func (b CefBrowserHostT) WasResized()
- type CefCertErrorCallbackT
- type CefClientT
- type CefDomVisitorT
- type CefErrorCode
- type CefEventHandleT
- type CefKeyEventT
- type CefListValueT
- type CefMouseEventT
- type CefPostDataElementT
- func (b CefPostDataElementT) AddRef()
- func (e CefPostDataElementT) GetBytes(b []byte) int
- func (e CefPostDataElementT) GetBytesCount() int
- func (e CefPostDataElementT) GetFile() string
- func (e CefPostDataElementT) GetType() C.cef_postdataelement_type_t
- func (e CefPostDataElementT) IsReadOnly() bool
- func (b CefPostDataElementT) Release()
- func (e CefPostDataElementT) SetToBytes(b []byte)
- func (e CefPostDataElementT) SetToEmpty()
- func (e CefPostDataElementT) SetToFile(fileName string)
- type CefPostDataT
- func (p CefPostDataT) AddElement(element CefPostDataElementT) bool
- func (b CefPostDataT) AddRef()
- func (p CefPostDataT) GetElementCount() int
- func (p CefPostDataT) GetElements(numToGet int) []CefPostDataElementT
- func (p CefPostDataT) IsReadOnly() bool
- func (b CefPostDataT) Release()
- func (p CefPostDataT) RemoveElement(element CefPostDataElementT) bool
- func (p CefPostDataT) RemoveElements()
- type CefRectT
- type CefRequestContextT
- type CefRequestT
- func (b CefRequestT) AddRef()
- func (r CefRequestT) GetFirstPartyForCookies() string
- func (r CefRequestT) GetFlags() int
- func (r CefRequestT) GetHeaderMap() map[string][]string
- func (r CefRequestT) GetMethod() string
- func (r CefRequestT) GetPostData() CefPostDataT
- func (r CefRequestT) GetResourceType() int
- func (r CefRequestT) GetTransitionType() int
- func (r CefRequestT) GetUrl() string
- func (r CefRequestT) IsReadOnly() bool
- func (b CefRequestT) Release()
- func (r CefRequestT) Set(url, method string, postData CefPostDataT, headerMap map[string]string)
- func (r CefRequestT) SetFirstPartyForCookies(url string)
- func (r CefRequestT) SetFlags(flags int)
- func (r CefRequestT) SetHeaderMap(headerMap map[string]string)
- func (r CefRequestT) SetMethod(method string)
- func (r CefRequestT) SetPostData(data CefPostDataT)
- func (r CefRequestT) SetUrl(newUrl string)
- type CefRunFileDialogCallbackT
- type CefState
- type CefStringVisitorT
- type CefTimeT
- type CefV8ContextT
- type ClientHandler
- type ClientHandlerT
- type CommandLineT
- type ContextMenuHandlerT
- type DialogHandlerT
- type DisplayHandler
- type DisplayHandlerT
- type DownloadHandler
- type DownloadHandlerT
- type DownloadItem
- func (c DownloadItem) GetContentDisposition() string
- func (c DownloadItem) GetCurrentSpeed() int64
- func (c DownloadItem) GetEndTime() CefTimeT
- func (c DownloadItem) GetFullPath() string
- func (c DownloadItem) GetId() uint32
- func (c DownloadItem) GetMimeType() string
- func (c DownloadItem) GetPercentComplete() int
- func (c DownloadItem) GetReceivedBytes() int64
- func (c DownloadItem) GetStartTime() CefTimeT
- func (c DownloadItem) GetSuggestedFileName() string
- func (c DownloadItem) GetTotalBytes() int64
- func (c DownloadItem) GetUrl() string
- func (c DownloadItem) IsCanceled() bool
- func (c DownloadItem) IsComplete() bool
- func (c DownloadItem) IsInProgress() bool
- func (c DownloadItem) IsValid() bool
- func (c DownloadItem) Release()
- type DownloadItemCallback
- type DragHandlerT
- type FocusHandlerT
- type Frame
- func (b Frame) AddRef()
- func (f Frame) Copy()
- func (f Frame) Cut()
- func (f Frame) Del()
- func (f Frame) ExecuteJavaScript(code, url string, startLine int)
- func (f Frame) GetBrowser() Browser
- func (f Frame) GetIdentifier() int64
- func (f Frame) GetName() string
- func (f Frame) GetParent() Frame
- func (f Frame) GetSource(visitor CefStringVisitorT)
- func (f Frame) GetText(visitor CefStringVisitorT)
- func (f Frame) GetUrl() string
- func (f Frame) GetV8context() CefV8ContextT
- func (f Frame) IsFocused() bool
- func (f Frame) IsMain() bool
- func (f Frame) IsValid() bool
- func (f Frame) LoadRequest(request CefRequestT)
- func (f Frame) LoadString(contents, url string)
- func (f Frame) LoadUrl(url string)
- func (f Frame) Paste()
- func (f Frame) Redo()
- func (b Frame) Release()
- func (f Frame) SelectAll()
- func (f Frame) Undo()
- func (f Frame) ViewSource()
- func (f Frame) VisitDom(visitor CefDomVisitorT)
- type GeolocationHandlerT
- type JsdialogHandlerT
- type KeyboardHandlerT
- type LifeSpanHandler
- type LifeSpanHandlerT
- type LoadHandlerT
- type MemoryManagedBridge
- type RenderHandler
- type RenderHandlerT
- type RequestHandler
- type RequestHandlerT
- type Settings
- type TaskToExecute
- type ThreadId
- type WindowInfo
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 CreateBrowser ¶
func CreateBrowser(hwnd WindowInfo, clientHandler ClientHandler, browserSettings BrowserSettings, url string) bool
func DisableLog ¶
func DisableLog()
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)
func OnContextInitialized ¶
func OnContextInitialized(self *C.struct__cef_browser_process_handler_t)
func OnRenderProcessThreadCreated ¶
func OnRenderProcessThreadCreated(self *C.struct__cef_browser_process_handler_t, extraInfo *C.struct__cef_list_value_t)
func OnThreadID ¶
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 RunMessageLoop ¶
func RunMessageLoop()
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 ¶
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) CanGoForward ¶
func (Browser) GetFocusedFrame ¶
func (Browser) GetFrameByIdent ¶
func (Browser) GetFrameCount ¶
func (Browser) GetFrameIdentifiers ¶
func (Browser) GetFrameNames ¶
func (Browser) GetHost ¶
func (b Browser) GetHost() CefBrowserHostT
func (Browser) GetIdentifier ¶
func (Browser) GetMainFrame ¶
func (Browser) HasDocument ¶
func (Browser) ReloadIgnoreCache ¶
func (b Browser) ReloadIgnoreCache()
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) 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 (e CefPostDataElementT) GetType() C.cef_postdataelement_type_t
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 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) ExecuteJavaScript ¶
func (Frame) GetBrowser ¶
func (Frame) GetIdentifier ¶
func (Frame) GetSource ¶
func (f Frame) GetSource(visitor CefStringVisitorT)
func (Frame) GetText ¶
func (f Frame) GetText(visitor CefStringVisitorT)
func (Frame) GetV8context ¶
func (f Frame) GetV8context() CefV8ContextT
func (Frame) LoadRequest ¶
func (f Frame) LoadRequest(request CefRequestT)
func (Frame) LoadString ¶
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 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 ¶
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 WindowInfo ¶
type WindowInfo struct { Ptr unsafe.Pointer Hdl uint64 WindowlessRendering int Height int Width int }
func NewWindowInfo ¶
func NewWindowInfo(height, width int) WindowInfo
Source Files ¶
- cef_app.go
- cef_base.go
- cef_browser.go
- cef_browser_host.go
- cef_browser_process_handler.go
- cef_client_handler.go
- cef_display_handler.go
- cef_download_handler.go
- cef_error_code.go
- cef_frame.go
- cef_lifespan_handler.go
- cef_render_handler.go
- cef_request.go
- cef_request_handler.go
- cef_task.go
- chrome.go
- chrome_handler.go
- chrome_linux.go
- constant.go
- other.go
- util.go
Click to show internal directories.
Click to hide internal directories.