mouse.h 850 B

12345678910111213141516171819202122232425
  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. int mouse_streaming_enabled(void);
  7. unsigned int mouse_device_id(void);
  8. int mouse_cursor_visible(void);
  9. unsigned int mouse_packet_size(void);
  10. /* Current cursor position (hotspot) in framebuffer pixels. */
  11. unsigned int mouse_get_x(void);
  12. unsigned int mouse_get_y(void);
  13. /* Button state bitmask: bit0 = left, bit1 = right, bit2 = middle. */
  14. unsigned int mouse_buttons_state(void);
  15. /* Restore the saved background under the cursor (erase the cursor). Call
  16. before a scene redraw so mouse_redraw_cursor() re-saves a clean background. */
  17. void mouse_cursor_erase(void);
  18. /* Re-save the region under the cursor and redraw it on top (after the WM
  19. redraws windows underneath a stationary cursor). */
  20. void mouse_redraw_cursor(void);
  21. #endif