master uint/maus / include / maus_x11.h
 1#ifndef MAUS_X11_H
 2#define MAUS_X11_H
 3
 4#include <stdint.h>
 5
 6#include <X11/Xlib.h>
 7#include <X11/extensions/XShm.h>
 8
 9typedef enum {
10	MAUS_ATOM_WM_DELETE_WINDOW,
11	MAUS_ATOM_LAST
12} MausX11Atoms;
13
14typedef struct {
15	Display* display;
16	Window   root;
17	Window   win;
18	Atom     atoms[MAUS_ATOM_LAST];
19	GC       gc;
20
21	int8_t cur_rel; /* relative cursor */
22	int8_t ignore_warp;
23	int8_t xi2;
24	int    xi2_opcode;
25	int32_t mouse_x;
26	int32_t mouse_y;
27	int8_t  mouse_pos_set;
28
29	XShmSegmentInfo shm;
30	int8_t          shmat;
31	XImage*         image; /* TODO: XImage path */
32} MausBackend;
33
34#endif /* MAUS_X11_H */
35