blob: 8924b6163440208023e4fc2f5cae158748834b89 (
plain) (
blame)
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
|
#ifndef _HACKVR_GRAPHICS_X11_H_
#define _HACKVR_GRAPHICS_X11_H_
#include <X11/Xlib.h>
struct x11_global {//stores global variables for the x11 *specific* shit.
XColor colors[256];
XColor green;
XColor red;
XColor blue;
XColor redblue[2];
Colormap color_map;
Display *dpy;
Window w;
Pixmap backbuffer;
Pixmap cleanbackbuffer;
GC gc;
GC backgc;
int root_window;
};
void draw_cs_line(cs_t p1,cs_t p2);
void draw_cs_text(cs_t p,char *text);
void draw_cs_shape(cs_s_t s);
void set_aspect_ratio();
void flipscreen();
void set_color();
void clear_backbuffer();
int keypress_handler(int sym);
int graphics_init();
int graphics_event_handler();
void set_clipping_rectangle(int x,int y,int width,int height);
void red_and_blue_magic();
#endif
|