2020-02-21 21:53:23 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "terminal.h"
|
|
|
|
|
|
2020-02-22 14:02:00 +01:00
|
|
|
#define SIXEL_MAX_COLORS 1024u
|
|
|
|
|
|
2020-06-10 18:36:54 +02:00
|
|
|
void sixel_fini(struct terminal *term);
|
|
|
|
|
|
2020-02-21 21:53:23 +01:00
|
|
|
void sixel_init(struct terminal *term);
|
|
|
|
|
void sixel_put(struct terminal *term, uint8_t c);
|
|
|
|
|
void sixel_unhook(struct terminal *term);
|
2020-02-22 00:23:19 +01:00
|
|
|
|
|
|
|
|
void sixel_destroy(struct sixel *sixel);
|
2020-02-24 18:39:14 +01:00
|
|
|
|
2020-06-27 15:29:47 +02:00
|
|
|
/* Deletes all sixels that are touched by the specified row(s). Row
|
|
|
|
|
* numbers are relative to the current grid aoffset */
|
2020-06-27 13:56:13 +02:00
|
|
|
void sixel_delete_in_range(struct terminal *term, int row_start, int row_end);
|
|
|
|
|
void sixel_delete_at_row(struct terminal *term, int row);
|
2020-06-27 15:22:31 +02:00
|
|
|
|
2020-06-27 15:29:47 +02:00
|
|
|
/* Remove sixel data from the specified location. Row numbers are
|
|
|
|
|
* relative to the current grid offset */
|
|
|
|
|
void sixel_overwrite_by_rectangle(
|
2020-06-27 15:22:31 +02:00
|
|
|
struct terminal *term, int row, int col, int height, int width);
|
2020-06-27 15:29:47 +02:00
|
|
|
void sixel_overwrite_by_row(struct terminal *term, int row, int col, int width);
|
|
|
|
|
void sixel_overwrite_at_cursor(struct terminal *term);
|
2020-02-22 14:02:00 +01:00
|
|
|
|
|
|
|
|
void sixel_colors_report_current(struct terminal *term);
|
|
|
|
|
void sixel_colors_reset(struct terminal *term);
|
|
|
|
|
void sixel_colors_set(struct terminal *term, unsigned count);
|
|
|
|
|
void sixel_colors_report_max(struct terminal *term);
|
2020-02-22 21:03:24 +01:00
|
|
|
|
|
|
|
|
void sixel_geometry_report_current(struct terminal *term);
|
|
|
|
|
void sixel_geometry_reset(struct terminal *term);
|
|
|
|
|
void sixel_geometry_set(struct terminal *term, unsigned width, unsigned height);
|
|
|
|
|
void sixel_geometry_report_max(struct terminal *term);
|