xenv.h 613 B

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