aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-06-23 11:29:12 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-06-26 16:39:23 +0000
commit20923bb2e8235c0e3d72f7c6195523ad0b0a2afa (patch)
treeaefe0f6a3c34627e037ae33f6aa9867c1d2030c8 /terminal.h
parentMerge branch 'vs15-16' (diff)
grid: refactor: first step towards a more generic range handling
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/terminal.h b/terminal.h
index 5033c550..fc654702 100644
--- a/terminal.h
+++ b/terminal.h
@@ -99,19 +99,30 @@ struct damage {
uint16_t lines;
};
-struct row_uri_range {
- int start;
- int end;
+struct uri_range_data {
uint64_t id;
char *uri;
};
+struct row_range {
+ int start;
+ int end;
+
+ union {
+ struct uri_range_data uri;
+ };
+};
+
+struct row_ranges {
+ struct row_range *v;
+ int size;
+ int count;
+};
+
+enum row_range_type {ROW_RANGE_URI};
+
struct row_data {
- struct {
- struct row_uri_range *v;
- uint32_t size;
- uint32_t count;
- } uri_ranges;
+ struct row_ranges uri_ranges;
};
struct row {