grid: refactor: first step towards a more generic range handling

This commit is contained in:
Daniel Eklöf 2024-06-23 13:29:12 +02:00
parent cbe399ecd9
commit 20923bb2e8
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 135 additions and 81 deletions

View file

@ -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 {