• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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_WINDOW_AGENT_H
17 #define OHOS_WINDOW_AGENT_H
18 
19 #include "zidl/window_stub.h"
20 #include "window_impl.h"
21 #include "window_property.h"
22 #include "wm_common.h"
23 
24 namespace OHOS {
25 namespace Rosen {
26 class WindowAgent : public WindowStub {
27 public:
28     WindowAgent(sptr<WindowImpl>& window);
29     ~WindowAgent() = default;
30     void UpdateWindowRect(const struct Rect& rect, WindowSizeChangeReason reason) override;
31     void UpdateWindowMode(WindowMode mode) override;
32     void UpdateFocusStatus(bool focused) override;
33     void UpdateAvoidArea(const std::vector<Rect>& avoidAreas) override;
34     void UpdateWindowState(WindowState state) override;
35     void UpdateWindowDragInfo(const PointInfo& point, DragEvent event) override;
36     void UpdateDisplayId(DisplayId from, DisplayId to) override;
37     void UpdateOccupiedAreaChangeInfo(const sptr<OccupiedAreaChangeInfo>& info) override;
38     void UpdateActiveStatus(bool isActive) override;
39 private:
40     sptr<WindowImpl> window_;
41 };
42 } // namespace Rosen
43 } // namespace OHOS
44 #endif // OHOS_WINDOW_AGENT_H
45