• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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 "ohos_adapter/bridge/ark_clip_board_image_data_adapter_impl.h"
17 
18 namespace OHOS::ArkWeb {
19 
ArkClipBoardImageDataAdapterImpl(std::shared_ptr<OHOS::NWeb::ClipBoardImageDataAdapter> ref)20 ArkClipBoardImageDataAdapterImpl::ArkClipBoardImageDataAdapterImpl(
21     std::shared_ptr<OHOS::NWeb::ClipBoardImageDataAdapter> ref)
22     : real_(ref)
23 {}
24 
GetColorType()25 int32_t ArkClipBoardImageDataAdapterImpl::GetColorType()
26 {
27     return (int32_t)real_->GetColorType();
28 }
29 
GetAlphaType()30 int32_t ArkClipBoardImageDataAdapterImpl::GetAlphaType()
31 {
32     return (int32_t)real_->GetAlphaType();
33 }
34 
GetData()35 uint32_t* ArkClipBoardImageDataAdapterImpl::GetData()
36 {
37     return real_->GetData();
38 }
39 
GetDataSize()40 size_t ArkClipBoardImageDataAdapterImpl::GetDataSize()
41 {
42     return real_->GetDataSize();
43 }
44 
GetRowBytes()45 size_t ArkClipBoardImageDataAdapterImpl::GetRowBytes()
46 {
47     return real_->GetRowBytes();
48 }
49 
GetWidth()50 int32_t ArkClipBoardImageDataAdapterImpl::GetWidth()
51 {
52     return real_->GetWidth();
53 }
54 
GetHeight()55 int32_t ArkClipBoardImageDataAdapterImpl::GetHeight()
56 {
57     return real_->GetHeight();
58 }
59 
SetColorType(int32_t color)60 void ArkClipBoardImageDataAdapterImpl::SetColorType(int32_t color)
61 {
62     real_->SetColorType((OHOS::NWeb::ClipBoardImageColorType)color);
63 }
64 
SetAlphaType(int32_t alpha)65 void ArkClipBoardImageDataAdapterImpl::SetAlphaType(int32_t alpha)
66 {
67     real_->SetAlphaType((OHOS::NWeb::ClipBoardImageAlphaType)alpha);
68 }
69 
SetData(uint32_t * data)70 void ArkClipBoardImageDataAdapterImpl::SetData(uint32_t* data)
71 {
72     real_->SetData(data);
73 }
74 
SetDataSize(size_t size)75 void ArkClipBoardImageDataAdapterImpl::SetDataSize(size_t size)
76 {
77     real_->SetDataSize(size);
78 }
79 
SetRowBytes(size_t rowBytes)80 void ArkClipBoardImageDataAdapterImpl::SetRowBytes(size_t rowBytes)
81 {
82     real_->SetRowBytes(rowBytes);
83 }
84 
SetWidth(int32_t width)85 void ArkClipBoardImageDataAdapterImpl::SetWidth(int32_t width)
86 {
87     real_->SetWidth(width);
88 }
89 
SetHeight(int32_t height)90 void ArkClipBoardImageDataAdapterImpl::SetHeight(int32_t height)
91 {
92     real_->SetHeight(height);
93 }
94 
95 } // namespace OHOS::ArkWeb
96