• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "gesture_info.h"
17 
18 namespace OHOS::Ace {
19 #ifdef ENABLE_DRAG_FRAMEWORK
SetData(const RefPtr<UnifiedData> & unifiedData)20 void DragEvent::SetData(const RefPtr<UnifiedData>& unifiedData)
21 {
22     unifiedData_ = unifiedData;
23 }
24 
GetData()25 RefPtr<UnifiedData>& DragEvent::GetData()
26 {
27     return unifiedData_;
28 }
29 
SetSummary(std::map<std::string,int64_t> & summary)30 void DragEvent::SetSummary(std::map<std::string, int64_t>& summary)
31 {
32     summary_ = summary;
33 }
34 
GetSummary()35 std::map<std::string, int64_t>& DragEvent::GetSummary()
36 {
37     return summary_;
38 }
39 
SetResult(DragRet dragRet)40 void DragEvent::SetResult(DragRet dragRet)
41 {
42     dragRet_ = dragRet;
43 }
44 
GetResult()45 DragRet DragEvent::GetResult()
46 {
47     return dragRet_;
48 }
49 
GetPreviewRect()50 Rect DragEvent::GetPreviewRect()
51 {
52     return previewRect_;
53 }
54 
SetPreviewRect(Rect previewRect)55 void DragEvent::SetPreviewRect(Rect previewRect)
56 {
57     previewRect_ = previewRect;
58 }
59 
UseCustomAnimation(bool useCustomAnimation)60 void DragEvent::UseCustomAnimation(bool useCustomAnimation)
61 {
62     useCustomAnimation_ = useCustomAnimation;
63 }
64 
IsUseCustomAnimation()65 bool DragEvent::IsUseCustomAnimation()
66 {
67     return useCustomAnimation_;
68 }
69 
SetDragInfo(const RefPtr<UnifiedData> & dragInfo)70 void DragEvent::SetDragInfo(const RefPtr<UnifiedData>& dragInfo)
71 {
72     dragInfo_ = dragInfo;
73 }
74 
GetDragInfo()75 RefPtr<UnifiedData>& DragEvent::GetDragInfo()
76 {
77     return dragInfo_;
78 }
79 
SetCopy(bool copy)80 void DragEvent::SetCopy(bool copy)
81 {
82     copy_ = copy;
83 }
84 
IsCopy()85 bool DragEvent::IsCopy()
86 {
87     return copy_;
88 }
89 
SetUdKey(const std::string udKey)90 void DragEvent::SetUdKey(const std::string udKey)
91 {
92     udKey_ = udKey;
93 }
94 
GetUdKey()95 std::string DragEvent::GetUdKey()
96 {
97     return udKey_;
98 }
99 
SetIsGetDataSuccess(bool isGetDataSuccess)100 void DragEvent::SetIsGetDataSuccess(bool isGetDataSuccess)
101 {
102     isGetDataSuccess_ = isGetDataSuccess;
103 }
104 
IsGetDataSuccess()105 bool DragEvent::IsGetDataSuccess()
106 {
107     return isGetDataSuccess_;
108 }
109 #endif // ENABLE_DRAG_FRAMEWORK
110 } // namespace OHOS::Ace