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/** 22 * Defines Marquee constructor options. 23 * 24 * Anonymous Object Rectification. 25 * @interface MarqueeOptions 26 * @syscap SystemCapability.ArkUI.ArkUI.Full 27 * @crossplatform 28 * @form 29 * @atomicservice 30 * @since 18 31 */ 32interface MarqueeOptions { 33 /** 34 * Control whether the running lamp enters the playing state. 35 * 36 * @type { boolean } 37 * @syscap SystemCapability.ArkUI.ArkUI.Full 38 * @since 8 39 */ 40 /** 41 * Control whether the running lamp enters the playing state. 42 * 43 * @type { boolean } 44 * @syscap SystemCapability.ArkUI.ArkUI.Full 45 * @form 46 * @since 9 47 */ 48 /** 49 * Control whether the running lamp enters the playing state. 50 * 51 * @type { boolean } 52 * @syscap SystemCapability.ArkUI.ArkUI.Full 53 * @crossplatform 54 * @form 55 * @since 10 56 */ 57 /** 58 * Control whether the running lamp enters the playing state. 59 * 60 * @type { boolean } 61 * @syscap SystemCapability.ArkUI.ArkUI.Full 62 * @crossplatform 63 * @form 64 * @atomicservice 65 * @since 11 66 */ 67 /** 68 * Control whether the running lamp enters the playing state. 69 * 70 * Anonymous Object Rectification. 71 * @type { boolean } 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @crossplatform 74 * @form 75 * @atomicservice 76 * @since 18 77 */ 78 start: boolean; 79 80 /** 81 * Scroll animation text scroll step, when step is larger than the text width of Marquee, take the default value. 82 * 83 * @type { ?number } 84 * @syscap SystemCapability.ArkUI.ArkUI.Full 85 * @since 8 86 */ 87 /** 88 * Scroll animation text scroll step, when step is larger than the text width of Marquee, take the default value. 89 * 90 * @type { ?number } 91 * @syscap SystemCapability.ArkUI.ArkUI.Full 92 * @form 93 * @since 9 94 */ 95 /** 96 * Scroll animation text scroll step, when step is larger than the text width of Marquee, take the default value. 97 * 98 * @type { ?number } 99 * @syscap SystemCapability.ArkUI.ArkUI.Full 100 * @crossplatform 101 * @form 102 * @since 10 103 */ 104 /** 105 * Scroll animation text scroll step, when step is larger than the text width of Marquee, take the default value. 106 * 107 * @type { ?number } 108 * @syscap SystemCapability.ArkUI.ArkUI.Full 109 * @crossplatform 110 * @form 111 * @atomicservice 112 * @since 11 113 */ 114 /** 115 * Scroll animation text scroll step, when step is larger than the text width of Marquee, take the default value. 116 * 117 * Anonymous Object Rectification. 118 * @type { ?number } 119 * @syscap SystemCapability.ArkUI.ArkUI.Full 120 * @crossplatform 121 * @form 122 * @atomicservice 123 * @since 18 124 */ 125 step?: number; 126 127 /** 128 * Set the number of times the scroll is repeated, infinite loop if it is less than or equal to zero. 129 * 130 * @type { ?number } 131 * @syscap SystemCapability.ArkUI.ArkUI.Full 132 * @since 8 133 */ 134 /** 135 * Set the number of times the scroll is repeated, infinite loop if it is less than or equal to zero. 136 * 137 * @type { ?number } 138 * @syscap SystemCapability.ArkUI.ArkUI.Full 139 * @form 140 * @since 9 141 */ 142 /** 143 * Set the number of times the scroll is repeated, infinite loop if it is less than or equal to zero. 144 * 145 * @type { ?number } 146 * @syscap SystemCapability.ArkUI.ArkUI.Full 147 * @crossplatform 148 * @form 149 * @since 10 150 */ 151 /** 152 * Set the number of times the scroll is repeated, infinite loop if it is less than or equal to zero. 153 * 154 * @type { ?number } 155 * @syscap SystemCapability.ArkUI.ArkUI.Full 156 * @crossplatform 157 * @form 158 * @atomicservice 159 * @since 11 160 */ 161 /** 162 * Set the number of times the scroll is repeated, infinite loop if it is less than or equal to zero. 163 * 164 * Anonymous Object Rectification. 165 * @type { ?number } 166 * @syscap SystemCapability.ArkUI.ArkUI.Full 167 * @crossplatform 168 * @form 169 * @atomicservice 170 * @since 18 171 */ 172 loop?: number; 173 174 /** 175 * Set text to scroll from the beginning or backward. 176 * 177 * @type { ?boolean } 178 * @syscap SystemCapability.ArkUI.ArkUI.Full 179 * @since 8 180 */ 181 /** 182 * Set text to scroll from the beginning or backward. 183 * 184 * @type { ?boolean } 185 * @syscap SystemCapability.ArkUI.ArkUI.Full 186 * @form 187 * @since 9 188 */ 189 /** 190 * Set text to scroll from the beginning or backward. 191 * 192 * @type { ?boolean } 193 * @syscap SystemCapability.ArkUI.ArkUI.Full 194 * @crossplatform 195 * @form 196 * @since 10 197 */ 198 /** 199 * Set text to scroll from the beginning or backward. 200 * 201 * @type { ?boolean } 202 * @syscap SystemCapability.ArkUI.ArkUI.Full 203 * @crossplatform 204 * @form 205 * @atomicservice 206 * @since 11 207 */ 208 /** 209 * Set text to scroll from the beginning or backward. 210 * 211 * Anonymous Object Rectification. 212 * @type { ?boolean } 213 * @syscap SystemCapability.ArkUI.ArkUI.Full 214 * @crossplatform 215 * @form 216 * @atomicservice 217 * @since 18 218 */ 219 fromStart?: boolean; 220 221 /** 222 * Text that needs scrolling. 223 * 224 * @type { string } 225 * @syscap SystemCapability.ArkUI.ArkUI.Full 226 * @since 8 227 */ 228 /** 229 * Text that needs scrolling. 230 * 231 * @type { string } 232 * @syscap SystemCapability.ArkUI.ArkUI.Full 233 * @form 234 * @since 9 235 */ 236 /** 237 * Text that needs scrolling. 238 * 239 * @type { string } 240 * @syscap SystemCapability.ArkUI.ArkUI.Full 241 * @crossplatform 242 * @form 243 * @since 10 244 */ 245 /** 246 * Text that needs scrolling. 247 * 248 * @type { string } 249 * @syscap SystemCapability.ArkUI.ArkUI.Full 250 * @crossplatform 251 * @form 252 * @atomicservice 253 * @since 11 254 */ 255 /** 256 * Text that needs scrolling. 257 * 258 * Anonymous Object Rectification. 259 * @type { string } 260 * @syscap SystemCapability.ArkUI.ArkUI.Full 261 * @crossplatform 262 * @form 263 * @atomicservice 264 * @since 18 265 */ 266 src: string; 267} 268 269/** 270 * Provides the interface for the marquee attributes. 271 * 272 * @interface MarqueeInterface 273 * @syscap SystemCapability.ArkUI.ArkUI.Full 274 * @since 8 275 */ 276/** 277 * Provides the interface for the marquee attributes. 278 * 279 * @interface MarqueeInterface 280 * @syscap SystemCapability.ArkUI.ArkUI.Full 281 * @form 282 * @since 9 283 */ 284/** 285 * Provides the interface for the marquee attributes. 286 * 287 * @interface MarqueeInterface 288 * @syscap SystemCapability.ArkUI.ArkUI.Full 289 * @crossplatform 290 * @form 291 * @since 10 292 */ 293/** 294 * Provides the interface for the marquee attributes. 295 * 296 * @interface MarqueeInterface 297 * @syscap SystemCapability.ArkUI.ArkUI.Full 298 * @crossplatform 299 * @form 300 * @atomicservice 301 * @since 11 302 */ 303interface MarqueeInterface { 304 /** 305 * Create marquee. 306 * 307 * @param { object } value 308 * @returns { MarqueeAttribute } 309 * @syscap SystemCapability.ArkUI.ArkUI.Full 310 * @since 8 311 */ 312 /** 313 * Create marquee. 314 * 315 * @param { object } value 316 * @returns { MarqueeAttribute } 317 * @syscap SystemCapability.ArkUI.ArkUI.Full 318 * @form 319 * @since 9 320 */ 321 /** 322 * Create marquee. 323 * 324 * @param { object } value 325 * @returns { MarqueeAttribute } 326 * @syscap SystemCapability.ArkUI.ArkUI.Full 327 * @crossplatform 328 * @form 329 * @since 10 330 */ 331 /** 332 * Create marquee. 333 * 334 * @param { object } value 335 * @returns { MarqueeAttribute } 336 * @syscap SystemCapability.ArkUI.ArkUI.Full 337 * @crossplatform 338 * @form 339 * @atomicservice 340 * @since 11 341 */ 342 /** 343 * Create marquee. 344 * 345 * Anonymous Object Rectification. 346 * @param { MarqueeOptions } options - Marquee options. 347 * @returns { MarqueeAttribute } 348 * @syscap SystemCapability.ArkUI.ArkUI.Full 349 * @crossplatform 350 * @form 351 * @atomicservice 352 * @since 18 353 */ 354 (options: MarqueeOptions): MarqueeAttribute; 355} 356 357/** 358 * Declares marquee properties. 359 * 360 * @extends CommonMethod<MarqueeAttribute> 361 * @syscap SystemCapability.ArkUI.ArkUI.Full 362 * @since 8 363 */ 364/** 365 * Declares marquee properties. 366 * 367 * @extends CommonMethod<MarqueeAttribute> 368 * @syscap SystemCapability.ArkUI.ArkUI.Full 369 * @form 370 * @since 9 371 */ 372/** 373 * Declares marquee properties. 374 * 375 * @extends CommonMethod<MarqueeAttribute> 376 * @syscap SystemCapability.ArkUI.ArkUI.Full 377 * @crossplatform 378 * @form 379 * @since 10 380 */ 381/** 382 * Declares marquee properties. 383 * 384 * @extends CommonMethod<MarqueeAttribute> 385 * @syscap SystemCapability.ArkUI.ArkUI.Full 386 * @crossplatform 387 * @form 388 * @atomicservice 389 * @since 11 390 */ 391declare class MarqueeAttribute extends CommonMethod<MarqueeAttribute> { 392 /** 393 * Set marquee font Color. 394 * 395 * @param { ResourceColor } value 396 * @returns { MarqueeAttribute } 397 * @syscap SystemCapability.ArkUI.ArkUI.Full 398 * @since 8 399 */ 400 /** 401 * Set marquee font Color. 402 * 403 * @param { ResourceColor } value 404 * @returns { MarqueeAttribute } 405 * @syscap SystemCapability.ArkUI.ArkUI.Full 406 * @form 407 * @since 9 408 */ 409 /** 410 * Set marquee font Color. 411 * 412 * @param { ResourceColor } value 413 * @returns { MarqueeAttribute } 414 * @syscap SystemCapability.ArkUI.ArkUI.Full 415 * @crossplatform 416 * @form 417 * @since 10 418 */ 419 /** 420 * Set marquee font Color. 421 * 422 * @param { ResourceColor } value 423 * @returns { MarqueeAttribute } 424 * @syscap SystemCapability.ArkUI.ArkUI.Full 425 * @crossplatform 426 * @form 427 * @atomicservice 428 * @since 11 429 */ 430 fontColor(value: ResourceColor): MarqueeAttribute; 431 432 /** 433 * Set marquee font size. 434 * 435 * @param { Length } value 436 * @returns { MarqueeAttribute } 437 * @syscap SystemCapability.ArkUI.ArkUI.Full 438 * @since 8 439 */ 440 /** 441 * Set marquee font size. 442 * 443 * @param { Length } value 444 * @returns { MarqueeAttribute } 445 * @syscap SystemCapability.ArkUI.ArkUI.Full 446 * @form 447 * @since 9 448 */ 449 /** 450 * Set marquee font size. 451 * 452 * @param { Length } value 453 * @returns { MarqueeAttribute } 454 * @syscap SystemCapability.ArkUI.ArkUI.Full 455 * @crossplatform 456 * @form 457 * @since 10 458 */ 459 /** 460 * Set marquee font size. 461 * 462 * @param { Length } value 463 * @returns { MarqueeAttribute } 464 * @syscap SystemCapability.ArkUI.ArkUI.Full 465 * @crossplatform 466 * @form 467 * @atomicservice 468 * @since 11 469 */ 470 fontSize(value: Length): MarqueeAttribute; 471 472 /** 473 * Set marquee allow scale. 474 * 475 * @param { boolean } value 476 * @returns { MarqueeAttribute } 477 * @syscap SystemCapability.ArkUI.ArkUI.Full 478 * @since 8 479 */ 480 /** 481 * Set marquee allow scale. 482 * 483 * @param { boolean } value 484 * @returns { MarqueeAttribute } 485 * @syscap SystemCapability.ArkUI.ArkUI.Full 486 * @form 487 * @since 9 488 */ 489 /** 490 * Set marquee allow scale. 491 * 492 * @param { boolean } value 493 * @returns { MarqueeAttribute } 494 * @syscap SystemCapability.ArkUI.ArkUI.Full 495 * @crossplatform 496 * @form 497 * @since 10 498 */ 499 /** 500 * Set marquee allow scale. 501 * 502 * @param { boolean } value 503 * @returns { MarqueeAttribute } 504 * @syscap SystemCapability.ArkUI.ArkUI.Full 505 * @crossplatform 506 * @form 507 * @atomicservice 508 * @since 11 509 */ 510 allowScale(value: boolean): MarqueeAttribute; 511 512 /** 513 * Set marquee font weight. 514 * 515 * @param { number | FontWeight | string } value 516 * @returns { MarqueeAttribute } 517 * @syscap SystemCapability.ArkUI.ArkUI.Full 518 * @since 8 519 */ 520 /** 521 * Set marquee font weight. 522 * 523 * @param { number | FontWeight | string } value 524 * @returns { MarqueeAttribute } 525 * @syscap SystemCapability.ArkUI.ArkUI.Full 526 * @form 527 * @since 9 528 */ 529 /** 530 * Set marquee font weight. 531 * 532 * @param { number | FontWeight | string } value 533 * @returns { MarqueeAttribute } 534 * @syscap SystemCapability.ArkUI.ArkUI.Full 535 * @crossplatform 536 * @form 537 * @since 10 538 */ 539 /** 540 * Set marquee font weight. 541 * 542 * @param { number | FontWeight | string } value 543 * @returns { MarqueeAttribute } 544 * @syscap SystemCapability.ArkUI.ArkUI.Full 545 * @crossplatform 546 * @form 547 * @atomicservice 548 * @since 11 549 */ 550 fontWeight(value: number | FontWeight | string): MarqueeAttribute; 551 552 /** 553 * Set marquee font family. 554 * 555 * @param { string | Resource } value 556 * @returns { MarqueeAttribute } 557 * @syscap SystemCapability.ArkUI.ArkUI.Full 558 * @since 8 559 */ 560 /** 561 * Set marquee font family. 562 * 563 * @param { string | Resource } value 564 * @returns { MarqueeAttribute } 565 * @syscap SystemCapability.ArkUI.ArkUI.Full 566 * @form 567 * @since 9 568 */ 569 /** 570 * Set marquee font family. 571 * 572 * @param { string | Resource } value 573 * @returns { MarqueeAttribute } 574 * @syscap SystemCapability.ArkUI.ArkUI.Full 575 * @crossplatform 576 * @form 577 * @since 10 578 */ 579 /** 580 * Set marquee font family. 581 * 582 * @param { string | Resource } value 583 * @returns { MarqueeAttribute } 584 * @syscap SystemCapability.ArkUI.ArkUI.Full 585 * @crossplatform 586 * @form 587 * @atomicservice 588 * @since 11 589 */ 590 fontFamily(value: string | Resource): MarqueeAttribute; 591 592 /** 593 * Marquee scrolling strategy after text update. 594 * 595 * @param { MarqueeUpdateStrategy } value - The scrolling strategy after text update. 596 * @returns { MarqueeAttribute } 597 * @syscap SystemCapability.ArkUI.ArkUI.Full 598 * @crossplatform 599 * @atomicservice 600 * @since 12 601 */ 602 marqueeUpdateStrategy(value: MarqueeUpdateStrategy): MarqueeAttribute; 603 604 /** 605 * Called when scrolling starts. 606 * 607 * @param { function } event 608 * @returns { MarqueeAttribute } 609 * @syscap SystemCapability.ArkUI.ArkUI.Full 610 * @since 8 611 */ 612 /** 613 * Called when scrolling starts. 614 * 615 * @param { function } event 616 * @returns { MarqueeAttribute } 617 * @syscap SystemCapability.ArkUI.ArkUI.Full 618 * @form 619 * @since 9 620 */ 621 /** 622 * Called when scrolling starts. 623 * 624 * @param { function } event 625 * @returns { MarqueeAttribute } 626 * @syscap SystemCapability.ArkUI.ArkUI.Full 627 * @crossplatform 628 * @form 629 * @since 10 630 */ 631 /** 632 * Called when scrolling starts. 633 * 634 * @param { function } event 635 * @returns { MarqueeAttribute } 636 * @syscap SystemCapability.ArkUI.ArkUI.Full 637 * @crossplatform 638 * @form 639 * @atomicservice 640 * @since 11 641 */ 642 onStart(event: () => void): MarqueeAttribute; 643 644 /** 645 * Called when scrolling to the bottom. 646 * 647 * @param { function } event 648 * @returns { MarqueeAttribute } 649 * @syscap SystemCapability.ArkUI.ArkUI.Full 650 * @since 8 651 */ 652 /** 653 * Called when scrolling to the bottom. 654 * 655 * @param { function } event 656 * @returns { MarqueeAttribute } 657 * @syscap SystemCapability.ArkUI.ArkUI.Full 658 * @form 659 * @since 9 660 */ 661 /** 662 * Called when scrolling to the bottom. 663 * 664 * @param { function } event 665 * @returns { MarqueeAttribute } 666 * @syscap SystemCapability.ArkUI.ArkUI.Full 667 * @crossplatform 668 * @form 669 * @since 10 670 */ 671 /** 672 * Called when scrolling to the bottom. 673 * 674 * @param { function } event 675 * @returns { MarqueeAttribute } 676 * @syscap SystemCapability.ArkUI.ArkUI.Full 677 * @crossplatform 678 * @form 679 * @atomicservice 680 * @since 11 681 */ 682 onBounce(event: () => void): MarqueeAttribute; 683 684 /** 685 * Called when scrolling is complete. 686 * 687 * @param { function } event 688 * @returns { MarqueeAttribute } 689 * @syscap SystemCapability.ArkUI.ArkUI.Full 690 * @since 8 691 */ 692 /** 693 * Called when scrolling is complete. 694 * 695 * @param { function } event 696 * @returns { MarqueeAttribute } 697 * @syscap SystemCapability.ArkUI.ArkUI.Full 698 * @form 699 * @since 9 700 */ 701 /** 702 * Called when scrolling is complete. 703 * 704 * @param { function } event 705 * @returns { MarqueeAttribute } 706 * @syscap SystemCapability.ArkUI.ArkUI.Full 707 * @crossplatform 708 * @form 709 * @since 10 710 */ 711 /** 712 * Called when scrolling is complete. 713 * 714 * @param { function } event 715 * @returns { MarqueeAttribute } 716 * @syscap SystemCapability.ArkUI.ArkUI.Full 717 * @crossplatform 718 * @form 719 * @atomicservice 720 * @since 11 721 */ 722 onFinish(event: () => void): MarqueeAttribute; 723} 724 725/** 726 * Defines Marquee Component. 727 * 728 * @syscap SystemCapability.ArkUI.ArkUI.Full 729 * @since 8 730 */ 731/** 732 * Defines Marquee Component. 733 * 734 * @syscap SystemCapability.ArkUI.ArkUI.Full 735 * @form 736 * @since 9 737 */ 738/** 739 * Defines Marquee Component. 740 * 741 * @syscap SystemCapability.ArkUI.ArkUI.Full 742 * @crossplatform 743 * @form 744 * @since 10 745 */ 746/** 747 * Defines Marquee Component. 748 * 749 * @syscap SystemCapability.ArkUI.ArkUI.Full 750 * @crossplatform 751 * @form 752 * @atomicservice 753 * @since 11 754 */ 755declare const Marquee: MarqueeInterface; 756 757/** 758 * Defines Marquee Component instance. 759 * 760 * @syscap SystemCapability.ArkUI.ArkUI.Full 761 * @since 8 762 */ 763/** 764 * Defines Marquee Component instance. 765 * 766 * @syscap SystemCapability.ArkUI.ArkUI.Full 767 * @form 768 * @since 9 769 */ 770/** 771 * Defines Marquee Component instance. 772 * 773 * @syscap SystemCapability.ArkUI.ArkUI.Full 774 * @crossplatform 775 * @form 776 * @since 10 777 */ 778/** 779 * Defines Marquee Component instance. 780 * 781 * @syscap SystemCapability.ArkUI.ArkUI.Full 782 * @crossplatform 783 * @form 784 * @atomicservice 785 * @since 11 786 */ 787declare const MarqueeInstance: MarqueeAttribute; 788