1 /* 2 * Copyright (c) 2021-2022 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 FOUNDATION_DM_SCREEN_GROUP_H 17 #define FOUNDATION_DM_SCREEN_GROUP_H 18 19 #include <refbase.h> 20 #include <vector> 21 #include "screen.h" 22 23 namespace OHOS::Rosen { 24 class ScreenGroupInfo; 25 enum class ScreenCombination : uint32_t { 26 SCREEN_ALONE, 27 SCREEN_EXPAND, 28 SCREEN_MIRROR, 29 }; 30 31 class ScreenGroup : public Screen { 32 friend class ScreenManager; 33 public: 34 ~ScreenGroup(); 35 ScreenGroup(const ScreenGroup&) = delete; 36 ScreenGroup(ScreenGroup&&) = delete; 37 ScreenGroup& operator=(const ScreenGroup&) = delete; 38 ScreenGroup& operator=(ScreenGroup&&) = delete; 39 ScreenCombination GetCombination() const; 40 std::vector<ScreenId> GetChildIds() const; 41 std::vector<Point> GetChildPositions() const; 42 43 private: 44 // No more methods or variables can be defined here. 45 ScreenGroup(sptr<ScreenGroupInfo> info); 46 void UpdateScreenGroupInfo(sptr<ScreenGroupInfo> info) const; 47 void UpdateScreenGroupInfo() const; 48 class Impl; 49 sptr<Impl> pImpl_; 50 }; 51 } // namespace OHOS::Rosen 52 53 #endif // FOUNDATION_DM_SCREEN_GROUP_H