-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterminal.h
53 lines (44 loc) · 1.11 KB
/
terminal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef TERMINAL_H
#define TERMINAL_H
#include <sys/ioctl.h>
typedef uint32_t u32;
typedef uint8_t u8;
#define nil NULL
typedef struct Col Col;
struct Col
{
u8 a, b, g, r;
};
extern Col phos1, phos2;
extern float Gamma;
extern int altesc;
void panic(char *fmt, ...);
#define BLURRADIUS 4
Col getblur(Col *src, int width, int height, int x, int y);
void initblur(float sig);
void* readthread(void *p);
void keyup(SDL_Keysym keysym);
void keydown(SDL_Keysym keysym, int repeat);
void draw(void);
void recvchar(int c);
void shell(void);
void spawn(void);
void mkpty(struct winsize *ws, int th, int tw, int fw, int fh);
void mkwindow(SDL_Window **window, SDL_Renderer **renderer,
char *title, int width, int height);
void mainloop(void);
void toggle_fullscreen(void);
extern char **cmd; // the command to run
extern int baud;
extern int rerun;
extern char **scancodemap;
extern char *scancodemap_both[];
extern char *scancodemap_upper[];
extern const u8 *keystate;
extern u32 userevent;
extern int updatebuf;
extern int updatescreen;
extern int pty;
extern SDL_Window *window;
extern char *name;
#endif /* TERMINAL_H */