1e0dac50fSopenharmony_ci/*
2e0dac50fSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3e0dac50fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4e0dac50fSopenharmony_ci * you may not use this file except in compliance with the License.
5e0dac50fSopenharmony_ci * You may obtain a copy of the License at
6e0dac50fSopenharmony_ci *
7e0dac50fSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8e0dac50fSopenharmony_ci *
9e0dac50fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10e0dac50fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11e0dac50fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12e0dac50fSopenharmony_ci * See the License for the specific language governing permissions and
13e0dac50fSopenharmony_ci * limitations under the License.
14e0dac50fSopenharmony_ci */
15e0dac50fSopenharmony_ci
16e0dac50fSopenharmony_ci#ifndef OHOS_WINDOW_PROXY_H
17e0dac50fSopenharmony_ci#define OHOS_WINDOW_PROXY_H
18e0dac50fSopenharmony_ci
19e0dac50fSopenharmony_ci#include "window_interface.h"
20e0dac50fSopenharmony_ci#include "iremote_proxy.h"
21e0dac50fSopenharmony_ci#include "wm_common.h"
22e0dac50fSopenharmony_ci#include <transaction/rs_transaction.h>
23e0dac50fSopenharmony_ci
24e0dac50fSopenharmony_cinamespace OHOS {
25e0dac50fSopenharmony_cinamespace Rosen {
26e0dac50fSopenharmony_ciclass WindowProxy : public IRemoteProxy<IWindow> {
27e0dac50fSopenharmony_cipublic:
28e0dac50fSopenharmony_ci    explicit WindowProxy(const sptr<IRemoteObject>& impl) : IRemoteProxy<IWindow>(impl) {};
29e0dac50fSopenharmony_ci
30e0dac50fSopenharmony_ci    ~WindowProxy() {};
31e0dac50fSopenharmony_ci
32e0dac50fSopenharmony_ci    WMError UpdateWindowRect(const struct Rect& rect, bool decoStatus, WindowSizeChangeReason reason,
33e0dac50fSopenharmony_ci        const std::shared_ptr<RSTransaction>& rsTransaction = nullptr) override;
34e0dac50fSopenharmony_ci    WMError UpdateWindowMode(WindowMode mode) override;
35e0dac50fSopenharmony_ci    WMError UpdateWindowModeSupportInfo(uint32_t modeSupportInfo) override;
36e0dac50fSopenharmony_ci    WMError UpdateFocusStatus(bool focused) override;
37e0dac50fSopenharmony_ci    WMError UpdateAvoidArea(const sptr<AvoidArea>& avoidArea, AvoidAreaType type) override;
38e0dac50fSopenharmony_ci    WMError UpdateWindowState(WindowState state) override;
39e0dac50fSopenharmony_ci    WMError UpdateWindowDragInfo(const PointInfo& point, DragEvent event) override;
40e0dac50fSopenharmony_ci    WMError UpdateDisplayId(DisplayId from, DisplayId to) override;
41e0dac50fSopenharmony_ci    WMError UpdateOccupiedAreaChangeInfo(const sptr<OccupiedAreaChangeInfo>& info,
42e0dac50fSopenharmony_ci        const std::shared_ptr<RSTransaction>& rsTransaction = nullptr) override;
43e0dac50fSopenharmony_ci    WMError UpdateOccupiedAreaAndRect(const sptr<OccupiedAreaChangeInfo>& info, const Rect& rect,
44e0dac50fSopenharmony_ci        const std::shared_ptr<RSTransaction>& rsTransaction = nullptr) override;
45e0dac50fSopenharmony_ci    WMError UpdateActiveStatus(bool isActive) override;
46e0dac50fSopenharmony_ci    sptr<WindowProperty> GetWindowProperty() override;
47e0dac50fSopenharmony_ci    WMError NotifyTouchOutside() override;
48e0dac50fSopenharmony_ci    WMError NotifyScreenshot() override;
49e0dac50fSopenharmony_ci    WMError DumpInfo(const std::vector<std::string>& params) override;
50e0dac50fSopenharmony_ci    WMError NotifyDestroy(void) override;
51e0dac50fSopenharmony_ci    WMError NotifyForeground(void) override;
52e0dac50fSopenharmony_ci    WMError NotifyBackground(void) override;
53e0dac50fSopenharmony_ci    WMError NotifyWindowClientPointUp(const std::shared_ptr<MMI::PointerEvent>& pointerEvent) override;
54e0dac50fSopenharmony_ci    WMError UpdateZoomTransform(const Transform& trans, bool isDisplayZoomOn) override;
55e0dac50fSopenharmony_ci    WMError RestoreSplitWindowMode(uint32_t mode) override;
56e0dac50fSopenharmony_ci    void ConsumeKeyEvent(std::shared_ptr<MMI::KeyEvent> event) override;
57e0dac50fSopenharmony_ci    void NotifyForegroundInteractiveStatus(bool interactive) override;
58e0dac50fSopenharmony_ci
59e0dac50fSopenharmony_ciprivate:
60e0dac50fSopenharmony_ci    static inline BrokerDelegator<WindowProxy> delegator_;
61e0dac50fSopenharmony_ci};
62e0dac50fSopenharmony_ci} // namespace Rosen
63e0dac50fSopenharmony_ci} // namespace OHOS
64e0dac50fSopenharmony_ci#endif // OHOS_WINDOW_PROXY_H
65