fake

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fake is an in-memory platform.Backend for testing the public API without a GUI. Its event loop runs on the goroutine that calls Run, which is treated as the main thread.

Index

Constants

This section is empty.

Variables

Apps are the applications Applications lists, which tests set.

View Source
var ErrNoReply = errors.New("fake: no reply")

ErrNoReply makes Window.CallAsyncFunction never call back, like a promise that never settles.

View Source
var Opened []string

Opened are the paths OpenApplication was given.

View Source
var Trashed []string

Trashed are the paths TrashItem was given.

Functions

This section is empty.

Types

type Backend

type Backend struct {

	// ClipboardError injects a failed write while preserving existing ownership.
	ClipboardError error
	// ClipboardDuringFlush simulates a toolkit pumping a nested event loop
	// after releasing providers but before its storage operation returns.
	ClipboardDuringFlush func()

	// KeepsLocale makes the backend keep the app's language, as macOS
	// does, in SavedLocale; without it the core keeps it in a file.
	KeepsLocale bool

	// UILanguages are the languages SetLanguages told last, and
	// UIRightToLeft its direction.
	UILanguages   []string
	UIRightToLeft bool
	// Watching reports whether power events were asked for, Awake counts the
	// KeepAwake calls not released yet.
	Watching bool
	Awake    int
	// Online and Metered are what Network.Status answers with, and
	// WatchingNetwork whether Network.Watch was called.
	Online, Metered bool
	WatchingNetwork bool
	// FileWatches are the file watches made, FileWatchError what making
	// one fails with, FileWatchSubtree whether they take Subtree targets
	// and FileWatchNoFiles whether they refuse files.
	FileWatches      []*FileWatch
	FileWatchError   error
	FileWatchSubtree bool
	FileWatchNoFiles bool
	// FileWatchAddHook is the AddHook of the file watches made.
	FileWatchAddHook func(platform.FileWatchTarget) error
	// URLSchemes are the registered URL schemes, by scheme: "id name".
	URLSchemes map[string]string
	// LoginItem is the command that starts the app at login: "id name arg".
	LoginItem string
	// DockMenu is the menu of the Dock icon.
	DockMenu *platform.Menu
	// ForegroundAllowed counts AllowForeground calls.
	ForegroundAllowed int
	// Cleared counts ClearBrowsingData calls.
	Cleared int

	// CookiesCleared counts ClearCookies calls.
	CookiesCleared int
	// RecentDocuments are the paths AddRecentDocument recorded, in order,
	// without the ones ClearRecentDocuments removed.
	RecentDocuments []string
	// RecentCleared counts ClearRecentDocuments calls.
	RecentCleared int
	// JumpList is the list of the last SetJumpList call, JumpListCommits
	// the number of calls.
	JumpList        platform.JumpList
	JumpListCommits int
	// Dialog results returned by the next dialog.
	OpenResult    []string
	SaveResult    string
	MessageResult platform.MessageBoxResult
	// OnOpenDialog, OnSaveDialog and OnMessageBox, when set, answer the
	// dialogs instead of the results above. They run on the main thread.
	OnOpenDialog func(opts *platform.OpenDialogOptions) []string
	OnSaveDialog func(opts *platform.SaveDialogOptions) string
	OnMessageBox func(opts *platform.MessageBoxOptions) platform.MessageBoxResult
	// NotificationError, when set, is what showing a notification fails
	// with.
	NotificationError error
	// NoWebView makes WebViewAvailable report no system webview, as a
	// machine without one does.
	NoWebView bool
	// contains filtered or unexported fields
}

Backend is a fake platform backend.

func New

func New() *Backend

New creates a fake backend.

func (*Backend) App

func (b *Backend) App() platform.AppController

func (*Backend) AppMenu

func (b *Backend) AppMenu() *platform.Menu

AppMenu returns the last application menu.

func (*Backend) Applications

func (b *Backend) Applications() ([]platform.Application, error)

func (*Backend) ClickMenuItem

func (b *Backend) ClickMenuItem(id int)

ClickMenuItem simulates choosing a menu item.

func (*Backend) ClickNotification

func (b *Backend) ClickNotification(id string)

ClickNotification reports a click on a notification, as the platform does. It runs on the main thread, like the backends report it.

func (*Backend) Clipboard

func (b *Backend) Clipboard() platform.Clipboard

func (*Backend) Delivered

