diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-02-13 11:31:55 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-02-21 19:14:51 +0000 |
| commit | fd87bca102321e5804fef74dac8a6d267ae46732 (patch) | |
| tree | 5473f7e53fd2b6cd9075d1b5d6b8b18a184a2ea4 /terminal.h | |
| parent | url-mode: store URL in UTF-8, not UTF-32 (diff) | |
grid: enable rows to have ‘extra’ data associated with them
This patch adds an ‘extra’ member to the row struct. It is a pointer
to a struct containing extra data to be associated with this row.
Initially, this struct contains a list of URL ranges. These
define (OSC-8) URLs on this row.
The ‘extra’ data is allocated on-demand. I.e. the pointer is NULL by
default; it is *not* allocated by grid_row_alloc().
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -86,10 +86,21 @@ struct composed { uint8_t count; }; +struct row_uri_range { + int start; + int end; + char *uri; +}; + +struct row_data { + tll(struct row_uri_range) uri_ranges; +}; + struct row { struct cell *cells; bool dirty; bool linebreak; + struct row_data *extra; }; struct sixel { |
