1/* 2 * Copyright (c) 2021-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/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/*** if arkts 1.2 */ 22import { CommonMethod } from './common' 23import { ResourceColor, ResourceStr } from './units' 24import { Resource } from '../../global/resource' 25/*** endif */ 26 27/** 28 * Provides an interface for generating QR codes. 29 * 30 * @interface QRCodeInterface 31 * @syscap SystemCapability.ArkUI.ArkUI.Full 32 * @since 7 33 */ 34/** 35 * Provides an interface for generating QR codes. 36 * 37 * @interface QRCodeInterface 38 * @syscap SystemCapability.ArkUI.ArkUI.Full 39 * @form 40 * @since 9 41 */ 42/** 43 * Provides an interface for generating QR codes. 44 * 45 * @interface QRCodeInterface 46 * @syscap SystemCapability.ArkUI.ArkUI.Full 47 * @crossplatform 48 * @form 49 * @since 10 50 */ 51/** 52 * Provides an interface for generating QR codes. 53 * 54 * @interface QRCodeInterface 55 * @syscap SystemCapability.ArkUI.ArkUI.Full 56 * @crossplatform 57 * @form 58 * @atomicservice 59 * @since arkts {'1.1':'11','1.2':'20'} 60 * @arkts 1.1&1.2 61 */ 62interface QRCodeInterface { 63 /** 64 * Called when a QR code is set. 65 * 66 * @param { string } value 67 * @returns { QRCodeAttribute } 68 * @syscap SystemCapability.ArkUI.ArkUI.Full 69 * @since 7 70 */ 71 /** 72 * Called when a QR code is set. 73 * 74 * @param { string } value 75 * @returns { QRCodeAttribute } 76 * @syscap SystemCapability.ArkUI.ArkUI.Full 77 * @form 78 * @since 9 79 */ 80 /** 81 * Called when a QR code is set. 82 * 83 * @param { string } value 84 * @returns { QRCodeAttribute } 85 * @syscap SystemCapability.ArkUI.ArkUI.Full 86 * @crossplatform 87 * @form 88 * @since 10 89 */ 90 /** 91 * Called when a QR code is set. 92 * 93 * @param { string } value 94 * @returns { QRCodeAttribute } 95 * @syscap SystemCapability.ArkUI.ArkUI.Full 96 * @crossplatform 97 * @form 98 * @atomicservice 99 * @since 11 100 */ 101 /** 102 * Called when a QR code is set. 103 * 104 * @param { ResourceStr } value 105 * @returns { QRCodeAttribute } 106 * @syscap SystemCapability.ArkUI.ArkUI.Full 107 * @crossplatform 108 * @form 109 * @atomicservice 110 * @since 20 111 * @arkts 1.1&1.2 112 */ 113 (value: ResourceStr): QRCodeAttribute; 114 115 /** 116 * Called when a QR code is set. 117 * 118 * @param { string } value 119 * @returns { QRCodeAttribute } 120 * @syscap SystemCapability.ArkUI.ArkUI.Full 121 * @crossplatform 122 * @form 123 * @atomicservice 124 * @since 20 125 * @arkts 1.2 126 */ 127 (value: string): QRCodeAttribute; 128} 129 130/** 131 * Defines the qrcode attribute functions. 132 * 133 * @extends CommonMethod<QRCodeAttribute> 134 * @syscap SystemCapability.ArkUI.ArkUI.Full 135 * @since 7 136 */ 137/** 138 * Defines the qrcode attribute functions. 139 * 140 * @extends CommonMethod<QRCodeAttribute> 141 * @syscap SystemCapability.ArkUI.ArkUI.Full 142 * @form 143 * @since 9 144 */ 145/** 146 * Defines the qrcode attribute functions. 147 * 148 * @extends CommonMethod<QRCodeAttribute> 149 * @syscap SystemCapability.ArkUI.ArkUI.Full 150 * @crossplatform 151 * @form 152 * @since 10 153 */ 154/** 155 * Defines the qrcode attribute functions. 156 * 157 * @extends CommonMethod<QRCodeAttribute> 158 * @syscap SystemCapability.ArkUI.ArkUI.Full 159 * @crossplatform 160 * @form 161 * @atomicservice 162 * @since arkts {'1.1':'11','1.2':'20'} 163 * @arkts 1.1&1.2 164 */ 165declare class QRCodeAttribute extends CommonMethod<QRCodeAttribute> { 166 /** 167 * Called when the QR code color is set. 168 * 169 * @param { ResourceColor } value 170 * @returns { QRCodeAttribute } 171 * @syscap SystemCapability.ArkUI.ArkUI.Full 172 * @since 7 173 */ 174 /** 175 * Called when the QR code color is set. 176 * 177 * @param { ResourceColor } value 178 * @returns { QRCodeAttribute } 179 * @syscap SystemCapability.ArkUI.ArkUI.Full 180 * @form 181 * @since 9 182 */ 183 /** 184 * Called when the QR code color is set. 185 * 186 * @param { ResourceColor } value 187 * @returns { QRCodeAttribute } 188 * @syscap SystemCapability.ArkUI.ArkUI.Full 189 * @crossplatform 190 * @form 191 * @since 10 192 */ 193 /** 194 * Called when the QR code color is set. 195 * 196 * @param { ResourceColor } value 197 * @returns { QRCodeAttribute } 198 * @syscap SystemCapability.ArkUI.ArkUI.Full 199 * @crossplatform 200 * @form 201 * @atomicservice 202 * @since arkts {'1.1':'11','1.2':'20'} 203 * @arkts 1.1&1.2 204 */ 205 color(value: ResourceColor): QRCodeAttribute; 206 207 /** 208 * Called when setting the QR code background color. 209 * 210 * @param { ResourceColor } value 211 * @returns { QRCodeAttribute } 212 * @syscap SystemCapability.ArkUI.ArkUI.Full 213 * @since 7 214 */ 215 /** 216 * Called when setting the QR code background color. 217 * 218 * @param { ResourceColor } value 219 * @returns { QRCodeAttribute } 220 * @syscap SystemCapability.ArkUI.ArkUI.Full 221 * @form 222 * @since 9 223 */ 224 /** 225 * Called when setting the QR code background color. 226 * 227 * @param { ResourceColor } value 228 * @returns { QRCodeAttribute } 229 * @syscap SystemCapability.ArkUI.ArkUI.Full 230 * @crossplatform 231 * @form 232 * @since 10 233 */ 234 /** 235 * Called when setting the QR code background color. 236 * 237 * @param { ResourceColor } value 238 * @returns { QRCodeAttribute } 239 * @syscap SystemCapability.ArkUI.ArkUI.Full 240 * @crossplatform 241 * @form 242 * @atomicservice 243 * @since arkts {'1.1':'11','1.2':'20'} 244 * @arkts 1.1&1.2 245 */ 246 backgroundColor(value: ResourceColor): QRCodeAttribute; 247 248 /** 249 * Set the opacity of the QR code content color. 250 * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. 251 * @returns { QRCodeAttribute } the attribute of the QR code 252 * @syscap SystemCapability.ArkUI.ArkUI.Full 253 * @crossplatform 254 * @since 11 255 */ 256 /** 257 * Set the opacity of the QR code content color. 258 * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. 259 * @returns { QRCodeAttribute } the attribute of the QR code 260 * @syscap SystemCapability.ArkUI.ArkUI.Full 261 * @crossplatform 262 * @atomicservice 263 * @since arkts {'1.1':'12','1.2':'20'} 264 * @arkts 1.1&1.2 265 */ 266 contentOpacity(value: number | Resource): QRCodeAttribute; 267} 268 269/** 270 * Defines QRCode Component. 271 * 272 * @syscap SystemCapability.ArkUI.ArkUI.Full 273 * @since 7 274 */ 275/** 276 * Defines QRCode Component. 277 * 278 * @syscap SystemCapability.ArkUI.ArkUI.Full 279 * @form 280 * @since 9 281 */ 282/** 283 * Defines QRCode Component. 284 * 285 * @syscap SystemCapability.ArkUI.ArkUI.Full 286 * @crossplatform 287 * @form 288 * @since 10 289 */ 290/** 291 * Defines QRCode Component. 292 * 293 * @syscap SystemCapability.ArkUI.ArkUI.Full 294 * @crossplatform 295 * @form 296 * @atomicservice 297 * @since 11 298 */ 299declare const QRCode: QRCodeInterface; 300 301/** 302 * Defines QRCode Component instance. 303 * 304 * @syscap SystemCapability.ArkUI.ArkUI.Full 305 * @since 7 306 */ 307/** 308 * Defines QRCode Component instance. 309 * 310 * @syscap SystemCapability.ArkUI.ArkUI.Full 311 * @form 312 * @since 9 313 */ 314/** 315 * Defines QRCode Component instance. 316 * 317 * @syscap SystemCapability.ArkUI.ArkUI.Full 318 * @crossplatform 319 * @form 320 * @since 10 321 */ 322/** 323 * Defines QRCode Component instance. 324 * 325 * @syscap SystemCapability.ArkUI.ArkUI.Full 326 * @crossplatform 327 * @form 328 * @atomicservice 329 * @since 11 330 */ 331declare const QRCodeInstance: QRCodeAttribute; 332