You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
1.0 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://sam.zoy.org/projects/COPYING.WTFPL for more details.
  9. //
  10. //
  11. // The Input static class
  12. // ----------------------
  13. //
  14. #if !defined __LOL_INPUT_H__
  15. #define __LOL_INPUT_H__
  16. #include "matrix.h"
  17. namespace lol
  18. {
  19. class WorldEntity;
  20. class Input
  21. {
  22. public:
  23. /* These methods are general queries */
  24. static vec2 GetAxis(int axis);
  25. static ivec2 GetMousePos();
  26. static ivec3 GetMouseButtons();
  27. /* Entities can subscribe to events */
  28. static void TrackMouse(WorldEntity *e);
  29. static void UntrackMouse(WorldEntity *e);
  30. /* These methods are called by the underlying input listeners */
  31. static void SetMousePos(ivec2 coord);
  32. static void SetMouseButton(int index);
  33. static void UnsetMouseButton(int index);
  34. };
  35. } /* namespace lol */
  36. #endif // __LOL_INPUT_H__