CMouseInput.h 791 B

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