diff options
Diffstat (limited to '')
| -rw-r--r-- | st.h | 40 |
1 files changed, 0 insertions, 40 deletions
| @@ -1,8 +1,5 @@ | |||
| 1 | /* See LICENSE for license details. */ | 1 | /* See LICENSE for license details. */ |
| 2 | 2 | ||
| 3 | /* Arbitrary sizes */ | ||
| 4 | #define UTF_SIZ 4 | ||
| 5 | |||
| 6 | /* macros */ | 3 | /* macros */ |
| 7 | #define MIN(a, b) ((a) < (b) ? (a) : (b)) | 4 | #define MIN(a, b) ((a) < (b) ? (a) : (b)) |
| 8 | #define MAX(a, b) ((a) < (b) ? (b) : (a)) | 5 | #define MAX(a, b) ((a) < (b) ? (b) : (a)) |
| @@ -69,41 +66,6 @@ typedef struct { | |||
| 69 | 66 | ||
| 70 | typedef Glyph *Line; | 67 | typedef Glyph *Line; |
| 71 | 68 | ||
| 72 | typedef struct { | ||
| 73 | Glyph attr; /* current char attributes */ | ||
| 74 | int x; | ||
| 75 | int y; | ||
| 76 | char state; | ||
| 77 | } TCursor; | ||
| 78 | |||
| 79 | /* Purely graphic info */ | ||
| 80 | typedef struct { | ||
| 81 | int tw, th; /* tty width and height */ | ||
| 82 | int w, h; /* window width and height */ | ||
| 83 | int ch; /* char height */ | ||
| 84 | int cw; /* char width */ | ||
| 85 | int mode; /* window state/mode flags */ | ||
| 86 | int cursor; /* cursor style */ | ||
| 87 | } TermWindow; | ||
| 88 | |||
| 89 | typedef struct { | ||
| 90 | int mode; | ||
| 91 | int type; | ||
| 92 | int snap; | ||
| 93 | /* | ||
| 94 | * Selection variables: | ||
| 95 | * nb – normalized coordinates of the beginning of the selection | ||
| 96 | * ne – normalized coordinates of the end of the selection | ||
| 97 | * ob – original coordinates of the beginning of the selection | ||
| 98 | * oe – original coordinates of the end of the selection | ||
| 99 | */ | ||
| 100 | struct { | ||
| 101 | int x, y; | ||
| 102 | } nb, ne, ob, oe; | ||
| 103 | |||
| 104 | int alt; | ||
| 105 | } Selection; | ||
| 106 | |||
| 107 | typedef union { | 69 | typedef union { |
| 108 | int i; | 70 | int i; |
| 109 | uint ui; | 71 | uint ui; |
| @@ -137,11 +99,9 @@ void selclear(void); | |||
| 137 | void selinit(void); | 99 | void selinit(void); |
| 138 | void selstart(int, int, int); | 100 | void selstart(int, int, int); |
| 139 | void selextend(int, int, int, int); | 101 | void selextend(int, int, int, int); |
| 140 | void selnormalize(void); | ||
| 141 | int selected(int, int); | 102 | int selected(int, int); |
| 142 | char *getsel(void); | 103 | char *getsel(void); |
| 143 | 104 | ||
| 144 | size_t utf8decode(const char *, Rune *, size_t); | ||
| 145 | size_t utf8encode(Rune, char *); | 105 | size_t utf8encode(Rune, char *); |
| 146 | 106 | ||
| 147 | void *xmalloc(size_t); | 107 | void *xmalloc(size_t); |
