diff options
author | notaz | 2012-04-10 00:33:43 +0300 |
---|---|---|
committer | notaz | 2012-04-10 03:07:13 +0300 |
commit | 3a321131b0f1d75685b7487517fc84738f4186d2 (patch) | |
tree | 2590fda9464f309d005e47cb63399b1aef6f9864 /frontend/linux/xenv.h | |
parent | 4fa24f17bf5938ee5962b19f27625c6fb13ac9f7 (diff) | |
download | pcsx_rearmed-3a321131b0f1d75685b7487517fc84738f4186d2.tar.gz pcsx_rearmed-3a321131b0f1d75685b7487517fc84738f4186d2.tar.bz2 pcsx_rearmed-3a321131b0f1d75685b7487517fc84738f4186d2.zip |
frontend: merge updates from SDL project
Diffstat (limited to 'frontend/linux/xenv.h')
-rw-r--r-- | frontend/linux/xenv.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/frontend/linux/xenv.h b/frontend/linux/xenv.h index 1afad9d..6abda19 100644 --- a/frontend/linux/xenv.h +++ b/frontend/linux/xenv.h @@ -1,6 +1,18 @@ -int xenv_init(const char *window_title); -int xenv_update(int *is_down); +#define XENV_CAP_KEYS (1<<0) +#define XENV_CAP_MOUSE (1<<1) + +/* xenv_flags specify if we need keys and mouse, + * on return, flag is removed if input is not available */ +int xenv_init(int *xenv_flags, const char *window_title); + +/* read events from X, calling key_cb for key, mouseb_cb for mouse button + * and mousem_cb for mouse motion events */ +int xenv_update(int (*key_cb)(void *cb_arg, int kc, int is_pressed), + int (*mouseb_cb)(void *cb_arg, int x, int y, int button, int is_pressed), + int (*mousem_cb)(void *cb_arg, int x, int y), + void *cb_arg); + int xenv_minimize(void); void xenv_finish(void); |