1 #pragma once 2 3 #include "terminal.h" 4 5 #define SIXEL_MAX_COLORS 1024u 6 #define SIXEL_MAX_WIDTH 10000u 7 #define SIXEL_MAX_HEIGHT 10000u 8 9 void sixel_fini(struct terminal *term); 10 11 void sixel_init(struct terminal *term, int p1, int p2, int p3); 12 void sixel_put(struct terminal *term, uint8_t c); 13 void sixel_unhook(struct terminal *term); 14 15 void sixel_destroy(struct sixel *sixel); 16 void sixel_destroy_all(struct terminal *term); 17 18 void sixel_scroll_up(struct terminal *term, int rows); 19 void sixel_scroll_down(struct terminal *term, int rows); 20 21 void sixel_cell_size_changed(struct terminal *term); 22 void sixel_reflow(struct terminal *term); 23 24 /* 25 * Remove sixel data from the specified location. Used when printing 26 * or erasing characters, and when emitting new sixel images, to 27 * remove sixel data that would otherwise be rendered on-top. 28 * 29 * Row numbers are relative to the current grid offset 30 */ 31 void sixel_overwrite_by_rectangle( 32 struct terminal *term, int row, int col, int height, int width); 33 void sixel_overwrite_by_row(struct terminal *term, int row, int col, int width); 34 void sixel_overwrite_at_cursor(struct terminal *term, int width); 35 36 void sixel_colors_report_current(struct terminal *term); 37 void sixel_colors_reset(struct terminal *term); 38 void sixel_colors_set(struct terminal *term, unsigned count); 39 void sixel_colors_report_max(struct terminal *term); 40 41 void sixel_geometry_report_current(struct terminal *term); 42 void sixel_geometry_reset(struct terminal *term); 43 void sixel_geometry_set(struct terminal *term, unsigned width, unsigned height); 44 void sixel_geometry_report_max(struct terminal *term); 45