func (b *Backend) Delivered(n *platform.Notification)

Delivered adds a notification the platform still shows from an earlier run of the app, which the app did not show in this one.

func (*Backend) Dialogs

func (b *Backend) Dialogs() platform.Dialogs

func (*Backend) EmitNetwork

func (b *Backend) EmitNetwork(status platform.NetworkStatus)

EmitNetwork reports a network status to the app, as a backend does when it may have changed.

func (*Backend) EmitPower

func (b *Backend) EmitPower(event string)

EmitPower simulates a power or session event.

func (*Backend) Init

func (*Backend) IsMainThread

func (b *Backend) IsMainThread() bool

func (*Backend) LastFileWatch

func (b *Backend) LastFileWatch() *FileWatch

LastFileWatch returns the FileWatch created last.

func (*Backend) MenuUpdates

func (b *Backend) MenuUpdates() []*platform.MenuItem

MenuUpdates returns the items passed to UpdateMenuItem.

func (*Backend) Name

func (b *Backend) Name() string

func (*Backend) Network

func (b *Backend) Network() platform.Network

func (*Backend) NewFileWatch

func (b *Backend) NewFileWatch(notify func(platform.FileWatchNotice)) (platform.FileWatch, error)

func (*Backend) NewTray

func (b *Backend) NewTray(h platform.TrayHandler) (platform.Tray, error)

func (*Backend) NewWindow

func (*Backend) Notification

func (b *Backend) Notification(id string) *platform.Notification

Notification returns the notification with an id, or nil.

func (*Backend) Notifications

func (b *Backend) Notifications() []*platform.Notification

Notifications returns the notifications shown and not yet removed.

func (*Backend) NotificationsSupported

func (b *Backend) NotificationsSupported() bool

Notifications are recorded rather than shown, so that a test can see what the app asked for and report a click as a platform does.

func (*Backend) PopupMenu

func (b *Backend) PopupMenu(m *platform.Menu, _ platform.Window, pos *platform.Point)

PopupMenu notes the context menu shown, which Popups returns.

func (*Backend) Popups

func (b *Backend) Popups() []Popup

Popups returns the context menus shown, in order.

func (*Backend) Power

func (b *Backend) Power() platform.Power

func (*Backend) PreferenceReads

func (b *Backend) PreferenceReads() int

PreferenceReads returns how many times Preferences() read the backend, for tests.

func (*Backend) PressHotkey

func (b *Backend) PressHotkey(acc string)

PressHotkey simulates a global shortcut.

func (*Backend) Quit

func (b *Backend) Quit()

func (*Backend) QuitRequested

func (b *Backend) QuitRequested() bool

QuitRequested simulates Cmd+Q and reports whether the app agreed.

func (*Backend) RegisterHotkey

func (b *Backend) RegisterHotkey(id int, acc string) error

func (*Backend) RemoveAllNotifications

func (b *Backend) RemoveAllNotifications()

func (*Backend) RemoveNotification

func (b *Backend) RemoveNotification(id string)

func (*Backend) ReplaceFile

func (b *Backend) ReplaceFile(target, replacement string) error

ReplaceFile renames replacement over target, with the target's permissions.

func (*Backend) Run

func (b *Backend) Run() error

func (*Backend) Screen

func (b *Backend) Screen() platform.Screen

func (*Backend) Secrets

func (b *Backend) Secrets() platform.Secrets

func (*Backend) SetApplicationMenu

func (b *Backend) SetApplicationMenu(m *platform.Menu)

func (*Backend) SetPreferences

func (b *Backend) SetPreferences(p platform.Preferences)

SetPreferences changes the desktop's preferences, as the user does in the system's settings.

func (*Backend) SetSavedLocale

func (b *Backend) SetSavedLocale(tag string)

SetSavedLocale sets what the system keeps of the app's language, as the user does choosing it in macOS's System Settings while the app is not running.

func (*Backend) SetSecretError

func (b *Backend) SetSecretError(err error)

SetSecretError makes every Secrets call fail with err, or work again when err is nil. It may be called from any goroutine.

func (*Backend) SetSystemLanguages

func (b *Backend) SetSystemLanguages(tags ...string)

SetSystemLanguages changes the languages the user prefers, as the user does in the system's settings, and reports it; none goes back to en-US.

func (*Backend) SetSystemRegion

func (b *Backend) SetSystemRegion(r platform.Region)

