diff options
| author | Albert Cervin <albert@acervin.com> | 2022-12-21 15:29:21 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2022-12-21 15:29:21 +0100 |
| commit | 690786504fce73edea78c7ec13b34771771e4caf (patch) | |
| tree | 0a8927e6ab88bb5118eca569fdc4ae3593d7f178 /src/text.h | |
| parent | a817e01bfe2356fdd860010d46db4e4361f343a6 (diff) | |
| download | dged-690786504fce73edea78c7ec13b34771771e4caf.tar.gz dged-690786504fce73edea78c7ec13b34771771e4caf.tar.xz dged-690786504fce73edea78c7ec13b34771771e4caf.zip | |
wip render rework
Diffstat (limited to 'src/text.h')
| -rw-r--r-- | src/text.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5,7 +5,7 @@ // opaque so it is easier to change representation to gap, rope etc. struct text; -struct render_cmd; +struct render_command; struct text *text_create(uint32_t initial_capacity); void text_destroy(struct text *text); @@ -15,7 +15,7 @@ void text_destroy(struct text *text); */ void text_clear(struct text *text); -void text_append_at(struct text *text, uint32_t line, uint32_t col, +void text_insert_at(struct text *text, uint32_t line, uint32_t col, uint8_t *bytes, uint32_t nbytes, uint32_t *lines_added, uint32_t *cols_added); @@ -28,6 +28,7 @@ void text_delete(struct text *text, uint32_t line, uint32_t col, uint32_t text_num_lines(struct text *text); uint32_t text_line_length(struct text *text, uint32_t lineidx); uint32_t text_line_size(struct text *text, uint32_t lineidx); +uint32_t text_col_to_byteindex(struct text *text, uint32_t line, uint32_t col); struct text_chunk { uint8_t *text; |
