aboutsummaryrefslogtreecommitdiffstats
path: root/xlib.h
blob: 3c8ae24192b99a00a6e1dbebd46241f9fbf9e28f (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
#ifndef _RUNES_XLIB_H
#define _RUNES_XLIB_H

#include <X11/Xlib.h>

enum runes_atoms {
    RUNES_ATOM_WM_DELETE_WINDOW,
    RUNES_NUM_ATOMS
};

struct runes_window {
    Display *dpy;
    Window w;
    GC gc;
    XIC ic;

    Atom atoms[RUNES_NUM_ATOMS];
};

struct xlib_loop_data {
    struct loop_data data;
    XEvent e;
};

RunesWindow *runes_window_create();
cairo_surface_t *runes_surface_create(RunesTerm *t);
void runes_loop_init(RunesTerm *t, uv_loop_t *loop);
void runes_window_destroy(RunesWindow *w);

#endif