diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-21 20:53:23 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-21 20:53:23 +0000 |
| commit | 9e3bfb1eab2c7b1c7a1ec6021331fddc57e8a266 (patch) | |
| tree | 35d03f0099762cb82ca23e584d4bd4464d548332 /terminal.h | |
| parent | keymap: tab: handle all modifiers (diff) | |
sixel: initial support
This implements basic parsing of sixel data. Lots of limitations and
temporary solutions as this is still work-in-progress:
* Maximum image size hardcoded to 800x800
* No HLS color format support
* Image is always rendered at 0x0 in the terminal
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -131,6 +131,7 @@ struct vt { uint8_t *data; size_t size; size_t idx; + void (*put_handler)(struct terminal *term, uint8_t c); void (*unhook_handler)(struct terminal *term); } dcs; struct attributes attrs; @@ -344,6 +345,22 @@ struct terminal { int upper_fd; } delayed_render_timer; + struct { + enum { SIXEL_SIXEL, SIXEL_REPEAT, SIXEL_RASTER, SIXEL_COLOR, SIXEL_COLOR_SPEC} state; + int row; + int col; + int color_idx; + int max_col; + unsigned params[4]; + uint32_t *palette; + uint32_t *image; + + unsigned int param; + unsigned param_idx; + + pixman_image_t *pix; + } sixel; + bool hold_at_exit; bool is_shutting_down; void (*shutdown_cb)(void *data, int exit_code); |
