BsMouse.h 946 B

1234567891011121314151617181920212223242526272829303132333435
  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. /** Represents a single hardware mouse. Used by the Input to report raw mouse input events. */
  8. class BS_CORE_EXPORT Mouse
  9. {
  10. public:
  11. struct Pimpl;
  12. Mouse(const String& name, Input* owner);
  13. ~Mouse();
  14. /** Returns the name of the device. */
  15. String getName() const { return mName; }
  16. /** Captures the input since the last call and triggers the events on the parent Input. */
  17. void capture();
  18. private:
  19. friend class Input;
  20. /** Changes the capture context. Should be called when focus is moved to a new window. */
  21. void changeCaptureContext(UINT64 windowHandle);
  22. String mName;
  23. Input* mOwner;
  24. Pimpl* m;
  25. };
  26. }