windows

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 39 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 windows is Tango's Windows backend: Win32 windows hosting Microsoft Edge WebView2, called through package syscall and COM vtables (no cgo).

Files without a platform suffix hold pure logic (DPI conversion, accelerator parsing, menu planning, HTTP adaptation, UTF-16 helpers, runtime discovery) and build and test on every OS. Files ending in _windows*.go hold the native code.

WebView2Loader.dll is not required: like mygo, the backend locates the installed (Evergreen) or fixed-version WebView2 Runtime itself (registry EdgeUpdate\ClientState\<channel>\EBWebView, or the WEBVIEW2_BROWSER_EXECUTABLE_FOLDER variable) and calls CreateWebViewEnvironmentWithOptionsInternal exported by the runtime's EmbeddedBrowserWebView.dll, which is what the loader does. An official WebView2Loader.dll placed next to the executable takes precedence.

Parts of this package are adapted from MIT-licensed code:

  • mygo (https://github.com/egoist/mygo), Copyright (c) 2026 MyGo contributors: the ARM64/x64 RECT passing (abi_*.go, zoom_*.go) and the argument order of the undocumented CreateWebViewEnvironmentWithOptionsInternal export. The COM helpers, runtime discovery, dialogs and activation context were rewritten from Microsoft's documentation and no longer derive from it.
  • Wails v3 (https://github.com/wailsapp/wails), Copyright (c) 2018-Present Lea Anthony: WebView2 interface vtable layouts.

Both are distributed under the MIT License:

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GUID

type GUID struct {
	Data1 uint32
	Data2 uint16
	Data3 uint16
	Data4 [8]byte
}

GUID is a COM interface or class identifier (same layout as Win32 GUID).

Directories

Path Synopsis
internal
smoke command
Command smoke exercises the Windows backend without the tango root package: it opens a window, serves a page through ServeAsset, exchanges messages with it, sets a menu, and quits once the page has loaded and its message round-tripped (or after a 30-second timeout).
Command smoke exercises the Windows backend without the tango root package: it opens a window, serves a page through ServeAsset, exchanges messages with it, sets a menu, and quits once the page has loaded and its message round-tripped (or after a 30-second timeout).
smokeattach command
Command smokeattach drives canvases attached to a WebView surface of the Windows backend (docs/specs/canvas-surface.md, step D) without the root tango package.
Command smokeattach drives canvases attached to a WebView surface of the Windows backend (docs/specs/canvas-surface.md, step D) without the root tango package.
smokecanvas command
Command smokecanvas drives a canvas surface of the Windows backend (the self-drawn UI window, docs/specs/canvas-surface.md) without the root tango package.
Command smokecanvas drives a canvas surface of the Windows backend (the self-drawn UI window, docs/specs/canvas-surface.md) without the root tango package.

Jump to

Keyboard shortcuts

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