Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

controls.h 581B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * controls.h
  3. */
  4. #ifndef __CONTROLS_H__
  5. #define __CONTROLS_H__
  6. enum mouse_buttons {
  7. MOUSE_LEFT = 0,
  8. MOUSE_MIDDLE,
  9. MOUSE_RIGHT,
  10. MOUSE_BACK,
  11. MOUSE_FORWARD,
  12. MOUSE_BUTTONS_COUNT
  13. };
  14. struct mouse_state {
  15. bool changed;
  16. bool button[MOUSE_BUTTONS_COUNT];
  17. int16_t delta_x, delta_y;
  18. int16_t scroll_x, scroll_y;
  19. bool scroll_lock, fake_middle;
  20. int16_t internal_scroll_x, internal_scroll_y;
  21. };
  22. void controls_init(void);
  23. void controls_mouse_new(int id, bool state);
  24. struct mouse_state controls_mouse_read(void);
  25. #endif // __CONTROLS_H__