1 /*
2  * Copyright (c) 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 WINDOW_EXTENSION_INTERFACE_H
17 #define WINDOW_EXTENSION_INTERFACE_H
18 
19 #include <iremote_broker.h>
20 #include <refbase.h>
21 
22 #include "window.h"
23 #include "window_extension_client_interface.h"
24 #include "wm_common.h"
25 
26 namespace OHOS {
27 namespace Rosen {
28 class IWindowExtension : public IRemoteBroker {
29 public:
30     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IWindowExtension");
31 
32     enum {
33         TRANS_ID_SETBOUNDS = 0,
34         TRANS_ID_HIDE_WINDOW,
35         TRANS_ID_SHOW_WINDOW,
36         TRANS_ID_REQUESTFOCUS,
37         TRANS_ID_CONNECT_TO_EXTENSION,
38     };
39 
40     virtual void SetBounds(const Rect& rect) = 0;
41     virtual void Hide() = 0;
42     virtual void Show() = 0;
43     virtual void RequestFocus() = 0;
44     virtual void GetExtensionWindow(sptr<IWindowExtensionClient>& token) = 0;
45 };
46 } // namespace Rosen
47 } // namespace OHOS
48 #endif // WINDOW_EXTENSION_INTERFACE_H