From c8b9286e2184b6d936e6007f81ead3367a4870b6 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Tue, 2 Jun 2020 08:48:31 -0700 Subject: feat: started port of st to wayland --- sys/cmd/term/term.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'sys/cmd/term/term.h') diff --git a/sys/cmd/term/term.h b/sys/cmd/term/term.h index f5f20b3..841f30c 100644 --- a/sys/cmd/term/term.h +++ b/sys/cmd/term/term.h @@ -22,7 +22,8 @@ #define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b)) #define IS_TRUECOL(x) (1 << 24 & (x)) -enum glyph_attribute { +enum glyph_attribute +{ ATTR_NULL = 0, ATTR_BOLD = 1 << 0, ATTR_FAINT = 1 << 1, @@ -38,33 +39,38 @@ enum glyph_attribute { ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT, }; -enum selection_mode { +enum selection_mode +{ SEL_IDLE = 0, SEL_EMPTY = 1, SEL_READY = 2 }; -enum selection_type { +enum selection_type +{ SEL_REGULAR = 1, SEL_RECTANGULAR = 2 }; -enum selection_snap { +enum selection_snap +{ SNAP_WORD = 1, SNAP_LINE = 2 }; #define Glyph Glyph_ -typedef struct { - rune u; /* character code */ - ushort mode; /* attribute flags */ +typedef struct +{ + rune u; /* character code */ + ushort mode; /* attribute flags */ uint32 fg; /* foreground */ uint32 bg; /* background */ } Glyph; typedef Glyph *Line; -typedef union { +typedef union +{ int i; uint ui; float f; -- cgit v1.2.1