Documentation
¶
Overview ¶
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).
Files without a build tag hold pure logic (accelerator and label conversion, menu roles, HTTP adaptation, the callback dispatch table, lifecycle aggregation) and are unit tested on any OS. Files ending in _linux.go are tagged `linux && !android` and talk to the native libraries.
Why GTK 3 rather than GTK 4: GtkMenuBar, window placement and broad distribution coverage (WebKitGTK 4.1 targets GTK 3); see MyGo's docs/architecture.md ("Why not GTK 4"), whose Linux backend this one borrows from (MIT, Copyright (c) 2026 MyGo contributors).
Callbacks: purego callbacks are limited in number and never freed, so the package creates a fixed handful of trampolines once (callbacks_linux.go) and routes every signal, idle source and scheme request through a dispatch table keyed by the id passed as C user_data (dispatch.go). Entries are removed by the GDestroyNotify / GClosureNotify that GLib calls when the connection or source goes away.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSmokeUnsupported = errors.New("not supported by this GDK backend")
ErrSmokeUnsupported is returned where the GDK backend cannot synthesize input or read the screen (Wayland).
Functions ¶
Types ¶
type SmokeAttachState ¶
type SmokeAttachState struct {
Frame [4]float64 // x, y, w, h relative to the overlay (content area)
InOverlay bool // the widget's parent is the surface's overlay
AboveWeb bool // after the web view in the overlay's stacking order
PassThrough bool // the overlay child is pass-through
Shape bool // an input shape is set
Focused bool // the widget has keyboard focus
WebTransparent bool // the web view's background was made transparent
X11 bool // clicks, moves and screen reads are available
}
SmokeAttachState describes an attached canvas.
Source Files
¶
- accel.go
- activity_linux.go
- appevents_linux.go
- asset.go
- atspi_plan.go
- backend_linux.go
- callbacks_linux.go
- canvas_a11y_linux.go
- canvas_attach_linux.go
- canvas_attach_plan.go
- canvas_attach_smoke_linux.go
- canvas_damage_linux.go
- canvas_drop_linux.go
- canvas_ffi_linux.go
- canvas_gl_linux.go
- canvas_gl_plan.go
- canvas_input_linux.go
- canvas_keys.go
- canvas_linux.go
- canvas_shortcut_linux.go
- canvas_smoke_linux.go
- canvas_touch.go
- canvas_touch_linux.go
- clipboard_linux.go
- contrast_linux.go
- dbus_linux.go
- dialogs_linux.go
- dialogspec.go
- dispatch.go
- doc.go
- dragout_linux.go
- ffi_ext_linux.go
- ffi_linux.go
- hotkey_portal_linux.go
- inputmethod_config.go
- inputmethod_fcitx.go
- inputmethod_fcitx_linux.go
- inputmethod_ibus_props.go
- inputmethod_keys.go
- inputmethod_linux.go
- integration.go
- integration_linux.go
- lanes.go
- lanes_linux.go
- lifecycle.go
- locale_linux.go
- menu_linux.go
- menubuild_linux.go
- menuspec.go
- motion_linux.go
- msggate.go
- nativeembed_linux.go
- network_linux.go
- notifyhotkey_linux.go
- popup_linux.go
- power_linux.go
- print_linux.go
- scheme_linux.go
- schemestream.go
- schemestream_linux.go
- securestore_linux.go
- shim.go
- sni_linux.go
- surface_ext_linux.go
- surface_linux.go
- sysplan.go
- sysxplan.go
- tray_linux.go
- web_key_data.go
- webembed_linux.go
- webembed_plan.go
- webview_ext_linux.go
- webview_interaction_linux.go
- webview_navigation_linux.go
- webview_operation_linux.go
- webview_profile_linux.go
- webviewext.go
- windowext.go
Directories
¶
| Path | Synopsis |
|---|---|
|
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: |
|
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. |
|
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. |