summaryrefslogtreecommitdiff
path: root/src/display.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2023-01-09 23:50:48 +0100
committerAlbert Cervin <albert@acervin.com>2023-01-09 23:50:48 +0100
commitfd8ecb6d0f9af3245e8b1a662987b8cf4e89dec9 (patch)
tree4d7236e75292153b917671251767218b979bdeb2 /src/display.h
parent690786504fce73edea78c7ec13b34771771e4caf (diff)
downloaddged-fd8ecb6d0f9af3245e8b1a662987b8cf4e89dec9.tar.gz
dged-fd8ecb6d0f9af3245e8b1a662987b8cf4e89dec9.tar.xz
dged-fd8ecb6d0f9af3245e8b1a662987b8cf4e89dec9.zip
More stuff
Render things and line numbers.
Diffstat (limited to 'src/display.h')
-rw-r--r--src/display.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/display.h b/src/display.h
index c1c3667..e518b34 100644
--- a/src/display.h
+++ b/src/display.h
@@ -10,26 +10,11 @@ struct display {
uint32_t height;
};
-struct render_command {
- uint32_t col;
- uint32_t row;
-
- uint8_t *data;
- uint32_t len;
-};
-
-struct command_list {
- struct render_command *cmds;
- uint64_t ncmds;
- uint64_t capacity;
- uint32_t xoffset;
- uint32_t yoffset;
-
- uint8_t format[64];
- uint32_t format_len;
-};
+struct render_command;
+struct command_list;
struct display display_create();
+void display_resize(struct display *display);
void display_destroy(struct display *display);
void display_clear(struct display *display);
@@ -41,7 +26,8 @@ void display_end_render(struct display *display);
typedef void *(*alloc_fn)(size_t);
struct command_list *command_list_create(uint32_t capacity, alloc_fn allocator,
- uint32_t xoffset, uint32_t yoffset);
+ uint32_t xoffset, uint32_t yoffset,
+ const char *name);
void command_list_set_index_color_bg(struct command_list *list,
uint8_t color_idx);
@@ -54,3 +40,5 @@ void command_list_set_color_fg(struct command_list *list, uint8_t red,
void command_list_reset_color(struct command_list *list);
void command_list_draw_text(struct command_list *list, uint32_t col,
uint32_t row, uint8_t *data, uint32_t len);
+void command_list_draw_text_copy(struct command_list *list, uint32_t col,
+ uint32_t row, uint8_t *data, uint32_t len);