mouse.h 945 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #ifndef MOUSE_H
  3. #define MOUSE_H
  4. #include "../base/os.h"
  5. #include "../base/types.h"
  6. #include <stdbool.h>
  7. #if defined(IS_MACOSX)
  8. #include <ApplicationServices/ApplicationServices.h>
  9. typedef enum {
  10. LEFT_BUTTON = kCGMouseButtonLeft,
  11. RIGHT_BUTTON = kCGMouseButtonRight,
  12. CENTER_BUTTON = kCGMouseButtonCenter,
  13. WheelDown = 4,
  14. WheelUp = 5,
  15. WheelLeft = 6,
  16. WheelRight = 7,
  17. } MMMouseButton;
  18. #elif defined(USE_X11)
  19. enum _MMMouseButton {
  20. LEFT_BUTTON = 1,
  21. CENTER_BUTTON = 2,
  22. RIGHT_BUTTON = 3,
  23. WheelDown = 4,
  24. WheelUp = 5,
  25. WheelLeft = 6,
  26. WheelRight = 7,
  27. };
  28. typedef unsigned int MMMouseButton;
  29. #elif defined(IS_WINDOWS)
  30. enum _MMMouseButton {
  31. LEFT_BUTTON = 1,
  32. CENTER_BUTTON = 2,
  33. RIGHT_BUTTON = 3,
  34. WheelDown = 4,
  35. WheelUp = 5,
  36. WheelLeft = 6,
  37. WheelRight = 7,
  38. };
  39. typedef unsigned int MMMouseButton;
  40. #else
  41. #error "No mouse button constants set for platform"
  42. #endif
  43. #endif /* MOUSE_H */