Commit | Line | Data |
---|---|---|
7bf7acb6 GI |
1 | #ifndef LIBPICOFE_XENV_H |
2 | #define LIBPICOFE_XENV_H | |
838a76d4 | 3 | |
f620fa7a | 4 | #define XENV_CAP_KEYS (1<<0) |
5 | #define XENV_CAP_MOUSE (1<<1) | |
6 | ||
7 | /* xenv_flags specify if we need keys and mouse, | |
323db729 | 8 | * on return, flag is removed if input is not available */ |
f620fa7a | 9 | int xenv_init(int *xenv_flags, const char *window_title); |
c7b78b94 | 10 | |
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), | |
16 | void *cb_arg); | |
17 | ||
477ba3f2 | 18 | int xenv_minimize(void); |
838a76d4 | 19 | void xenv_finish(void); |
20 | ||
7bf7acb6 | 21 | #endif // LIBPICOFE_XENV_H |