glutter

module
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause

README

Glutter

Glutter is a GUI toolkit for Go that has Flutter's framework API: widgets, rendering, gestures, animation and Material 3. It runs on its own engine: a Wayland and X11 platform layer and a Vulkan renderer with an OpenGL ES 3.0 fallback (on Windows, Win32 through the standard library and Direct3D 12; on macOS, AppKit and Metal), with the system libraries called through purego, and text layout on go-text. There is no cgo: CGO_ENABLED=0 go build makes the app, and Go is all you need to build it.

Linux desktop comes first, then the web (GOOS=js GOARCH=wasm), Android, Windows (GOOS=windows, Direct3D 12; version 1.8) macOS (GOOS=darwin, Metal; version 1.13), the Cupertino look of iOS and macOS (package cupertino; version 1.14) and iOS (GOOS=ios, UIKit and Metal; version 1.15). Every part that depends on the operating system or the GPU sits behind an internal interface, so more platforms can be added later.

The counter example The gallery, light
examples/counter examples/gallery, light and dark, every Material 3 component

Install

You need Go 1.27 or newer, and nothing else to build:

go get github.com/rm4n0s/glutter@latest

Apps import one package, the way Flutter's apps import material.dart:

import m "github.com/rm4n0s/glutter/material"

Try the examples from a clone: go run ./examples/counter, go run ./examples/gallery.

Quick start

This is examples/counter, the app that flutter create makes:

package main

import (
	"log"
	"strconv"

	m "github.com/rm4n0s/glutter/material"
)

func main() {
	err := m.RunApp(NewMyApp(), m.RunAppOpts{
		AppID:  "dev.glutter.counter",
		Window: m.WindowConfig{Title: "Counter", Size: m.Size{Width: 480, Height: 640}},
	})
	if err != nil {
		log.Fatal(err)
	}
}

type MyApp struct{ m.StatelessWidget }

func NewMyApp() *MyApp { return &MyApp{} }

func (a *MyApp) Build(bc m.BuildContext) m.Widget {
	return m.NewMaterialApp(m.MaterialAppOpts{
		Title:                      "Counter",
		Theme:                      m.NewThemeData(m.ThemeDataOpts{ColorSchemeSeed: m.Some(m.Colors.Blue.Primary)}),
		DebugShowCheckedModeBanner: m.Some(false),
		Home:                       NewCounterPage("Counter"),
	})
}

type CounterPage struct {
	m.StatefulWidget
	title string
}

func NewCounterPage(title string, opts ...m.WidgetOpts) *CounterPage {
	return &CounterPage{StatefulWidget: m.NewStatefulWidgetBase(opts...), title: title}
}

func (p *CounterPage) Title() string        { return p.title }
func (p *CounterPage) CreateState() m.State { return &counterPageState{} }

type counterPageState struct {
	m.StateOf[*CounterPage]
	count int
}

func (s *counterPageState) increment() { s.SetState(func() { s.count++ }) }

func (s *counterPageState) Build(bc m.BuildContext) m.Widget {
	return m.NewScaffold(m.ScaffoldOpts{
		AppBar: m.NewAppBar(m.AppBarOpts{Title: m.NewText(s.Widget().Title())}),
		Body: m.NewCenter(
			m.NewColumn([]m.Widget{
				m.NewText("You have pushed the button this many times:"),
				m.NewText(strconv.Itoa(s.count), m.TextOpts{Style: m.ThemeOf(bc).TextTheme.HeadlineMedium}),
			}, m.ColumnOpts{MainAxisAlignment: m.MainAxisAlignmentCenter}),
		),
		FloatingActionButton: m.NewFloatingActionButton(s.increment, m.NewIcon(m.Icons.Add()),
			m.FloatingActionButtonOpts{Tooltip: "Increment"}),
	})
}

Run it with go run .. The code reads like the Dart one: SetState, Scaffold, AppBar, FloatingActionButton, ThemeOf(bc).TextTheme.HeadlineMedium.

Fonts

An app loads its own fonts, for example a monospace font for a code view, from bytes or from its assets, and names them in TextStyle.FontFamily and FontFamilyFallback. The families of a style are tried in order, and the system's default font comes last, so monospace as a fallback reaches the user's monospace font. services.FontLoader and PlatformDispatcher.LoadFontFromList load a font while the app runs, and gluttertest.Opts.Fonts gives a widget test its fonts. docs/GUIDE.md has the details.

A code view also wants tab stops: TextPainterOpts.TabSize puts the stops that many spaces apart, measured from the start of each line, as CSS's tab-size does (Flutter has none, so the default is off). The text engine keeps the shaped runs of the lines it builds, so a line whose spans did not change is built again several times faster than it was the first time.

var editorStyle = m.NewTextStyle(m.TextStyleOpts{
	FontFamily:         "JetBrains Mono",
	FontFamilyFallback: []string{"monospace"},
})

func options(mono []byte) m.RunAppOpts {
	return m.RunAppOpts{Fonts: []m.FontSource{{Family: "JetBrains Mono", Data: mono}}}
}

An app that lives in the system tray closes its window to the tray: SetHidden(true) on the window's controller takes it off the screen and the task bar while the app goes on, and SetHidden(false) or Activate() brings it back as it was (Flutter has no counterpart; examples/tray does it from AppLifecycleListener.OnExitRequested).

The controller of a window (WindowControllerOf(bc), or the one a RegularWindow is made with) sets its title, activates it, minimizes it, maximizes it, makes it full screen, and takes the state a window opens in; closing the first window can be an ordinary close that leaves other windows open (WindowingOwner().SetImplicitWindowDelegate; examples/multiwindow does it). MouseRegionOpts.HoldCursorWhilePressed keeps a region's cursor while a button is held (a sash that the pointer outruns), and DraggableOpts.Slop, CancelOnEscape and DragTargetOpts.RepeatMove make a draggable row stay a click, cancel with Escape, and let a list scroll under a waiting drag. TreeSliverNode has SetChildren, InsertChild and RemoveChild, lazy nodes (HasChildren) and TreeSliverOpts.NodeKey; RawTooltip has a hover delay read on enter, callbacks and a controller.

What is new in 1.8. Windows (the "Windows" section below), and three more fixes for the application built on Glutter that asked for 1.7's. The font fallback no longer parses a font to learn that it lacks a character: it asks the font's character map first (fontconfig's, the scanner's, or the cmap table alone), and control characters such as the tab go to the first face that loads, so a style with dozens of fonts costs one parse on its first layout instead of dozens (an app that kept a ControlsFont workaround can remove it). TreeSliverNode.SetExpanded sets a node's expansion whether it is shown or not, with no animation and no OnNodeToggle, so a tree whose state lives in a model need not make its nodes again. In WindowDecoration, only the title, the empty space around it and the gap before Leading move the window, maximize it on a double tap and open its menu on a right click; the Leading and Actions widgets get their own gestures, and a tap on a button in Actions arrives at once.

What is new in 1.9. SVG images. The package svg has flutter_svg's widgets: NewSvgPictureAsset, NewSvgPictureString, NewSvgPictureMemory, NewSvgPictureFile and NewSvgPictureNetwork. Glutter's own parser and painter, in plain Go, draw:

  • shapes, strokes and dashes;
  • gradients and patterns;
  • clip paths and masks;
  • text, laid out by Glutter's text engine;
  • markers and the common filters (blur, drop shadow, color matrix, compositing, blending, morphology).

The same pixels come out on every platform and every renderer. examples/svg shows it, and the guide compares it with flutter_svg.

func logo() m.Widget {
	return svg.NewSvgPictureAsset("assets/logo.svg", svg.SvgPictureAssetOpts{
		SvgPictureOpts: svg.SvgPictureOpts{Width: m.Some(48.0)},
	})
}

What is new in 1.9.1. Drawing a view off screen, for an app that needs the pixels of a second view (a remote view, a thumbnail, a preview). The package offscreen has:

  • NewRasterizer, a ui.Rasterizer on the software renderer (for Scene.ToImage), safe on any goroutine;
  • NewDetacher, which copies a scene on the UI thread into one that any goroutine can draw;
  • NewSurface, the pixels of one view across frames, which redraws only the rectangles that changed;
  • NewView, which runs a widget tree in a view of its own, on its own binding, at most 30 frames a second, and calls your function on a goroutine with the image and the damage of each frame (the guide).

The software renderer is also faster, with the same pixels: a full 1280x800 frame takes about 6 ms (16 ms full of text) where it took about 50.

func startView(parent *m.WidgetsBinding, root m.Widget, send func(pixels []byte, width int)) (*offscreen.View, error) {
	return offscreen.NewView(parent, m.Size{Width: 1280, Height: 800}, root, func(f offscreen.Frame) {
		send(append([]byte(nil), f.Image.Pix...), f.Image.Rect.Dx()) // the image is valid only in this call
	})
}

What is new in 1.14. The Cupertino look.

  • Package cupertino: Flutter's cupertino library, file by file, drawn the same on every platform: CupertinoApp, the page route with the parallax slide and the back swipe, sheets, popups and dialogs, the tab scaffold, the navigation bars with the large title that collapses and flies between routes, the controls, the text and search fields and form rows, list sections and tiles, the expansion tile, the pull to refresh, alert dialogs, action sheets, context menus and menu anchors, the pickers, the scrollbar, text selection with its handles, toolbars and magnifier, CupertinoColors and CupertinoDynamicColor, and CupertinoIcons. San Francisco is used on macOS (and iOS) through Core Text and is never bundled; elsewhere the default font draws.
  • Material's adaptive widgets are Flutter's: the switch, checkbox, radio, slider, progress and refresh indicators, scrollbar, alert dialog, list tiles, page transitions, text field, text selection toolbar and magnifier take the Cupertino look when the theme's platform is iOS or macOS, and Theme gives its subtree a CupertinoTheme made from the Material one. Chapter 24 of docs/GUIDE.md shows them.

What is new in 1.15.1. Gamepads start when they are wanted.

  • The gamepad service can be turned off and no longer writes to pads on its own. RunAppOpts.Gamepads is "auto" (the default: a pad moves the focus, as before, but the service only reads the pads until the app uses package gamepad, so the light bar, the enhanced mode and the other HID writes happen only for an app that wants them), "ondemand" (nothing starts until the app uses the package) or "off" (no goroutine, no watch on /dev/input, no device opened, no pad key events); GLUTTER_GAMEPADS overrides it for one run. See chapter 20 of docs/GUIDE.md.

What is new in 1.15. iOS.

  • iOS (the "iOS" section below): UIKit and Metal, on the Simulator and on a device, from iOS 15: touch, the Pencil, the pointer and hardware keyboards, the soft keyboard and input methods, the pasteboard, haptics, notifications, the spell checker, VoiceOver and Dynamic Type, game controllers, audio with the audio session, Core Motion, and glutter-ios, which makes a signed .app. Every example but multiwindow and tray draws on the Simulator. Unlike every other target, iOS needs cgo (the Go linker has to link UIKit with Xcode's clang): the library stays cgo-free, and the cgo is in the internal/platform/ios files that end in _ios.go.

What is new in 1.13. macOS.

  • macOS (the "macOS" section below): AppKit and Metal through purego, no cgo, on Apple silicon and Intel, from macOS 12: windows and several windows, the mouse, trackpad and tablets, the keyboard and input methods, the pasteboard, menus, drag and drop, the tray, notifications, file dialogs, VoiceOver, gamepads, audio, the gpu package and the 3D view on Metal, and glutter-macos, which makes a signed .app. Every example draws on a Mac.

What is new in 1.12. Linux without a GPU.

  • The soft renderer on Linux. GLUTTER_RENDERER=soft draws the app on the CPU into the window's shared memory (wl_shm on Wayland, MIT-SHM on X11, XPutImage over a remote display or with GLUTTER_X11_NOSHM=1) and rasterizes and sends only the rectangles that changed. In a virtual machine whose OpenGL is llvmpipe, OpenGL rasterizes the whole window for every frame.
  • auto chooses it when there is no GPU. Vulkan first, then OpenGL ES, then soft; OpenGL ES gives up when its GL_RENDERER is llvmpipe, softpipe, swrast, a software rasterizer or SwiftShader, and the log says which string decided. A name (GLUTTER_RENDERER=gles) is never second-guessed. An X11 window made for soft never initializes EGL, so Mesa's DRI3 error line does not appear.
  • Speed. An idle editor with a blinking caret takes about 4 ms of CPU for each second with soft on Wayland and X11, against 190 to 460 ms with OpenGL ES on llvmpipe (docs/PERFORMANCE.md).
  • Fixes. The event loop of Linux no longer starves the display connection, the posted functions and the input when frames take longer than the display's interval (it ran the timers that a frame set for "at once" one after the other), which also helped OpenGL ES on a rasterizer on the CPU.

What is new in 1.11. Games.

  • The package gamepad. gamepad.Of(bc).Pads() (or AppendPads, which allocates nothing) gives the connected pads, each with the same buttons and axes whatever it is (Xbox, PlayStation, Switch, generic), from SDL 3's table of mappings and your own lines; listeners and the state to poll; rumble, lights, battery, touchpads and sensors where the pad has them. Linux (evdev, hotplug, force feedback), Windows (XInput and Raw Input HID), browsers and Android. The pads also make key events (the D-pad is the arrows, A activates the focused widget, Start is GameButtonStart), so a Material menu works with a pad and no code of yours.
  • The package audio. Playback and capture devices (PulseAudio and ALSA, WASAPI, AAudio, Web Audio) with streams of any rate, channel count and speed that are converted and mixed for you, callback streams, WAV files in audio/wav, and a device that follows the system's default. sensors gives a phone's or a pad's accelerometer and gyroscope; browsers vibrate for haptic feedback.
  • Models and materials. model/gltf (.gltf and .glb, the common extensions, meshopt), model/ply and model/threemf load into model.Model; viewport3d draws PBR metallic-roughness materials with image-based lighting, a shadow, tone mapping, skins, morph targets and animations, and point clouds with colors.
  • examples/game3d. Coin Run uses all of them: a skinned character in a glTF level, played with a pad, the keyboard, a locked mouse or touch, with music, effects, rumble and a pause menu. Its guide chapter is "A game, from the pieces".
  • Speed and memory. A pad button reaches the app in the next frame; the output latency on PulseAudio is about 19 ms; the renderer draws the example's frame at 1920x1080 with 4x multisampling at about 700 frames a second on a Radeon RX 6800M; a steady frame of the 3D view, the pads and the audio allocates nothing; pads connected and removed 1,000 times, streams opened and closed 1,000 times and a level loaded 100 times leave the heap flat. One target is not met: in ten-minute recordings of a test tone the null sink's monitor had one or two glitches of 128 frames while the UI drew (docs/PERFORMANCE.md, "Games"); the cause is not found.
  • Fixes. The loop of the Windows platform no longer starves when frames take longer than the display's interval (an app now ends when asked, even over a software rasterizer), and a pad's listeners are no longer copied for each event.

What is new in 1.10. The GPU and 3D.

  • The package gpu. The device of the renderer (gpu.DeviceOf, gpu.OnDevice) with buffers, textures, samplers, shader modules (made from your WGSL by glutter-gen gpushaders), render and compute pipelines, bind groups, command encoders, indirect draws, copies and read-back, on Vulkan, Direct3D 12 and WebGPU. gpu.NewView is a widget with a render target of its own (depth, 4x multisampling, RGBA16Float) that your function draws into; it is shown in the widget tree with no copy and draws only when it changes. examples/gpu-triangle is a lit cube drawn this way.
  • A locked pointer for a game or a 3D view: widgets.PointerLock on Linux (Wayland and X11), Windows, the web and Android.
  • vecmath, viewport3d and model. A 3D view with a camera and its navigation (orbit, pan, zoom, the standard views; a mouse, touch, a trackpad, keys), meshes, materials, lines, points and the edges of a model, four display modes, section planes with caps, picking and selection, a grid, axes, a view cube and widgets anchored to points of the scene. Matrices are float64 on the CPU and float32 relative to the eye on the GPU, so a part 50 km from the origin keeps its 0.1 mm. model/stl and model/obj read STL and OBJ files (a million triangles in 137 ms and 0.64 s), and viewport3d.Upload makes a scene of them. examples/cad is a viewer that opens a file, cuts a section, picks a face and measures a distance.
  • Speed and memory. A steady frame allocates nothing; a million triangles with edges draw at about 400 frames a second on a Radeon RX 6800M with 0.12 ms of CPU; 10,000 items of one mesh cost under a millisecond. 10,000 items that each have a mesh of their own cost about 20 ms (see docs/PERFORMANCE.md). A model opened and closed, a view resized and a device lost leave the heap flat.
  • A fix: a gpu.View whose device was lost now draws again on the new one (its OnDispose for the lost device ran after the OnInit of the new one).

What is new in 1.9.9. A fix for Emetos: a SliverVariedExtentList (or a ListView with ItemExtentBuilder) and a TreeSliver remember the heights their builder gave, so a list of 100,000 rows of different heights jumps to its end in about a millisecond instead of 40 to 60, and lands on the last row. The builder must give the same heights until the list is rebuilt.

What is new in 1.9.8. A fix for Emetos: RunAppContext(ctx, app) (and RunWidgetContext) ends the app when the context ends, with the same clean exit as a closed window. With signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM), the app closes on Ctrl+C or when it is told to terminate.

