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 ¶
Source Files
¶
- accel.go
- canvas_attach_plan.go
- canvas_damage_plan.go
- canvas_gpu_plan.go
- canvas_keys.go
- canvas_touch.go
- dialogplan.go
- doc.go
- dpi.go
- guid.go
- httpconv.go
- iconimage.go
- inputmethod_keys.go
- inputmethod_session.go
- integration.go
- lanes.go
- localeplan.go
- menuplan.go
- overlay.go
- sysplan.go
- sysxplan.go
- taskdialog.go
- uia_plan.go
- utf16.go
- web_key_data.go
- webembed_plan.go
- webview2find.go
- webview_ext_plan.go
- webview_startup.go
- windowext.go
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. |