SetSystemRegion changes the user's regional formats, as the user does in the system's settings, and reports it.

func (*Backend) SetTrayDark

func (b *Backend) SetTrayDark(dark bool)

SetTrayDark turns the menu bar the icons show on dark or light, as the system's appearance or the wallpaper does, and tells the icons.

func (*Backend) Shell

func (b *Backend) Shell() platform.Shell

func (*Backend) ShowNotification

func (b *Backend) ShowNotification(n *platform.Notification, done func(error))

func (*Backend) Signal

func (b *Backend) Signal()

func (*Backend) Step

func (b *Backend) Step()

func (*Backend) StoredSecret

func (b *Backend) StoredSecret(service, account string) ([]byte, bool)

StoredSecret returns the secret stored for service and account, as the system's store would show it.

func (*Backend) Theme

func (b *Backend) Theme() platform.Theme

func (*Backend) TrayIDs

func (b *Backend) TrayIDs() []string

TrayIDs returns the IDs the tray icons were given, in order.

func (*Backend) UnregisterHotkey

func (b *Backend) UnregisterHotkey(id int)

func (*Backend) UpdateMenuItem

func (b *Backend) UpdateMenuItem(it *platform.MenuItem)

func (*Backend) Wake

func (b *Backend) Wake()

func (*Backend) WebViewAvailable

func (b *Backend) WebViewAvailable() bool

WebViewAvailable reports whether the fake system webview is there: windows showing web pages work, unless NoWebView says otherwise.

func (*Backend) Windows

func (b *Backend) Windows() []*Window

Windows returns the windows created so far.

type FileWatch

type FileWatch struct {

	// Subtree makes Add accept Subtree targets, as Windows does.
	Subtree bool
	// NoFiles makes Add refuse targets that aren't directories, as every
	// system backend does.
	NoFiles bool
	// AddHook, when set, runs in Add before the target is enrolled; an
	// error it returns is Add's.
	AddHook func(platform.FileWatchTarget) error
	// contains filtered or unexported fields
}

FileWatch records the targets the core enrolls; tests report changes with Notify.

func (*FileWatch) Add

func (*FileWatch) Close

func (w *FileWatch) Close()

func (*FileWatch) Notify

func (w *FileWatch) Notify(n platform.FileWatchNotice)

Notify reports n, as a backend's goroutine would, unless the watch is closed.

func (*FileWatch) Remove

func (w *FileWatch) Remove(id uint64)

func (*FileWatch) Targets

func (w *FileWatch) Targets() []platform.FileWatchTarget

Targets returns the enrolled targets.

type Popup struct {
	Menu *platform.Menu
	Pos  *platform.Point
}

Popup is a context menu shown at Pos.

type Surface

type Surface struct {

	// Scale is the device pixels per DIP.
	Scale float64
	// contains filtered or unexported fields
}

Surface is a fake window surface: it records what the content asks of it, and tests deliver events through Send.

func (*Surface) Accessibility

func (s *Surface) Accessibility() (*platform.AccessTree, int)

Accessibility returns the last accessibility tree the content gave, and how many it gave.

func (*Surface) CancelDataDrag

func (s *Surface) CancelDataDrag()

func (*Surface) Cursor

func (s *Surface) Cursor() platform.Cursor

Cursor returns the pointer shape the content set; TextInput whether it asked for text input.

func (*Surface) DataDrag

func (s *Surface) DataDrag() *platform.DragRequest

DataDrag returns the active native-source request. Main thread only.

func (*Surface) FinishDataDrag

func (s *Surface) FinishDataDrag(r transfer.Result)

FinishDataDrag delivers the native source's result once. Main thread only.

func (*Surface) Frame

func (s *Surface) Frame() bool

Frame draws a frame when the content asked for one since the last, as the display would, and reports whether it did.

func (*Surface) Frames

func (s *Surface) Frames() int

Frames returns how many frames were presented.

func (*Surface) Native

func (s *Surface) Native() platform.SurfaceNative

func (*Surface) NewWebView

func (*Surface) Pixel

func (s *Surface) Pixel(x, y int) [4]byte

Pixel returns the color of a pixel of the last frame, as BGRA.

func (*Surface) PlaceWebViews

func (s *Surface) PlaceWebViews(views []platform.WebViewPlacement)

func (*Surface) Placements

func (s *Surface) Placements() int

