• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 FOUNDATION_ACE_ACE_ENGINE_ADAPTER_OHOS_CAPABILITY_WINDOW_CONNECTION_WINDOW_EXTENSION_CONNECTION_OHOS_H
17 #define FOUNDATION_ACE_ACE_ENGINE_ADAPTER_OHOS_CAPABILITY_WINDOW_CONNECTION_WINDOW_EXTENSION_CONNECTION_OHOS_H
18 
19 #include "window_extension_connection.h"
20 
21 #include "core/common/window/window_extension_connection_adapter.h"
22 
23 namespace OHOS::Ace {
24 class ACE_EXPORT WindowExtensionConnectionAdapterOhos : public WindowExtensionConnectionAdapter {
25     DECLARE_ACE_TYPE(WindowExtensionConnectionAdapterOhos, WindowExtensionConnectionAdapter);
26 
27 public:
28     void ConnectExtension(
29         const std::string& want, const Rect& rect, WeakPtr<RenderNode> node, int32_t windowId) override;
30     void RemoveExtension() override;
31     void UpdateRect(const Rect& rect) override;
32     void Show() override;
33     void Hide() override;
34 
35 private:
36     std::unique_ptr<Rosen::WindowExtensionConnection> windowExtension_;
37 };
38 } // namespace OHOS::Ace
39 
40 #endif // FOUNDATION_ACE_ACE_ENGINE_ADAPTER_OHOS_CAPABILITY_WINDOW_CONNECTION_WINDOW_EXTENSION_CONNECTION_OHOS_H