• 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_ARKUI_ACE_ENGINE_FRAMEWORKS_BASE_TEST_MOCK_MOCK_SUBWINDOW_OHOS_H
17 #define FOUNDATION_ARKUI_ACE_ENGINE_FRAMEWORKS_BASE_TEST_MOCK_MOCK_SUBWINDOW_OHOS_H
18 
19 #include "base/memory/ace_type.h"
20 #include "base/subwindow/subwindow.h"
21 
22 namespace OHOS::Ace {
23 
24 class Component;
25 
26 class SubwindowOhos : public Subwindow {
27     DECLARE_ACE_TYPE(SubwindowOhos, Subwindow)
28 
29 public:
30     explicit SubwindowOhos(int32_t instanceId);
31     ~SubwindowOhos() = default;
32     RefPtr<SubwindowOhos> CreateSubwindow(int32_t instanceId);
ShowMenu(const RefPtr<Component> & newComponent)33     void ShowMenu(const RefPtr<Component>& newComponent) override {}
ShowMenuNG(const RefPtr<NG::FrameNode> menuNode,int32_t targetId,const NG::OffsetF & offset)34     void ShowMenuNG(const RefPtr<NG::FrameNode> menuNode, int32_t targetId, const NG::OffsetF& offset) override {}
HideMenuNG(int32_t targetId)35     void HideMenuNG(int32_t targetId) override {}
HideMenuNG()36     void HideMenuNG() override {}
37     void ShowPopup(const RefPtr<Component>& newComponent, bool disableTouchEvent = true) override {}
ShowPopupNG(int32_t targetId,const NG::PopupInfo & popupInfo)38     void ShowPopupNG(int32_t targetId, const NG::PopupInfo& popupInfo) override {}
HidePopupNG(int32_t targetId)39     void HidePopupNG(int32_t targetId) override {}
HidePopupNG()40     void HidePopupNG() override {}
CancelPopup(const std::string & id)41     bool CancelPopup(const std::string& id) override
42     {
43         return false;
44     }
CloseMenu()45     void CloseMenu() override {}
ShowToast(const std::string & message,int32_t duration,const std::string & bottom)46     void ShowToast(const std::string& message, int32_t duration, const std::string& bottom) override {}
ShowDialog(const std::string & title,const std::string & message,const std::vector<ButtonInfo> & buttons,bool autoCancel,std::function<void (int32_t,int32_t)> && callback,const std::set<std::string> & callbacks)47     void ShowDialog(const std::string& title, const std::string& message,
48         const std::vector<ButtonInfo>& buttons, bool autoCancel, std::function<void(int32_t, int32_t)>&& callback,
49         const std::set<std::string>& callbacks) override {}
ShowActionMenu(const std::string & title,const std::vector<ButtonInfo> & button,std::function<void (int32_t,int32_t)> && callback)50     void ShowActionMenu(const std::string& title,
51         const std::vector<ButtonInfo>& button, std::function<void(int32_t, int32_t)>&& callback) override {}
52     void InitContainer() override;
53 };
54 } // namespace OHOS::Ace
55 #endif // FOUNDATION_ARKUI_ACE_ENGINE_FRAMEWORKS_BASE_TEST_MOCK_MOCK_SUBWINDOW_OHOS_H
56