mouse.h 1006 B

12345678910111213141516171819202122232425262728
  1. #ifndef MOUSE_H
  2. #define MOUSE_H
  3. void mouse_init(void);
  4. void mouse_poll_update(void);
  5. int mouse_is_present(void);
  6. /* 1 when a PS/2 mouse was detected; the protocol accessors below are
  7. PS/2-specific (the USB backend lives in usbhid.h). */
  8. int mouse_ps2_present(void);
  9. int mouse_streaming_enabled(void);
  10. unsigned int mouse_device_id(void);
  11. int mouse_cursor_visible(void);
  12. unsigned int mouse_packet_size(void);
  13. /* Current cursor position (hotspot) in framebuffer pixels. */
  14. unsigned int mouse_get_x(void);
  15. unsigned int mouse_get_y(void);
  16. /* Button state bitmask: bit0 = left, bit1 = right, bit2 = middle. */
  17. unsigned int mouse_buttons_state(void);
  18. /* Restore the saved background under the cursor (erase the cursor). Call
  19. before a scene redraw so mouse_redraw_cursor() re-saves a clean background. */
  20. void mouse_cursor_erase(void);
  21. /* Re-save the region under the cursor and redraw it on top (after the WM
  22. redraws windows underneath a stationary cursor). */
  23. void mouse_redraw_cursor(void);
  24. #endif