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 #ifndef I_DRAG_ANIMATION_H 17 #define I_DRAG_ANIMATION_H 18 19 #include "pixel_map.h" 20 #include "transaction/rs_transaction.h" 21 #include "ui/rs_canvas_node.h" 22 #include "ui/rs_root_node.h" 23 24 #include "drag_data.h" 25 26 namespace OHOS { 27 namespace Msdp { 28 namespace DeviceStatus { 29 class IDragAnimation { 30 public: 31 IDragAnimation() = default; 32 virtual ~IDragAnimation() = default; 33 virtual void OnStartDrag(const DragAnimationData &dragAnimationData, 34 std::shared_ptr<Rosen::RSCanvasNode> shadowNode, 35 std::shared_ptr<Rosen::RSCanvasNode> styleNode) = 0; 36 virtual void OnDragStyle(std::shared_ptr<Rosen::RSCanvasNode> styleNode, 37 std::shared_ptr<Media::PixelMap> stylePixelMap) = 0; 38 virtual void OnStopDragSuccess(std::shared_ptr<Rosen::RSCanvasNode> shadowNode, 39 std::shared_ptr<Rosen::RSCanvasNode> styleNode) = 0; 40 virtual void OnStopDragFail(std::shared_ptr<Rosen::RSSurfaceNode> surfaceNode, 41 std::shared_ptr<Rosen::RSNode> rootNode) = 0; 42 virtual void OnStopAnimation() = 0; 43 }; 44 } // namespace DeviceStatus 45 } // namespace Msdp 46 } // namespace OHOS 47 #endif // I_DRAG_ANIMATION_H 48