CMouseInput.h 808 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <glm/vec2.hpp>
  3. namespace WallpaperEngine::Input {
  4. enum MouseClickStatus : int {
  5. Waiting = 0,
  6. Released = 1,
  7. Clicked = 2
  8. };
  9. /**
  10. * Handles mouse input for the background
  11. */
  12. class CMouseInput {
  13. public:
  14. virtual ~CMouseInput () = default;
  15. /**
  16. * Takes current mouse position and updates it
  17. */
  18. virtual void update () = 0;
  19. /**
  20. * The virtual pointer's position
  21. */
  22. [[nodiscard]] virtual glm::dvec2 position () const = 0;
  23. /**
  24. * @return The status of the mouse's left click
  25. */
  26. [[nodiscard]] virtual MouseClickStatus leftClick () const = 0;
  27. /**
  28. * @return The status of the mouse's right click
  29. */
  30. [[nodiscard]] virtual MouseClickStatus rightClick () const = 0;
  31. };
  32. } // namespace WallpaperEngine::Input