Documentation
¶
Overview ¶
Package gelm is a retained-mode widget kit for Wayland, written in pure Go (no cgo).
The public API lives in two packages:
app - the parked event loop, windows (xdg toplevels and
layer surfaces), popovers, dialogs, and input wiring
widget - the retained widget tree: labels, buttons, entries,
text areas, lists, notebooks, menus, icons, themes
Supporting it:
render - premultiplied-alpha canvas, shaped text, icons
wlr - generated Wayland protocol bindings
internal - session, buffer arena, scale, popup, and drag-drop
plumbing
cmd - the demos (gelm-hello showcase, gelm-multi, panel,
bar, gelm-invoke threading demo)
The docs/ directory carries the design contracts: architecture, input model, application model, threading model, accessibility decision, icon theming, and the debug inspector.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package app owns the shared event loop: buffer pooling, input routing into the widget tree, frame-callback pacing, and idle dispatch.
|
Package app owns the shared event loop: buffer pooling, input routing into the widget tree, frame-callback pacing, and idle dispatch. |
|
Package capture copies screen contents out of the compositor: whole outputs and output regions through wlr-screencopy, single windows through ext-image-copy-capture (with the ext-foreign-toplevel-list enumeration and its capture sources) or Hyprland's toplevel-export, and continuous damage-driven output capture through an ext-image-copy-capture session (Stream).
|
Package capture copies screen contents out of the compositor: whole outputs and output regions through wlr-screencopy, single windows through ext-image-copy-capture (with the ext-foreign-toplevel-list enumeration and its capture sources) or Hyprland's toplevel-export, and continuous damage-driven output capture through an ext-image-copy-capture session (Stream). |
|
cmd
|
|
|
gelm-bar
command
Command gelm-bar is the M1 paint demo: a top bar anchored across the output showing a label, a clock, and a moving second indicator, all CPU-rasterized (rounded rects, gradient, shaped text) into pooled wl_shm ARGB8888 buffers and kept current with damage-tracked repaints driven by frame callbacks.
|
Command gelm-bar is the M1 paint demo: a top bar anchored across the output showing a label, a clock, and a moving second indicator, all CPU-rasterized (rounded rects, gradient, shaped text) into pooled wl_shm ARGB8888 buffers and kept current with damage-tracked repaints driven by frame callbacks. |
|
gelm-columns
command
Command gelm-columns is the tabular/tree view demo (#90): ten thousand rows sorted and filtered through the header and the search entry (both instant - the view is virtualized), a tree tab with the expander column and indent guides, and a drag-to-reorder tab.
|
Command gelm-columns is the tabular/tree view demo (#90): ten thousand rows sorted and filtered through the header and the search entry (both instant - the view is virtualized), a tree tab with the expander column and indent guides, and a drag-to-reorder tab. |
|
gelm-hello
command
Command gelm-hello is the showcase demo: one xdg_toplevel window exercising every widget - labels, button, slider, progress bar, switch, checkbox, text entry, multi-line text area, a scrollable list, hover tooltips, animated tweens, the right-click context menu, Tab focus traversal with the focus ring, drag-to-move, and Escape to close.
|
Command gelm-hello is the showcase demo: one xdg_toplevel window exercising every widget - labels, button, slider, progress bar, switch, checkbox, text entry, multi-line text area, a scrollable list, hover tooltips, animated tweens, the right-click context menu, Tab focus traversal with the focus ring, drag-to-move, and Escape to close. |
|
gelm-i18n
command
Command gelm-i18n proves the message catalog (#89): the same app, two languages.
|
Command gelm-i18n proves the message catalog (#89): the same app, two languages. |
|
gelm-invoke
command
Command gelm-invoke demonstrates the threading model: a plain goroutine "polls a sensor" twice a second and pushes the reading into a label through app.Invoke, while app.Every drives a second label on the loop's own timer wakes.
|
Command gelm-invoke demonstrates the threading model: a plain goroutine "polls a sensor" twice a second and pushes the reading into a label through app.Invoke, while app.Every drives a second label on the loop's own timer wakes. |
|
gelm-messages
command
Command gelm-messages demonstrates the typed messaging layer (app/message.go) and single-instance activation (app/instance.go): one SharedState counter shared across two windows - either window's buttons move both labels - and one Stream broker that any depth of code can reach without threading senders: both windows subscribe, a button publishes, every window toasts.
|
Command gelm-messages demonstrates the typed messaging layer (app/message.go) and single-instance activation (app/instance.go): one SharedState counter shared across two windows - either window's buttons move both labels - and one Stream broker that any depth of code can reach without threading senders: both windows subscribe, a button publishes, every window toasts. |
|
gelm-multi
command
Command gelm-multi exercises the application model: one process running a declarative layer-shell bar on every output plus toplevel windows created on demand, with a close-request veto.
|
Command gelm-multi exercises the application model: one process running a declarative layer-shell bar on every output plus toplevel windows created on demand, with a close-request veto. |
|
gelm-multilist
command
Command gelm-multilist is the multi-select list client the headless input suite (internal/headlesstest) drives: one window holding a multiple-selection widget.List whose selection and activation land in the trace log, so synthetic keyboard and pointer gestures can be asserted end to end through the compositor.
|
Command gelm-multilist is the multi-select list client the headless input suite (internal/headlesstest) drives: one window holding a multiple-selection widget.List whose selection and activation land in the trace log, so synthetic keyboard and pointer gestures can be asserted end to end through the compositor. |
|
gelm-panel
command
Command gelm-panel is the M2+M4 interactive demo: a right-anchored panel with a slider (drag), progress bar, switch, checkbox, text entry, and a scrollable list, all live through the pointer and keyboard input stack.
|
Command gelm-panel is the M2+M4 interactive demo: a right-anchored panel with a slider (drag), progress bar, switch, checkbox, text entry, and a scrollable list, all live through the pointer and keyboard input stack. |
|
gelm-popover
command
Command gelm-popover is the popover client the headless input suite (internal/headlesstest) drives: one window whose button opens a popover holding a focused Entry and a label a timer keeps changing, so typing through the popup grab and loop-driven repaints of an open popover can be asserted end to end through the compositor.
|
Command gelm-popover is the popover client the headless input suite (internal/headlesstest) drives: one window whose button opens a popover holding a focused Entry and a label a timer keeps changing, so typing through the popup grab and loop-driven repaints of an open popover can be asserted end to end through the compositor. |
|
gelm-settings
command
Command gelm-settings is the settings application example: typed persisted keys (app/settings.go) bound straight to widgets through Binding connectors, so every edit writes through to <config>/dev.stubbe.gelm.settings/settings.json and every restart comes back exactly where it left off.
|
Command gelm-settings is the settings application example: typed persisted keys (app/settings.go) bound straight to widgets through Binding connectors, so every edit writes through to <config>/dev.stubbe.gelm.settings/settings.json and every restart comes back exactly where it left off. |
|
gelm-states
command
Command gelm-states is the window-state client the headless state suite (internal/headlesstest) drives: one toplevel whose keyboard chords issue the xdg_toplevel state requests - m maximize, n unmaximize, f fullscreen, g unfullscreen, i minimize, p poll the reported state, Escape close - while a status label mirrors only what the compositor CONFIRMS.
|
Command gelm-states is the window-state client the headless state suite (internal/headlesstest) drives: one toplevel whose keyboard chords issue the xdg_toplevel state requests - m maximize, n unmaximize, f fullscreen, g unfullscreen, i minimize, p poll the reported state, Escape close - while a status label mirrors only what the compositor CONFIRMS. |
|
wlpointer
command
Command wlpointer drives a zwlr_virtual_pointer_v1 device against a Wayland compositor: synthetic pointer input for interactive testing.
|
Command wlpointer drives a zwlr_virtual_pointer_v1 device against a Wayland compositor: synthetic pointer input for interactive testing. |
|
zz-vpclick
command
The harness clicker: pointer clicks, wheel, keys, and text on $WAYLAND_DISPLAY through the headless suite's virtual pointer — the manual companion to internal/headlesstest's in-process driving, used to walk a live surface (the settings app on a nested sway) while its trace log runs.
|
The harness clicker: pointer clicks, wheel, keys, and text on $WAYLAND_DISPLAY through the headless suite's virtual pointer — the manual companion to internal/headlesstest's in-process driving, used to walk a live surface (the settings app on a nested sway) while its trace log runs. |
|
Package highlight holds syntax highlighters for widget.TextArea (GtkSourceView's language definitions).
|
Package highlight holds syntax highlighters for widget.TextArea (GtkSourceView's language definitions). |
|
internal
|
|
|
anim
Package anim runs time-based animations: tweens advanced once per rendered frame, combinable into timelines (Sequence, Parallel, Delay) and cancelable mid-flight.
|
Package anim runs time-based animations: tweens advanced once per rendered frame, combinable into timelines (Sequence, Parallel, Delay) and cancelable mid-flight. |
|
appearance
Package appearance follows the desktop's dark/light preference — xdg-desktop-portal's org.freedesktop.portal.Settings color-scheme key, the one place Hyprland, GNOME, KDE and friends agree to publish it — over the session bus.
|
Package appearance follows the desktop's dark/light preference — xdg-desktop-portal's org.freedesktop.portal.Settings color-scheme key, the one place Hyprland, GNOME, KDE and friends agree to publish it — over the session bus. |
|
atspi
Package atspi is the in-process AT-SPI bridge (#65): it serves the widget tree's accessibility semantics (widget.Describe and the semantic roles, the plain-Go model of widget/a11y.go) over D-Bus in the AT-SPI2 shape, so screen readers and tools like accerciser can walk a gelm application.
|
Package atspi is the in-process AT-SPI bridge (#65): it serves the widget tree's accessibility semantics (widget.Describe and the semantic roles, the plain-Go model of widget/a11y.go) over D-Bus in the AT-SPI2 shape, so screen readers and tools like accerciser can walk a gelm application. |
|
buffer
Arena: one wl_shm pool per session.
|
Arena: one wl_shm pool per session. |
|
clipboard
Package clipboard implements text copy and paste over the core wl_data_device protocol and, when the compositor offers it, the zwp_primary_selection_unstable_v1 protocol: the offer pipeline for reading a selection, and data sources for claiming either.
|
Package clipboard implements text copy and paste over the core wl_data_device protocol and, when the compositor offers it, the zwp_primary_selection_unstable_v1 protocol: the offer pipeline for reading a selection, and data sources for claiming either. |
|
compose
Package compose turns keysym sequences into text: pressing ' then e on a us-intl/deadkeys layout commits "é".
|
Package compose turns keysym sequences into text: pressing ' then e on a us-intl/deadkeys layout commits "é". |
|
datacontrol
Package datacontrol is the clipboard-manager side of the seat's selections, over ext_data_control_v1 or, on compositors that predate it, zwlr_data_control_unstable_v1.
|
Package datacontrol is the clipboard-manager side of the seat's selections, over ext_data_control_v1 or, on compositors that predate it, zwlr_data_control_unstable_v1. |
|
dbustest
Package dbustest runs private D-Bus daemons for tests: a session- style bus on a fresh unix socket, configured from a file the helper writes itself, so a test needs dbus-daemon on PATH and nothing in /etc (where a distro's session.conf may be absent - NixOS, minimal containers).
|
Package dbustest runs private D-Bus daemons for tests: a session- style bus on a fresh unix socket, configured from a file the helper writes itself, so a test needs dbus-daemon on PATH and nothing in /etc (where a distro's session.conf may be absent - NixOS, minimal containers). |
|
debug
Package debug is gelm's compile-time trace facility.
|
Package debug is gelm's compile-time trace facility. |
|
dragdrop
Package dragdrop implements drag and drop over the wl_data_device protocol: the source side (data source + start_drag with an icon), the destination side (offer bookkeeping, accept/reject, payload transfer), and the routing of enter/motion/leave/drop to the target registered for the surface under the drag.
|
Package dragdrop implements drag and drop over the wl_data_device protocol: the source side (data source + start_drag with an icon), the destination side (offer bookkeeping, accept/reject, payload transfer), and the routing of enter/motion/leave/drop to the target registered for the surface under the drag. |
|
emoji
Package emoji is gelm's emoji chooser data (#92): a curated table of common Unicode emoji grouped by category with search keywords, parsed once from a compact literal.
|
Package emoji is gelm's emoji chooser data (#92): a curated table of common Unicode emoji grouped by category with search keywords, parsed once from a compact literal. |
|
golden
Package golden compares rendered pixels against committed PNG snapshots ("goldens"), so render-level tests can assert byte-stable output on any machine.
|
Package golden compares rendered pixels against committed PNG snapshots ("goldens"), so render-level tests can assert byte-stable output on any machine. |
|
headlesstest
Compositor drivers for the harness: the suite itself is compositor-agnostic; the pieces that differ - how to close a client window through the compositor's own control channel, where the boot recipe records the pid, what it named the config and log - live behind this interface.
|
Compositor drivers for the harness: the suite itself is compositor-agnostic; the pieces that differ - how to close a client window through the compositor's own control channel, where the boot recipe records the pid, what it named the config and log - live behind this interface. |
|
icons
Icon-theme following (#64): the cache applies live icon-theme switches delivered by the portal monitor (internal/appearance), which the application wires in.
|
Icon-theme following (#64): the cache applies live icon-theme switches delivered by the portal monitor (internal/appearance), which the application wires in. |
|
imgcache
Package imgcache caches decoded raster images and the resampled rasters widget.Image paints from, under one shared LRU budget.
|
Package imgcache caches decoded raster images and the resampled rasters widget.Image paints from, under one shared LRU budget. |
|
inspect
The doctor diagnostics block: one line block a bug report carries verbatim ("here is my gelm doctor output"), covering the session's bound globals and their versions, outputs and scales, the resolved cursor theme, the fonts sysfont selected, and the shm buffer format.
|
The doctor diagnostics block: one line block a bug report carries verbatim ("here is my gelm doctor output"), covering the session's bound globals and their versions, outputs and scales, the resolved cursor theme, the fonts sysfont selected, and the shm buffer format. |
|
keymapfd
Package keymapfd reads the xkb keymap a wl_keyboard.keymap event carries.
|
Package keymapfd reads the xkb keymap a wl_keyboard.keymap event carries. |
|
layersurface
Package layersurface maps the wlr-layer-shell role onto a wl_surface: anchor, layer, keyboard mode, the configure handshake, and the closed signal.
|
Package layersurface maps the wlr-layer-shell role onto a wl_surface: anchor, layer, keyboard mode, the configure handshake, and the closed signal. |
|
logutil
Package logutil holds gelm's single injectable logger.
|
Package logutil holds gelm's single injectable logger. |
|
notify
Package notify sends desktop notifications: the xdg-desktop-portal Notification interface when a portal owns the desktop, org.freedesktop.Notifications (the GNOME spec every daemon implements) as the fallback, and nothing at all without a session bus - the appearance.md failure model, inert and logged at Debug.
|
Package notify sends desktop notifications: the xdg-desktop-portal Notification interface when a portal owns the desktop, org.freedesktop.Notifications (the GNOME spec every daemon implements) as the fallback, and nothing at all without a session bus - the appearance.md failure model, inert and logged at Debug. |
|
popup
The enter/exit visual half of a popup: a slide-and-fade wrapper the coordinator drives.
|
The enter/exit visual half of a popup: a slide-and-fade wrapper the coordinator drives. |
|
recentfiles
Package recentfiles tracks recently used files in the XDG recently-used.xbel format (TOML-free, XML as the spec says), so gelm apps share the recents list with the desktop's other citizens.
|
Package recentfiles tracks recently used files in the XDG recently-used.xbel format (TOML-free, XML as the spec says), so gelm apps share the recents list with the desktop's other citizens. |
|
scale
Package scale owns one surface's buffer scaling: the integer wl_surface fallback, the optional wp_viewporter and wp_fractional_scale_v1 objects, and the output transform.
|
Package scale owns one surface's buffer scaling: the integer wl_surface fallback, the optional wp_viewporter and wp_fractional_scale_v1 objects, and the output transform. |
|
sessionlock
Package sessionlock maps ext-session-lock-v1 onto gelm: the lock object's locked/finished lifecycle and the per-output lock surface role with its configure handshake.
|
Package sessionlock maps ext-session-lock-v1 onto gelm: the lock object's locked/finished lifecycle and the per-output lock surface role with its configure handshake. |
|
style
Package style is gelm's CSS engine: a tokenizer and parser for the GTK-flavored subset docs/css.md scopes, the rule index, and the matcher/cascader that computes one widget's style — custom properties with var() substitution, calc(), color-mix(), and per-longhand cascade across prioritized stylesheets and per-widget inline declarations.
|
Package style is gelm's CSS engine: a tokenizer and parser for the GTK-flavored subset docs/css.md scopes, the rule index, and the matcher/cascader that computes one widget's style — custom properties with var() substitution, calc(), color-mix(), and per-longhand cascade across prioritized stylesheets and per-widget inline declarations. |
|
surfx
Package surfx is the surface-animation coordinator: one state machine every transient surface (menus, tooltips, toasts, dropdown lists, dialogs, layer overlays) drives its enter and exit tweens through, instead of one ad-hoc implementation per surface kind.
|
Package surfx is the surface-animation coordinator: one state machine every transient surface (menus, tooltips, toasts, dropdown lists, dialogs, layer overlays) drives its enter and exit tweens through, instead of one ad-hoc implementation per surface kind. |
|
sysfont
Package sysfont resolves system fonts through fontscan's CSS font selection rules, replacing per-app guesswork.
|
Package sysfont resolves system fonts through fontscan's CSS font selection rules, replacing per-app guesswork. |
|
text
Bidirectional resolution (UAX #9) for every text path in the toolkit (#68): mixed Hebrew/Arabic + Latin lines resolve into directional runs that the shaper lays out visually correct, and the editable widgets map caret motion through.
|
Bidirectional resolution (UAX #9) for every text path in the toolkit (#68): mixed Hebrew/Arabic + Latin lines resolve into directional runs that the shaper lays out visually correct, and the editable widgets map caret motion through. |
|
touchinput
Package touchinput is the session-to-widget bridge for the non-pointer devices every input surface embeds (app windows, popups): it implements wlsession.SurfaceTouchHandler, SurfaceGestureHandler and SurfaceTabletHandler over a widget.TouchTracker, the router's gestures, and its stylus samples.
|
Package touchinput is the session-to-widget bridge for the non-pointer devices every input surface embeds (app windows, popups): it implements wlsession.SurfaceTouchHandler, SurfaceGestureHandler and SurfaceTabletHandler over a widget.TouchTracker, the router's gestures, and its stylus samples. |
|
window
Package window maps the xdg-shell role onto a wl_surface: real toplevel windows with titles, the configure handshake, the compositor-confirmed state set, ping/pong liveness, and the close signal.
|
Package window maps the xdg-shell role onto a wl_surface: real toplevel windows with titles, the configure handshake, the compositor-confirmed state set, ping/pong liveness, and the close signal. |
|
wlnull
Package wlnull is the null object argument the generated Wayland bindings cannot send: a typed-nil proxy (a nil *xdg.Surface, a nil *wl.Output) encodes as object 0 but then panics in the wire encoder's new-id scan, which calls Id on every proxy argument.
|
Package wlnull is the null object argument the generated Wayland bindings cannot send: a typed-nil proxy (a nil *xdg.Surface, a nil *wl.Output) encodes as object 0 but then panics in the wire encoder's new-id scan, which calls Id on every proxy argument. |
|
wlsession
XDG activation: optional xdg_activation_v1 support — the compositor-consented focus request.
|
XDG activation: optional xdg_activation_v1 support — the compositor-consented focus request. |
|
xfer
Package xfer moves selection and drag-and-drop payloads through the pipes Wayland hands the two ends of a transfer.
|
Package xfer moves selection and drag-and-drop payloads through the pipes Wayland hands the two ends of a transfer. |
|
The CSS box primitives: per-corner rounded fills, rounded border rings with per-side widths and colors, angled multi-stop linear gradients, and box shadows with offset, spread, blur, and inset — everything a CSS box paints behind its content.
|
The CSS box primitives: per-corner rounded fills, rounded border rings with per-side widths and colors, angled multi-stop linear gradients, and box shadows with offset, spread, blur, and inset — everything a CSS box paints behind its content. |
|
third_party
|
|
|
neurlang-wayland/external/swizzle
Package swizzle provides functions for converting between RGBA pixel formats.
|
Package swizzle provides functions for converting between RGBA pixel formats. |
|
neurlang-wayland/os
Package os implements an operating system routines useful for graphics
|
Package os implements an operating system routines useful for graphics |
|
neurlang-wayland/unstable/text-input-v3
Package text implements the text_input_unstable_v3 protocol
|
Package text implements the text_input_unstable_v3 protocol |
|
neurlang-wayland/unstable/xdg-decoration-v1
Package xdg implements the xdg_decoration_unstable_v1 protocol
|
Package xdg implements the xdg_decoration_unstable_v1 protocol |
|
neurlang-wayland/wl
Package wl implements the stable Wayland protocol
|
Package wl implements the stable Wayland protocol |
|
neurlang-wayland/wlclient
Package wlclient implements a wayland-client like api
|
Package wlclient implements a wayland-client like api |
|
neurlang-wayland/wlcursor
Package wlcursor implements a Wayland cursor
|
Package wlcursor implements a Wayland cursor |
|
neurlang-wayland/wlcursor/xcursor
Package xcursor loads and parses the X cursor
|
Package xcursor loads and parses the X cursor |
|
neurlang-wayland/xdg
Package xdg implements the stable XDG Window Manager Base protocol
|
Package xdg implements the stable XDG Window Manager Base protocol |
|
Package transfer is the content shape every data transfer shares: clipboard claims, the primary selection, and drag and drop all offer a payload as mime types, best first, with a writer for each, and all read one back by mime preference.
|
Package transfer is the content shape every data transfer shares: clipboard claims, the primary selection, and drag and drop all offer a payload as mime types, best first, with a writer for each, and all read one back by mime preference. |
|
Package vinput injects pointer and keyboard input into the compositor through zwlr_virtual_pointer_v1 and zwp_virtual_keyboard_v1, on a private Wayland connection: the input half of a remote-desktop bridge, and of gelm's own headless test harness.
|
Package vinput injects pointer and keyboard input into the compositor through zwlr_virtual_pointer_v1 and zwp_virtual_keyboard_v1, on a private Wayland connection: the input half of a remote-desktop bridge, and of gelm's own headless test harness. |
|
Accessibility semantics for the widget tree: semantic roles plus a state snapshot that assistive technology can consume.
|
Accessibility semantics for the widget tree: semantic roles plus a state snapshot that assistive technology can consume. |
|
css
Package css names libadwaita's style classes and named colors - the relm4-css analog (#95) - so application code spells them as constants and stylesheets written for GTK port over verbatim:
|
Package css names libadwaita's style classes and named colors - the relm4-css analog (#95) - so application code spells them as constants and stylesheets written for GTK port over verbatim: |
|
Package wlr implements the alpha_modifier_v1 protocol
|
Package wlr implements the alpha_modifier_v1 protocol |
Click to show internal directories.
Click to hide internal directories.