frontend: merge updates from SDL project
[pcsx_rearmed.git] / frontend / linux / xenv.h
1
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,
6  * on return, flag is removed if input is not available */
7 int  xenv_init(int *xenv_flags, const char *window_title);
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
16 int  xenv_minimize(void);
17 void xenv_finish(void);
18