Update to xterm 372. ok tb@, naddy@. Tested by others too.

This commit is contained in:
matthieu
2022-04-25 19:20:37 +00:00
parent ba3092b67c
commit 77c0be362c
96 changed files with 22458 additions and 9904 deletions

View File

@@ -1,8 +1,8 @@
/* $XTermId: graphics.h,v 1.23 2016/05/29 16:11:41 tom Exp $ */
/* $XTermId: graphics.h,v 1.29 2022/02/22 23:36:19 tom Exp $ */
/*
* Copyright 2013-2015,2016 by Ross Combs
* Copyright 2013-2015,2016 by Thomas E. Dickey
* Copyright 2013-2016,2022 by Ross Combs
* Copyright 2013-2016,2022 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -47,11 +47,21 @@ typedef struct {
typedef unsigned short RegisterNum;
#define MAX_COLOR_REGISTERS 1024U
#define COLOR_HOLE ((RegisterNum)MAX_COLOR_REGISTERS)
#define MAX_COLOR_REGISTERS 0x400 /* 1024U */
#define COLOR_HOLE 0x404 /* bytable above MAX_COLOR_REGISTERS */
#define MAX_GRAPHICS 16U
#define ClrSpixel(graphic, cell) \
do { \
(graphic)->pixels[cell] = COLOR_HOLE; \
} while (0)
#define SetSpixel(graphic, cell, value) \
do { \
(graphic)->pixels[cell] = value; \
} while (0)
typedef struct {
RegisterNum *pixels;
ColorRegister *private_color_registers;
@@ -71,9 +81,9 @@ typedef struct {
int bufferid; /* which screen buffer the graphic is associated with */
unsigned type; /* type of graphic 0==sixel, 1...NUM_REGIS_PAGES==ReGIS page */
unsigned id; /* sequential id used for preserving layering */
int valid; /* if the graphic has been initialized */
int dirty; /* if the graphic needs to be redrawn */
int hidden; /* if the graphic should not be displayed */
Boolean valid; /* if the graphic has been initialized */
Boolean dirty; /* if the graphic needs to be redrawn */
Boolean hidden; /* if the graphic should not be displayed */
} Graphic;
extern Graphic *get_new_graphic(XtermWidget /* xw */, int /* charrow */, int /* charcol */, unsigned /* type */);
@@ -81,7 +91,6 @@ extern Graphic *get_new_or_matching_graphic(XtermWidget /* xw */, int /* charrow
extern RegisterNum read_pixel(Graphic */* graphic */, int /* x */, int /* y */);
extern void draw_solid_pixel(Graphic */* graphic */, int /* x */, int /* y */, unsigned /* color */);
extern void draw_solid_rectangle(Graphic */* graphic */, int /* x1 */, int /* y1 */, int /* x2 */, int /* y2 */, unsigned /* color */);
extern void draw_solid_line(Graphic */* graphic */, int /* x1 */, int /* y1 */, int /* x2 */, int /* y2 */, unsigned /* color */);
extern void copy_overlapping_area(Graphic */* graphic */, int /* src_x */, int /* src_y */, int /* dst_x */, int /* dst_y */, unsigned /* w */, unsigned /* h */, unsigned /* default_color */);
extern void hls2rgb(int /* h */, int /* l */, int /* s */, short */* r */, short */* g */, short */* b */);
extern void dump_graphic(Graphic const */* graphic */);
@@ -96,7 +105,7 @@ extern void reset_displayed_graphics(TScreen const */* screen */);
extern void scroll_displayed_graphics(XtermWidget /* xw */, int /* rows */);
#ifdef NO_LEAKS
extern void noleaks_graphics(void);
extern void noleaks_graphics(Display */* dpy */);
#endif
#else
@@ -106,7 +115,6 @@ extern void noleaks_graphics(void);
#define read_pixel(graphic, x, y) /* nothing */
#define draw_solid_pixel(graphic, x, y, color) /* nothing */
#define draw_solid_rectangle(graphic, x1, y1, x2, y2, color) /* nothing */
#define draw_solid_line(graphic, x1, y1, x2, y2, color) /* nothing */
#define copy_overlapping_area(graphic, src_x, src_y, dst_x, dst_y, w, h, default_color) /* nothing */
#define hls2rgb(h, l, s, r, g, b) /* nothing */
#define dump_graphic(graphic) /* nothing */