• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 namespace {
22 constexpr ::OHOS::HiviewDFX::HiLogLabel LABEL { LOG_CORE, ::OHOS::Msdp::MSDP_DOMAIN_ID, "fusion_data_binding" };
23 } // namespace
24 
CDragDataFree(struct CDragData * cdrag)25 struct CDragData* CDragDataFree(struct CDragData *cdrag)
26 {
27     CHKPP(cdrag);
28     return nullptr;
29 }
30 
CDragDataFrom(const::OHOS::Msdp::DeviceStatus::DragData * drag,CDragData * cdrag)31 int32_t CDragDataFrom(const ::OHOS::Msdp::DeviceStatus::DragData *drag, CDragData *cdrag)
32 {
33     CALL_DEBUG_ENTER;
34     CHKPR(drag, RET_ERR);
35     CHKPR(cdrag, RET_ERR);
36     cdrag->shadowInfo.x = drag->shadowInfo.x;
37     cdrag->shadowInfo.y = drag->shadowInfo.y;
38     cdrag->buffer = drag->buffer.data();
39     cdrag->bufSize = drag->buffer.size();
40     cdrag->sourceType = drag->sourceType;
41     cdrag->dragNum = drag->dragNum;
42     cdrag->pointerId = drag->pointerId;
43     cdrag->displayX = drag->displayX;
44     cdrag->displayY = drag->displayY;
45     cdrag->displayId = drag->displayId;
46     cdrag->hasCanceledAnimation = drag->hasCanceledAnimation;
47     return RET_OK;
48 }
49