1 #ifndef LIBPICOFE_XENV_H
2 #define LIBPICOFE_XENV_H
4 #define XENV_CAP_KEYS (1<<0)
5 #define XENV_CAP_MOUSE (1<<1)
7 /* xenv_flags specify if we need keys and mouse,
8 * on return, flag is removed if input is not available */
9 int xenv_init(int *xenv_flags, const char *window_title);
11 /* read events from X, calling key_cb for key, mouseb_cb for mouse button
12 * and mousem_cb for mouse motion events */
13 int xenv_update(int (*key_cb)(void *cb_arg, int kc, int is_pressed),
14 int (*mouseb_cb)(void *cb_arg, int x, int y, int button, int is_pressed),
15 int (*mousem_cb)(void *cb_arg, int x, int y),
18 int xenv_minimize(void);
19 void xenv_finish(void);
21 #endif // LIBPICOFE_XENV_H