InputBackend.h 752 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2022 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <memory>
  5. #include <vector>
  6. class ControllerInterface;
  7. namespace ciface
  8. {
  9. namespace Core
  10. {
  11. class Device;
  12. }
  13. class InputBackend
  14. {
  15. public:
  16. InputBackend(ControllerInterface* controller_interface);
  17. virtual ~InputBackend();
  18. virtual void PopulateDevices() = 0;
  19. // Do NOT directly add/remove devices within here,
  20. // just add them to the removal list if necessary.
  21. virtual void UpdateInput(std::vector<std::weak_ptr<ciface::Core::Device>>& devices_to_remove);
  22. virtual void HandleWindowChange();
  23. ControllerInterface& GetControllerInterface();
  24. private:
  25. ControllerInterface& m_controller_interface;
  26. };
  27. } // namespace ciface