InputSdl.h 775 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Window/Input.h>
  7. #include <SDL3/SDL.h>
  8. namespace anki {
  9. /// SDL input implementation
  10. class InputSdl : public Input
  11. {
  12. public:
  13. Array<SDL_Cursor*, U32(MouseCursor::kCount)> m_cursors = {};
  14. // SDL calls only from the main thread so have some members for deffer setting some things:
  15. // {
  16. MouseCursor m_crntMouseCursor = MouseCursor::kArrow;
  17. MouseCursor m_prevMouseCursor = MouseCursor::kArrow;
  18. Bool m_crntHideCursor = false;
  19. Bool m_prevHideCursor = false;
  20. // }
  21. ~InputSdl();
  22. Error initInternal();
  23. Error handleEventsInternal();
  24. };
  25. } // end namespace anki