diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-06-02 08:48:31 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-06-02 08:48:31 -0700 |
commit | c8b9286e2184b6d936e6007f81ead3367a4870b6 (patch) | |
tree | 3a365732c0b66d0db21018e64960a04516b0a0df /sys/cmd/term/term.h | |
parent | 80a9db5cab5544badc511fa19aadb5bbfb409c97 (diff) |
feat: started port of st to wayland
Diffstat (limited to 'sys/cmd/term/term.h')
-rw-r--r-- | sys/cmd/term/term.h | 22 |
1 files changed, 14 insertions, 8 deletions
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; |