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 #include "fusion_data_binding_internal.h" 17 18 #include "devicestatus_define.h" 19 #include "fi_log.h" 20 21 #undef LOG_TAG 22 #define LOG_TAG "fusion_data_binding" 23 CDragDataFree(struct CDragData * cdrag)24struct CDragData* CDragDataFree(struct CDragData *cdrag) 25 { 26 CHKPP(cdrag); 27 return nullptr; 28 } 29 CDragDataFrom(const::OHOS::Msdp::DeviceStatus::DragData * drag,CDragData * cdrag)30int32_t CDragDataFrom(const ::OHOS::Msdp::DeviceStatus::DragData *drag, CDragData *cdrag) 31 { 32 CALL_DEBUG_ENTER; 33 CHKPR(drag, RET_ERR); 34 CHKPR(cdrag, RET_ERR); 35 cdrag->shadowInfo.x = drag->shadowInfo.x; 36 cdrag->shadowInfo.y = drag->shadowInfo.y; 37 cdrag->buffer = drag->buffer.data(); 38 cdrag->bufSize = drag->buffer.size(); 39 cdrag->sourceType = drag->sourceType; 40 cdrag->dragNum = drag->dragNum; 41 cdrag->pointerId = drag->pointerId; 42 cdrag->displayX = drag->displayX; 43 cdrag->displayY = drag->displayY; 44 cdrag->displayId = drag->displayId; 45 cdrag->hasCanceledAnimation = drag->hasCanceledAnimation; 46 return RET_OK; 47 } 48