master uint/maus / include / maus_x11.h
 1#ifndef MAUS_X11_H
 2#define MAUS_X11_H
 3
 4#include "uletypes.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	ule_i8 cur_rel; /* relative cursor */
22	ule_i8 ignore_warp;
23	ule_i8 xi2;
24	int    xi2_opcode;
25	ule_i32 mouse_x;
26	ule_i32 mouse_y;
27	ule_i8  mouse_pos_set;
28
29	XShmSegmentInfo shm;
30	ule_i8          shmat;
31	XImage*         image; /* TODO: XImage path */
32} MausBackend;
33
34#endif /* MAUS_X11_H */
35