Placements counts the PlaceWebViews calls.

func (*Surface) PresentPixels

func (s *Surface) PresentPixels(pix []byte, stride, width, height int)

func (*Surface) Press

func (s *Surface) Press(x, y float64) *WebView

Press presses the pointer at x, y as the platform would: on the web view taking it there, which tells the content (WebViewPress) and returns it, else on the content, and reports nil.

func (*Surface) RefreshRate

func (s *Surface) RefreshRate() float64

RefreshRate returns the display's refresh rate, 60 unless SetRefreshRate set another.

func (*Surface) RequestFrame

func (s *Surface) RequestFrame()

func (*Surface) Send

func (s *Surface) Send(ev platform.SurfaceEvent) bool

Send delivers an event to the window's content, on the main thread, and returns what the content answered.

func (*Surface) SetCursor

func (s *Surface) SetCursor(c platform.Cursor)

func (*Surface) SetDropFormats

func (s *Surface) SetDropFormats(f []transfer.Format)

func (*Surface) SetRefreshRate

func (s *Surface) SetRefreshRate(hz float64)

SetRefreshRate sets the display's refresh rate.

func (*Surface) SetTextInput

func (s *Surface) SetTextInput(t platform.TextInputState)

func (*Surface) Size

func (s *Surface) Size() (float64, float64, float64)

func (*Surface) StartDataDrag

func (s *Surface) StartDataDrag(r platform.DragRequest)

func (*Surface) TextInput

func (s *Surface) TextInput() (bool, platform.RectF)

TextInput reports whether text input is on, and the caret.

func (*Surface) TextInputState

func (s *Surface) TextInputState() platform.TextInputState

TextInputState returns the last state of text input the content set.

func (*Surface) UpdateAccessibility

func (s *Surface) UpdateAccessibility(tree *platform.AccessTree)

func (*Surface) WebViewAt

func (s *Surface) WebViewAt(x, y float64) *WebView

WebViewAt returns the web view that takes the pointer at x, y: the last shown, in the order the content painted them, whose placement takes it.

func (*Surface) WebViews

func (s *Surface) WebViews() []*WebView

WebViews returns the surface's web views not closed, in the order they were made.

type WebView

type WebView struct {
	*Window

	// Placement is where the content last showed the web view, while
	// Shown; Focused tells that Focus or TabInto gave it the keyboard
	// since, TabbedBack that TabInto did so going back.
	Placement  platform.WebViewPlacement
	Shown      bool
	Focused    bool
	TabbedBack bool
	// contains filtered or unexported fields
}

WebView is a web view under a fake Surface (Surface.NewWebView): a Window of its own for its page, which its handler hears of, without the window's methods.

func (*WebView) Close

func (v *WebView) Close()

Close closes the web view; its handler hears no more of it.

func (*WebView) Focus

func (v *WebView) Focus()

func (*WebView) Host

func (v *WebView) Host() *Window

Host returns the window the web view is in.

func (*WebView) TabInto

func (v *WebView) TabInto(back bool)

func (*WebView) TabOut

func (v *WebView) TabOut(back bool)

TabOut moves the keyboard out of the web view as Tab past its page's last element does, or Shift+Tab past its first when back.

type Window

type Window struct {
	H    platform.WindowHandler
	Opts *platform.WindowOptions
	// Flyout is how a flyout was placed last.
	Flyout platform.Flyout

	// Dropped is what DroppedFiles returns, once.
	Dropped []string
	// PDF holds the options of the last PrintToPDF.
	PDF platform.PDFOptions
	// HTML holds the documents LoadHTML loaded, in order.
	HTML []string
	// UserScriptUpdates counts the calls of SetUserScripts.
	UserScriptUpdates int
	// What the window extras were last set to.
	Background      platform.Color
	Progress        string
	ProgressValue   float64
	Flashing        bool
	SkipsTaskbar    bool
	OnAllWorkspaces bool
	AutoHidesMenu   bool
	Icon            []byte
	// RepresentedFile and DocumentEdited are what SetRepresentedFile and
	// SetDocumentEdited set.
	RepresentedFile string
	DocumentEdited  bool
	// TitleBarRoom is what TitleBar returns: set for windows with a hidden
	// title bar, and changed by tests before they call H.TitleBarChanged.
	TitleBarRoom platform.TitleBar
	// AsyncFunction answers CallAsyncFunction.
	AsyncFunction func(body string) (string, error)
	// AsyncCallback, when set, receives CallAsyncFunction calls to answer
	// through reply whenever it wants, on the main thread.
	AsyncCallback func(body string, reply func(string, error))
	// OnEval, when set, receives the scripts passed to Eval instead of
	// recording them.
	OnEval func(js string)
	// contains filtered or unexported fields
}

