-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrawing.h
More file actions
45 lines (36 loc) · 970 Bytes
/
drawing.h
File metadata and controls
45 lines (36 loc) · 970 Bytes
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
#pragma once
#include <fcntl.h>
#include <linux/fb.h>
#include <linux/kd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xos.h>
#include <X11/Xutil.h>
#include "colors.h"
#include "main.h"
#include "util.h"
typedef enum { BACKEND_FB, BACKEND_X11 } GUI_BACKEND;
extern GUI_BACKEND backend;
extern int backendFB_ttyFD;
extern int backendFB_frameBufferFD;
extern struct fb_var_screeninfo backendFB_screenInfo;
extern const int backendX11_WindowWidth;
extern const int backendX11_WindowHeight;
extern Display *backendX11_display;
extern int backendX11_screen;
extern Window backendX11_window;
extern GC backendX11_gc;
extern XEvent backendX11_event;
extern XImage *backendX11_image;
extern int frameBufferSize;
extern char *restrict frameBuffer;
extern char *restrict drawBuffer;
void drawInit();
void drawLoop();
void drawQuit();