win32

package
v0.0.0-...-ff9a39a Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DidStopLoading     = "did-stop-loading" //mbOnLoadingFinish
	PageTitleUpdated   = "page-title-updated"
	PageFaviconUpdated = "page-favicon-updated"
)

onContentsEvent

View Source
const (
	WKE_LBUTTON  = 0x01
	WKE_RBUTTON  = 0x02
	WKE_SHIFT    = 0x04
	WKE_CONTROL  = 0x08
	WKE_MBUTTON  = 0x10
	WKE_EXTENDED = 0x0100
	WKE_REPEAT   = 0x4000
)
View Source
const (
	MB_SETTING_PROXY            mbSettingMask = 1
	MB_ENABLE_NODEJS            mbSettingMask = 1 << 3
	MB_ENABLE_DISABLE_H5VIDEO   mbSettingMask = 1 << 4
	MB_ENABLE_DISABLE_PDFVIEW   mbSettingMask = 1 << 5
	MB_ENABLE_DISABLE_CC        mbSettingMask = 1 << 6
	MB_ENABLE_ENABLE_EGLGLES2   mbSettingMask = 1 << 7
	MB_ENABLE_ENABLE_SWIFTSHAER mbSettingMask = 1 << 8
)
View Source
const (
	WKE_LOADING_SUCCEEDED wkeLoadingResult = 0
	WKE_LOADING_FAILED    wkeLoadingResult = 1
	WKE_LOADING_CANCELED  wkeLoadingResult = 2
)
View Source
const (
	WKE_NAVIGATION_TYPE_LINKCLICK     wkeNavigationType = 0
	WKE_NAVIGATION_TYPE_FORMSUBMITTE  wkeNavigationType = 1
	WKE_NAVIGATION_TYPE_BACKFORWARD   wkeNavigationType = 2
	WKE_NAVIGATION_TYPE_RELOAD        wkeNavigationType = 3
	WKE_NAVIGATION_TYPE_FORMRESUBMITT wkeNavigationType = 4
	WKE_NAVIGATION_TYPE_OTHER         wkeNavigationType = 5
)
View Source
const (
	// Registry key security and access rights.
	// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724878.aspx
	// for details.
	ALL_ACCESS         = 0xf003f
	CREATE_LINK        = 0x00020
	CREATE_SUB_KEY     = 0x00004
	ENUMERATE_SUB_KEYS = 0x00008
	EXECUTE            = 0x20019
	NOTIFY             = 0x00010
	QUERY_VALUE        = 0x00001
	READ               = 0x20019
	SET_VALUE          = 0x00002
	WOW64_32KEY        = 0x00200
	WOW64_64KEY        = 0x00100
	WRITE              = 0x20006
)
View Source
const (
	// Windows defines some predefined root keys that are always open.
	// An application can use these keys as entry points to the registry.
	// Normally these keys are used in OpenKey to open new keys,
	// but they can also be used anywhere a Key is required.
	CLASSES_ROOT     = Key(syscall.HKEY_CLASSES_ROOT)
	CURRENT_USER     = Key(syscall.HKEY_CURRENT_USER)
	LOCAL_MACHINE    = Key(syscall.HKEY_LOCAL_MACHINE)
	USERS            = Key(syscall.HKEY_USERS)
	CURRENT_CONFIG   = Key(syscall.HKEY_CURRENT_CONFIG)
	PERFORMANCE_DATA = Key(syscall.HKEY_PERFORMANCE_DATA)
)
View Source
const (
	SYSTEM_RESIZE = "resize"
)

Variables

This section is empty.

Functions

func Debug

func Debug() bool

func GetBound

func GetBound(h win.HWND) win.RECT

func MainLoop

func MainLoop()

func ShowMainWindow

func ShowMainWindow(url, script string, x, y int32)

func StartBlinkMain

func StartBlinkMain(url, title, ico, ua, devPath string, max, mb, ib, show, size bool, width, height, pos int,
	jsFunc map[int32]func(string) string, forms map[string]FormProfile, set, close func(uintptr),
	s SaveCallback, f FinishCallback, domains []string) error

func StartBlinkMainAll

