1 /* 2 * Copyright (c) 2021 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_FRAMEWORKS_CORE_COMMON_MANAGER_INTERFACE_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMMON_MANAGER_INTERFACE_H 18 19 #include "base/geometry/offset.h" 20 #include "base/memory/ace_type.h" 21 #include "core/components/scroll/scroll_element.h" 22 #include "core/components/stack/stack_element.h" 23 24 namespace OHOS::Ace { 25 26 class ManagerInterface : public AceType { 27 DECLARE_ACE_TYPE(ManagerInterface, AceType); 28 29 public: SetClickPosition(const Offset & position)30 virtual void SetClickPosition(const Offset& position) {} GetClickPosition()31 virtual const Offset& GetClickPosition() 32 { 33 static Offset empty; 34 return empty; 35 } MovePage(int32_t pageId,const Offset & rootRect,double offsetHeight)36 virtual void MovePage(int32_t pageId, const Offset& rootRect, double offsetHeight) {} SetScrollElement(int32_t pageId,const WeakPtr<ScrollElement> & scrollElement)37 virtual void SetScrollElement(int32_t pageId, const WeakPtr<ScrollElement>& scrollElement) {} RemovePageId(int32_t pageId)38 virtual void RemovePageId(int32_t pageId) {} GetImeShow()39 virtual bool GetImeShow() const { return false; } SetUIExtensionImeShow(bool imeShow)40 virtual void SetUIExtensionImeShow(bool imeShow) {} GetNeedToRequestKeyboard()41 virtual bool GetNeedToRequestKeyboard() {return true;} SetNeedToRequestKeyboard(bool val)42 virtual void SetNeedToRequestKeyboard(bool val) {} GetIsImeAttached()43 virtual bool GetIsImeAttached() const { return false; } 44 }; 45 46 } // namespace OHOS::Ace 47 48 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMMON_MANAGER_INTERFACE_H 49