Store images, currently at most 10.

This commit is contained in:
Nicholas Marriott
2019-12-05 00:02:55 +00:00
parent 3aebcc6709
commit 49f2f0a8f1
7 changed files with 133 additions and 8 deletions

25
tmux.h
View File

@@ -709,6 +709,21 @@ struct style {
enum style_default_type default_type;
};
/* Image. */
struct image {
struct screen *s;
struct sixel_image *data;
u_int px;
u_int py;
u_int sx;
u_int sy;
TAILQ_ENTRY (image) all_entry;
TAILQ_ENTRY (image) entry;
};
TAILQ_HEAD(images, image);
/* Virtual screen. */
struct screen_sel;
struct screen_titles;
@@ -729,10 +744,10 @@ struct screen {
u_int rlower; /* scroll region bottom */
int mode;
bitstr_t *tabs;
struct screen_sel *sel;
struct images images;
};
/* Screen write context. */
@@ -2705,6 +2720,12 @@ struct window_pane *spawn_pane(struct spawn_context *, char **);
/* regsub.c */
char *regsub(const char *, const char *, const char *, int);
/* image.c */
void image_free_all(struct screen *);
void image_store(struct screen *, struct sixel_image *);
int image_check_line(struct screen *, u_int, u_int);
int image_check_area(struct screen *, u_int, u_int, u_int, u_int);
/* sixel.c */
struct sixel_image *sixel_parse(const char *, size_t, u_int, u_int);
void sixel_free(struct sixel_image *);