What is new in 1.9.7. Four fixes for Emetos:

  • Input: a frame that handles a key or a click no longer asks for a second frame that draws nothing, so a held key types at the full repeat rate.
  • Key repeat: on Wayland a held key repeats at the compositor's rate; a slow frame no longer slows the repeats that follow.
  • Clipboard: services.ClipboardData has an HTML field (services.ClipboardKTextHTML): copy formatted text next to the plain text, and a rich editor pastes it formatted. It works on Linux, Windows, the web and Android.
  • Text fields: when the text of a scrolled field gets shorter, the field shows the end of the text at once instead of springing back over a second.

What is new in 1.9.6. A fix for Emetos: a button's TextStyle (from FilledButtonStyleFrom, OutlinedButtonStyleFrom or TextButtonStyleFrom, on the button or its theme) is merged with the default label style. A style that gives only a size or a weight keeps the theme's font and the foreground color; before, the label could vanish.

What is new in 1.9.5. Two more for Emetos:

  • Focus: a focus node that leaves the tree while it has the focus tells its listeners, once, that it lost it. Give a Focus a FocusNode you own and listen to it to know when a focused widget went away.
  • Glyphs: PlatformDispatcher.FontMetrics(style) measures a font (ascent, descent, line height, the width of "0") without a paragraph, and offscreen.NewGlyphSheet rasterizes glyphs into one image with each glyph's place and metrics, for a grid drawn with a single DrawAtlas (a terminal, for example).

What is new in 1.9.4. A fix for 1.9.3's faster UI-thread check: it could take a background goroutine for the UI thread once the goroutine that drove the UI had ended (a test's subtest, for example), and that goroutine's SetState then ran at once instead of being posted. The check now uses the goroutine's number, which is never reused, and still takes a few nanoseconds.

What is new in 1.9.3. Two more fixes for Emetos:

  • Keys: the focus manager's early and late key handlers also see the keys that arrive while nothing has the focus, for example in the frames between a closed tab and the next one taking the focus. An app can claim a key before any focused widget with one early handler.
  • Faster debug builds: the check that a call comes from the UI goroutine takes about 2 nanoseconds instead of 4 to 33 microseconds. Debug builds ran it each time something was marked for rebuild; it also ran in every SetState, in all builds.

