1 /* 2 * Copyright (c) 2023 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 VIRTUAL_DEVICE_DEFINES_H 17 #define VIRTUAL_DEVICE_DEFINES_H 18 19 #include <cstdint> 20 #include <string> 21 22 #ifndef REL_WHEEL_HI_RES 23 #define REL_WHEEL_HI_RES 0x0b 24 #endif 25 26 #ifndef REL_HWHEEL_HI_RES 27 #define REL_HWHEEL_HI_RES 0x0c 28 #endif 29 30 namespace OHOS { 31 namespace Msdp { 32 namespace DeviceStatus { 33 constexpr double HALF_VALUE { 2.0 }; 34 constexpr double DEFAULT_PRECISION { 0.1 }; 35 constexpr int32_t SLEEP_TIME { 500 }; 36 constexpr int32_t DOWN_VALUE { 1 }; 37 constexpr int32_t UP_VALUE { 0 }; 38 constexpr int32_t SYNC_VALUE { 0 }; 39 constexpr int32_t OBFUSCATED { 30 }; 40 constexpr int32_t MOVE_VALUE_X { 1 }; 41 constexpr int32_t MOVE_VALUE_Y { -1 }; 42 43 struct ResolutionInfo { 44 int16_t axisCode { 0 }; 45 int32_t absResolution { 0 }; 46 }; 47 48 struct AbsInfo { 49 int32_t code { 0 }; 50 int32_t minValue { 0 }; 51 int32_t maxValue { 0 }; 52 int32_t fuzz { 0 }; 53 int32_t flat { 0 }; 54 }; 55 56 struct Coordinate { 57 int32_t x { 0 }; 58 int32_t y { 0 }; 59 }; 60 } // namespace DeviceStatus 61 } // namespace Msdp 62 } // namespace OHOS 63 #endif // VIRTUAL_DEVICE_DEFINES_H