1 /* 2 * Copyright (c) 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 17 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMMON_INTERACTION_MANAGER_IMPL_H 18 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMMON_INTERACTION_MANAGER_IMPL_H 19 20 #include "core/common/interaction/interaction_interface.h" 21 22 namespace OHOS::Ace { 23 class InteractionImpl : public InteractionInterface { 24 DECLARE_ACE_TYPE(InteractionImpl, InteractionInterface); 25 26 public: 27 int32_t UpdateShadowPic(const ShadowInfoCore& shadowInfo) override; 28 29 int32_t SetDragWindowVisible(bool visible, 30 const std::shared_ptr<Rosen::RSTransaction>& rSTransaction = nullptr) override; 31 32 int32_t SetMouseDragMonitorState(bool state) override; 33 34 int32_t StartDrag(const DragDataCore& dragData, 35 std::function<void(const OHOS::Ace::DragNotifyMsg&)> callback) override; 36 37 int32_t GetDragBundleInfo(DragBundleInfo& dragBundleInfo) override; 38 39 int32_t UpdateDragStyle(DragCursorStyleCore style, const int32_t eventId = -1) override; 40 41 int32_t UpdatePreviewStyle(const PreviewStyle& previewStyle) override; 42 43 int32_t UpdatePreviewStyleWithAnimation(const PreviewStyle& previewStyle, 44 const PreviewAnimation& animation) override; 45 46 int32_t StopDrag(DragDropRet result) override; 47 48 int32_t GetUdKey(std::string& udKey) override; 49 50 int32_t GetShadowOffset(ShadowOffsetData& shadowOffsetData) override; 51 52 int32_t GetDragState(DragState& dragState) const override; 53 54 int32_t GetDragSummary(std::map<std::string, int64_t>& summary, 55 std::map<std::string, int64_t>& detailedSummary, std::map<std::string, std::vector<int32_t>>& summaryFormat, 56 int32_t& version, int64_t& totalSize) override; 57 58 int32_t GetDragExtraInfo(std::string& extraInfo) override; 59 60 int32_t EnterTextEditorArea(bool enable) override; 61 62 int32_t AddPrivilege() override; 63 64 int32_t RegisterCoordinationListener(std::function<void()> dragOutCallback) override; 65 66 int32_t UnRegisterCoordinationListener() override; 67 68 int32_t SetDraggableState(bool state) override; 69 70 int32_t GetAppDragSwitchState(bool& state) override; 71 72 void SetDraggableStateAsync(bool state, int64_t downTime) override; 73 74 int32_t EnableInternalDropAnimation(const std::string& animationInfo) override; 75 76 bool IsDragStart() const override; 77 }; 78 79 } // namespace OHOS::Ace 80 #endif // FOUNDATION_ACE_ACE_ENGINE_ADAPTER_OHOS_CAPABILITY_INTERACTION_IMPL_H