Window is a fake native window. Scripts evaluated in it are recorded.

func (*Window) Blur

func (w *Window) Blur()

func (*Window) Bounds

func (w *Window) Bounds() platform.Rect

func (*Window) CallAsyncFunction

func (w *Window) CallAsyncFunction(body string, cb func(string, error))

func (*Window) CanGoBack

func (w *Window) CanGoBack() bool

func (*Window) CanGoForward

func (w *Window) CanGoForward() bool

func (*Window) CapturePage

func (w *Window) CapturePage(cb func([]byte, error))

func (*Window) Center

func (w *Window) Center()

func (*Window) ClearScripts

func (w *Window) ClearScripts()

ClearScripts forgets the scripts passed to Eval so far.

func (*Window) ClickMenuItem

func (w *Window) ClickMenuItem(id int)

ClickMenuItem simulates choosing an item of this window's menu.

func (*Window) Close

func (w *Window) Close()

func (*Window) CloseDevTools

func (w *Window) CloseDevTools()

func (*Window) ContentBounds

func (w *Window) ContentBounds() platform.Rect

func (*Window) Document

func (w *Window) Document() (path string, edited bool)

Document returns what SetRepresentedFile and SetDocumentEdited set.

func (*Window) DroppedFiles

func (w *Window) DroppedFiles() []string

func (*Window) Eval

func (w *Window) Eval(js string)

func (*Window) FakeSurface

func (w *Window) FakeSurface() *Surface

FakeSurface returns the window's surface, for tests.

func (*Window) FlashFrame

func (w *Window) FlashFrame(v bool)

func (*Window) Focus

func (w *Window) Focus()

func (*Window) GoBack

func (w *Window) GoBack()

func (*Window) GoForward

func (w *Window) GoForward()

func (*Window) Handle

func (w *Window) Handle() uintptr

func (*Window) HasShadow

func (w *Window) HasShadow() bool

func (*Window) Hide

func (w *Window) Hide()

func (*Window) IsAlwaysOnTop

func (w *Window) IsAlwaysOnTop() bool

func (*Window) IsClosable

func (w *Window) IsClosable() bool

func (*Window) IsClosed

func (w *Window) IsClosed() bool

IsClosed reports whether Close was called.

func (*Window) IsDevToolsOpened

func (w *Window) IsDevToolsOpened() bool

func (*Window) IsFocused

func (w *Window) IsFocused() bool

func (*Window) IsFullScreen

func (w *Window) IsFullScreen() bool

func (*Window) IsLoading

func (w *Window) IsLoading() bool

func (*Window) IsMaximizable

func (w *Window) IsMaximizable() bool

func (*Window) IsMaximized

func (w *Window) IsMaximized() bool

func (*Window) IsMinimizable

func (w *Window) IsMinimizable() bool

func (*Window) IsMinimized

func (w *Window) IsMinimized() bool

func (*Window) IsMovable

func (w *Window) IsMovable() bool

func (*Window) IsResizable

func (w *Window) IsResizable() bool

func (*Window) IsVisible

func (w *Window) IsVisible() bool

func (*Window) LoadFile

func (w *Window) LoadFile(path, _ string)

func (*Window) LoadHTML

func (w *Window) LoadHTML(html, _ string)

func (*Window) LoadURL

func (w *Window) LoadURL(url string)

func (*Window) Maximize

func (w *Window) Maximize()

func (*Window) Menu

func (w *Window) Menu() *platform.Menu

Menu returns the menu SetMenu set last.

func (*Window) Minimize

func (w *Window) Minimize()

func (*Window) Opacity

func (w *Window) Opacity() float64

func (*Window) OpenDevTools

func (w *Window) OpenDevTools()

func (*Window) PlaceFlyout

func (w *Window) PlaceFlyout(f platform.Flyout, size platform.Size)

PlaceFlyout places a flyout as the real backends do, against the parent's content area and the fake display's work area.

func (*Window) Print

func (w *Window) Print()

