10ef62e3 |
1 | |
bd34c5a8 |
2 | #define XENV_CAP_KEYS (1<<0) |
3 | #define XENV_CAP_MOUSE (1<<1) |
4 | |
5 | /* xenv_flags specify if we need keys and mouse, |
356473ec |
6 | * on return, flag is removed if input is not available */ |
bd34c5a8 |
7 | int xenv_init(int *xenv_flags, const char *window_title); |
1a375014 |
8 | |
9 | /* read events from X, calling key_cb for key, mouseb_cb for mouse button |
10 | * and mousem_cb for mouse motion events */ |
11 | int xenv_update(int (*key_cb)(void *cb_arg, int kc, int is_pressed), |
12 | int (*mouseb_cb)(void *cb_arg, int x, int y, int button, int is_pressed), |
13 | int (*mousem_cb)(void *cb_arg, int x, int y), |
14 | void *cb_arg); |
15 | |
eef1557e |
16 | int xenv_minimize(void); |
10ef62e3 |
17 | void xenv_finish(void); |
18 | |