From 690786504fce73edea78c7ec13b34771771e4caf Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Wed, 21 Dec 2022 15:29:21 +0100 Subject: wip render rework --- src/text.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/text.h') diff --git a/src/text.h b/src/text.h index 31fc9ca..213cf9e 100644 --- a/src/text.h +++ b/src/text.h @@ -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; -- cgit v1.2.3