1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef INNER_POINTER_ITEM_H 17 #define INNER_POINTER_ITEM_H 18 19 #include "pointer_event.h" 20 21 namespace OHOS { 22 namespace Msdp { 23 namespace DeviceStatus { 24 namespace Cooperate { 25 struct InnerPointerItem { 26 int32_t pointerId { -1 }; 27 bool pressed { false }; 28 int32_t displayX { -1 }; 29 int32_t displayY { -1 }; 30 int32_t windowX { -1 }; 31 int32_t windowY { -1 }; 32 double displayXPos { 0.0 }; 33 double displayYPos { 0.0 }; 34 double windowXPos { 0.0 }; 35 double windowYPos { 0.0 }; 36 int32_t width { -1 }; 37 int32_t height { -1 }; 38 double tiltX { 0.0 }; 39 double tiltY { 0.0 }; 40 int32_t toolDisplayX { -1 }; 41 int32_t toolDisplayY { -1 }; 42 int32_t toolWindowX { -1 }; 43 int32_t toolWindowY { -1 }; 44 int32_t toolWidth { -1 }; 45 int32_t toolHeight { -1 }; 46 double pressure { 0.0 }; 47 int32_t longAxis { -1 }; 48 int32_t shortAxis { -1 }; 49 int32_t deviceId { -1 }; 50 int64_t downTime { -1 }; 51 int32_t toolType { -1 }; 52 int32_t targetWindowId { -1 }; 53 int32_t originPointerId { -1 }; 54 int32_t rawDx { -1 }; 55 int32_t rawDy { -1 }; 56 57 public: 58 static void Transform(const MMI::PointerEvent::PointerItem &mmiItem, InnerPointerItem &innerItem); 59 static void Transform(const InnerPointerItem &innerItem, MMI::PointerEvent::PointerItem &mmiItem); 60 }; 61 } // namespace Cooperate 62 } // namespace DeviceStatus 63 } // namespace Msdp 64 } // namespace OHOS 65 #endif // INNER_POINTER_ITEM_H 66