summaryrefslogtreecommitdiff
path: root/src/libvterm/include/vterm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libvterm/include/vterm.h')
-rw-r--r--src/libvterm/include/vterm.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libvterm/include/vterm.h b/src/libvterm/include/vterm.h
index fe4a6fce8..9873b6d55 100644
--- a/src/libvterm/include/vterm.h
+++ b/src/libvterm/include/vterm.h
@@ -122,7 +122,12 @@ typedef enum {
/**
* Mask that can be used to extract the default foreground/background bit.
*/
- VTERM_COLOR_DEFAULT_MASK = 0x06
+ VTERM_COLOR_DEFAULT_MASK = 0x06,
+
+ /**
+ * If set, indicates that the color is invalid.
+ */
+ VTERM_COLOR_INVALID = 0x08
} VTermColorType;
/**
@@ -155,6 +160,12 @@ typedef enum {
#define VTERM_COLOR_IS_DEFAULT_BG(col) \
(!!((col)->type & VTERM_COLOR_DEFAULT_BG))
+/**
+ * Returns true if the VTERM_COLOR_INVALID `type` flag is set, indicating
+ * that the given VTermColor instance is an invalid color.
+ */
+#define VTERM_COLOR_IS_INVALID(col) (!!((col)->type & VTERM_COLOR_INVALID))
+
typedef struct {
/**
* Tag indicating which member is actually valid.