diff options
author | 2025-02-12 15:09:08 +0000 | |
---|---|---|
committer | 2025-02-17 16:01:12 +0000 | |
commit | 8b37b1b36a36bafabfb4dd9870db7d5b5f12c4cc (patch) | |
tree | 18c9575e8d9dde6d0ab27ccfdec54458f67f130c /include/input | |
parent | 93816371d747eac26def8b80c032e9313d367905 (diff) |
Move utility functions related to isFromSource to Input.h
Moving following function to a common file to avoid duplication.
1. isStylusHoverEvent
2. isFromMouse
3. isFromTouchpad
4. isFromDrawingTablet
5. isHoverAction
6. isMouseOrTouchpad
Test: atest inputflinger_tests
Bug: 245989146
Flag: EXEMPT refactor
Change-Id: I9538646f126e792897c525e7e698f6acde4aaa22
Diffstat (limited to 'include/input')
-rw-r--r-- | include/input/Input.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/input/Input.h b/include/input/Input.h index e84023e5e5..002b3a7d15 100644 --- a/include/input/Input.h +++ b/include/input/Input.h @@ -316,6 +316,19 @@ struct PointerProperties; bool isStylusEvent(uint32_t source, const std::vector<PointerProperties>& properties); +bool isStylusHoverEvent(uint32_t source, const std::vector<PointerProperties>& properties, + int32_t action); + +bool isFromMouse(uint32_t source, ToolType tooltype); + +bool isFromTouchpad(uint32_t source, ToolType tooltype); + +bool isFromDrawingTablet(uint32_t source, ToolType tooltype); + +bool isHoverAction(int32_t action); + +bool isMouseOrTouchpad(uint32_t sources); + /* * Flags that flow alongside events in the input dispatch system to help with certain * policy decisions such as waking from device sleep. |