Raxol.UI.Rendering.PaintAuthority.Dialect (Raxol v2.6.1)

View Source

The single home of the wire vocabulary shared by every PaintAuthority implementation: the cursor-save dialect and the scroll-region set. The cursor-save dialect choice (DECSC \e7/\e8 vs SCO \e[s/\e[u) changes exactly the two constants below and nothing else; implementations and oracles must reference this module rather than embedding the bytes.

DECSC is the current choice, held provisional until broader terminal coverage confirms it.

Summary

Functions

DECTCEM hide: CSI ? 25 l. Paired with cursor_show/0 around a multi-row footer repaint burst when no DEC 2026 bracket is covering the frame (see InlineAuthority's park protocol) -- hiding is what keeps the parked cursor from visibly hopping row to row while the footer rewrites.

Cursor Position (CUP), 1-based row, column pinned to 1: CSI row;1H. The single byte-builder for "position at the start of history row row" -- callers that used to hand-roll "\e[#{row};1H" (the append path's InlineAuthority.append_sealed/2) route through this instead, so the wire format is defined once and pinned by test rather than duplicated per call site.

Cursor Position (CUP) with an explicit column: CSI row;col H -- the cursor-park vocabulary (InlineAuthority's :cursor repaint/ keyframe option parks the terminal cursor at the composer's edit point after each footer paint). Same single-home rule as cursor_position/1: the wire format lives here, never hand-rolled at an emit site.

Cursor restore (DECRC, provisional).

Cursor save (DECSC, provisional).

DECTCEM show: CSI ? 25 h. See cursor_hide/0.

Erase in Line (EL), default parameter (cursor to end of line): CSI K. The single byte-builder for "clear the row the cursor is currently on" -- callers that used to hand-roll the "\e[K" literal at each footer/ transient emit site route through this instead, same single-home rule as cursor_position/1.

DECSTBM scroll-region set, 1-based inclusive rows: CSI top;bottom r.

DEC 2026 synchronized-update begin: CSI ? 2026 h. Paired with sync_end/0 by InlineAuthority.sync_open/1/sync_close/1; defined here (not inline at the emit site) so the mode number and set/reset finals live in the shared wire vocabulary, pinned by a raw-byte test rather than duplicated per call site.

DEC 2026 synchronized-update end: CSI ? 2026 l. See sync_begin/0.

Functions

cursor_hide()

@spec cursor_hide() :: binary()

DECTCEM hide: CSI ? 25 l. Paired with cursor_show/0 around a multi-row footer repaint burst when no DEC 2026 bracket is covering the frame (see InlineAuthority's park protocol) -- hiding is what keeps the parked cursor from visibly hopping row to row while the footer rewrites.

cursor_position(row)

@spec cursor_position(pos_integer()) :: binary()

Cursor Position (CUP), 1-based row, column pinned to 1: CSI row;1H. The single byte-builder for "position at the start of history row row" -- callers that used to hand-roll "\e[#{row};1H" (the append path's InlineAuthority.append_sealed/2) route through this instead, so the wire format is defined once and pinned by test rather than duplicated per call site.

cursor_position(row, col)

@spec cursor_position(pos_integer(), pos_integer()) :: binary()

Cursor Position (CUP) with an explicit column: CSI row;col H -- the cursor-park vocabulary (InlineAuthority's :cursor repaint/ keyframe option parks the terminal cursor at the composer's edit point after each footer paint). Same single-home rule as cursor_position/1: the wire format lives here, never hand-rolled at an emit site.

cursor_restore()

@spec cursor_restore() :: binary()

Cursor restore (DECRC, provisional).

cursor_save()

@spec cursor_save() :: binary()

Cursor save (DECSC, provisional).

cursor_show()

@spec cursor_show() :: binary()

DECTCEM show: CSI ? 25 h. See cursor_hide/0.

erase_line()

@spec erase_line() :: binary()

Erase in Line (EL), default parameter (cursor to end of line): CSI K. The single byte-builder for "clear the row the cursor is currently on" -- callers that used to hand-roll the "\e[K" literal at each footer/ transient emit site route through this instead, same single-home rule as cursor_position/1.

region_set(top, bottom)

@spec region_set(pos_integer(), pos_integer()) :: binary()

DECSTBM scroll-region set, 1-based inclusive rows: CSI top;bottom r.

sync_begin()

@spec sync_begin() :: binary()

DEC 2026 synchronized-update begin: CSI ? 2026 h. Paired with sync_end/0 by InlineAuthority.sync_open/1/sync_close/1; defined here (not inline at the emit site) so the mode number and set/reset finals live in the shared wire vocabulary, pinned by a raw-byte test rather than duplicated per call site.

sync_end()

@spec sync_end() :: binary()

DEC 2026 synchronized-update end: CSI ? 2026 l. See sync_begin/0.