BsLinuxInput.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. namespace bs
  6. {
  7. /** Infomation about an analog axis that's part of a gamepad. */
  8. struct AxisInfo
  9. {
  10. INT32 axisIdx;
  11. INT32 min;
  12. INT32 max;
  13. };
  14. /** Information about a gamepad. */
  15. struct GamepadInfo
  16. {
  17. UINT32 id;
  18. UINT32 eventHandlerIdx;
  19. String name;
  20. UnorderedMap<INT32, ButtonCode> buttonMap;
  21. UnorderedMap<INT32, AxisInfo> axisMap;
  22. };
  23. /**
  24. * Data specific to Linux implementation of the input system. Can be passed to platform specific implementations of
  25. * the individual device types.
  26. */
  27. struct InputPrivateData
  28. {
  29. Vector<GamepadInfo> gamepadInfos;
  30. Vector<INT32> mice;
  31. Vector<INT32> keyboards;
  32. };
  33. #define BUFFER_SIZE_GAMEPAD 64
  34. #define BUFFER_SIZE_KEYBOARD 128
  35. #define BUFFER_SIZE_MOUSE 16
  36. }