• 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_INTERFACE_H
17 #define OHOS_WINDOW_INTERFACE_H
18 
19 #include "iremote_broker.h"
20 #include "window.h"
21 #include "window_property.h"
22 #include "wm_common.h"
23 #include "wm_common_inner.h"
24 
25 namespace OHOS {
26 namespace Rosen {
27 class IWindow : public IRemoteBroker {
28 public:
29     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IWindow");
30 
31     enum {
32         TRANS_ID_UPDATE_WINDOW_RECT,
33         TRANS_ID_UPDATE_WINDOW_MODE,
34         TRANS_ID_UPDATE_FOCUS_STATUS,
35         TRANS_ID_UPDATE_AVOID_AREA,
36         TRANS_ID_UPDATE_WINDOW_STATE,
37         TRANS_ID_UPDATE_DRAG_EVENT,
38         TRANS_ID_UPDATE_DISPLAY_ID,
39         TRANS_ID_UPDATE_OCCUPIED_AREA,
40         TRANS_ID_UPDATE_ACTIVE_STATUS,
41     };
42 
43     virtual void UpdateWindowRect(const struct Rect& rect, WindowSizeChangeReason reason) = 0;
44     virtual void UpdateWindowMode(WindowMode mode) = 0;
45     virtual void UpdateFocusStatus(bool focused) = 0;
46     virtual void UpdateAvoidArea(const std::vector<Rect>& avoidAreas) = 0;
47     virtual void UpdateWindowState(WindowState state) = 0;
48     virtual void UpdateWindowDragInfo(const PointInfo& point, DragEvent event) = 0;
49     virtual void UpdateDisplayId(DisplayId from, DisplayId to) = 0;
50     virtual void UpdateOccupiedAreaChangeInfo(const sptr<OccupiedAreaChangeInfo>& info) = 0;
51     virtual void UpdateActiveStatus(bool isActive) = 0;
52 };
53 } // namespace Rosen
54 } // namespace OHOS
55 #endif // OHOS_WINDOW_INTERFACE_H
56