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 OHOS_ROSEN_SCREEN_FOLD_DATA_H 17 #define OHOS_ROSEN_SCREEN_FOLD_DATA_H 18 19 #include <cstdint> 20 #include <string> 21 22 namespace OHOS::Rosen { 23 24 struct ScreenFoldData { ScreenFoldDataScreenFoldData25 ScreenFoldData() {} ~ScreenFoldDataScreenFoldData26 ~ScreenFoldData() {} 27 28 bool GetTypeCThermalWithUtil(); 29 void SetFocusedPkgName(const std::string& packageName); 30 void SetInvalid(); 31 32 constexpr static int32_t DMS_PARAM_NUMBER = 5; 33 constexpr static int32_t INVALID_VALUE = -1; 34 constexpr static int32_t HALF_FOLD_REPORT_TRIGGER_DURATION = 15; 35 36 // DMS 37 int32_t currentScreenFoldStatus_ = INVALID_VALUE; 38 int32_t nextScreenFoldStatus_ = 0; 39 int32_t currentScreenFoldStatusDuration_ = 0; 40 int32_t screenRotation_ = 0; 41 float postureAngle_ = 0.0f; 42 43 // WMS 44 int32_t screenDisplayMode_ = 0; 45 std::string focusedPackageName_; 46 47 // Others 48 int32_t typeCThermal_ = 0; 49 int32_t screenThermal_ = 0; 50 int32_t angleOfABAxis_ = 0; 51 int32_t isTentMode_ = 0; 52 }; 53 } 54 55 #endif // OHOS_ROSEN_SCREEN_FOLD_DATA_H