func (*Window) PrintToPDF

func (w *Window) PrintToPDF(o platform.PDFOptions, cb func([]byte, error))

func (*Window) Reload

func (w *Window) Reload(bool)

func (*Window) Restore

func (w *Window) Restore()

func (*Window) Scripts

func (w *Window) Scripts() []string

Scripts returns the scripts passed to Eval.

func (*Window) SetAlwaysOnTop

func (w *Window) SetAlwaysOnTop(bool)

func (*Window) SetAutoHideMenu

func (w *Window) SetAutoHideMenu(v bool)

func (*Window) SetBackgroundColor

func (w *Window) SetBackgroundColor(c platform.Color)

func (*Window) SetBounds

func (w *Window) SetBounds(r platform.Rect)

func (*Window) SetClosable

func (w *Window) SetClosable(bool)

func (*Window) SetContentBounds

func (w *Window) SetContentBounds(r platform.Rect)

func (*Window) SetContentProtection

func (w *Window) SetContentProtection(bool)

func (*Window) SetDocumentEdited

func (w *Window) SetDocumentEdited(v bool)

func (*Window) SetFullScreen

func (w *Window) SetFullScreen(v bool)

func (*Window) SetHasShadow

func (w *Window) SetHasShadow(bool)

func (*Window) SetIcon

func (w *Window) SetIcon(png []byte) error

func (*Window) SetIgnoreMouseEvents

func (w *Window) SetIgnoreMouseEvents(bool)

func (*Window) SetMaximizable

func (w *Window) SetMaximizable(bool)

func (*Window) SetMaximumSize

func (w *Window) SetMaximumSize(platform.Size)

func (*Window) SetMenu

func (w *Window) SetMenu(m *platform.Menu)

func (*Window) SetMinimizable

func (w *Window) SetMinimizable(bool)

func (*Window) SetMinimumSize

func (w *Window) SetMinimumSize(platform.Size)

func (*Window) SetMovable

func (w *Window) SetMovable(bool)

func (*Window) SetOpacity

func (w *Window) SetOpacity(float64)

func (*Window) SetProgressBar

func (w *Window) SetProgressBar(state string, value float64)

func (*Window) SetRepresentedFile

func (w *Window) SetRepresentedFile(p string)

func (*Window) SetResizable

func (w *Window) SetResizable(bool)

func (*Window) SetSkipTaskbar

func (w *Window) SetSkipTaskbar(v bool)

func (*Window) SetTitle

func (w *Window) SetTitle(t string)

func (*Window) SetUserAgent

func (w *Window) SetUserAgent(string)

func (*Window) SetUserScripts

func (w *Window) SetUserScripts(scripts []platform.UserScript)

SetUserScripts replaces Opts.UserScripts, which tests read and UserScripts returns.

func (*Window) SetVibrancy

func (w *Window) SetVibrancy(string)

func (*Window) SetVisibleOnAllWorkspaces

func (w *Window) SetVisibleOnAllWorkspaces(v bool)

func (*Window) SetZoom

func (w *Window) SetZoom(f float64)

func (*Window) Show

func (w *Window) Show()

func (*Window) ShowInactive

func (w *Window) ShowInactive()

func (*Window) StartDrag

func (w *Window) StartDrag()

func (*Window) StopLoading

func (w *Window) StopLoading()

func (*Window) Surface

func (w *Window) Surface() platform.Surface

Surface returns the window's surface, nil unless it was created with WindowOptions.Surface.

func (*Window) Title

func (w *Window) Title() string

func (*Window) TitleBar

func (w *Window) TitleBar() platform.TitleBar

func (*Window) TitleBarDoubleClicked

func (w *Window) TitleBarDoubleClicked()

func (*Window) URL

func (w *Window) URL() string

func (*Window) Unmaximize

func (w *Window) Unmaximize()

func (*Window) UserAgent

func (w *Window) UserAgent() string

func (*Window) UserClose

func (w *Window) UserClose() bool

UserClose simulates a click on the close button.

func (*Window) UserScripts

func (w *Window) UserScripts() []platform.UserScript

UserScripts returns the scripts a page loaded now gets: those of the options, or the ones SetUserScripts set since.

func (*Window) WebViewHandle

func (w *Window) WebViewHandle() uintptr

func (*Window) Zoom

func (w *Window) Zoom() float64

Jump to

Keyboard shortcuts

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