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 
26 class ScreenGroup : public Screen {
27 friend class ScreenManager;
28 public:
29     ~ScreenGroup();
30     ScreenGroup(const ScreenGroup&) = delete;
31     ScreenGroup(ScreenGroup&&) = delete;
32     ScreenGroup& operator=(const ScreenGroup&) = delete;
33     ScreenGroup& operator=(ScreenGroup&&) = delete;
34 
35     /**
36      * @brief Get the screenCombination type of the screen group.
37      *
38      * @return ScreenCombination type of the screen group.
39      */
40     ScreenCombination GetCombination() const;
41 
42     /**
43      * @brief Get the child screen ids.
44      *
45      * @return Child screen ids.
46      */
47     std::vector<ScreenId> GetChildIds() const;
48 
49     /**
50      * @brief Get the child screen positions.
51      *
52      * @return Child screen positions.
53      */
54     std::vector<Point> GetChildPositions() const;
55 
56 private:
57     // No more methods or variables can be defined here.
58     explicit ScreenGroup(sptr<ScreenGroupInfo> info);
59     void UpdateScreenGroupInfo(sptr<ScreenGroupInfo> info) const;
60     void UpdateScreenGroupInfo() const;
61     class Impl;
62     sptr<Impl> pImpl_;
63 };
64 } // namespace OHOS::Rosen
65 
66 #endif // FOUNDATION_DM_SCREEN_GROUP_H