Versions in this module Expand all Collapse all v1 v1.0.1 Aug 23, 2024 v1.0.0 Aug 22, 2024 Changes in this version + const ARCH_BIT + const ID_TRAY + const ID_TRAYMENU_EXIT + const ID_TRAYMENU_RESTORE + const JS_GO2JS + const JS_IPC + const JS_JS2GO + const JS_MB + const JS_REGISTER_HANDLER + const WM_TRAYNOTIFY + const WM_USER + func AssertType[T interface{}](ptr uintptr) *T + func BoolToPtr(b bool) uintptr + func CallbackToPtr(callback interface{}) uintptr + func CopyBytes(src uintptr, n int) []byte + func CopyString(src uintptr, n int) string + func Float32FromBytes(src []byte, startIndex int, isLittleEndian bool) (float32, error) + func Float32ToBytes(value float32) []byte + func Float64FromBytes(src []byte, startIndex int, isLittleEndian bool) (float64, error) + func Float64ToBytes(value float64) []byte + func HIWORD(dwValue uint32) uint16 + func Int16FromBytes(src []byte, startIndex int, isLittleEndian bool) (int16, error) + func Int16ToBytes(value int16) []byte + func Int32FromBytes(src []byte, startIndex int, isLittleEndian bool) (int32, error) + func Int32ToBytes(value int32) []byte + func Int64FromBytes(src []byte, startIndex int, isLittleEndian bool) (int64, error) + func Int64ToBytes(value int64) []byte + func IntFromBytes(src []byte, startIndex int, isLittleEndian bool) (int, error) + func IntToBytes(value int) []byte + func LOWORD(dwValue uint32) uint16 + func PtrToBool(p uintptr) bool + func PtrToString(p uintptr) string + func PtrWCharToString(p uintptr) string + func StringToPtr(s string) uintptr + func StringToU16Arr(s string) []uint16 + func StringToWCharPtr(s string) uintptr + func StringToWcharU16Ptr(s string) *uint16 + func Uint16FromBytes(src []byte, startIndex int, isLittleEndian bool) (uint16, error) + func Uint16ToBytes(value uint16) []byte + func Uint32FromBytes(src []byte, startIndex int, isLittleEndian bool) (uint32, error) + func Uint32ToBytes(value uint32) []byte + func Uint64FromBytes(src []byte, startIndex int, isLittleEndian bool) (uint64, error) + func Uint64ToBytes(value uint64) []byte + func UintFromBytes(src []byte, startIndex int, isLittleEndian bool) (uint, error) + func UintToBytes(value uint) []byte + func WithCookieFile(path string) func(*Config) + func WithDllFile(dllFile string) func(*Config) + func WithDownloader(downloader *dl.Downloader) func(*Config) + func WithStoragePath(path string) func(*Config) + func WithTempPath(path string) func(*Config) + type AnyPtr = uintptr + type BOOL int32 + const FALSE + const TRUE + type BindFunctionCallback func(es JsExecState) + type Blink struct + IPC *IPC + Resource *resource.Resource + func NewApp(setups ...func(*Config)) *Blink + func (mb *Blink) AddBootScript(script string) + func (mb *Blink) AddJob(job func()) chan bool + func (mb *Blink) AddLoop(job ...func()) *Blink + func (mb *Blink) CallFunc(funcName string, args ...uintptr) (r1 uintptr, r2 uintptr, err error) + func (mb *Blink) CallFuncAsync(funcName string, args ...uintptr) *CallFuncJob + func (mb *Blink) CallFuncAsyncFirst(funcName string, args ...uintptr) *CallFuncJob + func (mb *Blink) CallFuncFirst(funcName string, args ...uintptr) (r1 uintptr, r2 uintptr, err error) + func (mb *Blink) CloseAll() + func (mb *Blink) CreateWebWindowControl(parent *View, withConfig ...WithWebWindowConfig) *View + func (mb *Blink) CreateWebWindowPopup(withConfig ...WithWebWindowConfig) *View + func (mb *Blink) CreateWebWindowTransparent(withConfig ...WithWebWindowConfig) *View + func (mb *Blink) Download(url string, withOption ...func(*downloader.Config)) (targetFile string, err error) + func (mb *Blink) Exit() + func (mb *Blink) Free() + func (mb *Blink) GetCookies() ([]*http.Cookie, error) + func (mb *Blink) GetFirstView() (view *View) + func (mb *Blink) GetString(str WkeString) string + func (mb *Blink) GetViewByHandle(viewHwnd WkeHandle) (view *View, exist bool) + func (mb *Blink) GetViewByJsExecState(es JsExecState) (view *View, exist bool) + func (mb *Blink) GetViews() []*View + func (mb *Blink) GetWindowByHandle(windowHwnd WkeHandle) (window *Window, exist bool) + func (mb *Blink) KeepRunning() + func (mb *Blink) LoopWinMessage() + func (mb *Blink) NetGetMIMEType(job WkeNetJob, mime string) string + func (mb *Blink) NetHookRequest(job WkeNetJob) + func (mb *Blink) NetSetData(job WkeNetJob, buf []byte) + func (mb *Blink) NetSetMIMEType(job WkeNetJob, mimeType string) + func (mb *Blink) Version() int + func (mb *Blink) VersionString() string + type BlinkJob struct + type CallFuncJob struct + func (cj *CallFuncJob) Wait() (r1 uintptr, r2 uintptr, err error) + type CallFuncResult struct + Err error + R1 uintptr + R2 uintptr + type Callback interface + type Char byte + func StringToChar(s string) []Char + type Config struct + Downloader *dl.Downloader + func NewConfig(setups ...func(*Config)) (*Config, error) + func (conf *Config) GetCookieFileABS() string + func (conf *Config) GetDllFile() string + func (conf *Config) GetDllFileABS() string + func (conf *Config) GetStoragePath() string + func (conf *Config) GetTempPath() string + type Double float64 + type Float float32 + type IPC struct + func (ipc *IPC) CallJsFunc(view *View, funcName string, args ...interface{}) async.InProgress[interface{}] + func (ipc *IPC) Handle(channel string, handler Callback) + func (ipc *IPC) HasChannel(channel string) (exist bool) + func (ipc *IPC) Invoke(channel string, args ...interface{}) (interface{}, error) + func (ipc *IPC) Sent(channel string, args ...interface{}) error + type IPCMessage struct + Args []interface{} + Channel string + Error string + ID string + ReplyId string + Result interface{} + type Int int32 + type JS struct + func (js *JS) Arg(es JsExecState, argIdx uint32) JsValue + func (js *JS) ArgCount(es JsExecState) uint32 + func (js *JS) ArgType(es JsExecState, argIdx uint32) JsType + func (js *JS) Boolean(value bool) JsValue + func (js *JS) Call(es JsExecState, fn, thisValue JsValue, args []JsValue) JsValue + func (js *JS) Double(value float64) JsValue + func (js *JS) EmptyArray(es JsExecState) JsValue + func (js *JS) EmptyObject(es JsExecState) JsValue + func (js *JS) Eval(es JsExecState, str string) JsValue + func (js *JS) Get(es JsExecState, object JsValue, prop string) JsValue + func (js *JS) GetAt(es JsExecState, object JsValue, index uint32) JsValue + func (js *JS) GetGlobal(es JsExecState, prop string) JsValue + func (js *JS) GetKeys(es JsExecState, object JsValue) []string + func (js *JS) GetLength(es JsExecState, object JsValue) int + func (js *JS) GetWebView(es JsExecState) WkeHandle + func (js *JS) GlobalExec(viewHandle WkeHandle) (es JsExecState) + func (js *JS) Int(value int32) JsValue + func (js *JS) Set(es JsExecState, object JsValue, prop string, value JsValue) + func (js *JS) SetAt(es JsExecState, object JsValue, index uint32, value JsValue) + func (js *JS) SetGlobal(es JsExecState, prop string, value JsValue) + func (js *JS) SetLength(es JsExecState, object JsValue, length uint32) + func (js *JS) String(es JsExecState, value string) JsValue + func (js *JS) ToBoolean(es JsExecState, value JsValue) bool + func (js *JS) ToDouble(es JsExecState, value JsValue) float64 + func (js *JS) ToGoValue(es JsExecState, value JsValue) interface{} + func (js *JS) ToJsValue(es JsExecState, value interface{}) JsValue + func (js *JS) ToString(es JsExecState, value JsValue) string + func (js *JS) ToTempString(es JsExecState, value JsValue) string + func (js *JS) TypeOf(val JsValue) JsType + func (js *JS) Undefined() JsValue + type JsArg interface + type JsData struct + CallAsFunction uintptr + Finalize uintptr + Name [100]byte + PropertyGet uintptr + PropertySet uintptr + type JsExecState uintptr + type JsKeys struct + First uintptr + Length uint32 + type JsType uint32 + const JsType_ARRAY + const JsType_BOOLEAN + const JsType_FUNCTION + const JsType_NULL + const JsType_NUMBER + const JsType_OBJECT + const JsType_STRING + const JsType_UNDEFINED + type JsValue uintptr + type KnownCType interface + type LangConfig struct + IsLittleEndian bool + type Long int32 + type LongDouble float64 + type LongInt int64 + type LongLong int64 + type Numeric interface + type OnClosingCallback func() bool + type OnConsoleCallback func(level int, message, sourceName string, sourceLine int, stackTrace string) + type OnDestroyCallback func() + type OnDidCreateScriptContextCallback func(frame WkeWebFrameHandle, context uintptr, exGroup, worldId int) + type OnDocumentReadyCallback func(frame WkeWebFrameHandle) + type OnDomEventCallback func() + type OnDownloadCallback func(url string) + type OnLoadUrlBeginCallback func(url string, job WkeNetJob) bool + type OnLoadUrlEndCallback func(url string, job WkeNetJob, buf []byte) + type OnOtherLoadCallback func(loadType WkeOtherLoadType, info *WkeTempCallbackInfo) + type OnTitleChangedCallback func(title string) + type OnWillReleaseScriptContextCallback func(frameId WkeWebFrameHandle, context uintptr, worldId int) + type PrintSettings struct + DPI int + Height int + MarginBottom int + MarginLeft int + MarginRight int + MarginTop int + Width int + type ProxyInfo struct + HostName string + Password string + Port int + Type ProxyType + UserName string + type ProxyType int + const ProxyType_HTTP + const ProxyType_NONE + const ProxyType_SOCKS4 + const ProxyType_SOCKS4A + const ProxyType_SOCKS5 + const ProxyType_SOCKS5HOSTNAME + type SChar int8 + type SIZE_TYPE uintptr + const SIZE_MAXHIDE + const SIZE_MAXIMIZED + const SIZE_MAXSHOW + const SIZE_MINIMIZED + const SIZE_RESTORED + type Short int16 + type UChar uint8 + type UInt uint32 + type ULong uint32 + type ULongInt uint64 + type ULongLong uint64 + type UShort uint16 + type Utf8 byte + type View struct + DevTools *View + Hwnd WkeHandle + Window *Window + func NewView(mb *Blink, hwnd WkeHandle, windowType WkeWindowType, parent ...*View) *View + func (v *View) AddEventListener(selector, eventType string, callback func(), preScripts ...string) (stop func()) + func (v *View) CallJsFunc(funcName string, args ...interface{}) async.InProgress[interface{}] + func (v *View) CloseWindow() + func (v *View) DestroyWindow() + func (v *View) DoWhenDidCreateScriptContext(callback func()) + func (v *View) DoWhenDocumentReady(callback func()) + func (v *View) ForceReload() + func (v *View) GetMainWebFrame() WkeWebFrameHandle + func (v *View) GetRect() *WkeRect + func (v *View) GetURL() string + func (v *View) GetWindowHandle() WkeHandle + func (v *View) HideWindow() + func (v *View) IsDidCreateScriptContext() bool + func (v *View) IsDocumentReady() bool + func (v *View) IsMainFrame(frameId WkeWebFrameHandle) bool + func (v *View) LoadURL(url string) + func (v *View) OnClosing(callback OnClosingCallback) (stop func()) + func (v *View) OnConsole(callback OnConsoleCallback) (stop func()) + func (v *View) OnDestroy(callback OnDestroyCallback) (stop func()) + func (v *View) OnDidCreateScriptContext(callback OnDidCreateScriptContextCallback) (stop func()) + func (v *View) OnDocumentReady(callback OnDocumentReadyCallback) (stop func()) + func (v *View) OnDownload(callback OnDownloadCallback) (stop func()) + func (v *View) OnLoadUrlBegin(callback OnLoadUrlBeginCallback) (stop func()) + func (v *View) OnLoadUrlEnd(callback OnLoadUrlEndCallback) (stop func()) + func (v *View) OnOtherLoad(callback OnOtherLoadCallback) (stop func()) + func (v *View) OnTitleChanged(callback OnTitleChangedCallback) (stop func()) + func (v *View) OnWillReleaseScriptContext(callback OnWillReleaseScriptContextCallback) (stop func()) + func (v *View) Reload() bool + func (v *View) RemoveEventListener(selector, eventType string) + func (v *View) Resize(width, height int32) + func (v *View) RunJS(script string) JsValue + func (v *View) RunJsByFrame(frame WkeWebFrameHandle, script string) JsValue + func (v *View) SaveToPDF(writer io.Writer, withSetting ...WithPrintSettings) error + func (v *View) SaveWebFrameToPDF(frameId WkeWebFrameHandle, writer io.Writer, withSetting ...WithPrintSettings) error + func (v *View) SetCookieJarFullPath(path string) + func (v *View) SetHeadlessEnabled(enable bool) *CallFuncJob + func (v *View) SetLocalStorageFullPath(path string) + func (v *View) SetTransparent(transparent bool) + func (v *View) ShowDevTools(devtoolsCallbacks ...func(devtools *View)) + func (v *View) ShowWindow() + func (v *View) WaitUntilDocumentReady(timeout time.Duration) bool + type VoidPtr = uintptr + type WM_SIZING uintptr + const WMSZ_BOTTOM + const WMSZ_BOTTOMLEFT + const WMSZ_BOTTOMRIGHT + const WMSZ_LEFT + const WMSZ_RIGHT + const WMSZ_TOP + const WMSZ_TOPLEFT + const WMSZ_TOPRIGHT + type Wchar_t uint16 + type WebWindowConfig struct + type Window struct + Hwnd WkeHandle + func (w *Window) Close() + func (w *Window) CloseAsHideTray() + func (w *Window) Destroy() + func (w *Window) EnableBorderResize(enable bool, thicknessOpional ...int32) + func (w *Window) EnableDragging() + func (w *Window) EnableTray(setups ...func(*win.NOTIFYICONDATA)) + func (w *Window) Hide() + func (w *Window) HideCaption() + func (w *Window) IsMaximized() bool + func (w *Window) Maximize() + func (w *Window) Minimize() + func (w *Window) MinimizeToTray() + func (w *Window) Move(x, y int32) + func (w *Window) MoveToCenter() + func (w *Window) OnActivateApp(callback WindowOnActivateAppCallback) (stop func()) + func (w *Window) OnCreate(callback WindowOnCreateCallback) (stop func()) + func (w *Window) OnSize(callback WindowOnSizeCallback) (stop func()) + func (w *Window) OnSizing(callback WindowOnSizingCallback) (stop func()) + func (w *Window) RemoveTray() + func (w *Window) Resize(width, height int32) + func (w *Window) Restore() + func (w *Window) SetIcon(handle win.HANDLE) error + func (w *Window) SetIconFromBytes(iconData []byte) error + func (w *Window) SetIconFromFile(iconFilePath string) error + func (w *Window) SetTitle(title string) + func (w *Window) SetWindowPos(x, y, width, height int32) + func (w *Window) Show() + func (w *Window) ShowCaption() + type WindowOnActivateAppCallback func(bool, uintptr) + type WindowOnCreateCallback func(*win.CREATESTRUCT) + type WindowOnSizeCallback func(stype SIZE_TYPE, width, height uint16) + type WindowOnSizingCallback func(WM_SIZING, *win.RECT) + type WithPrintSettings func(s *PrintSettings) + type WithWebWindowConfig func(c *WebWindowConfig) + func WithWebWindowPos(x, y int32) WithWebWindowConfig + func WithWebWindowSize(w, h int32) WithWebWindowConfig + type WkeConsoleCallback func(view WkeHandle, param uintptr, level WkeConsoleLevel, ...) (voidRes uintptr) + type WkeConsoleLevel int + const WkeConsoleLevel_Debug + const WkeConsoleLevel_Error + const WkeConsoleLevel_Info + const WkeConsoleLevel_Log + const WkeConsoleLevel_RevokedError + const WkeConsoleLevel_Warning + type WkeCreateViewCallback func(webView WkeHandle, param uintptr, navigationType WkeNavigationType, ...) WkeHandle + type WkeCursorType int + const WkeCursorType_Alias + const WkeCursorType_Cell + const WkeCursorType_ColumnResize + const WkeCursorType_ContextMenu + const WkeCursorType_Copy + const WkeCursorType_Cross + const WkeCursorType_Custom + const WkeCursorType_EastPanning + const WkeCursorType_EastResize + const WkeCursorType_EastWestResize + const WkeCursorType_Grab + const WkeCursorType_Grabbing + const WkeCursorType_Hand + const WkeCursorType_Help + const WkeCursorType_IBeam + const WkeCursorType_MiddlePanning + const WkeCursorType_Move + const WkeCursorType_NoDrop + const WkeCursorType_None + const WkeCursorType_NorthEastPanning + const WkeCursorType_NorthEastResize + const WkeCursorType_NorthEastSouthWestResize + const WkeCursorType_NorthPanning + const WkeCursorType_NorthResize + const WkeCursorType_NorthSouthResize + const WkeCursorType_NorthWestPanning + const WkeCursorType_NorthWestResize + const WkeCursorType_NorthWestSouthEastResize + const WkeCursorType_NotAllowed + const WkeCursorType_Pointer + const WkeCursorType_Progress + const WkeCursorType_RowResize + const WkeCursorType_SouthEastPanning + const WkeCursorType_SouthEastResize + const WkeCursorType_SouthPanning + const WkeCursorType_SouthResize + const WkeCursorType_SouthWestPanning + const WkeCursorType_SouthWestResize + const WkeCursorType_VerticalText + const WkeCursorType_Wait + const WkeCursorType_WestPanning + const WkeCursorType_WestResize + const WkeCursorType_ZoomIn + const WkeCursorType_ZoomOut + type WkeDidCreateScriptContextCallback func(view WkeHandle, param uintptr, frame WkeWebFrameHandle, context uintptr, ...) (voidRes uintptr) + type WkeDocumentReady2Callback func(view WkeHandle, param uintptr, frame WkeWebFrameHandle) (voidRes uintptr) + type WkeDownloadCallback func(view WkeHandle, param uintptr, url uintptr) (voidRes uintptr) + type WkeHandle uintptr + type WkeHttBodyElementType int + const WkeHttBodyElementTypeData + const WkeHttBodyElementTypeFile + type WkeJsNativeFunction func(es JsExecState, param uintptr) (voidRes uintptr) + type WkeKeyFlags int + const WkeKeyFlags_Extend + const WkeKeyFlags_Repeat + type WkeLoadUrlBeginCallback func(view WkeHandle, param uintptr, url string, job WkeNetJob) (boolRes uintptr) + type WkeLoadUrlEndCallback func(view WkeHandle, param uintptr, url string, job WkeNetJob, buf []byte) (voidRes uintptr) + type WkeLoadUrlFailCallback func(view WkeHandle, param, url string, job WkeNetJob) (voidRes uintptr) + type WkeMemBuf struct + Data unsafe.Pointer + Length uintptr + Unuse int + type WkeMouseFlags int + const WkeMouseFlags_CONTROL + const WkeMouseFlags_LBUTTON + const WkeMouseFlags_MBUTTON + const WkeMouseFlags_None + const WkeMouseFlags_RBUTTON + const WkeMouseFlags_SHIFT + type WkeNavigationType int + const WKE_NAVIGATION_TYPE_BACKFORWARD + const WKE_NAVIGATION_TYPE_FORMRESUBMITTED + const WKE_NAVIGATION_TYPE_FORMSUBMITTED + const WKE_NAVIGATION_TYPE_LINKCLICK + const WKE_NAVIGATION_TYPE_OTHER + const WKE_NAVIGATION_TYPE_RELOAD + type WkeNetJob uintptr + type WkeNetResponseCallback func(view WkeHandle, param uintptr, url string, job WkeNetJob) (boolRes uintptr) + type WkeOnOtherLoadCallback func(webView WkeHandle, param uintptr, loadType WkeOtherLoadType, ...) (voidRes uintptr) + type WkeOnShowDevtoolsCallback func(view WkeHandle, param uintptr) (voidRes uintptr) + type WkeOtherLoadType int + const WKE_DID_GET_REDIRECT_REQUEST + const WKE_DID_GET_RESPONSE_DETAILS + const WKE_DID_NAVIGATE + const WKE_DID_NAVIGATE_IN_PAGE + const WKE_DID_POST_REQUEST + const WKE_DID_START_LOADING + const WKE_DID_STOP_LOADING + type WkePaintBitUpdatedCallback func(view WkeHandle, param, buf []byte, rect *WkeRect, width, height int32) (voidRes uintptr) + type WkePostBodyElement struct + Data *WkeMemBuf + FileLength int64 + FilePath WkeString + FileStart int64 + Size int + Type WkeHttBodyElementType + type WkePostBodyElements struct + ElementSize uintptr + Elements []*WkePostBodyElement + IsDirty bool + Size int + type WkeRect struct + H int32 + W int32 + X int32 + Y int32 + type WkeRequestType int + const WkeRequestType_Get + const WkeRequestType_Post + const WkeRequestType_Put + const WkeRequestType_Unknow + type WkeResourceType int + const WKE_RESOURCE_TYPE_FAVICON + const WKE_RESOURCE_TYPE_FONT_RESOURCE + const WKE_RESOURCE_TYPE_IMAGE + const WKE_RESOURCE_TYPE_LAST_TYPE + const WKE_RESOURCE_TYPE_MAIN_FRAME + const WKE_RESOURCE_TYPE_MEDIA + const WKE_RESOURCE_TYPE_OBJECT + const WKE_RESOURCE_TYPE_PING + const WKE_RESOURCE_TYPE_PREFETCH + const WKE_RESOURCE_TYPE_SCRIPT + const WKE_RESOURCE_TYPE_SERVICE_WORKER + const WKE_RESOURCE_TYPE_SHARED_WORKER + const WKE_RESOURCE_TYPE_STYLESHEET + const WKE_RESOURCE_TYPE_SUB_FRAME + const WKE_RESOURCE_TYPE_SUB_RESOURCE + const WKE_RESOURCE_TYPE_WORKER + const WKE_RESOURCE_TYPE_XHR + type WkeSlist struct + Next uintptr + Str uintptr + type WkeString uintptr + type WkeTempCallbackInfo struct + Frame WkeWebFrameHandle + Job WkeNetJob + PostBody *WkePostBodyElements + Size int + URL *byte + WillSendRequestInfo *WkeWillSendRequestInfo + type WkeTitleChangedCallback func(view WkeHandle, param uintptr, title WkeString) (voidRes uintptr) + type WkeWebFrameHandle uintptr + type WkeWillReleaseScriptContextCallback func(webView WkeHandle, param uintptr, frameId WkeWebFrameHandle, context uintptr, ...) (voidRes uintptr) + type WkeWillSendRequestInfo struct + HTTPResponseCode int + Headers unsafe.Pointer + Method WkeString + NewURL WkeString + Referrer WkeString + ResourceType WkeResourceType + URL WkeString + type WkeWindowClosingCallback func(view WkeHandle, param uintptr) (boolRes uintptr) + type WkeWindowDestroyCallback func(view WkeHandle, param uintptr) (voidRes uintptr) + type WkeWindowFeatures struct + Fullscreen bool + Height int + LocationBarVisible bool + MenuBarVisible bool + Resizable bool + ScrollbarsVisible bool + StatusBarVisible bool + ToolBarVisible bool + Width int + X int + Y int + type WkeWindowType uintptr + const WKE_WINDOW_TYPE_CONTROL + const WKE_WINDOW_TYPE_HIDE_CAPTION + const WKE_WINDOW_TYPE_POPUP + const WKE_WINDOW_TYPE_TRANSPARENT