Versions in this module Expand all Collapse all v0 v0.5.1 Dec 2, 2026 v0.5.0 Dec 2, 2026 v0.4.0 Nov 27, 2026 v0.3.0 Nov 25, 2026 v0.2.1 Nov 24, 2026 v0.2.0 Nov 23, 2026 v0.1.0 Nov 14, 2026 Changes in this version + const AuthCancel + const AuthCredentials + const AuthDefault + const Background + const DataAll + const DataCache + const DataCookies + const DataStorage + const DownloadCanceled + const DownloadDone + const DownloadFailed + const DownloadProgress + const DragCopy + const DragLink + const DragMove + const DragNone + const EventDisplaysChanged + const EventMemoryWarning + const EventNotificationOpened + const EventOpenFiles + const EventOpenURL + const EventOrientationChanged + const EventPushOpened + const EventPushReceived + const EventPushToken + const EventReopen + const EventSafeAreaChanged + const EventThemeChanged + const EventWebViewRestored + const Foreground + const KindModal + const KindPanel + const KindSheet + const KindWindow + const MaterialBlur + const MaterialMica + const MaterialNone + const PermissionAllow + const PermissionDefault + const PermissionDeny + const PermissionPrompt + const Started + const StateFullscreen + const StateMaximized + const StateMinimized + const StateNormal + const Terminating + const TitleBarDefault + const TitleBarHidden + const TitleBarNone + const WebPermCamera + const WebPermClipboardRead + const WebPermGeolocation + const WebPermMIDI + const WebPermMedia + const WebPermMicrophone + const WebPermMotion + const WebPermNotifications + const WebPermOther + const WebPermScreen + const WebPermStorage + var ErrNestedWait = errors.New(...) + var ErrNoBackend = errors.New("tango: no platform backend for this platform") + var ErrNoFiles = errors.New("tango: DragFiles needs at least one file") + var ErrNotRunning = errors.New("tango: app is not running") + var ErrPanicked = errors.New("tango: the function run on the main thread panicked") + var ErrSurfaceClosed = errors.New("tango: surface is closed") + var ErrUnsupported = platform.ErrUnsupported + func AwaitAsync[T any](a *App, start func(done func(T))) T + func Await[T any](a *App, fn func() T) T + func TryAwaitAsync[T any](a *App, start func(done func(T))) (T, error) + type App struct + func New(opts Options) *App + func (a *App) AddBridgeScript(js string) + func (a *App) Backend() platform.Backend + func (a *App) DownloadDir() string + func (a *App) DownloadPath(req DownloadRequest) string + func (a *App) Go(fn func()) + func (a *App) HandleArgs(args []string, dir string) + func (a *App) ID() string + func (a *App) Name() string + func (a *App) NewSurface(opts SurfaceOptions) (*Surface, error) + func (a *App) OnBinary(fn func(s *Surface, generation uint64, packet []byte)) + func (a *App) OnDownloadEvent(fn func(s *Surface, ev DownloadEvent)) + func (a *App) OnEvent(fn func(AppEvent)) + func (a *App) OnEventKind(kind AppEventKind, fn func(AppEvent)) + func (a *App) OnLifecycle(fn func(Lifecycle)) + func (a *App) OnMessage(fn func(s *Surface, msg string)) + func (a *App) OnOpenFiles(fn func(paths []string)) + func (a *App) OnOpenURL(fn func(url string)) + func (a *App) OnQuitRequest(fn func() bool) + func (a *App) OnReady(fn func()) + func (a *App) OnSurfaceCreated(fn func(*Surface)) + func (a *App) OnWebViewRestored(fn func(s *Surface, url string)) + func (a *App) ParseArgs(args []string, dir string) []AppEvent + func (a *App) Post(fn func()) + func (a *App) Quit() + func (a *App) Run() error + func (a *App) SetAuthHandler(fn func(s *Surface, ch AuthChallenge) AuthResponse) + func (a *App) SetDownloadDir(dir string) + func (a *App) SetDownloadHandler(fn func(s *Surface, req DownloadRequest) string) + func (a *App) SetNavigationPolicy(fn func(s *Surface, nav NavigationRequest) bool) + func (a *App) SetNewWindowHandler(fn func(s *Surface, req NewWindowRequest) NewWindowAction) + func (a *App) SetPermissionHandler(fn func(s *Surface, req PermissionRequest) PermissionDecision) + func (a *App) SetPermissionPolicy(kind WebPermission, d PermissionDecision) + func (a *App) Surfaces() []*Surface + type AppEvent = platform.AppEvent + type AppEventKind = platform.AppEventKind + type Appearance = platform.Appearance + type AuthAction = platform.AuthAction + type AuthChallenge = platform.AuthChallenge + type AuthResponse = platform.AuthResponse + type BrowsingData = platform.BrowsingData + type DownloadEvent = platform.DownloadEvent + type DownloadRequest = platform.DownloadRequest + type DownloadState = platform.DownloadState + type DragOperation = platform.DragOperation + type FindOptions = platform.FindOptions + type FindResult = platform.FindResult + type HeaderScope int + const HeadersAll + const HeadersAssets + type Lifecycle = platform.LifecycleEvent + type Material = platform.Material + type NavigationRequest = platform.NavigationRequest + type NewWindowAction int + const NewWindowBrowser + const NewWindowCurrent + const NewWindowDefault + const NewWindowDeny + const NewWindowSurface + type NewWindowRequest = platform.NewWindowRequest + type Options struct + AllowCrossOriginAssets bool + Assets http.Handler + DisableFastLanes bool + ID string + Name string + OnPanic func(p Panic) (keepRunning bool) + QuitOnLastClose *bool + URLSchemes []string + type PDFOptions = platform.PDFOptions + type Panic struct + Stack []byte + Value any + Where string + type PermissionDecision = platform.PermissionDecision + type PermissionRequest = platform.PermissionRequest + type Rect = platform.Rect + type Surface struct + func (s *Surface) App() *App + func (s *Surface) Appearance() (ap Appearance) + func (s *Surface) BinaryMinSize() int + func (s *Surface) BinarySession() (uint64, ipc.BinaryConn) + func (s *Surface) Bounds() (r Rect) + func (s *Surface) CancelDownload(id uint64) error + func (s *Surface) Center() error + func (s *Surface) ClearBrowsingData(kinds BrowsingData) error + func (s *Surface) ClearCookies(domain string) error + func (s *Surface) Close() + func (s *Surface) Cookies(rawURL string) ([]*http.Cookie, error) + func (s *Surface) DeleteCookie(c *http.Cookie) error + func (s *Surface) DragFiles(paths []string, icon []byte, done func(DragOperation)) error + func (s *Surface) DropBinarySession() + func (s *Surface) Eval(js string) + func (s *Surface) Find(text string, opts FindOptions) (FindResult, error) + func (s *Surface) FindNext() (FindResult, error) + func (s *Surface) FindPrevious() (FindResult, error) + func (s *Surface) Focus() + func (s *Surface) Fullscreen() error + func (s *Surface) Hide() + func (s *Surface) ID() platform.SurfaceID + func (s *Surface) IsFocused() (f bool) + func (s *Surface) IsVisible() (v bool) + func (s *Surface) LaneHello() json.RawMessage + func (s *Surface) Maximize() error + func (s *Surface) Minimize() error + func (s *Surface) Native() (p uintptr) + func (s *Surface) Navigate(u string) + func (s *Surface) OnBlurred(fn func()) + func (s *Surface) OnClose(fn func() bool) + func (s *Surface) OnClosed(fn func()) + func (s *Surface) OnDownloadEvent(fn func(ev DownloadEvent)) + func (s *Surface) OnFilesDropped(fn func(paths []string, x, y int)) + func (s *Surface) OnFocused(fn func()) + func (s *Surface) OnLoadFailed(fn func(url, err string)) + func (s *Surface) OnLoaded(fn func()) + func (s *Surface) OnMoved(fn func(x, y int)) + func (s *Surface) OnNavigating(fn func(url string)) + func (s *Surface) OnResized(fn func(w, h int)) + func (s *Surface) OnStateChanged(fn func(WindowState)) + func (s *Surface) OpenDevTools() + func (s *Surface) Print() error + func (s *Surface) PrintToPDF(opts PDFOptions) ([]byte, error) + func (s *Surface) Reload() error + func (s *Surface) Restore() error + func (s *Surface) Screenshot() ([]byte, error) + func (s *Surface) Send(msg string) + func (s *Surface) SendBinary(packet []byte) bool + func (s *Surface) SetAppearance(ap Appearance) error + func (s *Surface) SetAuthHandler(fn func(ch AuthChallenge) AuthResponse) + func (s *Surface) SetBounds(r Rect) error + func (s *Surface) SetCookie(c *http.Cookie) error + func (s *Surface) SetDownloadHandler(fn func(req DownloadRequest) string) + func (s *Surface) SetExtraHeaders(h http.Header, scope HeaderScope) error + func (s *Surface) SetNavigationPolicy(fn func(nav NavigationRequest) bool) + func (s *Surface) SetNewWindowHandler(fn func(req NewWindowRequest) NewWindowAction) + func (s *Surface) SetPermissionHandler(fn func(req PermissionRequest) PermissionDecision) + func (s *Surface) SetSize(w, h int) + func (s *Surface) SetSizeLimits(minW, minH, maxW, maxH int) error + func (s *Surface) SetState(st WindowState) error + func (s *Surface) SetTitle(title string) + func (s *Surface) SetUserAgent(ua string) error + func (s *Surface) SetZoom(factor float64) error + func (s *Surface) Show() + func (s *Surface) Size() (w, h int) + func (s *Surface) State() (st WindowState) + func (s *Surface) StopFind() error + func (s *Surface) Title() (t string) + func (s *Surface) UserAgent() (ua string) + func (s *Surface) Zoom() float64 + type SurfaceKind = platform.SurfaceKind + type SurfaceOptions struct + AcceptFiles bool + Appearance Appearance + Auxiliary bool + Centered bool + Debug bool + Height int + Hidden bool + Kind SurfaceKind + MaxHeight int + MaxWidth int + MinHeight int + MinWidth int + Parent *Surface + Resizable bool + State WindowState + Title string + URL string + WebView WebViewOptions + Width int + X int + Y int + type TitleBar = platform.TitleBar + type WebPermission = platform.WebPermission + type WebViewOptions struct + HeaderScope HeaderScope + Headers http.Header + UserAgent string + type WindowState = platform.WindowState