1 /*
2 * Copyright (c) 2022-2023 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 #include "base/geometry/rect.h"
17 #include "base/log/log_wrapper.h"
18 #include "base/subwindow/subwindow_manager.h"
19
20 namespace OHOS::Ace {
21 namespace {
22 static RefPtr<Subwindow> g_currentWindow;
23 } // namespace
24
25 std::shared_ptr<SubwindowManager> SubwindowManager::instance_;
26
GetInstance()27 std::shared_ptr<SubwindowManager> SubwindowManager::GetInstance()
28 {
29 if (!instance_) {
30 instance_ = std::make_shared<SubwindowManager>();
31 }
32 return instance_;
33 }
34
HidePopupNG(int32_t targetId,int32_t instanceId)35 void SubwindowManager::HidePopupNG(int32_t targetId, int32_t instanceId) {}
36
ShowPopupNG(int32_t targetId,const NG::PopupInfo & popupInfo)37 void SubwindowManager::ShowPopupNG(int32_t targetId, const NG::PopupInfo& popupInfo) {}
38
HideMenuNG(const RefPtr<NG::FrameNode> & menu,int32_t targetId)39 void SubwindowManager::HideMenuNG(const RefPtr<NG::FrameNode>& menu, int32_t targetId) {}
40
HideMenuNG(bool showPreviewAnimation,bool startDrag)41 void SubwindowManager::HideMenuNG(bool showPreviewAnimation, bool startDrag) {}
42
SetHotAreas(const std::vector<Rect> & rects,int32_t overlayId,int32_t instanceId)43 void SubwindowManager::SetHotAreas(const std::vector<Rect>& rects, int32_t overlayId, int32_t instanceId) {}
44
HideSubWindowNG()45 void SubwindowManager::HideSubWindowNG() {}
46
GetCurrentWindow()47 const RefPtr<Subwindow>& SubwindowManager::GetCurrentWindow()
48 {
49 return g_currentWindow;
50 }
51
GetParentWindowRect()52 Rect SubwindowManager::GetParentWindowRect()
53 {
54 return Rect();
55 }
56
GetParentContainerId(int32_t containerId)57 int32_t SubwindowManager::GetParentContainerId(int32_t containerId)
58 {
59 return 0;
60 }
61
GetSubwindow(int32_t instanceId)62 const RefPtr<Subwindow> SubwindowManager::GetSubwindow(int32_t instanceId)
63 {
64 return nullptr;
65 }
66
ResizeWindowForFoldStatus()67 void SubwindowManager::ResizeWindowForFoldStatus() {}
68 } // namespace OHOS::Ace
69