diff options
author | 2023-10-07 16:19:19 +0900 | |
---|---|---|
committer | 2023-11-03 18:28:24 +0000 | |
commit | 6a2ce94936c11e3851a619a3287a8916a7da1ff5 (patch) | |
tree | b0e6f37b97daacbf7edc18ca6017b0f286be332d /libs/input/PointerController.h | |
parent | 3f3d325136be55350c94118572a535cfa08b3739 (diff) |
Pointer icon refactor for mouse (base)
When PointerChoreographer is enabled, CursorInputMapper no longer
depends on the legacy PointerController. PointerChoreographer is
responsible for accumulating movements, fading/unfading pointers,
and deciding display/coordinates.
Test: atest libinputservice_test
Bug: 293587049
Change-Id: Ie35b385a99623bbcb2e47b394b7cf2c0f7c5bc0e
Diffstat (limited to 'libs/input/PointerController.h')
-rw-r--r-- | libs/input/PointerController.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/libs/input/PointerController.h b/libs/input/PointerController.h index aa7ca3c52ecf..08e19a096d87 100644 --- a/libs/input/PointerController.h +++ b/libs/input/PointerController.h @@ -47,7 +47,8 @@ class PointerController : public PointerControllerInterface { public: static std::shared_ptr<PointerController> create( const sp<PointerControllerPolicyInterface>& policy, const sp<Looper>& looper, - SpriteController& spriteController, bool enabled); + SpriteController& spriteController, bool enabled, + ControllerType type = ControllerType::LEGACY); ~PointerController() override; @@ -75,7 +76,7 @@ public: void onDisplayInfosChangedLocked(const std::vector<gui::DisplayInfo>& displayInfos) REQUIRES(getLock()); - std::string dump(); + std::string dump() override; protected: using WindowListenerConsumer = @@ -87,10 +88,10 @@ protected: WindowListenerConsumer registerListener, WindowListenerConsumer unregisterListener); -private: PointerController(const sp<PointerControllerPolicyInterface>& policy, const sp<Looper>& looper, SpriteController& spriteController, bool enabled); +private: friend PointerControllerContext::LooperCallback; friend PointerControllerContext::MessageHandler; @@ -135,6 +136,24 @@ private: void clearSpotsLocked() REQUIRES(getLock()); }; +class MousePointerController : public PointerController { +public: + /** A version of PointerController that controls one mouse pointer. */ + MousePointerController(const sp<PointerControllerPolicyInterface>& policy, + const sp<Looper>& looper, SpriteController& spriteController, + bool enabled); + + void setPresentation(Presentation) override { + LOG_ALWAYS_FATAL("Should not be called"); + } + void setSpots(const PointerCoords*, const uint32_t*, BitSet32, int32_t) override { + LOG_ALWAYS_FATAL("Should not be called"); + } + void clearSpots() override { + LOG_ALWAYS_FATAL("Should not be called"); + } +}; + } // namespace android #endif // _UI_POINTER_CONTROLLER_H |