Açıklama Yok
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 594B

123456789101112131415161718192021222324252627282930313233
  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;
  20. uint16_t fake_middle;
  21. int16_t internal_scroll_x, internal_scroll_y;
  22. };
  23. void controls_init(void);
  24. void controls_mouse_new(int id, bool state);
  25. struct mouse_state controls_mouse_read(void);
  26. #endif // __CONTROLS_H__