Fix mistake of comparison
[apps/agl-service-windowmanager.git] / src / wm_layer_control.hpp
1 /*\r
2  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION\r
3  *\r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *      http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 #include <string>\r
18 #include <memory>\r
19 #include <vector>\r
20 #include <unordered_map>\r
21 #include <ilm/ilm_control.h>\r
22 #include "wm_error.hpp"\r
23 #include "util.hpp"\r
24 \r
25 namespace wm {\r
26 \r
27 class Screen : public rectangle {\r
28 \r
29 };\r
30 \r
31 class WMLayer;\r
32 class LayerControl\r
33 {\r
34   public:\r
35     explicit LayerControl(const std::string& root);\r
36     ~LayerControl() = default;\r
37     WMError init();\r
38     unsigned getNewLayerID(const std::string& role);\r
39     // void setRenderOrder(const std::vector<unsigned> layer_render_order);\r
40     // std::vector<unsigned> getAllRenderOrder();\r
41     // std::vector<std::shared_ptr<WMLayer>>& getAllLayers();\r
42     // std::vector<unsigned> getRenderOrder(const std::string& layer_name);\r
43     WMError updateLayer(WMLayer& wm_layer);\r
44     void commitChange();\r
45     void undoUpdate();\r
46 \r
47     // Don't use this function.\r
48     void dispatchILMEvent(ilmObjectType object, t_ilm_uint id, t_ilm_bool created);\r
49   private:\r
50     WMError loadLayerSetting(const std::string& path);\r
51     WMError loadAreaDb(const std::string& path);\r
52     std::vector<std::shared_ptr<WMLayer>> wm_layers;\r
53     std::unordered_map<std::string, struct rect> area2size;\r
54     unsigned screenID;\r
55     struct ilmScreenProperties screen_prop;\r
56 };\r
57 \r
58 } // namespace wm