diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-06-23 15:39:15 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-06-26 16:39:23 +0000 |
| commit | 32effc6657c1802cdf34098748337b0d7bc39dba (patch) | |
| tree | b87fd39cec2b17b72c51b530cef10e9c86ce68ad /terminal.h | |
| parent | grid: refactor: first step towards a more generic range handling (diff) | |
csi: wip: styled underlines
This is work in progress, and fairly untested.
This adds initial tracking of styled underlines. Setting attributes
seems to work (both color and underline style). Grid reflow has *not*
been tested.
When rendering, style is currently ignored (all styles are rendered as
a plain, legacy underline).
Color however, *is* applied.
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -104,12 +104,33 @@ struct uri_range_data { char *uri; }; +enum curly_style { + CURLY_NONE, + CURLY_SINGLE, /* Legacy underline */ + CURLY_DOUBLE, + CURLY_CURLY, + CURLY_DOTTED, + CURLY_DASHED, +}; + +struct curly_range_data { + enum curly_style style; + enum color_source color_src; + uint32_t color; +}; + +union row_range_data { + struct uri_range_data uri; + struct curly_range_data curly; +}; + struct row_range { int start; int end; union { struct uri_range_data uri; + struct curly_range_data curly; }; }; @@ -119,10 +140,11 @@ struct row_ranges { int count; }; -enum row_range_type {ROW_RANGE_URI}; +enum row_range_type {ROW_RANGE_URI, ROW_RANGE_CURLY}; struct row_data { struct row_ranges uri_ranges; + struct row_ranges curly_ranges; }; struct row { @@ -271,6 +293,8 @@ struct vt { char *uri; } osc8; + struct curly_range_data curly; + struct { uint8_t *data; size_t size; |