What is new in 1.9.2. Fixes for an app built on Glutter (Emetos):

  • Lists:
    • MaintainVisibleContentPosition in ListViewOpts (and the list slivers' options): rows inserted before the one the user reads no longer push it away, as in a chat or a live log. At the start, the list still follows the newest row.
    • EstimateItemOffsets: a jump far into a long list of items of different heights builds one window of items, not every item in between.
  • offscreen.View: a view can have a clipboard of its own (ViewOpts.Clipboard), follows the app's platform configuration, and has a window (ViewOpts.Window, View.SetWindow). SetSize keeps the rest of its configuration.
  • Gestures: a gesture arena no longer panics when a pointer goes down again before its arena is resolved, and it resolves in the order Flutter does. Each press on Linux gets a new pointer id.
  • Renderers: they skip what lies outside the clip. A frame in which only the caret blinks allocates tens of kilobytes, not megabytes that grow with the text.
  • Text fields: a field mounted again with the focus takes keys, and the caret of an obscured field sits on the right bullet.
  • Memory: eight memory leaks fixed. The largest kept every frame an app had repainted alive, about 40 KB for each page pushed. Tests now check that the live heap stays flat while an app runs. The undo history of a text field keeps at most 1,000 steps and 16 MB of text.
  • Other:
    • unplugging the last Wayland keyboard no longer logs an error;
    • programs no longer link the testing package.

What is new in 1.8.1 to 1.8.3.

  • 1.8.1: ErrorBoundary. When anything below it fails to build, it shows a fallback in place of its whole child, in the same frame. It is told about the error before the app's error reporter (the guide).
  • 1.8.2: WindowDecoration lays out its Actions first, then its Leading widgets, which may take all the room that is left, and gives the title the rest. Tabs in the title bar no longer need the bar's sizes copied into the app.
  • 1.8.3: a line that ends with an ellipsis keeps every character that fits before it, as in Flutter. A long word with no place to break no longer leaves only the ….

From Flutter to Glutter

Flutter Glutter
Text('hi') m.NewText("hi")
Padding(padding: EdgeInsets.all(8), child: c) m.NewPadding(m.NewEdgeInsetsAll(8), c)
Container(width: 100, color: Colors.blue, child: c) m.NewContainer(c, m.ContainerOpts{Width: m.Some(100.0), Color: m.Some(m.Colors.Blue.Primary)})
ListView.builder(itemBuilder: ...) m.NewListViewBuilder(func(bc m.BuildContext, i int) m.Widget {...})
Theme.of(context) m.ThemeOf(bc)
Navigator.push(context, route) m.NavigatorPush(bc, route); the result comes from a channel
MainAxisAlignment.center m.MainAxisAlignmentCenter
Icons.add m.Icons.Add()
setState(() {...}) s.SetState(func() {...})
Future, await func(ctx context.Context) (T, error), goroutines, State.Go

The required parameters are positional (child and children last), the optional ones are fields of a trailing XOpts struct, a nullable parameter is m.Some(v), and the zero value of an enum, XUnspecified, means the widget's default. The rules are in SPEC §12, every difference from Flutter is in §12.10, and docs/GUIDE.md shows eleven things side by side in Dart and Go.

What runs where

Required at run time:

  • a Wayland compositor with xdg_wm_base, or an X server
  • a GPU driver: either Vulkan 1.3 (or 1.1 with dynamic rendering and synchronization 2; libvulkan.so.1 and a driver such as Mesa's RADV, ANV or NVK, or NVIDIA's), or an EGL driver with OpenGL ES 3.0 (Mesa 20 or newer, NVIDIA through glvnd, or llvmpipe). Glutter uses Vulkan where it works and falls back to OpenGL ES where it does not, without being told
  • the libraries that every Linux desktop has (Wayland, xkbcommon, libdecor where the compositor draws no title bars, EGL); a missing one is reported as a tagged error

Optional: a D-Bus session bus (file dialogs, notifications, the tray, settings, opening URLs), xdg-desktop-portal and a backend, a StatusNotifierItem host for the tray, and at-spi2-core for accessibility (screen readers such as Orca). SPEC §16 has the list.

GLUTTER_BACKEND=x11|wayland chooses the backend; the default is Wayland when it is there. GLUTTER_RENDERER=auto|vulkan|gles|soft chooses the renderer (RunAppOpts.Renderer does the same). soft draws on the CPU into shared memory and redraws only what changed, which is the fast way on a machine with no GPU (a virtual machine whose OpenGL is llvmpipe); on Wayland (wl_shm) and X11 (MIT-SHM, or XPutImage on a remote display) it is there from 1.12. GLUTTER_X11_NOSHM=1 turns MIT-SHM off, so that the pixels go with XPutImage. The default is auto: Vulkan first, then OpenGL ES when there is no Vulkan loader, no driver that can present to the window, or only a software device (llvmpipe, lavapipe), and soft when there is no GPU at all (the OpenGL ES context is Mesa's llvmpipe, softpipe or swrast, or there is no OpenGL ES); each fallback is logged once at Info level with its error, and the error of OpenGL ES names the string that decided. A name never falls back, and is the only way to use a software Vulkan device. The log line renderer chosen names the renderer and the GPU. If the GPU is lost, Glutter makes its resources again once and draws the frame again; a second loss within ten seconds ends the app with VulkanDeviceLost. GLUTTER_VULKAN_DEVICE=<index or part of the name> picks another Vulkan device, GLUTTER_VULKAN_VALIDATION=1 turns on the validation layer, and GLUTTER_DAMAGE=0 and GLUTTER_RASTER_CACHE=0 turn off the damage rectangles and the raster cache of both renderers. What the GPU drivers compile (the program binaries of GLES, the pipeline cache of Vulkan) is kept in $XDG_CACHE_HOME/glutter/shaders (~/.cache/glutter/shaders) so that a second start compiles nothing; GLUTTER_SHADER_CACHE=0 turns it off, and GLUTTER_FRAME_STATS=1 logs the parts of the start (the renderers tried, the GPU context, the shaders, the first frame).

Web

Glutter runs in the browser too: GOOS=js GOARCH=wasm with the standard Go toolchain (no TinyGo). Every example except multiwindow and tray builds and runs there (a page has no second window and no tray).

go run ./cmd/glutter-web serve ./examples/gallery          # builds, serves at http://localhost:8080/
go run ./cmd/glutter-web build -release -o dist ./examples/counter   # a directory for any static server
go run ./cmd/glutter-web shot -browser firefox -o gallery.png ./examples/gallery

build writes index.html (the loader), wasm_exec.js, app.wasm and app.wasm.gz; -release builds with -tags glutter_release -ldflags=-s -w. Serve the .gz with Content-Encoding: gzip and app.wasm as application/wasm, which glutter-web serve does. The page needs no configuration; globalThis.glutterConfig.hostElement (a CSS selector, set in index.html) puts the view in an element instead of the whole page.

Browsers. Tried: Chromium 155 (WebGPU, WebGL 2) and Firefox 158 (WebGL 2; its WebGPU is off by default on Linux), both on Fedora 44. Safari and other engines were not tried.

Renderers. The page tries WebGPU, then WebGL 2, then a software renderer on a 2D canvas, once, at the first frame. ?GLUTTER_RENDERER=webgpu|webgl|soft in the page's address (or RunAppOpts.Renderer) chooses one; a name never falls back, and a browser that cannot give it shows the error in the page. Any query parameter that starts with GLUTTER_ is the program's environment variable of that name.

What the web lacks (SPEC §3, §23): accessibility (no ARIA tree in 1.1), a second window or view on a page, system fonts (the text uses the bundled Roboto and Material Icons and the fonts an app loads), drag and drop out of the app, file dialogs, the tray, KeepScreenOn, and closing the page from the app. Opening a link and notifications (without buttons) work. An app asks foundation.IsWeb where it must differ; docs/GUIDE.md has a note for Flutter web developers.

A release build of the counter is 38 MB of WebAssembly and 8.8 MB gzipped, the gallery 58 MB and 11.9 MB; docs/PERFORMANCE.md has the web numbers and the targets that are not met.

Android

Glutter runs on Android 8.0 (API 26) and later, on arm64 and x86_64 (Android is the one target that uses cgo, for the NDK and the Java embedding, in one package; CGO_ENABLED=0 go build ./... still builds the library). An app is the same Go program: GOOS=android is chosen by the tool, and the result is an APK.

What to install: Go 1.27, the Android SDK (ANDROID_HOME) with build-tools, a platforms/android-<level> and the NDK (sdkmanager "ndk;30.0.16248370"; ANDROID_NDK_HOME or the newest ndk/ under the SDK is used), and a Java runtime for apksigner. A missing piece is an error that names the sdkmanager package. A phone needs USB debugging; an emulator needs a system image.

go run ./cmd/glutter-android run ./examples/gallery            # builds, installs, starts, streams the log
go run ./cmd/glutter-android build -release -key key.pk8 -cert cert.pem -o gallery.apk ./examples/gallery
go run ./cmd/glutter-android shot -screen -o gallery.png ./examples/gallery
scripts/perf-android.sh -m                                      # sizes, start, CPU, frames, memory

build makes one APK for both ABIs (-abi arm64 for one); -release builds with -tags glutter_release and strips the program. -env GLUTTER_X=v (repeatable, on run and shot) reaches the app's environment as an intent extra, as the web's query parameters do. The app's HOME is its files directory, slog goes to logcat with the level as the priority (adb logcat -s <app id>), and GLUTTER_RENDERER=vulkan|gles|soft chooses the renderer (the default is Vulkan where the device's driver is good, then OpenGL ES, then the CPU).

What works: everything of the framework, Material 3, touch, stylus and mouse, the soft keyboard and input methods (composition, actions, the keyboard's height as ViewInsets), the clipboard, the back button and the predictive back gesture, the status and navigation bars, the system's fonts and emoji, TalkBack, system settings (dark mode, text size, languages, 24-hour clock, reduced motion), the overscroll glow and stretch, the text selection toolbar and magnifier, spell check, desktop.OpenURI and notifications.

What Android lacks: a second window or view (multiwindow), the tray (tray) and file dialogs, autofill, content that a keyboard inserts (stickers, GIFs), plugins and platform channels (call the NDK or Java through your own code, or use the standard library), and an Android App Bundle for Google Play (an APK only). SPEC §3 and §24 have the list and the reasons; docs/GUIDE.md has a note for Flutter Android developers.

Every example except multiwindow and tray builds and runs on a phone (examples/examples_test.go builds them and a device test draws the first frame of each). The gallery keeps its list of pages in a drawer when the window is narrow. A release build of the counter is an APK of 26 MiB per ABI and the gallery 37 MiB; docs/PERFORMANCE.md has the numbers, the targets and what the emulator cannot measure.

Windows

Glutter runs on Windows 10 (version 1809) and later, on amd64 and arm64, and it is the same Go program: GOOS=windows CGO_ENABLED=0 go build makes an .exe with no DLL next to it. Windows is called through the standard library's syscall (no cgo, no purego, no golang.org/x/sys/windows), frames are drawn with Direct3D 12 at feature level 11_0 (any GPU from about 2012, or WARP, which Windows has) and fall back to the software renderer drawn into the window with GDI, and the same shaders as the other targets are compiled to DXBC by Windows' own d3dcompiler_47.dll.

What to install: Go 1.27, and nothing else, on Windows or on any other OS (no C compiler, no SDK, no DLL to ship). To run on a PC an .exe needs nothing that Windows 10 or 11 does not have; a screen reader that uses UI Automation (Narrator, NVDA, JAWS) and an input method are optional. To try an app on Linux, install Wine (sudo dnf install wine-core wine-cms), a headless X server (xorg-x11-server-Xvfb) and Mesa's lavapipe (mesa-vulkan-drivers): Wine's Direct3D 12 is vkd3d on the host's Vulkan.

go run ./cmd/glutter-windows build -o gallery.exe ./examples/gallery          # an .exe with its manifest and icon
go run ./cmd/glutter-windows build -release -arch amd64,arm64 -o app.exe ./your/app   # app_amd64.exe and app_arm64.exe
go run ./cmd/glutter-windows run ./examples/gallery            # builds, then starts it (on Linux, under Wine)
go run ./cmd/glutter-windows shot -o gallery.png ./examples/gallery   # the frame the app draws
scripts/perf-windows.sh -m                                     # sizes, start, CPU, frames, memory (Wine's numbers)

Running under Wine (Linux): run and shot start Wine on your display, or on a headless X server with -headless (shot always does), with a private prefix in .wine-test/prefix of the checkout, so nothing of ~/.wine is touched. The tests of the Windows code run there too: scripts/test-windows.sh and go test -tags glutter_wine -p 1 ./examples (every example draws its first frame with Direct3D 12). Wine is not Windows: its adapter is a made-up GeForce, its fonts are Liberation Sans, and it has no WARP, no debug layer, no real input methods and no DWM, so a PC is the last word (docs/MANUAL-CHECKS.md).

build puts the manifest (per-monitor DPI awareness v2, UTF-8, long paths, Common Controls 6), the icon (-icon logo.png) and the version information (-version 1.2.3.4, -name) into the .exe, in pure Go, and builds a GUI program (-console for a console one). GLUTTER_RENDERER=auto|d3d12|soft chooses the renderer, GLUTTER_D3D12_ADAPTER=warp|<index> the adapter, GLUTTER_D3D12_DEBUG=1 the debug layer (Graphics Tools), and GLUTTER_FRAME_STATS=1 logs the start and the frames. A GUI program has no console: start it from a terminal and its log shows there, otherwise it goes to OutputDebugString.

What works: everything of the framework, Material 3 with Segoe UI, the mouse, touch and pen, the keyboard (every layout, dead keys, AltGr), input methods through IMM32, the clipboard (text, files, images), the system's settings (dark mode, accent, text size, high contrast, reduced motion, caret blink), several windows, drag and drop (OLE), the tray, notifications, the common file dialogs, desktop.OpenURI, and screen readers through UI Automation.

What Windows lacks: notifications with buttons and a place in the notification center (a notification is a tray balloon with one action, a click: real toasts need a registered app identity), the snap layouts of the maximize button for an app that draws its own title bar (WindowDecoration; Aero Snap by dragging works), DirectManipulation (a precision touchpad scrolls by its wheel messages, without inertia of its own, and a pinch is Control plus wheel), TSF-only input (reconversion, the handwriting panel), the clipboard's primary selection, and plugins and platform channels (call Win32 through your own syscall code, or use the standard library). SPEC §25 has the list and the reasons; docs/GUIDE.md has a note for Flutter Windows developers.

Every example builds for windows/amd64 and windows/arm64 and runs on Windows, multiwindow and tray included (examples/examples_test.go builds them, and a Wine test draws the first frame of each). A release build of the counter is an .exe of 25 MiB and the gallery 36 MiB (amd64); docs/PERFORMANCE.md has the numbers, which are Wine's and not a GPU's, and the targets that the owner still has to confirm on a PC.

macOS

Glutter runs on macOS 12 (Monterey) and later, on Apple silicon and Intel, and it is the same Go program: GOOS=darwin CGO_ENABLED=0 go build makes a Mach-O file with no .dylib next to it. AppKit, Foundation, Core Foundation, Core Graphics, Core Text, QuartzCore, IOSurface, IOKit, Core Audio and Metal are called through purego and its objc package (no cgo, no Objective-C, no Xcode), frames are drawn with Metal (the same shaders as the other targets, compiled to Metal Shading Language by naga when Glutter is built) and fall back to the software renderer drawn into IOSurfaces.

What to install: Go 1.27, and nothing else, to build and run: go run ./examples/counter works on a Mac as it does on Linux. To make an app bundle, signed, you need the codesign that every Mac has; the Command Line Tools are enough, Xcode is not needed. To work on Glutter itself, naga 30.0.1 (cargo install naga-cli --version 30.0.1) makes the shaders again, and a clone of the repository runs the macOS checks of docs/IMPLEMENTATION.md.

go run ./cmd/glutter-macos build -o Gallery.app ./examples/gallery            # a signed bundle, with its plist and icon
go run ./cmd/glutter-macos build -release -universal -o App.app ./your/app    # one executable for arm64 and amd64
go run ./cmd/glutter-macos run ./examples/gallery                             # builds the bundle, starts it, shows its log
go run ./cmd/glutter-macos shot -bundle -o gallery.png ./examples/gallery     # the frame the app draws, with no screen recording
scripts/perf-macos.sh -m                                                      # size, start, CPU, frames, memory

build writes <App>.app/Contents with the Info.plist (the identifier from -id, the version, the minimum system, a high-resolution app, the microphone's usage string and any -usage KEY=text), the icon (-icon logo.png, a square PNG of at least 16 pixels, made into an .icns), and the executable (-universal writes one with two slices, in pure Go, no lipo), and signs the bundle ad hoc with codesign. -hardened turns the hardened runtime on, which a notarized app needs. Signing with a Developer ID and notarization are yours, not the tool's: docs/GUIDE.md has the commands. An app that is only ad-hoc signed makes Gatekeeper warn about an unidentified developer when it was downloaded.

What works: everything of the framework, Material 3 with the system font, the mouse, the trackpad (scrolling with momentum, pinch, rotation) and tablets, the keyboard (every layout, dead keys, Cmd shortcuts), input methods (Chinese, Japanese and Korean), the pasteboard (text, HTML, files, images), the system's settings (dark mode, accent, text size, reduced motion), several windows, full screen, the menu bar, drag and drop with other apps, the tray (a status item), notifications from a bundle, file dialogs, VoiceOver (through NSAccessibility), gamepads (IOKit, with the HID drivers of PlayStation, Switch and Xbox pads), audio playback and capture (Core Audio), the gpu package and the 3D view on Metal.

What macOS lacks: the pointer lock (widgets.PointerLock; examples/game3d is played there with the keyboard, a pad or the mouse without it), the Dock icon's menu and badge, the rumble of a generic pad (only the pads that have a HID driver rumble), motion sensors (there are none on a Mac but a pad's), plugins and platform channels (call AppKit through your own objc code, or use the standard library), an installer or notarization, and the Mac App Store's sandbox (an app that is sandboxed needs entitlements that the tool does not write). SPEC §29 has the list and the reasons; docs/GUIDE.md has a note for Flutter macOS developers.

Every example builds as a signed bundle and draws its first frame with Metal (examples/macos_test.go, -tags glutter_display), multiwindow and tray included. A release build of the counter is an executable of 24 MiB for arm64 and the gallery 35 MiB; on the Apple M6 of docs/PERFORMANCE.md a warm start takes about 150 ms to the first frame, the gallery animates at the display's 120 frames a second with about 40% of a core, and an idle app uses no CPU. The resident memory (193 MB for the counter) is above the target of the desktop and is an open question there.

iOS

Glutter runs on iOS 15 and later, on the iPhone and the iPad, in the Simulator and on a device. It is the same Go program, with one difference from every other target: GOOS=ios needs cgo, because Go's external linker has to link the UIKit program with the clang of Xcode; a Glutter library file never contains import "C", and only the *_ios.go files of internal/platform/ios do. UIKit, Core Animation, Metal, Core Text, Core Audio, Core Motion, Game Controller, Core Haptics and User Notifications are called through purego and its objc package, and frames are drawn with Metal (the same shaders as the other targets) into a CAMetalLayer.

What to install: Go 1.27 and the full Xcode (not only the Command Line Tools: the iOS SDK and the Simulator's runtime are in it; xcode-select -s /Applications/Xcode.app/Contents/Developer). To run on a device, an Apple Developer team and a provisioning profile.

go run ./cmd/glutter-ios run ./examples/gallery                              # builds for the Simulator, installs, launches, shows the log
go run ./cmd/glutter-ios run -device ipad ./examples/gallery                 # the same on an iPad Simulator
go run ./cmd/glutter-ios shot -o gallery.png ./examples/gallery              # the frame the app draws, with no screen capture
go run ./cmd/glutter-ios build -sim -o Gallery.app ./examples/gallery        # a bundle for the Simulator, signed ad hoc
go run ./cmd/glutter-ios build -team ABCDE12345 -profile app.mobileprovision -o Gallery.app ./examples/gallery   # for a device
scripts/check-ios.sh                                                         # build and vet the module for the device and the Simulator

build writes <App>.app with the Info.plist (the identifier from -id, the version, iOS 15 as the minimum, a launch screen that is a dictionary so that no storyboard is compiled, the scene manifest, the orientations of -orientations, the usage strings of -usage KEY=text), the icons as PNG files (-icon logo.png, a square PNG of at least 167 pixels), the executable, and signs it. Signing a device build needs -team and -profile (a development profile that has the device and the app's identifier); -identity names the certificate (Apple Development by default). The tool does not make profiles, upload to App Store Connect or notarize: Xcode's organizer and xcrun altool do that with the .app this tool makes.

What works: everything of the framework, Material 3 and the Cupertino library with the system font, touch with multi-touch, the Apple Pencil (pressure, tilt and azimuth), the pointer of an iPad, hardware keyboards, the soft keyboard (the insets, the keyboard types, autocorrect, input methods that compose), the pasteboard (text, HTML, images, URLs), the system's settings (dark mode, Dynamic Type, Bold Text, Reduce Motion, Increase Contrast, the 24-hour clock, languages), VoiceOver, Switch Control and Voice Control, haptics, notifications, spell check, game controllers (with rumble and the light), audio through the audio session (interruptions, routes), the accelerometer and gyroscope, the gpu package and the 3D view on Metal, safe areas, rotation and the status bar. The framework takes Flutter's iOS branches: bouncing scroll physics, the Cupertino page transition with the back swipe, the Cupertino text selection with its handles and magnifier.

What iOS lacks: several windows (an iPad's second scene), the tray and the file dialogs (desktop.OpenFiles says FileChooserUnavailable: the document picker gives URLs, not paths), drag and drop between apps, the pointer lock (widgets.PointerLock), plugins and platform channels (call UIKit through your own objc code, or use the standard library), the trigger motors of a controller, the device motion (gravity and attitude: the sensors package has the two raw kinds), app extensions, widgets and Live Activities, and platform views (UiKitView). A background app is not drawn (iOS ends an app that has GPU work in the background).

Every example but multiwindow and tray is built as a bundle for the Simulator and draws its first frame with Metal (examples/ios_test.go, -tags glutter_ios), and the framework's behaviors on iOS are checked on the Simulator: the bounce of a list, the back swipe from the left edge, a double tap and a long press on a field. A release build of the counter is an executable of 24 MB and the gallery 35 MB; on the Simulator of docs/PERFORMANCE.md (an Apple M6 Mac, so the Mac's numbers) the first frame comes 130 to 160 ms after Run, an idle app uses no CPU, and an animation that runs for a minute keeps its memory flat. What only a phone shows (ProMotion, the Pencil, haptics, VoiceOver, the real keyboard, notifications, background behavior, the memory limit) is the list in docs/MANUAL-CHECKS.md.

Examples

Each one uses only the public packages and has tests that run on a fake platform.

Example Shows Screenshot
counter the reference app of SPEC §12.12
layout Row, Column, Stack, Wrap, Flex
animations implicit and explicit animations
scrolling lists, grids and slivers
navigation Navigator, routes, Hero, the Pages API
editor text editing, selection, clipboard, input methods
gallery every Material 3 component, light and dark
multiwindow several windows of one app
tray system tray, notifications, file dialog (the window alone is shown: a tray needs a desktop)
custompaint CustomPaint and the Canvas
todo a DataTable of tasks; each row has a checkbox, an Edit button (a dialog) and a Delete button
svg SVG pictures (package svg): icons with currentColor and a ColorFilter, a logo with gradients, text and a drop-shadow filter
gpu-triangle package gpu and vecmath: a lit cube drawn by the program's own shader into a gpu.View, with reversed-Z depth and 4x multisampling, a slider and a switch
cad package viewport3d and model: a 3D viewer with an STL or OBJ opened from a dialog, navigation, the view cube and the grid, four display modes, a section plane on a slider, picks with a side panel, and a distance between two picks drawn as a dimension
game3d packages gamepad, audio, viewport3d, model/gltf and widgets.PointerLock together: Coin Run, a skinned character that runs and jumps through a glTF level with PBR materials and a shadow, played with a pad, the keyboard, a locked mouse or touch, with music, effects, rumble on a hit and a Material pause menu that a pad drives
cupertino package cupertino: a CupertinoApp with a tab scaffold (a navigator per tab) whose first tab is a settings page under a large-title bar that collapses as it scrolls (a pull to refresh control above inset grouped sections of list tiles with a switch, additional info and chevrons, an expansion tile and a form section with text rows), whose rows push a page (the iOS parallax and the back swipe), a fullscreen page, present a sheet (dragged down to dismiss it, with a drag handle) and show a modal popup, with a dark mode switch; its second tab shows the controls (switch, checkbox, radios, slider, activity indicators and the two segmented controls), its third the text (text fields with a placeholder, prefix and clear button, the search field and the selection) its fourth the popups (an alert dialog, an action sheet, a context menu and a menu anchor) and its fifth the pickers (the date and time picker, the countdown timer picker and a wheel); it shows every widget of the library

Performance

On release builds (-tags glutter_release) an animation-only frame costs microseconds on the UI thread, a full rebuild of the gallery page about 4 ms, and an idle app uses no CPU. docs/PERFORMANCE.md has the numbers, the machine they were measured on and the targets that are not met yet. On Windows the numbers under Wine (scripts/perf-windows.sh) are for noticing regressions only, and the targets are proposed until the owner confirms them on a PC.

Working on Glutter

Go 1.27 and a C compiler (only because go test -race needs cgo). docs/SPEC.md is the source of truth, docs/IMPLEMENTATION.md the plan and docs/IMPLEMENTED.md the log of what is done. CLAUDE.md lists the commands:

go build ./...                  # CGO_ENABLED=0 go build ./... must always work
go test -race ./...
go vet ./... && golangci-lint run
go generate ./...
go run ./cmd/glutter-gen apicheck -allow cmd/glutter-gen/apicheck.allow

The web, Android and Windows have their own checks (GOOS=js GOARCH=wasm go build ./... and scripts/test-wasm.sh, scripts/check-android.sh, GOOS=windows go build ./... and scripts/test-windows.sh under Wine); CLAUDE.md lists them.

License

BSD-3-Clause, see LICENSE. Glutter is a derivative of the Flutter framework (BSD-3-Clause, third_party/flutter/LICENSE); NOTICE lists the other components.

Directories

Path Synopsis
Package animation provides AnimationController, Tween, Curves and the other animation primitives.
Package animation provides AnimationController, Tween, Curves and the other animation primitives.
Package audio plays and records sound (SPEC §28.3): a System lists the devices, opens a playback or a capture Device, and the streams of a device are mixed into it.
Package audio plays and records sound (SPEC §28.3): a System lists the devices, opens a playback or a capture Device, and the streams of a device are mixed into it.
wav
Package wav reads WAV files (SPEC §28.3): RIFF files with linear PCM of 8, 16, 24 or 32 bits (also in the WAVE_FORMAT_EXTENSIBLE form) or IEEE float of 32 or 64 bits, with 1 to 8 channels.
Package wav reads WAV files (SPEC §28.3): RIFF files with linear PCM of 8, 16, 24 or 32 bits (also in the WAVE_FORMAT_EXTENSIBLE form) or IEEE float of 32 or 64 bits, with 1 to 8 channels.
cmd
glutter-android command
Command glutter-android builds, installs, runs and takes screenshots of Glutter apps on Android (SPEC §24.1):
Command glutter-android builds, installs, runs and takes screenshots of Glutter apps on Android (SPEC §24.1):
glutter-gen command
Command glutter-gen runs the code generators: Wayland protocol bindings, key tables, material re-exports, CopyWith methods and icons, the shaders (`shaders` for the renderer's own, `gpushaders` for an app's, SPEC §27.3), and the API check.
Command glutter-gen runs the code generators: Wayland protocol bindings, key tables, material re-exports, CopyWith methods and icons, the shaders (`shaders` for the renderer's own, `gpushaders` for an app's, SPEC §27.3), and the API check.
glutter-gen/internal/androiddex
Package androiddex implements the `glutter-gen android-dex` subcommand: it compiles the Java of the Android embedding with javac and d8 into internal/androidtool/classes.dex (D22, SPEC §24.2).
Package androiddex implements the `glutter-gen android-dex` subcommand: it compiles the Java of the Android embedding with javac and d8 into internal/androidtool/classes.dex (D22, SPEC §24.2).
glutter-gen/internal/apicheck
Package apicheck implements the `glutter-gen apicheck` subcommand, which reads the public packages and reports what breaks the API conventions of SPEC §12.
Package apicheck implements the `glutter-gen apicheck` subcommand, which reads the public packages and reports what breaks the API conventions of SPEC §12.
glutter-gen/internal/audiochannels
Package audiochannels implements the `glutter-gen audiochannels` subcommand, which turns the channel converters of SDL 3 (src/audio/SDL_audio_channel_converters.h, which SDL generates itself) into the matrices that internal/audiocvt applies (SPEC §28.1, §28.3).
Package audiochannels implements the `glutter-gen audiochannels` subcommand, which turns the channel converters of SDL 3 (src/audio/SDL_audio_channel_converters.h, which SDL generates itself) into the matrices that internal/audiocvt applies (SPEC §28.1, §28.3).
glutter-gen/internal/copywith
Package copywith implements the `glutter-gen copywith` subcommand, which generates the CopyWith methods of the immutable value classes (ThemeData, ColorScheme, TextTheme...), as SPEC §12.3 describes.
Package copywith implements the `glutter-gen copywith` subcommand, which generates the CopyWith methods of the immutable value classes (ThemeData, ColorScheme, TextTheme...), as SPEC §12.3 describes.
glutter-gen/internal/errcheck
Package errcheck implements the `glutter-gen errcheck` subcommand, which reads the whole module and reports what breaks the rules of github.com/rm4n0s/errors (its AI_GUIDE.md, summarized in CLAUDE.md, "Error handling", and SPEC §14.4).
Package errcheck implements the `glutter-gen errcheck` subcommand, which reads the whole module and reports what breaks the rules of github.com/rm4n0s/errors (its AI_GUIDE.md, summarized in CLAUDE.md, "Error handling", and SPEC §14.4).
glutter-gen/internal/gamepaddb
Package gamepaddb implements the `glutter-gen gamepaddb` subcommand, which turns the two tables of gamepads in SDL 3 into Go: the mapping lines of src/joystick/SDL_gamepad_db.h and the vendor and product numbers of src/joystick/controller_list.h (SPEC §28.1).
Package gamepaddb implements the `glutter-gen gamepaddb` subcommand, which turns the two tables of gamepads in SDL 3 into Go: the mapping lines of src/joystick/SDL_gamepad_db.h and the vendor and product numbers of src/joystick/controller_list.h (SPEC §28.1).
glutter-gen/internal/icons
Package icons implements the `glutter-gen icons` subcommand, which generates the Material icon constants and, with -cupertino, the CupertinoIcons.
Package icons implements the `glutter-gen icons` subcommand, which generates the Material icon constants and, with -cupertino, the CupertinoIcons.
glutter-gen/internal/keys
Package keys implements the `glutter-gen keys` subcommand, which generates the key tables (XKB keycode to Flutter key ids).
Package keys implements the `glutter-gen keys` subcommand, which generates the key tables (XKB keycode to Flutter key ids).
glutter-gen/internal/reexport
Package reexport implements the `glutter-gen reexport` subcommand, which generates the wrappers that re-export package widgets from package material.
Package reexport implements the `glutter-gen reexport` subcommand, which generates the wrappers that re-export package widgets from package material.
glutter-gen/internal/shaders
Package shaders implements the `glutter-gen shaders` subcommand: it compiles the WGSL shaders of the explicit renderer to SPIR-V and to HLSL (shader model 5.1) with naga, and writes the Go file that holds them (D20, D25).
Package shaders implements the `glutter-gen shaders` subcommand: it compiles the WGSL shaders of the explicit renderer to SPIR-V and to HLSL (shader model 5.1) with naga, and writes the Go file that holds them (D20, D25).
glutter-gen/internal/uintptrcheck
Package uintptrcheck implements the `glutter-gen uintptrcheck` subcommand, which reads the Windows code and reports a Go pointer that is turned into a uintptr anywhere but in the argument list of a call that keeps it alive (SPEC §25.2).
Package uintptrcheck implements the `glutter-gen uintptrcheck` subcommand, which reads the Windows code and reports a Go pointer that is turned into a uintptr anywhere but in the argument list of a call that keeps it alive (SPEC §25.2).
glutter-gen/internal/wayland
Package wayland implements the `glutter-gen wayland` subcommand: it reads the Wayland protocol XML files and writes the Go bindings, one *_gen.go file per protocol, for package wl.
Package wayland implements the `glutter-gen wayland` subcommand: it reads the Wayland protocol XML files and writes the Go bindings, one *_gen.go file per protocol, for package wl.
glutter-ios command
Command glutter-ios builds, installs, runs and takes the frames of Glutter apps for iOS (SPEC §30.1): `build` makes the .app bundle (for the Simulator with -sim, or for a device with -team and -profile), `run` installs it on a Simulator device and streams its console, and `shot` saves a picture of the app (proof method H).
Command glutter-ios builds, installs, runs and takes the frames of Glutter apps for iOS (SPEC §30.1): `build` makes the .app bundle (for the Simulator with -sim, or for a device with -team and -profile), `run` installs it on a Simulator device and streams its console, and `shot` saves a picture of the app (proof method H).
glutter-macos command
Command glutter-macos builds, runs, takes screenshots of and measures Glutter apps on macOS (SPEC §29.1), as glutter-windows does for Windows: `build` makes the signed app bundle (the Info.plist, the .icns icon, a universal executable with -universal, ad-hoc signing, the hardened runtime with -hardened), `run` builds it and starts it with the log on the terminal, `shot` runs the app with GLUTTER_SCREENSHOT so that it saves its own first settled frame (proof method G, SPEC §29.13: no screen recording permission), and `perf` measures the size, the start, the idle CPU, the memory and the frames as SPEC §15 says.
Command glutter-macos builds, runs, takes screenshots of and measures Glutter apps on macOS (SPEC §29.1), as glutter-windows does for Windows: `build` makes the signed app bundle (the Info.plist, the .icns icon, a universal executable with -universal, ad-hoc signing, the hardened runtime with -hardened), `run` builds it and starts it with the log on the terminal, `shot` runs the app with GLUTTER_SCREENSHOT so that it saves its own first settled frame (proof method G, SPEC §29.13: no screen recording permission), and `perf` measures the size, the start, the idle CPU, the memory and the frames as SPEC §15 says.
glutter-proof command
Command glutter-proof renders a proof scene with the software renderer and saves it as a PNG, as proof that a step of docs/IMPLEMENTATION.md works.
Command glutter-proof renders a proof scene with the software renderer and saves it as a PNG, as proof that a step of docs/IMPLEMENTATION.md works.
glutter-web command
Command glutter-web builds, serves and screenshots Glutter apps for the web (SPEC §23.1, §23.8):
Command glutter-web builds, serves and screenshots Glutter apps for the web (SPEC §23.1, §23.8):
glutter-windows command
Command glutter-windows builds, runs and takes screenshots of Glutter apps for Windows (SPEC §25.1):
Command glutter-windows builds, runs and takes screenshots of Glutter apps for Windows (SPEC §25.1):
Package cupertino implements the Cupertino widgets: Flutter's cupertino library, the look of iOS and macOS.
Package cupertino implements the Cupertino widgets: Flutter's cupertino library, the look of iOS and macOS.
fonts
Package fonts holds the font that the cupertino package bundles: CupertinoIcons, the font of the cupertino_icons package (version 2.0.0, MIT license).
Package fonts holds the font that the cupertino package bundles: CupertinoIcons, the font of the cupertino_icons package (version 2.0.0, MIT license).
Package desktop holds the desktop services that Flutter leaves to plugins: the system tray, notifications, file dialogs and opening URIs.
Package desktop holds the desktop services that Flutter leaves to plugins: the system tray, notifications, file dialogs and opening URIs.
Package examples is the parent of the runnable examples.
Package examples is the parent of the runnable examples.
animations command
Command animations shows four animations in four labelled tiles: an AnimatedContainer that changes size, color and corner radius when tapped, a Pulse (a ScaleTransition driven by a repeating controller), an AnimatedSwitcher that cycles a counter, and a TweenAnimationBuilder that turns a plus sign.
Command animations shows four animations in four labelled tiles: an AnimatedContainer that changes size, color and corner radius when tapped, a Pulse (a ScaleTransition driven by a repeating controller), an AnimatedSwitcher that cycles a counter, and a TweenAnimationBuilder that turns a plus sign.
cad command
Command cad shows the 3D work of Glutter 1.10 together (SPEC §27): a part in a viewport3d.View that the mouse and the touch orbit, pan and zoom, with a grid, the axes and the view cube; the four display modes (shaded, shaded with edges, wireframe and hidden line); a section plane that a slider moves, with its cap and the outline of the cut; a pick that shows the item, the triangle, the point of the world and the normal in a side panel; and a distance measured between two picks, drawn as a dimension line with an Anchored label.
Command cad shows the 3D work of Glutter 1.10 together (SPEC §27): a part in a viewport3d.View that the mouse and the touch orbit, pan and zoom, with a grid, the axes and the view cube; the four display modes (shaded, shaded with edges, wireframe and hidden line); a section plane that a slider moves, with its cap and the outline of the cut; a pick that shows the item, the triangle, the point of the world and the normal in a side panel; and a distance measured between two picks, drawn as a dimension line with an Anchored label.
counter command
Command counter is the reference example of the SPEC (§12.12): a Material 3 app with an app bar, a counter and a floating action button that adds one.
Command counter is the reference example of the SPEC (§12.12): a Material 3 app with an app bar, a counter and a floating action button that adds one.
cupertino command
Command cupertino is the example of the Cupertino library (SPEC §31): an iOS styled app with a list of pages that push a page (with the parallax slide and the back swipe of iOS), present a sheet (that is dragged down to dismiss it) and show a modal popup.
Command cupertino is the example of the Cupertino library (SPEC §31): an iOS styled app with a list of pages that push a page (with the parallax slide and the back swipe of iOS), present a sheet (that is dragged down to dismiss it) and show a modal popup.
custompaint command
Command custompaint shows CustomPaint with a custom painter: an analog clock with a gradient face, a shadow, minute and hour ticks and three hands.
Command custompaint shows CustomPaint with a custom painter: an analog clock with a gradient face, a shadow, minute and hour ticks and three hands.
dev/android-a11y command
Command android-a11y is a development example (step 25.11): a Material page with a button, a text field, a list and a live region, which logs what happens to each (the button's count, the list's scroll offset, the text field's text), so that the device tests can drive it with accessibility actions as TalkBack does (the dev events script's a11y: events), read the nodes the system sees (uiautomator) and check the events that are sent.
Command android-a11y is a development example (step 25.11): a Material page with a button, a text field, a list and a live region, which logs what happens to each (the button's count, the list's scroll offset, the text field's text), so that the device tests can drive it with accessibility actions as TalkBack does (the dev events script's a11y: events), read the nodes the system sees (uiautomator) and check the events that are sent.
dev/android-audio command
Command android-audio is a development example (step 31.6): a Material page that plays a 440 Hz tone through the public audio package and, besides, through a device of the platform's own (to read the AAudio stream's timestamp, which the public package does not show), and logs what the audio does twice a second.
Command android-audio is a development example (step 31.6): a Material page that plays a 440 Hz tone through the public audio package and, besides, through a device of the platform's own (to read the AAudio stream's timestamp, which the public package does not show), and logs what the audio does twice a second.
dev/android-back command
Command android-back is a development example (step 25.9): an app of three pages that logs what the framework hears of the activity's life and of the back button and the back gesture, so that the device tests can send the app Home, press Back and swipe back, and read what happened.
Command android-back is a development example (step 25.9): an app of three pages that logs what the framework hears of the activity's life and of the back button and the back gesture, so that the device tests can send the app Home, press Back and swipe back, and read what happened.
dev/android-fonts command
Command android-fonts is a development example (step 25.10): a Material page with a line of text in each of several scripts (Latin, Greek, Cyrillic, Arabic, Hebrew, Devanagari, Thai, Chinese, Japanese, Korean and emoji) in the system's fonts.
Command android-fonts is a development example (step 25.10): a Material page with a line of text in each of several scripts (Latin, Greek, Cyrillic, Arabic, Hebrew, Devanagari, Thai, Chinese, Japanese, Korean and emoji) in the system's fonts.
dev/android-gamepad command
Command android-gamepad is a development example (step 31.2): a Material page with two buttons, the first one focused, that log each time they are activated, and a listener for the gamepads that logs each pad's buttons.
Command android-gamepad is a development example (step 31.2): a Material page with two buttons, the first one focused, that log each time they are activated, and a listener for the gamepads that logs each pad's buttons.
dev/android-hello command
Command android-hello is a development example (step 25.2): it shows that a Glutter program starts on Android.
Command android-hello is a development example (step 25.2): it shows that a Glutter program starts on Android.
dev/android-input command
Command android-input is a development example (step 25.6): a Material page whose Shortcuts handle the keys Back and K, so that the device tests can tell a key that a widget handled (it is taken, and logs "shortcut ran") from one that nothing handled (Android gets it again, and Back closes the activity).
Command android-input is a development example (step 25.6): a Material page whose Shortcuts handle the keys Back and K, so that the device tests can tell a key that a widget handled (it is taken, and logs "shortcut ran") from one that nothing handled (Android gets it again, and Back closes the activity).
dev/android-parity command
Command android-parity is the parity program of the Android device tests (step 25.4); see main.go.
Command android-parity is the parity program of the Android device tests (step 25.4); see main.go.
dev/android-scenes command
Command android-scenes is the program of the Android device test of the explicit device (step 30.1); see main.go.
Command android-scenes is the program of the Android device test of the explicit device (step 30.1); see main.go.
dev/android-sensors command
Command android-sensors is a development example (step 31.7): a Material page that opens the accelerometer and the gyroscope through package sensors, shows their latest readings, and logs them twice a second.
Command android-sensors is a development example (step 31.7): a Material page that opens the accelerometer and the gyroscope through package sensors, shows their latest readings, and logs them twice a second.
dev/android-services command
Command android-services is a development example (step 25.12): a Material page with buttons that open a URI and post a notification with an action button, and log what the desktop services answer, so that the device tests can start the actions without taps, read the results and check the notification in dumpsys.
Command android-services is a development example (step 25.12): a Material page with buttons that open a URI and post a notification with an action button, and log what the desktop services answer, so that the device tests can start the actions without taps, read the results and check the notification in dumpsys.
dev/android-spell command
Command android-spell is a development example (step 26.4): a Material page with one text field whose spell check is on, and that logs what the spell checker answers, so that the device tests can type a misspelled word with the dev events and read the result.
Command android-spell is a development example (step 26.4): a Material page with one text field whose spell check is on, and that logs what the spell checker answers, so that the device tests can type a misspelled word with the dev events and read the result.
dev/android-system command
Command android-system is a development example (step 25.7): a Material page that logs what the framework knows of the system on every build (the insets, the brightness, the text scale, the clock, the animations, the accessibility settings), and does what the variable GLUTTER_DEMO asks of the system's interface once it has started, so that the device tests can see the effect.
Command android-system is a development example (step 25.7): a Material page that logs what the framework knows of the system on every build (the insets, the brightness, the text scale, the clock, the animations, the accessibility settings), and does what the variable GLUTTER_DEMO asks of the system's interface once it has started, so that the device tests can see the effect.
dev/android-text command
Command android-text is a development example (step 25.8): a Material page with a single line text field, a password field and a multiline field, which logs what the framework hears of each (the changes, the action of the keyboard, the keyboard's height) so that the device tests can type into them with the dev events, read the clipboard and check the keyboard.
Command android-text is a development example (step 25.8): a Material page with a single line text field, a password field and a multiline field, which logs what the framework hears of each (the changes, the action of the keyboard, the keyboard's height) so that the device tests can type into them with the dev events, read the clipboard and check the keyboard.
dev/android-viewport3d command
Command android-viewport3d is the program of the Android device test of the 3D view (step 30.9); see main.go.
Command android-viewport3d is the program of the Android device test of the 3D view (step 30.9); see main.go.
dev/canvas-tour command
Command canvas-tour opens a 640x480 window that shows the proof scenes of milestones 2 to 4 (shapes, gradients, blend modes, effects, text), one per page, drawn by the GPU renderer, and a last page, size-grid, that depends on the size of the window: a grid of lines one pixel wide, which shows whether the buffer is as sharp as the screen (on a display with a fractional scale it must be, step 3.7).
Command canvas-tour opens a 640x480 window that shows the proof scenes of milestones 2 to 4 (shapes, gradients, blend modes, effects, text), one per page, drawn by the GPU renderer, and a last page, size-grid, that depends on the size of the window: a grid of lines one pixel wide, which shows whether the buffer is as sharp as the screen (on a display with a fractional scale it must be, step 3.7).
dev/input command
Command input opens a 640x400 window that logs every key and pointer event (with slog) and changes the mouse cursor: a text cursor over the left half of the window, a pointing hand over the right half.
Command input opens a 640x400 window that logs every key and pointer event (with slog) and changes the mouse cursor: a text cursor over the left half of the window, a pointing hand over the right half.
dev/pad-hid command
Command pad-hid is a development example (step 31.3) for the HID drivers of the gamepads: for each pad it shows the name, the kind, the battery, the touchpad fingers and the gyroscope and accelerometer, and it has buttons for the light bar, the motors and the motors of the triggers.
Command pad-hid is a development example (step 31.3) for the HID drivers of the gamepads: for each pad it shows the name, the kind, the battery, the touchpad fingers and the gyroscope and accelerometer, and it has buttons for the light bar, the motors and the motors of the triggers.
dev/runapp command
Command runapp is a development example (step 7.4): it runs the widgets binding with widgets.RunApp and shows a render tree made of widgets, to check the whole path from RunApp to the window.
Command runapp is a development example (step 7.4): it runs the widgets binding with widgets.RunApp and shows a render tree made of widgets, to check the whole path from RunApp to the window.
dev/sash command
Command sash is the manual check of step 27.7 (the cursor of a pressed pointer): a split view whose sash keeps the resize cursor while the mouse button is held, whatever the mouse moves over.
Command sash is the manual check of step 27.7 (the cursor of a pressed pointer): a split view whose sash keeps the resize cursor while the mouse button is held, whatever the mouse moves over.
dev/text-tour command
Command text-tour opens a 640x480 window that shows the text proof (the text-tour scene of internal/proof) drawn by the GPU renderer: Latin text in several sizes, weights and styles, Arabic and Hebrew, CJK, color emoji, every decoration style, shadows, an ellipsized paragraph and a justified one.
Command text-tour opens a 640x480 window that shows the text proof (the text-tour scene of internal/proof) drawn by the GPU renderer: Latin text in several sizes, weights and styles, Arabic and Hebrew, CJK, color emoji, every decoration style, shadows, an ellipsized paragraph and a justified one.
dev/viewport3d-modes command
Command viewport3d-modes is a development example (step 30.9): one part (a box, a cylinder and a sphere) in the four display modes of package viewport3d (shaded, shaded with edges, wireframe and hidden line), side by side, each in a viewport3d.View that the mouse and the touch orbit, pan and zoom.
Command viewport3d-modes is a development example (step 30.9): one part (a box, a cylinder and a sphere) in the four display modes of package viewport3d (shaded, shaded with edges, wireframe and hidden line), side by side, each in a viewport3d.View that the mouse and the touch orbit, pan and zoom.
dev/viewport3d-section command
Command viewport3d-section is a development example (step 30.10): a part (a box, a cylinder and a sphere) cut by a section plane, with its cap and the outline of the cut, in a viewport3d.View that the mouse and the touch orbit, pan and zoom.
Command viewport3d-section is a development example (step 30.10): a part (a box, a cylinder and a sphere) cut by a section plane, with its cap and the outline of the cut, in a viewport3d.View that the mouse and the touch orbit, pan and zoom.
dev/window command
Command window opens a 640x400 window (Wayland or X11) titled "Glutter dev window" and fills it with #6750A4 using OpenGL ES, drawing a new frame each time the compositor asks for one.
Command window opens a 640x400 window (Wayland or X11) titled "Glutter dev window" and fills it with #6750A4 using OpenGL ES, drawing a new frame each time the compositor asks for one.
editor command
Command editor is a small text editor on a WidgetsApp, without Material.
Command editor is a small text editor on a WidgetsApp, without Material.
gallery command
Command gallery shows the Material components of Glutter, one page for each group of them, with a side list to choose the page and a toggle between the light and the dark theme.
Command gallery shows the Material components of Glutter, one page for each group of them, with a side list to choose the page and a toggle between the light and the dark theme.
game3d command
Command game3d is a small 3D game that uses the games work of Glutter 1.10 and 1.11 together (SPEC §27, §28): Coin Run.
Command game3d is a small 3D game that uses the games work of Glutter 1.10 and 1.11 together (SPEC §27, §28): Coin Run.
game3d/internal/genassets command
Command genassets writes the assets of examples/game3d: the character and the level as glTF binary files (.glb) and the music and the sound effects as WAV files.
Command genassets writes the assets of examples/game3d: the character and the level as glTF binary files (.glb) and the music and the sound effects as WAV files.
gpu-triangle command
Command gpu-triangle shows package gpu: a lit cube that turns, drawn by the program's own shader into a gpu.View with a depth buffer and 4x multisampling, inside a Material page.
Command gpu-triangle shows package gpu: a lit cube that turns, drawn by the program's own shader into a gpu.View with a depth buffer and 4x multisampling, inside a Material page.
layout command
Command layout shows the layout widgets of Glutter in five labelled sections: a Row with Expanded and Flexible children, a Column for each MainAxisAlignment, a Stack with a Positioned badge, a Wrap of twelve colored tags and a Table.
Command layout shows the layout widgets of Glutter in five labelled sections: a Row with Expanded and Flexible children, a Column for each MainAxisAlignment, a Stack with a Positioned badge, a Wrap of twelve colored tags and a Table.
multiwindow command
Command multiwindow shows several windows.
Command multiwindow shows several windows.
navigation command
Command navigation shows the navigation of Glutter on a WidgetsApp, without Material.
Command navigation shows the navigation of Glutter on a WidgetsApp, without Material.
scrolling command
Command scrolling shows the scroll views of Glutter in seven tabs: a ListView with 10,000 rows, a GridView of colored tiles, a CustomScrollView with a pinned header, a list and a grid, a PageView of three pages, a ReorderableList, a TreeSliver (a file tree whose folders expand and collapse) and a Material ReorderableListView (with its drag handles).
Command scrolling shows the scroll views of Glutter in seven tabs: a ListView with 10,000 rows, a GridView of colored tiles, a CustomScrollView with a pinned header, a list and a grid, a PageView of three pages, a ReorderableList, a TreeSliver (a file tree whose folders expand and collapse) and a Material ReorderableListView (with its drag handles).
svg command
Command svg shows the SVG pictures of package svg (the widgets of flutter_svg).
Command svg shows the SVG pictures of package svg (the widgets of flutter_svg).
todo command
Command todo is a to-do list in a table.
Command todo is a to-do list in a table.
tray command
Command tray is a small note-taking window that lives in the system tray.
Command tray is a small note-taking window that lives in the system tray.
Package foundation holds the basic building blocks of the framework: Key, Opt[T], ChangeNotifier, TargetPlatform, diagnostics and debug flags.
Package foundation holds the basic building blocks of the framework: Key, Opt[T], ChangeNotifier, TargetPlatform, diagnostics and debug flags.
Package gamepad reads game controllers: which pads are connected, the buttons and axes of each in one standard layout (SPEC §28.2), their kind (Xbox, PlayStation, Switch, ...), and rumble and lights where the platform has them.
Package gamepad reads game controllers: which pads are connected, the buttons and axes of each in one standard layout (SPEC §28.2), their kind (Xbox, PlayStation, Switch, ...), and rumble and lights where the platform has them.
Package gestures turns pointer events into gestures: hit testing, the gesture arena and the recognizers.
Package gestures turns pointer events into gestures: hit testing, the gesture arena and the recognizers.
Package gluttertest is the widget-testing package: WidgetTester, finders and golden comparison, driven by a fake clock and a fake platform.
Package gluttertest is the widget-testing package: WidgetTester, finders and golden comparison, driven by a fake clock and a fake platform.
Package gpu is the public GPU API of Glutter (SPEC §27.2): buffers, textures, samplers, WGSL shaders, render and compute pipelines, command encoders and readback over the device of the explicit renderer.
Package gpu is the public GPU API of Glutter (SPEC §27.2): buffers, textures, samplers, WGSL shaders, render and compute pipelines, command encoders and readback over the device of the explicit renderer.
internal
androidtest
Package androidtest is the harness of the device tests (SPEC §24.13): it creates the virtual devices of the emulator in .android-test/ at the module root, starts one headless in a process group of its own under `timeout -k`, with its own adb server and its own HOME so that nothing of the user's ~/.android is read or written, waits for it to boot, and stops it (and the adb server) afterwards.
Package androidtest is the harness of the device tests (SPEC §24.13): it creates the virtual devices of the emulator in .android-test/ at the module root, starts one headless in a process group of its own under `timeout -k`, with its own adb server and its own HOME so that nothing of the user's ~/.android is read or written, waits for it to boot, and stops it (and the adb server) afterwards.
androidtool
Package androidtool builds, installs and signs Android apps for glutter-android (SPEC §24.1): it finds the SDK and the NDK, generates the manifest, runs the Go toolchain once per ABI, links the resources with aapt2, packs the APK with the embedding's classes.dex, aligns and signs it.
Package androidtool builds, installs and signs Android apps for glutter-android (SPEC §24.1): it finds the SDK and the NDK, generates the manifest, runs the Go toolchain once per ABI, links the resources with aapt2, packs the APK with the embedding's classes.dex, aligns and signs it.
audiocvt
Package audiocvt converts and mixes audio samples (SPEC §28.3): the conversion between sample types, the mixing between channel layouts, the resampler and the converter that a stream of package audio uses.
Package audiocvt converts and mixes audio samples (SPEC §28.3): the conversion between sample types, the mixing between channel layouts, the resampler and the converter that a stream of package audio uses.
dartfmt
Package dartfmt formats numbers the way Dart's toString and toStringAsFixed do, so that text printed by ported Flutter code (diagnostics, dumps) reads the same.
Package dartfmt formats numbers the way Dart's toString and toStringAsFixed do, so that text printed by ported Flutter code (diagnostics, dumps) reads the same.
dbus
Package dbus holds the D-Bus services, in pure Go on godbus: tray, notifications, portals, settings and AT-SPI2.
Package dbus holds the D-Bus services, in pure Go on godbus: tray, notifications, portals, settings and AT-SPI2.
dbus/atspi
Package atspi is the accessibility bridge for Linux desktops (SPEC §8.10): it mirrors the framework's semantics tree as AT-SPI2 objects on the accessibility bus, so that screen readers such as Orca can read the app and act on it.
Package atspi is the accessibility bridge for Linux desktops (SPEC §8.10): it mirrors the framework's semantics tree as AT-SPI2 objects on the accessibility bus, so that screen readers such as Orca can read the app and act on it.
dbus/fakebus
Package fakebus is an in-process D-Bus for tests (SPEC §17).
Package fakebus is an in-process D-Bus for tests (SPEC §17).
engine
Package engine wires the platform, the renderer and the text layout into the contracts of package ui, and owns the run loop.
Package engine wires the platform, the renderer and the text layout into the contracts of package ui, and owns the run loop.
fakeclock
Package fakeclock is a clock that a test moves by hand, so that timers and frame times in tests need no sleeping.
Package fakeclock is a clock that a test moves by hand, so that timers and frame times in tests need no sleeping.
gamepaddb
Package gamepaddb is the model of a pad that SPEC §28.1 ports from SDL 3 (zlib; see third_party/sdl/LICENSE): the identity of a pad (its GUID, its name and its kind), the mapping format that says which button or axis of a pad is which button or axis of the standard layout, SDL's built-in table of mappings (mappings_gen.go, made by glutter-gen gamepaddb), and the two layers that turn the raw reports of a pad into the buttons and axes of the layout.
Package gamepaddb is the model of a pad that SPEC §28.1 ports from SDL 3 (zlib; see third_party/sdl/LICENSE): the identity of a pad (its GUID, its name and its kind), the mapping format that says which button or axis of a pad is which button or axis of the standard layout, SDL's built-in table of mappings (mappings_gen.go, made by glutter-gen gamepaddb), and the two layers that turn the raw reports of a pad into the buttons and axes of the layout.
gamepadhid
Package gamepadhid holds the HID drivers of the pads that report more through HID than the system's own driver shows: the PlayStation 4 and 5 pads, the Nintendo Switch Pro controller and the Xbox One and Series pads over Bluetooth (SPEC §28.1, §28.2).
Package gamepadhid holds the HID drivers of the pads that report more through HID than the system's own driver shows: the PlayStation 4 and 5 pads, the Nintendo Switch Pro controller and the Xbox One and Series pads over Bluetooth (SPEC §28.1, §28.2).
goid
Package goid tells goroutines apart.
Package goid tells goroutines apart.
goldens
Package goldens compares rendered images with the golden PNGs of a package's tests.
Package goldens compares rendered images with the golden PNGs of a package's tests.
gpu
Package gpu defines the Renderer interface, flattens a ui.Scene into draw commands, and holds the glyph and path atlases shared by the renderers.
Package gpu defines the Renderer interface, flattens a ui.Scene into draw commands, and holds the glyph and path atlases shared by the renderers.
gpu/canvas2d
Package canvas2d is the last renderer of the web (SPEC §9.6): it draws each frame with the software renderer (internal/gpu/soft) and puts the image into the page's 2D canvas with putImageData, so that an app shows even where neither WebGPU nor WebGL 2 works.
Package canvas2d is the last renderer of the web (SPEC §9.6): it draws each frame with the software renderer (internal/gpu/soft) and puts the image into the page's 2D canvas with putImageData, so that an app shows even where neither WebGPU nor WebGL 2 works.
gpu/d3d12
Package d3d12 is the Direct3D 12 backend of the explicit renderer (D25, SPEC §9.8): the third explicit.Device, after vulkan and webgpu, for Windows.
Package d3d12 is the Direct3D 12 backend of the explicit renderer (D25, SPEC §9.8): the third explicit.Device, after vulkan and webgpu, for Windows.
gpu/d3d12/hlslcheck command
Command hlslcheck compiles the HLSL of generated shaders with D3DCompile (SPEC §27.3).
Command hlslcheck compiles the HLSL of generated shaders with D3DCompile (SPEC §27.3).
gpu/explicit
Package explicit is the renderer for the explicit GPU APIs, Vulkan and WebGPU (D19): the Device interface that both implement, the design limits they share (SPEC §9.3), and the WGSL shaders with the SPIR-V that glutter-gen makes from them (D20).
Package explicit is the renderer for the explicit GPU APIs, Vulkan and WebGPU (D19): the Device interface that both implement, the design limits they share (SPEC §9.3), and the WGSL shaders with the SPIR-V that glutter-gen makes from them (D20).
gpu/explicit/devicetest
Package devicetest holds the scenes that every backend of the explicit device runs (SPEC §27.12): Vulkan on lavapipe, Direct3D 12 under Wine, WebGPU in Chromium and the fake device.
Package devicetest holds the scenes that every backend of the explicit device runs (SPEC §27.12): Vulkan on lavapipe, Direct3D 12 under Wine, WebGPU in Chromium and the fake device.
gpu/explicit/devicetest/gotest
Package gotest adapts *testing.T to devicetest.T. It imports testing, so only tests import it.
Package gotest adapts *testing.T to devicetest.T. It imports testing, so only tests import it.
gpu/explicit/fakedevice
Package fakedevice is an explicit.Device that records every call, for the unit tests of the explicit renderer without a GPU.
Package fakedevice is an explicit.Device that records every call, for the unit tests of the explicit renderer without a GPU.
gpu/gdiwindow
Package gdiwindow is the last-resort renderer of Windows (SPEC §25.5): the software renderer (package soft) draws the frame, and a Presenter puts the image into the window with GDI, StretchDIBits at 1:1 from a top-down 32-bit DIB, into the window's device context, one call for each damaged rectangle.
Package gdiwindow is the last-resort renderer of Windows (SPEC §25.5): the software renderer (package soft) draws the frame, and a Presenter puts the image into the window with GDI, StretchDIBits at 1:1 from a top-down 32-bit DIB, into the window's device context, one call for each damaged rectangle.
gpu/gles
Package gles is the OpenGL ES 3.0 renderer.
Package gles is the OpenGL ES 3.0 renderer.
gpu/gles/glwebtest command
Command glwebtest is the program of the browser tests of the WebGL 2 renderer (step 21.4, SPEC §9.1, §17).
Command glwebtest is the program of the browser tests of the WebGL 2 renderer (step 21.4, SPEC §9.1, §17).
gpu/gputest
Package gputest has what the display tests of the GPU renderers share: the scenes the renderers are compared on, the comparison with the software renderer's image, and its tolerance.
Package gputest has what the display tests of the GPU renderers share: the scenes the renderers are compared on, the comparison with the software renderer's image, and its tolerance.
gpu/gputest/editorscene
Package editorscene makes the scenes of a frame in which only the caret of a text editor blinks, for the allocation tests and benchmarks of the renderers (SPEC §15, step 29.15).
Package editorscene makes the scenes of a frame in which only the caret of a text editor blinks, for the allocation tests and benchmarks of the renderers (SPEC §15, step 29.15).
gpu/metal
Package metal is the Metal backend of the explicit renderer (D33, SPEC §29.5): the fourth explicit.Device, after vulkan, webgpu and d3d12, for macOS.
Package metal is the Metal backend of the explicit renderer (D33, SPEC §29.5): the fourth explicit.Device, after vulkan, webgpu and d3d12, for macOS.
gpu/nativewindow
Package nativewindow is the last-resort renderer of Android (SPEC §24.4): the software renderer (package soft) draws the frame, and it is copied into the CPU buffers of the window's ANativeWindow (setBuffersGeometry, lock, unlockAndPost, loaded from libandroid.so through purego).
Package nativewindow is the last-resort renderer of Android (SPEC §24.4): the software renderer (package soft) draws the frame, and it is copied into the CPU buffers of the window's ANativeWindow (setBuffersGeometry, lock, unlockAndPost, loaded from libandroid.so through purego).
gpu/shadercache
Package shadercache keeps what the GPU drivers compile for Glutter between runs: the binaries of the OpenGL ES programs and the pipeline cache of Vulkan (SPEC §9.7).
Package shadercache keeps what the GPU drivers compile for Glutter between runs: the binaries of the OpenGL ES programs and the pipeline cache of Vulkan (SPEC §9.7).
gpu/shmwindow
Package shmwindow is the renderer of a Linux window without a GPU (SPEC §9.6): the software renderer (package soft) draws the frame into memory that a gpu.PixelTarget gives, and the window shows it, through wl_shm on Wayland.
Package shmwindow is the renderer of a Linux window without a GPU (SPEC §9.6): the software renderer (package soft) draws the frame into memory that a gpu.PixelTarget gives, and the window shows it, through wl_shm on Wayland.
gpu/soft
Package soft is the pure-Go software rasterizer, used for golden tests and headless rendering.
Package soft is the pure-Go software rasterizer, used for golden tests and headless rendering.
gpu/textdraw
Package textdraw turns the drawing of a paragraph into ordinary drawing operations, for the renderers: each glyph is a path, drawn with its origin on a quarter of a pixel horizontally and on a pixel vertically, so that the coverage of a glyph at a size can be cached for the four subpixel positions (SPEC §9.1).
Package textdraw turns the drawing of a paragraph into ordinary drawing operations, for the renderers: each glyph is a path, drawn with its origin on a quarter of a pixel horizontally and on a pixel vertically, so that the coverage of a glyph at a size can be cached for the four subpixel positions (SPEC §9.1).
gpu/vulkan
Package vulkan is the Vulkan backend of the explicit renderer (SPEC §9.4): it loads libvulkan.so.1 through purego and implements explicit.Device on it.
Package vulkan is the Vulkan backend of the explicit renderer (SPEC §9.4): it loads libvulkan.so.1 through purego and implements explicit.Device on it.
gpu/webgpu
Package webgpu is the WebGPU backend of the explicit renderer (SPEC §9.5): an explicit.Device over navigator.gpu, through syscall/js, so that internal/gpu/explicit draws on the web the way it draws on Vulkan.
Package webgpu is the WebGPU backend of the explicit renderer (SPEC §9.5): an explicit.Device over navigator.gpu, through syscall/js, so that internal/gpu/explicit draws on the web the way it draws on Vulkan.
gpu/webgpu/gpuwebtest command
Command gpuwebtest is the program of the browser tests of the WebGPU renderer (step 21.5, SPEC §9.5, §17).
Command gpuwebtest is the program of the browser tests of the WebGPU renderer (step 21.5, SPEC §9.5, §17).
gpuhost
Package gpuhost is an explicit.DeviceHost for tests: it holds the device that a test gives it, tells the watchers when the device is opened, lost or closed, and keeps the log that package gpu writes.
Package gpuhost is an explicit.DeviceHost for tests: it holds the device that a test gives it, tells the watchers when the device is opened, lost or closed, and keeps the log that package gpu writes.
iostest
Package iostest is the harness of the iOS Simulator tests (SPEC §30.11): it keeps a device set of its own in `.ios-test/devices` at the root of the module (git-ignored, made with `xcrun simctl --set`), makes an iPhone and an iPad of the newest installed runtime on first use, boots them, installs and launches apps, reads their console and screenshots, and shuts everything down when the test ends.
Package iostest is the harness of the iOS Simulator tests (SPEC §30.11): it keeps a device set of its own in `.ios-test/devices` at the root of the module (git-ignored, made with `xcrun simctl --set`), makes an iPhone and an iPad of the newest installed runtime on first use, boots them, installs and launches apps, reads their console and screenshots, and shuts everything down when the test ends.
iostest/behaviorapp command
Command behaviorapp is the app of the framework-behavior tests of step 35.9: a Cupertino app that shows one thing in the mode that the environment names, and prints a line when it happens, so that the Simulator test reads it:
Command behaviorapp is the app of the framework-behavior tests of step 35.9: a Cupertino app that shows one thing in the mode that the environment names, and prints a line when it happens, so that the Simulator test reads it:
iostest/behaviorlines
Package behaviorlines holds the lines that the app of the framework-behavior tests (internal/iostest/behaviorapp) prints and the tests read.
Package behaviorlines holds the lines that the app of the framework-behavior tests (internal/iostest/behaviorapp) prints and the tests read.
iostest/fieldapp command
Command fieldapp is the app of the text input tests of step 35.5: a text field that takes the focus and prints a line with its text each time it changes, so that the Simulator test reads what the framework's field got from the text input (UITextInput) of the script.
Command fieldapp is the app of the text input tests of step 35.5: a text field that takes the focus and prints a line with its text each time it changes, so that the Simulator test reads what the framework's field got from the text input (UITextInput) of the script.
iostest/hello command
Command hello is the app of the Simulator tests of step 35.1: it starts UIKit through package ios and prints a line when the app has launched and a line when the scene has connected, so that the test sees them in the console of the app.
Command hello is the app of the Simulator tests of step 35.1: it starts UIKit through package ios and prints a line when the app has launched and a line when the scene has connected, so that the test sees them in the console of the app.
iostest/hellolines
Package hellolines has the lines that the app of the Simulator tests prints, which the test looks for.
Package hellolines has the lines that the app of the Simulator tests prints, which the test looks for.
iostest/inputapp command
Command inputapp is the app of the input tests of step 35.4: a view that takes the focus and prints a line for each tap, each pan and each key event, so that the Simulator test reads what the framework got from the touches and the keys of a script (GLUTTER_DEV_EVENTS).
Command inputapp is the app of the input tests of step 35.4: a view that takes the focus and prints a line for each tap, each pan and each key event, so that the Simulator test reads what the framework got from the touches and the keys of a script (GLUTTER_DEV_EVENTS).
iostest/inputlines
Package inputlines holds the lines that the app of the input tests (internal/iostest/inputapp) prints and the tests read, so that the two cannot drift apart.
Package inputlines holds the lines that the app of the input tests (internal/iostest/inputapp) prints and the tests read, so that the two cannot drift apart.
iostest/sceneapp command
Command sceneapp is the app of the Simulator tests of step 35.2; it runs on iOS only.
Command sceneapp is the app of the Simulator tests of step 35.2; it runs on iOS only.
iostest/scenelines
Package scenelines holds the lines that the app of the scene tests (internal/iostest/sceneapp) prints and the test reads, so that the two cannot drift apart.
Package scenelines holds the lines that the app of the scene tests (internal/iostest/sceneapp) prints and the test reads, so that the two cannot drift apart.
iostest/serviceslines
Package serviceslines holds the lines that the app of the services tests (internal/iostest/serviceapp) prints and the test reads, and the names of its steps, so that the two cannot drift apart.
Package serviceslines holds the lines that the app of the services tests (internal/iostest/serviceapp) prints and the test reads, and the names of its steps, so that the two cannot drift apart.
iostest/spinner command
Command spinner is the app of the Metal background test of step 35.3: a progress indicator that animates for ever, so that the app draws a frame on every tick of the display until it is sent to the background.
Command spinner is the app of the Metal background test of step 35.3: a progress indicator that animates for ever, so that the app draws a frame on every tick of the display until it is sent to the background.
iostool
Package iostool holds what `glutter-ios` does that does not need a Mac to be understood: the Info.plist of an iOS app, the layout of its bundle, its icons, the command lines of `simctl`, and the build of the program with the compiler of Xcode (SPEC §30.1).
Package iostool holds what `glutter-ios` does that does not need a Mac to be understood: the Info.plist of an iOS app, the layout of its bundle, its icons, the command lines of `simctl`, and the build of the program with the compiler of Xcode (SPEC §30.1).
leaktest
Package leaktest checks that a scenario does not leak memory: it runs a step many times, and compares the live heap and the goroutines after N steps and after 4N steps (SPEC §15, "Memory over time").
Package leaktest checks that a scenario does not leak memory: it runs a step many times, and compares the live heap and the goroutines after N steps and after 4N steps (SPEC §15, "Memory over time").
mactool
Package mactool builds Glutter apps for macOS, for glutter-macos (SPEC §29.1): it writes the Info.plist of an app bundle, the .icns icon from a PNG, one Mach-O file with an arm64 and an amd64 slice (what `lipo` makes), the bundle's directories, and signs the bundle ad hoc with /usr/bin/codesign.
Package mactool builds Glutter apps for macOS, for glutter-macos (SPEC §29.1): it writes the Info.plist of an app bundle, the .icns icon from a PNG, one Mach-O file with an arm64 and an amd64 slice (what `lipo` makes), the bundle's directories, and signs the bundle ad hoc with /usr/bin/codesign.
meshopt
Package meshopt decodes the data of EXT_meshopt_compression (SPEC §28.5): the vertex buffers, the index buffers and the index sequences of meshoptimizer's formats (versions 0 and 1), and its four vertex filters.
Package meshopt decodes the data of EXT_meshopt_compression (SPEC §28.5): the vertex buffers, the index buffers and the index sequences of meshoptimizer's formats (versions 0 and 1), and its four vertex filters.
opts
Package opts holds the helper behind the trailing options parameter of every constructor (SPEC §12.1).
Package opts holds the helper behind the trailing options parameter of every constructor (SPEC §12.1).
pads
Package pads is the manager of the gamepads of an app (SPEC §28.2): it takes the pads and the raw reports that a platform backend gives (internal/platform.Gamepads), finds each pad's mapping in the table (internal/gamepaddb), keeps the state of the buttons and axes of the standard layout and tells the listeners, and turns the buttons into key events.
Package pads is the manager of the gamepads of an app (SPEC §28.2): it takes the pads and the raw reports that a platform backend gives (internal/platform.Gamepads), finds each pad's mapping in the table (internal/gamepaddb), keeps the state of the buttons and axes of the standard layout and tells the listeners, and turns the buttons into key events.
perfstats
Package perfstats reads the engine's log lines that the performance tools measure with: the "first frame presented" line, the per-second "frames" statistics of GLUTTER_FRAME_STATS=1 and the key=value pairs of slog's text format.
Package perfstats reads the engine's log lines that the performance tools measure with: the "first frame presented" line, the per-second "frames" statistics of GLUTTER_FRAME_STATS=1 and the key=value pairs of slog's text format.
platform
Package platform defines the interface between the engine and an operating system backend, together with the types shared by all backends.
Package platform defines the interface between the engine and an operating system backend, together with the types shared by all backends.
platform/android
Package android is the platform backend for Android (GOOS=android, SPEC §24): the JNI entry points the Java embedding calls, the thread that runs the program's main, the log lines sent to logcat, and, from step 25.3, the looper, the surface, the input and the services.
Package android is the platform backend for Android (GOOS=android, SPEC §24): the JNI entry points the Java embedding calls, the thread that runs the program's main, the log lines sent to logcat, and, from step 25.3, the looper, the surface, the input and the services.
platform/android/aaudio
Package aaudio is the AAudio backend of the audio service on Android (SPEC §28.3, step 31.6): playback and capture of float32 frames through libaaudio.so (Android 8, API 26), called through purego, with a data callback that is made once, the low-latency performance mode, a stream that is made again when the device it was on is disconnected, and a device that pauses while the app is hidden.
Package aaudio is the AAudio backend of the audio service on Android (SPEC §28.3, step 31.6): playback and capture of float32 frames through libaaudio.so (Android 8, API 26), called through purego, with a data callback that is made once, the low-latency performance mode, a stream that is made again when the device it was on is disconnected, and a device that pauses while the app is hidden.
platform/android/asensor
Package asensor is the motion sensors backend of Android (SPEC §28.4, step 31.7): the accelerometer and the gyroscope through the sensor manager of the NDK (libandroid.so, Android 8, API 26), called through purego, with the events of every open sensor read on a looper that lives on an OS thread of its own.
Package asensor is the motion sensors backend of Android (SPEC §28.4, step 31.7): the accelerometer and the gyroscope through the sensor manager of the NDK (libandroid.so, Android 8, API 26), called through purego, with the events of every open sensor read on a looper that lives on an OS thread of its own.
platform/darwin
Package darwin holds what macOS and iOS share (SPEC §29.2): the loader of the system frameworks (dl), the Objective-C helpers (objcx), Core Foundation (cf), and the layout test helper for the Go mirrors of C structures (layouttest).
Package darwin holds what macOS and iOS share (SPEC §29.2): the loader of the system frameworks (dl), the Objective-C helpers (objcx), Core Foundation (cf), and the layout test helper for the Go mirrors of C structures (layouttest).
platform/darwin/a11ymodel
Package a11ymodel is the plain-Go model of the accessibility bridges of macOS and iOS (SPEC §29.10, §30.7): the mirror of the semantics trees of the views of the app, built from ui.SemanticsUpdate, and the changes between two trees that become notifications.
Package a11ymodel is the plain-Go model of the accessibility bridges of macOS and iOS (SPEC §29.10, §30.7): the mirror of the semantics trees of the views of the app, built from ui.SemanticsUpdate, and the changes between two trees that become notifications.
platform/darwin/cf
Package cf is the part of Core Foundation that the macOS and iOS backends use (SPEC §29.2, §29.3): strings, dictionaries, the run loop, and the version-0 run loop sources and the timers that carry Post and the timer heap of the UI thread.
Package cf is the part of Core Foundation that the macOS and iOS backends use (SPEC §29.2, §29.3): strings, dictionaries, the run loop, and the version-0 run loop sources and the timers that carry Post and the timer heap of the UI thread.
platform/darwin/coreaudio
Package coreaudio is the audio backend of macOS and iOS (SPEC §29.11, §30.10): Core Audio's AudioQueue for playback and capture, with the list of devices and its changes from the property listeners of the system object.
Package coreaudio is the audio backend of macOS and iOS (SPEC §29.11, §30.10): Core Audio's AudioQueue for playback and capture, with the list of devices and its changes from the property listeners of the system object.
platform/darwin/dl
Package dl is the one safe way to load the system frameworks of macOS and iOS and to call into them without cgo: it wraps purego's Dlopen, Dlsym and callbacks, tags every failure, and offers the libc helpers (malloc, free, C strings) that the backends share.
Package dl is the one safe way to load the system frameworks of macOS and iOS and to call into them without cgo: it wraps purego's Dlopen, Dlsym and callbacks, tags every failure, and offers the libc helpers (malloc, free, C strings) that the backends share.
platform/darwin/layouttest
Package layouttest checks the Go mirrors of C and Objective-C structures that the macOS and iOS backends pass to and get from the system (NSRect, CGPoint, CVTimeStamp, AudioStreamBasicDescription, ...) against the headers of the SDK (SPEC §29.2, §8.1 rule 3).
Package layouttest checks the Go mirrors of C and Objective-C structures that the macOS and iOS backends pass to and get from the system (NSRect, CGPoint, CVTimeStamp, AudioStreamBasicDescription, ...) against the headers of the SDK (SPEC §29.2, §8.1 rule 3).
platform/darwin/loop
Package loop has the plain-Go parts of the run loop that macOS and iOS share (SPEC §29.3, §30.2): the heap of timers that one CFRunLoopTimer is set to, the merging of the frame requests of a window, the pacer that starts and stops the display link, and the gate that offers one tick of a display link's thread at a time to the loop.
Package loop has the plain-Go parts of the run loop that macOS and iOS share (SPEC §29.3, §30.2): the heap of timers that one CFRunLoopTimer is set to, the merging of the frame requests of a window, the pacer that starts and stops the display link, and the gate that offers one tick of a display link's thread at a time to the loop.
platform/darwin/mainthread
Package mainthread runs the tests of a macOS program on the main thread: AppKit works only there (SPEC §29.3), and the Go test runner runs every test on a goroutine of its own.
Package mainthread runs the tests of a macOS program on the main thread: AppKit works only there (SPEC §29.3), and the Go test runner runs every test on a goroutine of its own.
platform/darwin/notify
Package notify is the numbering and the life of the notifications of an app on macOS and iOS (SPEC §29.9, §30.6) and, in center_darwin.go, UNUserNotificationCenter behind it.
Package notify is the numbering and the life of the notifications of an app on macOS and iOS (SPEC §29.9, §30.6) and, in center_darwin.go, UNUserNotificationCenter behind it.
platform/darwin/objcx
Package objcx is Glutter's thin layer over purego's objc package (SPEC §29.2): selectors made once, Foundation values (NSString, NSNumber, NSArray, NSURL, NSError) to and from Go, autorelease pools, blocks, and the registry of the Objective-C classes that Go implements (the app delegate, the view, the accessibility elements), whose instances find their Go object by a handle.
Package objcx is Glutter's thin layer over purego's objc package (SPEC §29.2): selectors made once, Foundation values (NSString, NSNumber, NSArray, NSURL, NSError) to and from Go, autorelease pools, blocks, and the registry of the Objective-C classes that Go implements (the app delegate, the view, the accessibility elements), whose instances find their Go object by a handle.
platform/darwin/openuri
Package openuri is the check that comes before a URI is opened on macOS and iOS (SPEC §29.9, §30.6): the part of opening that is plain Go, so that its tests run on any host.
Package openuri is the check that comes before a URI is opened on macOS and iOS (SPEC §29.9, §30.6): the part of opening that is plain Go, so that its tests run on any host.
platform/fake
Package fake is a scripted platform for tests: it replays queued events and records what the engine asks of it.
Package fake is a scripted platform for tests: it replays queued events and records what the engine asks of it.
platform/ios
Package ios is the platform of iOS (SPEC §30): UIKit through purego's objc (SPEC §29.2, the helpers of internal/platform/darwin) and, in the *_ios.go files only, the few lines of cgo that Go's iOS port needs (D35: the port links externally and purego needs cgo there, so the files that name the frameworks to link carry `import "C"`; nothing else is in C).
Package ios is the platform of iOS (SPEC §30): UIKit through purego's objc (SPEC §29.2, the helpers of internal/platform/darwin) and, in the *_ios.go files only, the few lines of cgo that Go's iOS port needs (D35: the port links externally and purego needs cgo there, so the files that name the frameworks to link carry `import "C"`; nothing else is in C).
platform/ios/a11y
Package a11y is the plain-Go part of the accessibility bridge of iOS (SPEC §30.7): what a node of the semantics tree is to UIAccessibility: whether it is an element, its label, value and hint, its traits, the actions that VoiceOver can do on it and the scroll directions that VoiceOver sends.
Package a11y is the plain-Go part of the accessibility bridge of iOS (SPEC §30.7): what a node of the semantics tree is to UIAccessibility: whether it is an element, its label, value and hint, its traits, the actions that VoiceOver can do on it and the scroll directions that VoiceOver sends.
platform/linux
Package linux holds what the Linux backends share: the event loop, the key tables, system settings and the choice between Wayland and X11.
Package linux holds what the Linux backends share: the event loop, the key tables, system settings and the choice between Wayland and X11.
platform/linux/alsa
Package alsa is the ALSA backend of the audio service on Linux (SPEC §28.3, step 31.5), for the systems where no PulseAudio (or PipeWire) server answers: playback and capture of float32 frames through libasound's PCM interface, on a goroutine of its own for each device.
Package alsa is the ALSA backend of the audio service on Linux (SPEC §28.3, step 31.5), for the systems where no PulseAudio (or PipeWire) server answers: playback and capture of float32 frames through libasound's PCM interface, on a goroutine of its own for each device.
platform/linux/dl
Package dl is the one safe way to load C libraries and call into them without cgo: it wraps purego's Dlopen, Dlsym and callbacks, tags every failure, and offers the libc helpers (malloc, free, C strings) that the backends share.
Package dl is the one safe way to load C libraries and call into them without cgo: it wraps purego's Dlopen, Dlsym and callbacks, tags every failure, and offers the libc helpers (malloc, free, C strings) that the backends share.
platform/linux/dl/layouttest
Package layouttest is the helper for the layout test that every Go mirror of a C struct needs (SPEC §8.1 rule 3).
Package layouttest is the helper for the layout test that every Go mirror of a C struct needs (SPEC §8.1 rule 3).
platform/linux/evdev
Package evdev is the gamepad backend of Linux: it finds the pads among the event devices of /dev/input, reads their buttons, axes and hats, and reports them to the pad manager (internal/pads) through platform.Gamepads.
Package evdev is the gamepad backend of Linux: it finds the pads among the event devices of /dev/input, reads their buttons, axes and hats, and reports them to the pad manager (internal/pads) through platform.Gamepads.
platform/linux/fontconfig
Package fontconfig binds libfontconfig (through purego, SPEC §8.1) to match a font family, weight, slant and language to the font files of the system, in the fallback order the user's fontconfig settings give.
Package fontconfig binds libfontconfig (through purego, SPEC §8.1) to match a font family, weight, slant and language to the font files of the system, in the fallback order the user's fontconfig settings give.
platform/linux/ime
Package ime connects a window system backend to an input method framework over D-Bus (IBus or Fcitx5): the same way for X11, and for Wayland on a compositor without text-input-v3 (SPEC §8.3, §8.6).
Package ime connects a window system backend to an input method framework over D-Bus (IBus or Fcitx5): the same way for X11, and for Wayland on a compositor without text-input-v3 (SPEC §8.3, §8.6).
platform/linux/ime/imetest
Package imetest has test doubles for the input method of the Linux backends: an input method that records its calls, and a poster that lets the test run what the bridge hands to the UI thread.
Package imetest has test doubles for the input method of the Linux backends: an input method that records its calls, and a poster that lets the test run what the bridge hands to the UI thread.
platform/linux/input
Package input turns what the Linux windowing systems report about pointers and touch screens into ui.PointerData, the same way for Wayland and X11.
Package input turns what the Linux windowing systems report about pointers and touch screens into ui.PointerData, the same way for Wayland and X11.
platform/linux/pixelpool
Package pixelpool is the buffers of one window that a CPU renderer draws into: the part of the Wayland and X11 backends that hands a buffer out only when the display server no longer reads it, and says how old its content is (SPEC §9.6; steps 32.1 and 32.2).
Package pixelpool is the buffers of one window that a CPU renderer draws into: the part of the Wayland and X11 backends that hands a buffer out only when the display server no longer reads it, and says how old its content is (SPEC §9.6; steps 32.1 and 32.2).
platform/linux/pulse
Package pulse is the PulseAudio backend of the audio service on Linux (SPEC §28.3, step 31.5): playback and capture streams of float32 frames on libpulse's threaded main loop, the devices and the default device of the server, and a notification when they change.
Package pulse is the PulseAudio backend of the audio service on Linux (SPEC §28.3, step 31.5): playback and capture streams of float32 frames on libpulse's threaded main loop, the devices and the default device of the server, and a notification when they change.
platform/linux/wayland
Package wayland is the Wayland backend.
Package wayland is the Wayland backend.
platform/linux/wayland/decor
Package decor binds libdecor, the library that draws native title bars for Wayland compositors without server-side decorations (GNOME).
Package decor binds libdecor, the library that draws native title bars for Wayland compositors without server-side decorations (GNOME).
platform/linux/wayland/fakecomp
Package fakecomp is a tiny fake Wayland compositor for tests: it speaks the wire protocol over a socket pair, answers the requests that the tests send, and logs them.
Package fakecomp is a tiny fake Wayland compositor for tests: it speaks the wire protocol over a socket pair, answers the requests that the tests send, and logs them.
platform/linux/wayland/wl
Package wl is the Wayland client: the runtime over libwayland-client, which is bound with purego, and the Go bindings of every protocol in ../protocols, generated by `glutter-gen wayland` into the *_gen.go files.
Package wl is the Wayland client: the runtime over libwayland-client, which is bound with purego, and the Go bindings of every protocol in ../protocols, generated by `glutter-gen wayland` into the *_gen.go files.
platform/linux/x11
Package x11 is the X11 backend.
Package x11 is the X11 backend.
platform/linux/xkb
Package xkb binds libxkbcommon (through purego, SPEC §8.1) and turns key presses into Flutter key data: the physical key, the logical key and the text, for any keyboard layout, with dead keys and compose sequences.
Package xkb binds libxkbcommon (through purego, SPEC §8.1) and turns key presses into Flutter key data: the physical key, the logical key and the text, for any keyboard layout, with dead keys and compose sequences.
platform/macos
Package macos is the platform backend of macOS: AppKit through purego and its objc package, with no cgo (SPEC §29).
Package macos is the platform backend of macOS: AppKit through purego and its objc package, with no cgo (SPEC §29).
platform/macos/a11y
Package a11y is the accessibility bridge of macOS (SPEC §29.10): a plain-Go model of the semantics trees of the views of the app and the mapping of a node to what NSAccessibility says about an element (its role, label, value, help, state, actions and text range), and, in the files for macOS, the elements that VoiceOver and the Accessibility Inspector read and the notifications that tell them of a change.
Package a11y is the accessibility bridge of macOS (SPEC §29.10): a plain-Go model of the semantics trees of the views of the app and the mapping of a node to what NSAccessibility says about an element (its role, label, value, help, state, actions and text range), and, in the files for macOS, the elements that VoiceOver and the Accessibility Inspector read and the notifications that tell them of a change.
platform/macos/iokit
Package iokit is the gamepad backend of macOS (SPEC §29.11): the pads that IOKit's HID manager reports, read as raw axes, buttons and hats, and the pads that have a HID driver (package gamepadhid), read through their reports.
Package iokit is the gamepad backend of macOS (SPEC §29.11): the pads that IOKit's HID manager reports, read as raw axes, buttons and hats, and the pads that have a HID driver (package gamepadhid), read through their reports.
platform/mobile
Package mobile is the logic of the desktop services of package desktop on a mobile platform (Android in 1.6, SPEC §24.11): opening a URI with an intent and showing notifications through the system's notification manager.
Package mobile is the logic of the desktop services of package desktop on a mobile platform (Android in 1.6, SPEC §24.11): opening a URI with an intent and showing notifications through the system's notification manager.
platform/padstd
Package padstd helps the backends whose pads already report the standard layout (XInput on Windows, the standard mapping of a browser): such a pad is a PadInfo with Standard set, and its raw buttons and axes are the Button and Axis of gamepaddb in the order of the layout.
Package padstd helps the backends whose pads already report the standard layout (XInput on Windows, the standard mapping of a browser): such a pad is a PadInfo with Standard set, and its raw buttons and axes are the Button and Axis of gamepaddb in the order of the layout.
platform/textedit
Package textedit is the model behind a text field that the platform keeps outside the framework (the hidden DOM field of the web, SPEC §23.5, and the Editable of the Android input method, SPEC §24.6), as plain Go: the editing state in UTF-16 units, the composition, and the editor that turns each change of the platform's field into the ui.TextInputEvent that makes the framework's field the same.
Package textedit is the model behind a text field that the platform keeps outside the framework (the hidden DOM field of the web, SPEC §23.5, and the Editable of the Android input method, SPEC §24.6), as plain Go: the editing state in UTF-16 units, the composition, and the editor that turns each change of the platform's field into the ui.TextInputEvent that makes the framework's field the same.
platform/web
Package web is the platform backend of the web (GOOS=js GOARCH=wasm, SPEC §23): one window that is a canvas in a host element of the page, frames from requestAnimationFrame, and the lifecycle and the settings of the browser.
Package web is the platform backend of the web (GOOS=js GOARCH=wasm, SPEC §23): one window that is a canvas in a host element of the page, frames from requestAnimationFrame, and the lifecycle and the settings of the browser.
platform/web/audiotest command
Command audiotest is the program of the browser tests of the audio of the web (step 31.6, SPEC §28.3, §28.8).
Command audiotest is the program of the browser tests of the audio of the web (step 31.6, SPEC §28.3, §28.8).
platform/web/desktoptest command
Command desktoptest is the program of the browser tests of the web desktop services (step 21.6, SPEC §17, §23.7).
Command desktoptest is the program of the browser tests of the web desktop services (step 21.6, SPEC §17, §23.7).
platform/web/inputtest command
Command inputtest is the program of the browser tests of the web input (step 21.2, SPEC §17, §23.4).
Command inputtest is the program of the browser tests of the web input (step 21.2, SPEC §17, §23.4).
platform/web/padtest command
Command padtest is the program of the browser test of the gamepads of the web (step 31.2, SPEC §28.2, §28.8).
Command padtest is the program of the browser test of the gamepads of the web (step 31.2, SPEC §28.2, §28.8).
platform/web/sensortest command
Command sensortest is the program of the browser tests of the motion sensors and the haptics of the web (step 31.7, SPEC §28.4, §28.8).
Command sensortest is the program of the browser tests of the motion sensors and the haptics of the web (step 31.7, SPEC §28.4, §28.8).
platform/web/synthetic
Package synthetic dispatches synthetic DOM events at the canvas of a Glutter app, the way the browser would deliver real ones: the debug-only script of the web platform (GLUTTER_DEV_EVENTS, for proof screenshots) and the browser tests use it.
Package synthetic dispatches synthetic DOM events at the canvas of a Glutter app, the way the browser would deliver real ones: the debug-only script of the web platform (GLUTTER_DEV_EVENTS, for proof screenshots) and the browser tests use it.
platform/web/texttest command
Command texttest is the program of the browser tests of the web text input and clipboard (step 21.3, SPEC §17, §23.5).
Command texttest is the program of the browser tests of the web text input and clipboard (step 21.3, SPEC §17, §23.5).
platform/windows
Package windows is the Win32 platform backend (SPEC §25): the windows, the message loop, the frame pacing, the displays and the process start of Windows (step 28.2), behind internal/platform; the pointer input (step 28.3), the keyboard (step 28.4), the text input and the input methods (step 28.5, with package ime); the clipboard, the system settings, the list of fonts and the lifecycle (step 28.6), and the tray, the notifications, the file dialogs and the opening of URIs (step 28.11); and OLE drag and drop and the windows that an app opens besides the first (step 28.12, with package ole).
Package windows is the Win32 platform backend (SPEC §25): the windows, the message loop, the frame pacing, the displays and the process start of Windows (step 28.2), behind internal/platform; the pointer input (step 28.3), the keyboard (step 28.4), the text input and the input methods (step 28.5, with package ime); the clipboard, the system settings, the list of fonts and the lifecycle (step 28.6), and the tray, the notifications, the file dialogs and the opening of URIs (step 28.11); and OLE drag and drop and the windows that an app opens besides the first (step 28.12, with package ole).
platform/windows/ime
Package ime is the text input of the Windows backend as plain Go: the composition of an input method (IMM32, SPEC §25.7) turned into the ui.TextInputEvents of the framework by the model of internal/platform/textedit, the characters of the keyboard that no key made, and the places of the composition and candidate windows.
Package ime is the text input of the Windows backend as plain Go: the composition of an input method (IMM32, SPEC §25.7) turned into the ui.TextInputEvents of the framework by the model of internal/platform/textedit, the characters of the keyboard that no key made, and the places of the composition and candidate windows.
platform/windows/ime/imetest
Package imetest is a fake of the input method manager (ime.IMM) for the tests of the text input of Windows, in the ime package and in the window code that uses it.
Package imetest is a fake of the input method manager (ime.IMM) for the tests of the text input of Windows, in the ime package and in the window code that uses it.
platform/windows/ole
Package ole is the OLE drag and drop of the Windows backend (SPEC §25.10): the COM objects that Go makes for it (IDropTarget, IDropSource, IDataObject and IEnumFORMATETC, SPEC §25.2), the reader of a data object that another program made, and the plain-Go models they stand on, which are tested on any host: the effects and the keys that choose among them, the formats and their names, the set of data that a drag offers, the enumerator of formats, and the decisions of the drag source.
Package ole is the OLE drag and drop of the Windows backend (SPEC §25.10): the COM objects that Go makes for it (IDropTarget, IDropSource, IDataObject and IEnumFORMATETC, SPEC §25.2), the reader of a data object that another program made, and the plain-Go models they stand on, which are tested on any host: the effects and the keys that choose among them, the formats and their names, the set of data that a drag offers, the enumerator of formats, and the decisions of the drag source.
platform/windows/uia
Package uia is the accessibility bridge of Windows (SPEC §25.11): it mirrors the framework's semantics tree as UI Automation providers, so that Narrator, NVDA, JAWS and Accessibility Insights can read the app and act on it.
Package uia is the accessibility bridge of Windows (SPEC §25.11): it mirrors the framework's semantics tree as UI Automation providers, so that Narrator, NVDA, JAWS and Accessibility Insights can read the app and act on it.
platform/windows/uia/callshim
Package callshim calls a function of the Windows calling convention with floating-point arguments, for the tests of UI Automation (SPEC §25.2): syscall.SyscallN passes integers only, and a COM method that takes a double (IRawElementProviderFragmentRoot::ElementProviderFromPoint, IRangeValueProvider::SetValue, and the client's SetValue and SetScrollPercent) gets it in a floating register.
Package callshim calls a function of the Windows calling convention with floating-point arguments, for the tests of UI Automation (SPEC §25.2): syscall.SyscallN passes integers only, and a COM method that takes a double (IRawElementProviderFragmentRoot::ElementProviderFromPoint, IRangeValueProvider::SetValue, and the client's SetValue and SetScrollPercent) gets it in a floating register.
platform/windows/uia/semtree
Package semtree builds semantics updates for the tests of UI Automation (SPEC §25.11): the nodes the way the engine fills them in, so that a test states only what it cares about.
Package semtree builds semantics updates for the tests of UI Automation (SPEC §25.11): the nodes the way the engine fills them in, so that a test states only what it cares about.
platform/windows/uia/uiatest
Package uiatest is the UI Automation client that tests use to look at the providers of package uia the way Narrator, NVDA and Accessibility Insights do (SPEC §25.11, §25.13): it creates CUIAutomation, finds the element of a window, walks the tree, reads properties, calls the patterns and listens to events.
Package uiatest is the UI Automation client that tests use to look at the providers of package uia the way Narrator, NVDA and Accessibility Insights do (SPEC §25.11, §25.13): it creates CUIAutomation, finds the element of a window, walks the tree, reads properties, calls the patterns and listens to events.
platform/windows/wasapi
Package wasapi is the WASAPI backend of the audio service on Windows (SPEC §28.3, step 31.6): playback and capture of float32 frames through the shared mode of the Windows audio engine, driven by events, with the list of devices and the default device from the device enumerator and its notification client (a COM object that Go makes, SPEC §25.2).
Package wasapi is the WASAPI backend of the audio service on Windows (SPEC §28.3, step 31.6): playback and capture of float32 frames through the shared mode of the Windows audio engine, driven by events, with the list of devices and the default device from the device enumerator and its notification client (a COM object that Go makes, SPEC §25.2).
platform/windows/win32
Package win32 is the one package that holds the bindings and the helpers for calling Windows without cgo (SPEC §25.2): System32-only DLL loading, the procedure tables, UTF-16 strings, the HRESULT and GetLastError errors, the COM calls over a vtable, the COM objects that Go implements, the callbacks, and the first kernel32 bindings.
Package win32 is the one package that holds the bindings and the helpers for calling Windows without cgo (SPEC §25.2): System32-only DLL loading, the procedure tables, UTF-16 strings, the HRESULT and GetLastError errors, the COM calls over a vtable, the COM objects that Go implements, the callbacks, and the first kernel32 bindings.
platform/windows/win32/layouttest
Package layouttest checks the Go mirrors of Win32 and COM structures, and the positions of COM methods in their vtables, against the mingw-w64 headers (SPEC §25.2, §6.3 rule 11).
Package layouttest checks the Go mirrors of Win32 and COM structures, and the positions of COM methods in their vtables, against the mingw-w64 headers (SPEC §25.2, §6.3 rule 11).
platform/windows/winpad
Package winpad is the gamepad service of Windows without the calls into Windows: it finds the pads that XInput serves and the HID pads that Raw Input lists, reads them, and reports them to the pad manager through platform.Gamepads (SPEC §28.2).
Package winpad is the gamepad service of Windows without the calls into Windows: it finds the pads that XInput serves and the HID pads that Raw Input lists, reads them, and reports them to the pad manager through platform.Gamepads (SPEC §28.2).
proof
Package proof holds the scenes that cmd/glutter-proof renders to prove, with a picture, that a step of docs/IMPLEMENTATION.md works.
Package proof holds the scenes that cmd/glutter-proof renders to prove, with a picture, that a step of docs/IMPLEMENTATION.md works.
proof/widgetscenes
Package widgetscenes holds the proof scenes that are made by pumping a widget tree through gluttertest.
Package widgetscenes holds the proof scenes that are made by pumping a widget tree through gluttertest.
renderhost
Package renderhost builds a RendererBinding on a fake engine with one view, lays out and paints a render tree through the pipeline, and keeps the scenes that the view rendered.
Package renderhost builds a RendererBinding on a fake engine with one view, lays out and paints a render tree through the pipeline, and keeps the scenes that the view rendered.
renderingtest
Package renderingtest is a temporary harness for the tests of the rendering library: it builds a RendererBinding on a fake engine, lays out and paints a render tree through the pipeline, and renders the scene with the software renderer.
Package renderingtest is a temporary harness for the tests of the rendering library: it builds a RendererBinding on a fake engine, lays out and paints a render tree through the pipeline, and renders the scene with the software renderer.
scenetest
Package scenetest has the scenes that the display tests of viewport3d draw on each backend (SPEC §27.12): meshes made by plain code, the scenes, and a function that draws one into a texture and reads the pixels back.
Package scenetest has the scenes that the display tests of viewport3d draw on each backend (SPEC §27.12): meshes made by plain code, the scenes, and a function that draws one into a texture and reads the pixels back.
svg
Package svg parses SVG documents into a tree of resolved drawing commands.
Package svg parses SVG documents into a tree of resolved drawing commands.
text
Package text lays out paragraphs on go-text: the font collection, shaping, line breaking, bidi and glyph outlines.
Package text lays out paragraphs on go-text: the font collection, shaping, line breaking, bidi and glyph outlines.
text/androidfonts
Package androidfonts finds the system fonts of an Android device the way Skia's Android font manager does (src/ports/SkFontMgr_android.cpp and SkFontMgr_android_parser.cpp): it reads the font configuration of the system (/system/etc/fonts.xml, and the fonts_customization.xml of the vendor), builds the families with their names, aliases, weights, styles, languages and variants, and answers a request for a family, a weight, a slant and a language with the fonts in the order the system would try them, and a request for a character with the first font that has it.
Package androidfonts finds the system fonts of an Android device the way Skia's Android font manager does (src/ports/SkFontMgr_android.cpp and SkFontMgr_android_parser.cpp): it reads the font configuration of the system (/system/etc/fonts.xml, and the fonts_customization.xml of the vendor), builds the families with their names, aliases, weights, styles, languages and variants, and answers a request for a family, a weight, a slant and a language with the fonts in the order the system would try them, and a request for a character with the first font that has it.
text/darwinfonts
Package darwinfonts finds the system fonts of macOS: it answers a request for a family, a weight, a slant and a language with the fonts in the order a Mac would try them, and a request for a character with the font that Core Text chooses for it, or the first font of a fallback chain that has it (SPEC §29.8).
Package darwinfonts finds the system fonts of macOS: it answers a request for a family, a weight, a slant and a language with the fonts in the order a Mac would try them, and a request for a character with the font that Core Text chooses for it, or the first font of a fallback chain that has it (SPEC §29.8).
text/fonttest
Package fonttest makes test fonts from the fonts that the module bundles: the same outlines under another character map, so that a test can have many fonts that cover different characters, and a font whose character map cannot be read, without keeping font files in the repository.
Package fonttest makes test fonts from the fonts that the module bundles: the same outlines under another character map, so that a test can have many fonts that cover different characters, and a font whose character map cannot be read, without keeping font files in the repository.
text/layout
Package layout lays out paragraphs: it turns the styled text of a ui.ParagraphBuilder into lines of shaped glyphs with go-text.
Package layout lays out paragraphs: it turns the styled text of a ui.ParagraphBuilder into lines of shaped glyphs with go-text.
text/winfonts
Package winfonts finds the system fonts of Windows: it answers a request for a family, a weight, a slant and a language with the fonts in the order Windows would try them, and a request for a character with the first font of the fallback chain that has it (SPEC §25.8).
Package winfonts finds the system fonts of Windows: it answers a request for a family, a weight, a slant and a language with the fonts in the order Windows would try them, and a request for a character with the first font of the fallback chain that has it (SPEC §25.8).
webtest
Package webtest is the harness that runs a Glutter web app in a headless browser (SPEC §17 "Browser tests", §23.8): an httptest server that serves a build made by internal/webtool and collects the PNG and the results the page posts, launchers for Chromium and Firefox with temporary profiles that run under timeout in their own process group and are killed when the test ends, and Shot, which glutter-web's shot command and the browser tests use.
Package webtest is the harness that runs a Glutter web app in a headless browser (SPEC §17 "Browser tests", §23.8): an httptest server that serves a build made by internal/webtool and collects the PNG and the results the page posts, launchers for Chromium and Firefox with temporary profiles that run under timeout in their own process group and are killed when the test ends, and Shot, which glutter-web's shot command and the browser tests use.
webtool
Package webtool packages a Glutter app for the web (SPEC §23.1): it builds the program for js/wasm, writes the directory that a static web server can serve (index.html, wasm_exec.js, app.wasm and app.wasm.gz), and serves such a directory with the right types and with the gzip file for a browser that accepts it.
Package webtool packages a Glutter app for the web (SPEC §23.1): it builds the program for js/wasm, writes the directory that a static web server can serve (index.html, wasm_exec.js, app.wasm and app.wasm.gz), and serves such a directory with the right types and with the gzip file for a browser that accepts it.
winetest
Package winetest is the harness of the tests that run a Windows program under Wine (SPEC §25.13): it makes the Wine prefix in .wine-test/prefix at the module root (with the workaround for the first boot, under a lock), starts a headless X server (scripts/headless-x11.sh) and the program under `timeout -k`, in a process group of its own and with the environment of §25.13, stops everything with `wineserver -k`, and finds what is left (Leftovers reads /proc).
Package winetest is the harness of the tests that run a Windows program under Wine (SPEC §25.13): it makes the Wine prefix in .wine-test/prefix at the module root (with the workaround for the first boot, under a lock), starts a headless X server (scripts/headless-x11.sh) and the program under `timeout -k`, in a process group of its own and with the environment of §25.13, stops everything with `wineserver -k`, and finds what is left (Leftovers reads /proc).
wintool
Package wintool builds, runs and takes screenshots of Glutter apps for Windows, for glutter-windows (SPEC §25.1): it generates the application manifest, writes the resources of the .exe (the manifest, the icon with its sizes, the version information) as a COFF object with a .rsrc section in pure Go, runs the Go toolchain with that object added through `go build -overlay`, and starts the .exe under Wine through internal/winetest.
Package wintool builds, runs and takes screenshots of Glutter apps for Windows, for glutter-windows (SPEC §25.1): it generates the application manifest, writes the resources of the .exe (the manifest, the icon with its sizes, the version information) as a COFF object with a .rsrc section in pure Go, runs the Go toolchain with that object added through `go build -overlay`, and starts the .exe under Wine through internal/winetest.
Package material implements Material 3.
Package material implements Material 3.
fonts
Package fonts holds the fonts that Glutter bundles with the program: Roboto, the first family of Flutter's Linux typography, and Material Icons.
Package fonts holds the fonts that Glutter bundles with the program: Roboto, the first family of Flutter's Linux typography, and Material Icons.
internal/mcu
Package mcu is a port of Google's material-color-utilities (the Dart package in reference/material-color-utilities): the HCT color space, the CAM16 color appearance model, tonal palettes, the dynamic color scheme variants and the contrast tools that Material 3 builds its color schemes with.
Package mcu is a port of Google's material-color-utilities (the Dart package in reference/material-color-utilities): the HCT color space, the CAM16 color appearance model, tonal palettes, the dynamic color scheme variants and the contrast tools that Material 3 builds its color schemes with.
Package model is the plain Go data of a 3D model that a loader reads from a file (SPEC §27.9, §28.5): meshes, materials, textures, images and a tree of nodes with float64 transforms, and for the formats that have them skins, morph targets, animations, cameras, lights and scenes (as data: viewport3d plays them).
Package model is the plain Go data of a 3D model that a loader reads from a file (SPEC §27.9, §28.5): meshes, materials, textures, images and a tree of nodes with float64 transforms, and for the formats that have them skins, morph targets, animations, cameras, lights and scenes (as data: viewport3d plays them).
gltf
Package gltf reads glTF 2.0 files, the text kind (.gltf, with its buffers and images in files or in data: URIs) and the binary kind (.glb), into a model.Model (SPEC §28.5).
Package gltf reads glTF 2.0 files, the text kind (.gltf, with its buffers and images in files or in data: URIs) and the binary kind (.glb), into a model.Model (SPEC §28.5).
internal/parse
Package parse has the small text readers that the loaders of package model share: fields, integers and decimal numbers read from byte slices with no allocation (an OBJ file of a million triangles has some seven million of them).
Package parse has the small text readers that the loaders of package model share: fields, integers and decimal numbers read from byte slices with no allocation (an OBJ file of a million triangles has some seven million of them).
internal/poly
Package poly cuts the polygons of a model file into triangles (a fan when the polygon is convex, ear clipping when it is not); the loaders of OBJ and PLY share it.
Package poly cuts the polygons of a model file into triangles (a fan when the polygon is convex, ear clipping when it is not); the loaders of OBJ and PLY share it.
internal/vtx
Package vtx is the table that welds equal vertices for the loaders of package model: a hash table from a key of three integers (the bits of a position, or its cell on a grid) to the number of the vertex that was first seen with it.
Package vtx is the table that welds equal vertices for the loaders of package model: a hash table from a key of three integers (the bits of a position, or its cell on a grid) to the number of the vertex that was first seen with it.
obj
Package obj reads Wavefront OBJ files, with the subset of MTL that matters to a viewer, into a model.Model (SPEC §27.9).
Package obj reads Wavefront OBJ files, with the subset of MTL that matters to a viewer, into a model.Model (SPEC §27.9).
ply
Package ply reads PLY files, the ASCII kind and the binary kind in both byte orders (SPEC §28.5), into a model.Model.
Package ply reads PLY files, the ASCII kind and the binary kind in both byte orders (SPEC §28.5), into a model.Model.
stl
Package stl reads STL files, the binary and the ASCII kind (SPEC §27.9), into a model.Model.
Package stl reads STL files, the binary and the ASCII kind (SPEC §27.9), into a model.Model.
threemf
Package threemf reads 3MF files (SPEC §28.5) into a model.Model: the core specification of the 3D Manufacturing Format, a zip archive whose model part (3D/3dmodel.model, found through the package's relationships) is XML, and the base materials and colors of its materials extension.
Package threemf reads 3MF files (SPEC §28.5) into a model.Model: the core specification of the 3D Manufacturing Format, a zip archive whose model part (3D/3dmodel.model, found through the package's relationships) is XML, and the base materials and colors of its materials extension.
Package offscreen draws scenes into pixels in the app's own process, with no window and no GPU: a software ui.Rasterizer, a Detacher that makes a scene safe to draw on any goroutine, and a Surface that keeps the pixels of one view across frames and redraws only what changed (SPEC §9.9, D28).
Package offscreen draws scenes into pixels in the app's own process, with no window and no GPU: a software ui.Rasterizer, a Detacher that makes a scene safe to draw on any goroutine, and a Surface that keeps the pixels of one view across frames and redraws only what changed (SPEC §9.9, D28).
Package painting provides the painting building blocks above the engine: EdgeInsets, BoxDecoration, borders, TextPainter and ImageProvider.
Package painting provides the painting building blocks above the engine: EdgeInsets, BoxDecoration, borders, TextPainter and ImageProvider.
Package physics provides the simulations used by scrolling and animation, such as springs, friction and clamping.
Package physics provides the simulations used by scrolling and animation, such as springs, friction and clamping.
Package rendering holds the render tree: RenderObject, RenderBox, slivers, layers and the PipelineOwner.
Package rendering holds the render tree: RenderObject, RenderBox, slivers, layers and the PipelineOwner.
Package scheduler schedules frames and callbacks: the SchedulerBinding, Ticker and the frame phases.
Package scheduler schedules frames and callbacks: the SchedulerBinding, Ticker and the frame phases.
Package semantics describes the app to assistive technology: SemanticsNode, actions and flags.
Package semantics describes the app to assistive technology: SemanticsNode, actions and flags.
Package sensors gives an app the motion sensors of the device (SPEC §28.4): the accelerometer and the gyroscope of a phone or of a browser on one, and the sensors of a gamepad (package gamepad).
Package sensors gives an app the motion sensors of the device (SPEC §28.4): the accelerometer and the gyroscope of a phone or of a browser on one, and the sensors of a gamepad (package gamepad).
Package services connects the framework to the platform: keyboard, text input, clipboard, mouse cursors and assets.
Package services connects the framework to the platform: keyboard, text input, clipboard, mouse cursors and assets.
Package svg draws SVG images in Glutter apps, with the widgets of Flutter's flutter_svg package.
Package svg draws SVG images in Glutter apps, with the widgets of Flutter's flutter_svg package.
Package ui is the engine API: geometry, Color, Paint, Path, Canvas, Scene, Paragraph, images, views and input events.
Package ui is the engine API: geometry, Color, Paint, Path, Canvas, Scene, Paragraph, images, views and input events.
Package vecmath is the 3D math of Glutter (SPEC §27.7): vectors, quaternions, matrices, rays, planes, boxes, spheres and frustums in float64, as values that never allocate.
Package vecmath is the 3D math of Glutter (SPEC §27.7): vectors, quaternions, matrices, rays, planes, boxes, spheres and frustums in float64, as values that never allocate.
Package viewport3d is the 3D view of Glutter for CAD and games (SPEC §27.8): a Camera with CAD navigation, and, in later steps, a Scene of meshes, materials, lines, points and edges, section planes, picking and overlays.
Package viewport3d is the 3D view of Glutter for CAD and games (SPEC §27.8): a Camera with CAD navigation, and, in later steps, a Scene of meshes, materials, lines, points and edges, section planes, picking and overlays.
Package widgets is the widgets library: the Widget, Element and State classes and the basic widgets built on the render tree.
Package widgets is the widgets library: the Widget, Element and State classes and the basic widgets built on the render tree.

Jump to

Keyboard shortcuts

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