commit 3fb2aec6fa516be7d14a7aba61a312061f7b7245
parent b9e436c8991be80b2a9c57f920e3acb686875965
Author: Kyle Milz <krwmilz@gmail.com>
Date: Sat, 11 Sep 2021 21:39:17 +0000
move struct {fg,bg}rec into better header file
Diffstat:
M | events.h | | | 32 | ++++++++++++++++++++++++++++++++ |
M | xdvi.h | | | 28 | ---------------------------- |
2 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/events.h b/events.h
@@ -2,6 +2,8 @@
#include <poll.h> /* struct pollfd */
+#include "data.h" /* struct rgb */
+
struct xdvi_action {
struct xdvi_action *next;
@@ -50,6 +52,36 @@ struct WindowRec {
extern struct WindowRec mane, alt, currwin;
#define shrink_factor currwin.shrinkfactor
+
+/*
+ * For each (foreground, background) color pair, we keep information (depending
+ * on the color model). It is organized as a linked list of linked lists,
+ * with background color more significant.
+ */
+
+struct bgrec {
+ struct bgrec *next;
+ struct rgb color;
+ struct fgrec *fg_head;
+ Boolean pixel_good; /* if the pixel entry is valid */
+ Pixel pixel;
+};
+
+struct fgrec {
+ struct fgrec *next;
+ struct rgb color;
+ Boolean pixel_good; /* if the pixel entry is valid */
+ Pixel pixel;
+ Boolean palette_good; /* if the palette entry is valid */
+ Pixel palette[16]; /* non-TrueColor only */
+};
+
+struct bgrec *bg_head = NULL; /* head of list */
+struct bgrec *bg_current = NULL; /* current bg value */
+struct fgrec *fg_current; /* current fg value */
+struct fgrec *fg_active = NULL; /* where the GCs are */
+
+
/*
* Flag values and masks for event_flags
*/
diff --git a/xdvi.h b/xdvi.h
@@ -182,34 +182,6 @@ struct colorframe *rcs_top;
struct rgb fg_initial; /* Initial fg (from command line) */
struct rgb bg_initial; /* Initial bg */
-/*
- * For each (foreground, background) color pair, we keep information (depending
- * on the color model). It is organized as a linked list of linked lists,
- * with background color more significant.
- */
-
-struct bgrec {
- struct bgrec *next;
- struct rgb color;
- struct fgrec *fg_head;
- Boolean pixel_good; /* if the pixel entry is valid */
- Pixel pixel;
-};
-
-struct fgrec {
- struct fgrec *next;
- struct rgb color;
- Boolean pixel_good; /* if the pixel entry is valid */
- Pixel pixel;
- Boolean palette_good; /* if the palette entry is valid */
- Pixel palette[16]; /* non-TrueColor only */
-};
-
-struct bgrec *bg_head = NULL; /* head of list */
-struct bgrec *bg_current = NULL; /* current bg value */
-struct fgrec *fg_current; /* current fg value */
-struct fgrec *fg_active = NULL; /* where the GCs are */
-
extern struct mg_size_rec {
int w;