aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-23 09:34:44 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-23 09:34:44 +0000
commit9666d1d0b7bf10d1981ce895f252a4be05e7238c (patch)
tree6605282e9a5c2482053725e8ee0222c625c1288a /terminal.h
parentMerge branch 'document-control-sequences' (diff)
parentdoc: ctlseq: add private mode 1070 - use private color registers for each sixel (diff)
Merge branch 'sixel-private-color-registers'
Closes #362
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/terminal.h b/terminal.h
index acff9d06..632f6029 100644
--- a/terminal.h
+++ b/terminal.h
@@ -359,6 +359,8 @@ struct terminal {
uint32_t alt_screen:1;
uint32_t modify_escape_key:1;
uint32_t ime:1;
+
+ uint32_t sixel_private_palette:1;
} xtsave;
char *window_title;
@@ -519,7 +521,9 @@ struct terminal {
struct coord pos; /* Current sixel coordinate */
int color_idx; /* Current palette index */
int max_col; /* Largest column index we've seen (aka the image width) */
- uint32_t *palette; /* Color palette */
+ uint32_t *private_palette; /* Private palette, used when private mode 1070 is enabled */
+ uint32_t *shared_palette; /* Shared palette, used when private mode 1070 is disabled */
+ uint32_t *palette; /* Points to either private_palette or shared_palette */
struct {
uint32_t *data; /* Raw image data, in ARGB */
@@ -528,6 +532,8 @@ struct terminal {
bool autosize;
} image;
+ bool use_private_palette:1; /* Private mode 1070 */
+
unsigned params[5]; /* Collected parameters, for RASTER, COLOR_SPEC */
unsigned param; /* Currently collecting parameter, for RASTER, COLOR_SPEC and REPEAT */
unsigned param_idx; /* Parameters seen */