func StartBlinkMainAll(url, title, ico, ua, devPath, script string, max, mb, ib, show, size bool, width, height, pos, parent int,
	jsFunc map[int32]func(string) string, forms map[string]FormProfile, set, close func(uintptr),
	s SaveCallback, f FinishCallback, domains []string) error

func StrPtr

func StrPtr(s string) (uintptr, error)

Types

type BlinkView

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

func (*BlinkView) GetTitle

func (v *BlinkView) GetTitle() string

func (*BlinkView) GetViewURL

func (v *BlinkView) GetViewURL() string

func (*BlinkView) GoBack

func (v *BlinkView) GoBack()

func (*BlinkView) GoForward

func (v *BlinkView) GoForward()

func (*BlinkView) Id

func (v *BlinkView) Id() int

func (*BlinkView) LoadUrl

func (v *BlinkView) LoadUrl(url string)

func (*BlinkView) LoadUrlScript

func (v *BlinkView) LoadUrlScript(url, pre, ready string)

func (*BlinkView) Move

func (v *BlinkView) Move(left, top, width, height int32)

view setWidth move setSize hide

func (*BlinkView) NewMenu

func (v *BlinkView) NewMenu(items []string, b int, left bool, x, y int32, cmd func(i int))

func (*BlinkView) OnWndProc

func (v *BlinkView) OnWndProc(hWnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr

func (*BlinkView) ReloadIgnoringCacheView

func (v *BlinkView) ReloadIgnoringCacheView()

func (*BlinkView) SetCall

func (v *BlinkView) SetCall(call map[string]func(data EventData))

func (*BlinkView) SetDownPath

func (v *BlinkView) SetDownPath(dp string)

func (*BlinkView) SetDownloadCallback

func (v *BlinkView) SetDownloadCallback(callback func(wke wkeHandle, param uintptr, length uint32, url, mime, disposition uintptr, job wkeNetJob, dataBind uintptr) wkeDownloadOpt)

func (*BlinkView) SetOnNewWindow

func (v *BlinkView) SetOnNewWindow(callback wkeOnCreateViewCallback)

func (*BlinkView) Show

func (v *BlinkView) Show(s bool)

func (*BlinkView) ViewStop

func (v *BlinkView) ViewStop()

type EventData

type EventData struct {
	Handle wkeHandle
	Frame  wkeFrame
	Params string
}

type FinishCallback

type FinishCallback func(url string, success bool)

type FormProfile

type FormProfile struct {
	Title     string
	UserAgent string
	Width     int
	Height    int
	Max       bool
	Mb        bool
	Ib        bool
	// contains filtered or unexported fields
}

type Key

type Key syscall.Handle

Key is a handle to an open Windows registry key. Keys can be obtained by calling OpenKey; there are also some predefined root keys such as CURRENT_USER. Keys can be used directly in the Windows API.

func OpenKey

func OpenKey(k Key, path string, access uint32) (Key, error)

OpenKey opens a new key with path name relative to key k. It accepts any open key, including CURRENT_USER and others, and returns the new key and an error. The access parameter specifies desired access rights to the key to be opened.

func (Key) Close

func (k Key) Close() error

Close closes open key k.

func (Key) HaveSubKey

func (k Key) HaveSubKey(name string) (bool, error)

type ProxyInfo

type ProxyInfo struct {
	Type     ProxyType
	HostName string
	Port     int
	UserName string
	Password string
}

type ProxyType

type ProxyType int
const (
	ProxyType_NONE ProxyType = iota
	ProxyType_HTTP
	ProxyType_SOCKS4
	ProxyType_SOCKS4A
	ProxyType_SOCKS5
	ProxyType_SOCKS5HOSTNAME
)

type SaveCallback

type SaveCallback func(url, path string)
type Thublink struct {
	// contains filtered or unexported fields
}

func (*Thublink) Init

func (t *Thublink) Init() *Thublink

type Window

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

func (*Window) SetCall

func (w *Window) SetCall(call map[string]func(string))

func (*Window) ShowMessageBox

func (w *Window) ShowMessageBox(title, msg string)

dialogOpen

type WindowType

type WindowType int
const (
	WKE_WINDOW_TYPE_POPUP WindowType = iota
	WKE_WINDOW_TYPE_TRANSPARENT
	WKE_WINDOW_TYPE_CONTROL
)

Jump to

Keyboard shortcuts

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