Reference

Generated out of parse.c, dom.c and spark.h, the source that decides these answers, so this page cannot drift.

Tags
01

Tags, and what they become

tagmacOSWindowsLinux
<button>NSButtonBUTTONGtkButton
<native>the class you namethe window class you namethe GType you name
<input>NSTextFieldEDITGtkEntry
<check>NSButton switchBUTTON BS_CHECKBOXGtkCheckButton
<sep>NSBoxa lineGtkSeparator
<text>NSTextFieldSTATICGtkLabel
<scroll>NSScrollViewa clipping windowGtkScrolledWindow
<list>NSTableViewSysListView32GtkListBox
<item>a rowa rowa row
<area>NSTextViewEDIT ES_MULTILINEGtkTextView
<select>NSPopUpButtonCOMBOBOXGtkComboBoxText
<radio>NSButton radioBUTTON BS_RADIOBUTTONGtkRadioButton
<slider>NSSlidermsctls_trackbar32GtkScale
<progress>NSProgressIndicatormsctls_progress32GtkProgressBar
<spin>NSSteppermsctls_updown32GtkSpinButton
<image>NSImageViewGDI+GtkImage
<link>NSButton linkdrawnGtkLinkButton
<password>NSSecureTextFieldEDIT ES_PASSWORDGtkEntry, visibility off
<search>NSSearchFieldEDITGtkEntry
<toggle>NSSwitchdrawnGtkSwitch
<togglebutton>NSButton push-onBUTTON BS_PUSHLIKEGtkToggleButton
<spinner>NSProgressIndicator spinningdrawnGtkSpinner
<menu>NSMenuHMENUGtkMenuBar
<menuitem>NSMenuItema menu entryGtkMenuItem
<tabs>NSTabViewSysTabControl32GtkNotebook
<tab>a taba taba tab
<tree>NSOutlineViewSysTreeView32GtkListBox
<date>NSDatePickerSysDateTimePick32GtkEntry
<toolbar>a rowa rowa row
<table>NSTableViewSysListView32GtkListBox
<column>NSTableColumna columna column
<stack>layered viewslayered windowslayered
<tip>a styled windowa styled windowthe widget's own tooltip
<bar>a bara bara bar
<surface>a drawn viewan owner-drawn controlGtkDrawingArea
<fill>a shapea shapea shape
<picture>a shapea shapea shape
Attributes
02

Attributes 79

Settable from markup and from a script by the same name, and readable back as what they are.

What a thing looks like 59

gappadmin-sizemax-sizeresizablealways-on-topframelessfullscreenatfitrotateopacitywrapscalezoombundletypeallowmaxlengthtransitionanimatefromtocolsmin-colwhgrowalignselfsizebolditalictext-alignvalignshadowshadow-ygradient-xgradientcaret-colorselection-colormodaldisableddefaultfillcolorbgradiusborderaccent-hoveraccentborder-color-hoverborder-colorbg-hoverbg-activebg-disabledplaceholderlabelvalue

What a thing is 20

bindidminmaxstepfontsrcdatahreftipfont-filefont-dataaccelclassagentreadonlybarscheckedhiddentitle

Events and services
03

Events

clickchangeinputfocusblurmouseentermouseleaveresizeframekeytrayhotkeydropmessage

Services

What the system already runs, asked for by name. Each answers null where the system has no such thing.

servicewhat it is
alert confirmopen save dialogs
open dir|multi|anya folder, several at once, or either
snapshot <path>a picture of the window as it stands
clip-get clip-setclipboard
window-size window-titlethe window
window-raisetake the front, coming back from a
runa program, returning its output
open-urlhand a URL to the system browser
tray <icon> <tooltip>an icon in the system's status area
notify <title> <body>a message in the system's own centre
hotkey <combo>a key the system reports while we sleep
window-open <file>a second window, running that document
window-tell <text>hand a line to every other window
sound <file>play it, through whatever the system has
fetch <url> <spec>ask a server, through the system's own
update-check <manifest>what version is out there, or nothing
update-apply <manifest>fetch it and put it in place

spark.fetch waits for the answer. Give it into and it does not: the call returns at once and the answer lands in that signal, with statusInto beside it if you want the code. Everything bound to the signal follows on its own.

spark.fetch(url, { into: "games", statusInto: "code" });

Two attributes worth naming

<button default> is the button Enter presses, from wherever the keyboard is. Each system does its own thing with the mark: a Return key equivalent on AppKit, BS_DEFPUSHBUTTON on Win32, and the suggested-action class on GTK.

agent="read write invoke deny" says what a driver from outside may do with a control, and it is inherited from the nearest ancestor that says anything. It decides what tree and actions answer, and therefore which controls become tools when the window is served over MCP.