internal/

directory
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT

Directories

Path Synopsis
Package automation is the app side of Tango's whole-app automation (docs/automation.md) and the wire protocol it shares with the test client, package github.com/tangoui/tango/automation.
Package automation is the app side of Tango's whole-app automation (docs/automation.md) and the wire protocol it shares with the test client, package github.com/tangoui/tango/automation.
client
Package client is the automation channel's client without a test harness: it connects to a Tango development build, authenticates and exchanges requests (Conn), builds and starts such a program (Build, Launch) and writes the page-side JavaScript of WebView selector operations.
Package client is the automation channel's client without a test harness: it connects to a Tango development build, authenticates and exchanges requests (Conn), builds and starts such a program (Build, Launch) and writes the page-side JavaScript of WebView selector operations.
cmd
apitxt command
Command apitxt writes and checks the API golden files of the module: one sorted text file per public package under api/go, one fact per line, plus the tier checks of docs/specs/api-stability.md §4.3.
Command apitxt writes and checks the API golden files of the module: one sorted text file per public package under api/go, one fact per line, plus the tier checks of docs/specs/api-stability.md §4.3.
icongen command
Command icongen generates the icon sets in ui/icon/element, ui/icon/antd and ui/icon/lucide from the published SVG packages:
Command icongen generates the icon sets in ui/icon/element, ui/icon/antd and ui/icon/lucide from the published SVG packages:
shadcngen command
Command shadcngen writes ui/theme/shadcn_data.go from the shadcn/ui v4 theme registry (apps/v4/registry/themes.ts) and the Tailwind CSS v4 gray scales (theme.css).
Command shadcngen writes ui/theme/shadcn_data.go from the shadcn/ui v4 theme registry (apps/v4/registry/themes.ts) and the Tailwind CSS v4 gray scales (theme.css).
uiperf command
Package corehook lets Tango's own feature packages (menu, tray, ...) reach core internals without the root package exporting them.
Package corehook lets Tango's own feature packages (menu, tray, ...) reach core internals without the root package exporting them.
Package devfeat holds the core's development features: window placement across `tan dev` restarts (windowstate.go) and the whole-app automation channel (automation.go, docs/automation.md).
Package devfeat holds the core's development features: window placement across `tan dev` restarts (windowstate.go) and the whole-app automation channel (automation.go, docs/automation.md).
Package devhost implements hot reload of Tango's self-drawn UI under `tan dev` (docs/specs/ui-hotreload.md): the wire protocol between the long-lived host process (it owns the windows) and the worker processes (the user's app, replaced on every rebuild), shared-memory frame transport and state snapshots.
Package devhost implements hot reload of Tango's self-drawn UI under `tan dev` (docs/specs/ui-hotreload.md): the wire protocol between the long-lived host process (it owns the windows) and the worker processes (the user's app, replaced on every rebuild), shared-memory frame transport and state snapshots.
host
Package host is the hot-reload host process: it owns the canvas windows of an app run by `tan dev` and shows frames rendered by worker processes (each rebuild of the app), forwarding input to the current worker and swapping workers without closing windows.
Package host is the hot-reload host process: it owns the canvas windows of an app run by `tan dev` and shows frames rendered by worker processes (each rebuild of the app), forwarding input to the current worker and swapping workers without closing windows.
Package downq holds the per-page downstream queue of the down:poll lane (docs/superpowers/specs/2026-11-14-down-poll-design.md): every message, byte packet and barrier the core sends to a page gets a sequence number, and while the page polls, the items wait here until a poll request (Serve) takes them in a batch.
Package downq holds the per-page downstream queue of the down:poll lane (docs/superpowers/specs/2026-11-14-down-poll-design.md): every message, byte packet and barrier the core sends to a page gets a sequence number, and while the page polls, the items wait here until a poll request (Serve) takes them in a batch.
imebridge
proto
Package proto defines version 2 of the wire protocol shared by IME bridges.
Package proto defines version 2 of the wire protocol shared by IME bridges.
Package lane holds the per-page state of IPC fast lanes: side channels that carry stream byte frames as binary packets next to the message channel (see the ipc package comment, "Fast lanes", and docs/specs/2026-11-13-ipc-duplex-streams.md §6.1).
Package lane holds the per-page state of IPC fast lanes: side channels that carry stream byte frames as binary packets next to the message channel (see the ipc package comment, "Fast lanes", and docs/specs/2026-11-13-ipc-duplex-streams.md §6.1).
shmring
Package shmring implements the single-producer, single-consumer ring for the WebView2 shared-memory IPC lanes.
Package shmring implements the single-producer, single-consumer ring for the WebView2 shared-memory IPC lanes.
Package nativeglyph connects text-engine-owned glyph resources to optional native renderers without adding platform handles to the public paint API.
Package nativeglyph connects text-engine-owned glyph resources to optional native renderers without adding platform handles to the public paint API.
Package platform defines the contract between Tango's core (the root tango package) and each native backend (darwin, windows, linux, ios, android, fake).
Package platform defines the contract between Tango's core (the root tango package) and each native backend (darwin, windows, linux, ios, android, fake).
a11ybridge
Package a11ybridge holds the platform-neutral parts of the accessibility bridges of the desktop backends (docs/specs/a11y-bridge.md): role and state translation from ui/a11y to NSAccessibility, UI Automation and AT-SPI2, focus and live-region computation, hit testing and coordinate conversion.
Package a11ybridge holds the platform-neutral parts of the accessibility bridges of the desktop backends (docs/specs/a11y-bridge.md): role and state translation from ui/a11y to NSAccessibility, UI Automation and AT-SPI2, focus and live-region computation, hit testing and coordinate conversion.
android
Package android is Tango's Android backend: one Activity (the Java host in mobile/android) whose content is a stack of full-screen pages, WebViews or self-drawn canvases, driven over JNI.
Package android is Tango's Android backend: one Activity (the Java host in mobile/android) whose content is a stack of full-screen pages, WebViews or self-drawn canvases, driven over JNI.
darwin/internal/smoke command
Command smoke drives the macOS backend end to end without the root tango package: a window, an asset page served through tango://, a JS→Go message, an Eval round trip, a fetch POST and a streamed response, a sheet dialog, the clipboard and the app menu.
Command smoke drives the macOS backend end to end without the root tango package: a window, an asset page served through tango://, a JS→Go message, an Eval round trip, a fetch POST and a streamed response, a sheet dialog, the clipboard and the app menu.
darwin/internal/smokeattach command
Command smokeattach drives a canvas attached to a WebView surface of the macOS backend (docs/specs/canvas-surface.md, step D) without the root tango package.
Command smokeattach drives a canvas attached to a WebView surface of the macOS backend (docs/specs/canvas-surface.md, step D) without the root tango package.
darwin/internal/smokecanvas command
Command smokecanvas drives a canvas surface of the macOS backend (the self-drawn UI window, docs/specs/canvas-surface.md) without the root tango package.
Command smokecanvas drives a canvas surface of the macOS backend (the self-drawn UI window, docs/specs/canvas-surface.md) without the root tango package.
darwin/internal/smokeext command
Command smokeext checks the window capabilities (contract round 2) on the real macOS backend through the root tango package: a frameless transparent window and a normal one; SetBounds, Maximize, Restore, SetZoom, Reload, a failed navigation, a sheet and the events they cause.
Command smokeext checks the window capabilities (contract round 2) on the real macOS backend through the root tango package: a frameless transparent window and a normal one; SetBounds, Maximize, Restore, SetZoom, Reload, a failed navigation, a sheet and the events they cause.
darwin/internal/smokemetal command
Command smokemetal checks the GPU presentation path of the macOS canvas (platform.CanvasMetal) with the smallest possible Metal client: it calls UseMetalLayer on a canvas surface, then on every CanvasFrame takes the layer's next drawable, clears it to a colour that changes per frame, blits a white marker into the top-left quarter (width/2 × height/4) and presents it.
Command smokemetal checks the GPU presentation path of the macOS canvas (platform.CanvasMetal) with the smallest possible Metal client: it calls UseMetalLayer on a canvas surface, then on every CanvasFrame takes the layer's next drawable, clears it to a colour that changes per frame, blits a white marker into the top-left quarter (width/2 × height/4) and presents it.
darwin/internal/smoketray command
Command smoketray checks menus, context menus and the tray icon on the real macOS backend through the public tango, menu and tray packages: it creates a tray icon with a menu, updates it, clicks tray menu items, opens a context menu with menu.Popup and one from the page (data-tango-menu), each closed programmatically.
Command smoketray checks menus, context menus and the tray icon on the real macOS backend through the public tango, menu and tray packages: it creates a tray icon with a menu, updates it, clicks tray menu items, opens a context menu with menu.Popup and one from the page (data-tango-menu), each closed programmatically.
darwin/internal/smokewebdrop command
Command smokewebdrop checks file drags over a WebView surface created with AcceptFiles on the real macOS backend: the page sees the hover (dragenter / dragover / dragleave, with "Files" in the types) so it can highlight a drop target, the drop goes to OnFilesDropped (paths and point) instead of to the page or a navigation, and a drag without files is left to WebKit.
Command smokewebdrop checks file drags over a WebView surface created with AcceptFiles on the real macOS backend: the page sees the hover (dragenter / dragover / dragleave, with "Files" in the types) so it can highlight a drop target, the drop goes to OnFilesDropped (paths and point) instead of to the page or a navigation, and a drag without files is left to WebKit.
fake
Package fake is a headless platform.Backend for testing Tango's core.
Package fake is a headless platform.Backend for testing Tango's core.
fake/apphook
Package apphook lets test helpers build a tango.App on an injected Backend without the root package exporting a constructor for it.
Package apphook lets test helpers build a tango.App on an injected Backend without the root package exporting a constructor for it.
fake/faketest
Package faketest runs a tango.App on the fake backend for tests of packages built on tango (capability packages, ipc, bind, ...).
Package faketest runs a tango.App on the fake backend for tests of packages built on tango (capability packages, ipc, bind, ...).
imesession
Package imesession routes system input method sessions on the app thread.
Package imesession routes system input method sessions on the app thread.
ios
linux
Package linux is Tango's Linux desktop backend: GTK 3 windows hosting WebKitGTK 4.1 web views, loaded at run time with purego (no cgo).
Package linux is Tango's Linux desktop backend: GTK 3 windows hosting WebKitGTK 4.1 web views, loaded at run time with purego (no cgo).
linux/internal/smoke command
Command smoke is a manual check of the Linux backend on a real desktop:
Command smoke is a manual check of the Linux backend on a real desktop:
linux/internal/smokeattach command
Command smokeattach drives canvases attached to a WebView surface of the Linux backend (docs/specs/canvas-surface.md, step D) without the root tango package.
Command smokeattach drives canvases attached to a WebView surface of the Linux backend (docs/specs/canvas-surface.md, step D) without the root tango package.
linux/internal/smokecanvas command
Command smokecanvas drives a canvas surface of the Linux backend (the self-drawn UI window, docs/specs/canvas-surface.md) without the root tango package.
Command smokecanvas drives a canvas surface of the Linux backend (the self-drawn UI window, docs/specs/canvas-surface.md) without the root tango package.
mobilecanvas
Package mobilecanvas holds the platform-independent logic of the iOS and Android canvas backends (docs/specs/mobile-canvas.md): the frame scheduler, touch bookkeeping, the input-method shadow document, UTF-16 offsets and inset arithmetic.
Package mobilecanvas holds the platform-independent logic of the iOS and Android canvas backends (docs/specs/mobile-canvas.md): the frame scheduler, touch bookkeeping, the input-method shadow document, UTF-16 offsets and inset arithmetic.
native
Package native picks the platform backend for the GOOS being built and holds the per-platform main-thread rules the core follows.
Package native picks the platform backend for the GOOS being built and holds the per-platform main-thread rules the core follows.
rolenames
Package rolenames holds the localized labels of the native menu roles and the default dialog buttons the desktop backends supply themselves, in the wording of each platform (Apple, Microsoft and GNOME style guides).
Package rolenames holds the localized labels of the native menu roles and the default dialog buttons the desktop backends supply themselves, in the wording of each platform (Apple, Microsoft and GNOME style guides).
windows
Package windows is Tango's Windows backend: Win32 windows hosting Microsoft Edge WebView2, called through package syscall and COM vtables (no cgo).
Package windows is Tango's Windows backend: Win32 windows hosting Microsoft Edge WebView2, called through package syscall and COM vtables (no cgo).
windows/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).
windows/internal/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.
windows/internal/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.
Package regexp2 is a regexp package that has an interface similar to Go's framework regexp engine but uses a more feature full regex engine behind the scenes.
Package regexp2 is a regexp package that has an interface similar to Go's framework regexp engine but uses a more feature full regex engine behind the scenes.
render
gpu
Package gpu is the device-independent half of Tango's GPU renderer.
Package gpu is the device-independent half of Tango's GPU renderer.
gpu/atlas
Package atlas is the GPU renderer's persistent mask atlas: an R8 texture holding coverage masks across frames — glyphs (KindGlyph) and filled paths (KindPath).
Package atlas is the GPU renderer's persistent mask atlas: an R8 texture holding coverage masks across frames — glyphs (KindGlyph) and filled paths (KindPath).
gpu/cpuexec
Package cpuexec runs the GPU quad shader (internal/render/gpu/shaders) on the CPU, so the GPU renderer's pipeline can be tested without a GPU.
Package cpuexec runs the GPU quad shader (internal/render/gpu/shaders) on the CPU, so the GPU renderer's pipeline can be tested without a GPU.
gpu/d3d11
Package d3d11 is the Direct3D 11 backend of the GPU renderer: a gpu.Device that executes internal/render/gpu frames on a D3D11 device and a presenter that shows them in a window through a DXGI flip-model swap chain.
Package d3d11 is the Direct3D 11 backend of the GPU renderer: a gpu.Device that executes internal/render/gpu frames on a D3D11 device and a presenter that shows them in a window through a DXGI flip-model swap chain.
gpu/gen
Package gen holds the shader sources generated from internal/render/gpu/shaders.
Package gen holds the shader sources generated from internal/render/gpu/shaders.
gpu/gl
Package gl is the OpenGL backend of the GPU renderer: a gpu.Device that executes internal/render/gpu frames with OpenGL 3.3 core and a presenter that shows them in a GTK3 GtkGLArea.
Package gl is the OpenGL backend of the GPU renderer: a gpu.Device that executes internal/render/gpu frames with OpenGL 3.3 core and a presenter that shows them in a GTK3 GtkGLArea.
gpu/gl/nativewindow
Package nativewindow is the hand-over point between a platform canvas that owns a native window (an Android ANativeWindow) and the OpenGL ES presenter that draws into it (gl.NewPresenterAndroid).
Package nativewindow is the hand-over point between a platform canvas that owns a native window (an Android ANativeWindow) and the OpenGL ES presenter that draws into it (gl.NewPresenterAndroid).
gpu/internal/devkit
Package devkit holds the backend-neutral parts of the GPU devices (internal/render/gpu/d3d11, internal/render/gpu/gl): the layer texture pool, the partial-frame checks, the copy scratch sizing and the clearing quads, written over an abstract texture handle so they are tested on any machine.
Package devkit holds the backend-neutral parts of the GPU devices (internal/render/gpu/d3d11, internal/render/gpu/gl): the layer texture pool, the partial-frame checks, the copy scratch sizing and the clearing quads, written over an abstract texture handle so they are tested on any machine.
gpu/internal/gpuconf
Package gpuconf is the device conformance suite of the GPU renderer: Conformance runs the checks every gpu.Device backend (internal/render/gpu/metal, internal/render/gpu/d3d11, …) must pass on the same display lists, through gpu.Renderer and directly with hand-built gpu.Frames, comparing the read-back target with paint.CPU at the thresholds of package gputest.
Package gpuconf is the device conformance suite of the GPU renderer: Conformance runs the checks every gpu.Device backend (internal/render/gpu/metal, internal/render/gpu/d3d11, …) must pass on the same display lists, through gpu.Renderer and directly with hand-built gpu.Frames, comparing the read-back target with paint.CPU at the thresholds of package gputest.
gpu/internal/gputest
Package gputest holds the test scenes and image comparison shared by the GPU renderer's tests (internal/render/gpu with the CPU executor, internal/render/gpu/metal with a real device), so every backend is checked against paint.CPU on the same display lists with the same thresholds.
Package gputest holds the test scenes and image comparison shared by the GPU renderer's tests (internal/render/gpu with the CPU executor, internal/render/gpu/metal with a real device), so every backend is checked against paint.CPU on the same display lists with the same thresholds.
gpu/internal/racetest
Package racetest reports whether the test binary was built with the race detector, so the GPU renderer's heavy pixel tests (the CPU executor runs the shader per pixel, 10–20× slower under -race) can run a reduced but representative set of cases there and keep the full set otherwise.
Package racetest reports whether the test binary was built with the race detector, so the GPU renderer's heavy pixel tests (the CPU executor runs the shader per pixel, 10–20× slower under -race) can run a reduced but representative set of cases there and keep the full set otherwise.
gpu/metal
Package metal is the Metal Device of the GPU renderer (internal/render/gpu): it executes gpu.Frames into a persistent offscreen RGBA8 render target that ReadPixels reads back, and NewPresenter shows it in a CAMetalLayer.
Package metal is the Metal Device of the GPU renderer (internal/render/gpu): it executes gpu.Frames into a persistent offscreen RGBA8 render target that ReadPixels reads back, and NewPresenter shows it in a CAMetalLayer.
gpu/shaders
Package shaders holds the GPU renderer's shaders, written in Go against package sl.
Package shaders holds the GPU renderer's shaders, written in Go against package sl.
quartz
Package quartz plans retained native layers for macOS windows.
Package quartz plans retained native layers for macOS windows.
shader/cmd/tanshader command
Command tanshader compiles a Go shader package (written against internal/render/shader/sl) to Metal Shading Language, HLSL and GLSL.
Command tanshader compiles a Go shader package (written against internal/render/shader/sl) to Metal Shading Language, HLSL and GLSL.
shader/front
Package front is the shader compiler front end: it loads a Go package written against package sl, type-checks it with go/types, checks that it stays inside the shader subset, and lowers it to package ir.
Package front is the shader compiler front end: it loads a Go package written against package sl, type-checks it with go/types, checks that it stays inside the shader subset, and lowers it to package ir.
shader/glsl
Package glsl generates GLSL source from a shader ir.Module, for OpenGL 3.3 core (#version 330 core) or, as a dialect of the same output, OpenGL ES 3.0 (#version 300 es, which additionally declares highp default precision for float, int and sampler2D).
Package glsl generates GLSL source from a shader ir.Module, for OpenGL 3.3 core (#version 330 core) or, as a dialect of the same output, OpenGL ES 3.0 (#version 300 es, which additionally declares highp default precision for float, int and sampler2D).
shader/hlsl
Package hlsl generates HLSL (shader model 5.0) source from a shader ir.Module, for Direct3D 11.
Package hlsl generates HLSL (shader model 5.0) source from a shader ir.Module, for Direct3D 11.
shader/ir
Package ir is the structured intermediate representation shared by the shader front end (Go AST lowering) and the backends (Metal emission, CPU execution).
Package ir is the structured intermediate representation shared by the shader front end (Go AST lowering) and the backends (Metal emission, CPU execution).
shader/msl
Package msl generates Metal Shading Language source from a shader ir.Module.
Package msl generates Metal Shading Language source from a shader ir.Module.
shader/sl
Package sl is the shading language that GPU shaders are written in.
Package sl is the shading language that GPU shaders are written in.
Package uithread runs a task loop on a goroutine locked to its own OS thread: the UI thread of one window.
Package uithread runs a task loop on a goroutine locked to its own OS thread: the UI thread of one window.

Jump to

Keyboard shortcuts

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