examples/

directory
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

Directories

Path Synopsis
Command a11y-demo shows how a screen reader sees Tango's self-drawn UI (docs/accessibility.md, docs/specs/a11y-bridge.md).
Command a11y-demo shows how a screen reader sees Tango's self-drawn UI (docs/accessibility.md, docs/specs/a11y-bridge.md).
Command app-demo exercises the app-level features: quit interception, deep links / opened files, and single instance.
Command app-demo exercises the app-level features: quit interception, deep links / opened files, and single instance.
Command dock-demo is an IDE-style workbench built with ui.Dock in a real window.
Command dock-demo is an IDE-style workbench built with ui.Dock in a real window.
Command duplex is the bidirectional stream example: an embedded page talks to Go services over ipc streams that carry JSON and bytes both ways.
Command duplex is the bidirectional stream example: an embedded page talks to Go services over ipc streams that carry JSON and bytes both ways.
services
Package services holds the ipc services shared by the duplex examples (examples/duplex on the desktop, examples/duplex-mobile on iOS).
Package services holds the ipc services shared by the duplex examples (examples/duplex on the desktop, examples/duplex-mobile on iOS).
duplex-ios is the iOS self-test of Tango's ipc streams: the duplex examples' services (package examples/duplex/services: Echo, Upload, Sink, Source, Bench.Report) behind an ipc.Router wired like examples/duplex, and a page (web/selftest.js) that exercises them and reports to Go, which logs one line per result.
duplex-ios is the iOS self-test of Tango's ipc streams: the duplex examples' services (package examples/duplex/services: Echo, Upload, Sink, Source, Bench.Report) behind an ipc.Router wired like examples/duplex, and a page (web/selftest.js) that exercises them and reports to Go, which logs one line per result.
duplex-mobile is the iOS and Android self-test of Tango's ipc streams: the duplex examples' services (package examples/duplex/services: Echo, Upload, Sink, Source, Bench.Report) behind an ipc.Router wired like examples/duplex, and a page (services/selftest.js) that exercises them and reports to Go, which logs one line per result.
duplex-mobile is the iOS and Android self-test of Tango's ipc streams: the duplex examples' services (package examples/duplex/services: Echo, Upload, Sink, Source, Bench.Report) behind an ipc.Router wired like examples/duplex, and a page (services/selftest.js) that exercises them and reports to Go, which logs one line per result.
Command editor-demo opens the Tango code editor view (ui/editor) in a real window.
Command editor-demo opens the Tango code editor view (ui/editor) in a real window.
Command hello is the desktop end-to-end example: an embedded page calls a bound Go service, consumes a stream, receives an event and reports back.
Command hello is the desktop end-to-end example: an embedded page calls a bound Go service, consumes a stream, receives an event and reports back.
Command i18n-demo shows package i18n: the system languages, an app catalog, and the native menu roles in the current locale.
Command i18n-demo shows package i18n: the system languages, an app catalog, and the native menu roles in the current locale.
The Tango input method example hosts a small Pinyin engine.
The Tango input method example hosts a small Pinyin engine.
engine
Package engine is the input engine: it turns keystrokes into text to show while composing (preedit) and text to commit.
Package engine is the input engine: it turns keystrokes into text to show while composing (preedit) and text to commit.
smoke command
tis uses Carbon Text Input Source Services to manage the smoke input source.
tis uses Carbon Text Input Source Services to manage the smoke input source.
Command ledger is a small personal bookkeeping app built with Tango's self-drawn UI (no WebView): record income and expenses, filter and sort them, see monthly totals and where the money went, export to CSV.
Command ledger is a small personal bookkeeping app built with Tango's self-drawn UI (no WebView): record income and expenses, filter and sort them, see monthly totals and where the money went, export to CSV.
macoslite-counter is the reference window for the macoslite package: a counter drawn with Canvas calls only, used to measure the idle memory of a native lite window against other frameworks (see README.md).
macoslite-counter is the reference window for the macoslite package: a counter drawn with Canvas calls only, used to measure the idle memory of a native lite window against other frameworks (see README.md).
mobile-hello is the smallest Tango app that runs unchanged on desktop (go run .) and on iOS (bash mobile/ios/build.sh examples/mobile-hello).
mobile-hello is the smallest Tango app that runs unchanged on desktop (go run .) and on iOS (bash mobile/ios/build.sh examples/mobile-hello).
mobile-ui shows Tango's self-drawn UI (packages ui and ui/mobile) as a full-screen page through uihost.Open: no WebView.
mobile-ui shows Tango's self-drawn UI (packages ui and ui/mobile) as a full-screen page through uihost.Open: no WebView.
Command notify-demo smoke-tests the system integration packages on a real backend: clipboard images (written, read back, compared; the clipboard's text is saved first and restored at the end), a global hotkey registered and unregistered, a notification (from a bare binary it must fail with a clear error rather than crash), and a window shortcut triggered by a synthetic keydown.
Command notify-demo smoke-tests the system integration packages on a real backend: clipboard images (written, read back, compared; the clipboard's text is saved first and restored at the end), a global hotkey registered and unregistered, a notification (from a bare binary it must fail with a clear error rather than crash), and a window shortcut triggered by a synthetic keydown.
Command print-demo shows package sys/print: print the page through the system print dialog, export it as a PDF file, and print a PDF document and a generated image.
Command print-demo shows package sys/print: print the page through the system print dialog, export it as a PDF file, and print a PDF document and a generated image.
Command runtime-demo shows the page-side runtime API (package jsapi, window.tango.Window / Screens / Theme / Clipboard / Dialog ...): the page retitles and resizes its window, reads the displays and the theme, round trips the clipboard, listens to window and theme events, and shows a message box and a context menu.
Command runtime-demo shows the page-side runtime API (package jsapi, window.tango.Window / Screens / Theme / Clipboard / Dialog ...): the page retitles and resizes its window, reads the displays and the theme, round trips the clipboard, listens to window and theme events, and shows a message box and a context menu.
Command showcase is Tango's demo app: a WebView page (plain HTML/CSS/JS, no npm) that shows the IPC layer (bound calls, errors, events, streams with back-pressure and cancel), system capabilities reached from the page through jsapi (window, clipboard, dialogs, notifications, displays, theme), and the native side driven from Go (tray icon, app menu, notifications, theme following).
Command showcase is Tango's demo app: a WebView page (plain HTML/CSS/JS, no npm) that shows the IPC layer (bound calls, errors, events, streams with back-pressure and cancel), system capabilities reached from the page through jsapi (window, clipboard, dialogs, notifications, displays, theme), and the native side driven from Go (tray icon, app menu, notifications, theme following).
Command system-demo exercises the desktop integration packages (screen, theme, shell, appctl, autostart, env) and logs PASS/FAIL for each check.
Command system-demo exercises the desktop integration packages (screen, theme, shell, appctl, autostart, env) and logs PASS/FAIL for each check.
Command sysx-demo exercises the desktop system packages: securestore, power, network, a tray flyout panel, the app shortcut menu (Dock menu / Jump List) and dragging a file out of a window.
Command sysx-demo exercises the desktop system packages: securestore, power, network, a tray flyout panel, the app shortcut menu (Dock menu / Jump List) and dragging a file out of a window.
Command terminal opens the Tango terminal component (ui/terminal) in a window, connected to a shell on a local pseudo-terminal (sys/pty).
Command terminal opens the Tango terminal component (ui/terminal) in a window, connected to a shell on a local pseudo-terminal (sys/pty).
Command terminal-workspace demonstrates application-owned terminal sessions: real local shells, editable tabs, nested split panes and window shortcuts.
Command terminal-workspace demonstrates application-owned terminal sessions: real local shells, editable tabs, nested split panes and window shortcuts.
Command trayonly-demo demonstrates a tray daemon and a window process shipped together in a main application and its macOS helper app.
Command trayonly-demo demonstrates a tray daemon and a window process shipped together in a main application and its macOS helper app.
Command ui-gallery renders the Tango self-drawn component gallery to PNG files with the headless ui.Driver:
Command ui-gallery renders the Tango self-drawn component gallery to PNG files with the headless ui.Driver:
gallery
Package gallery is the page registry of the ui-gallery example.
Package gallery is the page registry of the ui-gallery example.
Command ui-hotreload shows hot reload of the self-drawn UI under tan dev.
Command ui-hotreload shows hot reload of the self-drawn UI under tan dev.
Command ui-window opens Tango's self-drawn UI in a real window.
Command ui-window opens Tango's self-drawn UI in a real window.
Command update-demo shows the default update window of service/updater/updateui.
Command update-demo shows the default update window of service/updater/updateui.
Command webview-demo exercises the advanced WebView features (package tango, webview.go): permission requests, downloads, cookies, HTTP authentication, find in page, user agent and extra headers, new-window requests, the navigation policy, PDF and PNG capture.
Command webview-demo exercises the advanced WebView features (package tango, webview.go): permission requests, downloads, cookies, HTTP authentication, find in page, user agent and extra headers, new-window requests, the navigation policy, PDF and PNG capture.
Command webview-embed puts native WebViews inside a self-drawn layout (docs/specs/webview-embed.md): one fills the right side of the window, another sits in a scrolling list on the left and is clipped by it.
Command webview-embed puts native WebViews inside a self-drawn layout (docs/specs/webview-embed.md): one fills the right side of the window, another sits in a scrolling list on the left and is clipped by it.
Command webview-overlay mixes a WebView page with Tango's self-drawn UI in one window (docs/specs/canvas-surface.md, step D).
Command webview-overlay mixes a WebView page with Tango's self-drawn UI in one window (docs/specs/canvas-surface.md, step D).

Jump to

Keyboard shortcuts

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