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 * common enum of color 18 * @since 7 19 */ 20/** 21 * common enum of color 22 * @form 23 * @since 9 24 */ 25declare enum Color { 26 /** 27 * White. 28 * @since 7 29 */ 30 /** 31 * White. 32 * @form 33 * @since 9 34 */ 35 White, 36 37 /** 38 * Black. 39 * @since 7 40 */ 41 /** 42 * Black. 43 * @form 44 * @since 9 45 */ 46 Black, 47 48 /** 49 * Blue. 50 * @since 7 51 */ 52 /** 53 * Blue. 54 * @form 55 * @since 9 56 */ 57 Blue, 58 59 /** 60 * Brown. 61 * @since 7 62 */ 63 /** 64 * Brown. 65 * @form 66 * @since 9 67 */ 68 Brown, 69 70 /** 71 * Gray. 72 * @since 7 73 */ 74 /** 75 * Gray. 76 * @form 77 * @since 9 78 */ 79 Gray, 80 81 /** 82 * Green. 83 * @since 7 84 */ 85 /** 86 * Green. 87 * @form 88 * @since 9 89 */ 90 Green, 91 92 /** 93 * Grey. 94 * @since 7 95 */ 96 /** 97 * Grey. 98 * @form 99 * @since 9 100 */ 101 Grey, 102 103 /** 104 * Orange. 105 * @since 7 106 */ 107 /** 108 * Orange. 109 * @form 110 * @since 9 111 */ 112 Orange, 113 114 /** 115 * color. 116 * @since 7 117 */ 118 /** 119 * color. 120 * @form 121 * @since 9 122 */ 123 Pink, 124 125 /** 126 * Red. 127 * @since 7 128 */ 129 /** 130 * Red. 131 * @form 132 * @since 9 133 */ 134 Red, 135 136 /** 137 * Yellow. 138 * @since 7 139 */ 140 /** 141 * Yellow. 142 * @form 143 * @since 9 144 */ 145 Yellow, 146 147 /** 148 * Transparent. 149 * @form 150 * @since 9 151 */ 152 Transparent, 153} 154 155/** 156 * Image display mode 157 * @since 7 158 */ 159/** 160 * Image display mode. 161 * @form 162 * @since 9 163 */ 164declare enum ImageFit { 165 /** 166 * Keep the aspect ratio to zoom out or zoom in so that the image is completely displayed within the display boundary. 167 * @since 7 168 */ 169 /** 170 * Keep the aspect ratio to zoom out or zoom in so that the image is completely displayed within the display boundary. 171 * @form 172 * @since 9 173 */ 174 Contain, 175 176 /** 177 * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the display boundary. 178 * @since 7 179 */ 180 /** 181 * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the display boundary. 182 * @form 183 * @since 9 184 */ 185 Cover, 186 187 /** 188 * Adaptive display 189 * @since 7 190 */ 191 /** 192 * Adaptive display 193 * @form 194 * @since 9 195 */ 196 Auto, 197 198 /** 199 * Zoom in or out without maintaining the aspect ratio so that the image fills the display boundary. 200 * @since 7 201 */ 202 /** 203 * Zoom in or out without maintaining the aspect ratio so that the image fills the display boundary. 204 * @form 205 * @since 9 206 */ 207 Fill, 208 209 /** 210 * Keep the aspect ratio displayed, and the image zooms out or remains unchanged. 211 * @since 7 212 */ 213 /** 214 * Keep the aspect ratio displayed, and the image zooms out or remains unchanged. 215 * @form 216 * @since 9 217 */ 218 ScaleDown, 219 220 /** 221 * Keep the original size and display it in the center. 222 * @since 7 223 */ 224 /** 225 * Keep the original size and display it in the center. 226 * @form 227 * @since 9 228 */ 229 None, 230} 231 232/** 233 * Border Style 234 * @since 7 235 */ 236/** 237 * Border Style 238 * @form 239 * @since 9 240 */ 241declare enum BorderStyle { 242 /** 243 * Displays as a series of dots with a radius of half the borderWidth. 244 * @since 7 245 */ 246 /** 247 * Displays as a series of dots with a radius of half the borderWidth. 248 * @form 249 * @since 9 250 */ 251 Dotted, 252 253 /** 254 * Shows as a series of short square dashed lines. 255 * @since 7 256 */ 257 /** 258 * Shows as a series of short square dashed lines. 259 * @form 260 * @since 9 261 */ 262 Dashed, 263 264 /** 265 * Shows as a solid line. 266 * @since 7 267 */ 268 /** 269 * Shows as a solid line. 270 * @form 271 * @since 9 272 */ 273 Solid, 274} 275 276/** 277 * Line Join Style 278 * @since 7 279 */ 280/** 281 * Line Join Style 282 * @form 283 * @since 9 284 */ 285declare enum LineJoinStyle { 286 /** 287 * Connect path segments using bevels. 288 * @since 7 289 */ 290 /** 291 * Connect path segments using bevels. 292 * @form 293 * @since 9 294 */ 295 Miter, 296 297 /** 298 * Connect path segments using sharp corners. 299 * @since 7 300 */ 301 /** 302 * Connect path segments using sharp corners. 303 * @form 304 * @since 9 305 */ 306 Round, 307 308 /** 309 * Connect path segments using fillets. 310 * @since 7 311 */ 312 /** 313 * Connect path segments using fillets. 314 * @form 315 * @since 9 316 */ 317 Bevel, 318} 319 320/** 321 * Function Called by Touch 322 * @since 7 323 */ 324declare enum TouchType { 325 /** 326 * Triggered when the finger is pressed. 327 * @since 7 328 */ 329 Down, 330 331 /** 332 * Triggered when the finger is raised. 333 * @since 7 334 */ 335 Up, 336 337 /** 338 * Triggered when the finger presses on the screen. 339 * @since 7 340 */ 341 Move, 342 343 /** 344 * Triggers when the touch event cancels. 345 * @since 7 346 */ 347 Cancel, 348} 349 350/** 351 * Function Called by Mouse 352 * @since 8 353 */ 354declare enum MouseButton { 355 /** 356 * Mouse Left Button. 357 * @since 8 358 */ 359 Left, 360 361 /** 362 * Mouse Right Button. 363 * @since 8 364 */ 365 Right, 366 367 /** 368 * Mouse Middle Button. 369 * @since 8 370 */ 371 Middle, 372 373 /** 374 * Mouse Back Button. 375 * @since 8 376 */ 377 Back, 378 379 /** 380 * Mouse Forward Button. 381 * @since 8 382 */ 383 Forward, 384 385 /** 386 * Mouse None Button. 387 * @since 8 388 */ 389 None, 390} 391 392/** 393 * Function Called by Mouse 394 * @since 8 395 */ 396declare enum MouseAction { 397 /** 398 * Triggered when the mouse is pressed. 399 * @since 8 400 */ 401 Press, 402 403 /** 404 * Triggered when the mouse is released. 405 * @since 8 406 */ 407 Release, 408 409 /** 410 * Triggered when the mouse is Moved. 411 * @since 8 412 */ 413 Move, 414 415 /** 416 * Triggered when the mouse is Hovered. 417 * @since 8 418 */ 419 Hover 420} 421 422/** 423 * Animation status. 424 * @since 7 425 */ 426declare enum AnimationStatus { 427 /** 428 * Initial state of the animation. 429 * @since 7 430 */ 431 Initial, 432 433 /** 434 * The animation is playing. 435 * @since 7 436 */ 437 Running, 438 439 /** 440 * The animation is paused. 441 * @since 7 442 */ 443 Paused, 444 445 /** 446 * The animation is stopped. 447 * @since 7 448 */ 449 Stopped, 450} 451 452/** 453 * Sets the animation playback mode. By default, the animation starts to play again after the playback is complete. 454 * @since 7 455 */ 456/** 457 * Sets the animation playback mode. By default, the animation starts to play again after the playback is complete. 458 * @form 459 * @since 9 460 */ 461declare enum Curve { 462 /** 463 * Indicates that the speed of the animation is the same from start to finish. 464 * @since 7 465 */ 466 /** 467 * Indicates that the speed of the animation is the same from start to finish. 468 * @form 469 * @since 9 470 */ 471 Linear, 472 473 /** 474 * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, CubicBezier(0.25, 0.1, 0.25, 1.0). 475 * @since 7 476 */ 477 /** 478 * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, CubicBezier(0.25, 0.1, 0.25, 1.0). 479 * @form 480 * @since 9 481 */ 482 Ease, 483 484 /** 485 * Indicates that the animation starts at a low speed, CubicBezier(0.42, 0.0, 1.0, 1.0). 486 * @since 7 487 */ 488 /** 489 * Indicates that the animation starts at a low speed, CubicBezier(0.42, 0.0, 1.0, 1.0). 490 * @form 491 * @since 9 492 */ 493 EaseIn, 494 495 /** 496 * Indicates that the animation ends at a low speed, CubicBezier(0.0, 0.0, 0.78, 1.0). 497 * @since 7 498 */ 499 /** 500 * Indicates that the animation ends at a low speed, CubicBezier(0.0, 0.0, 0.78, 1.0). 501 * @form 502 * @since 9 503 */ 504 EaseOut, 505 506 /** 507 * Indicates that the animation starts and ends at a slow speed, CubicBezier(0.42, 0.0, 0.78, 1.0). 508 * @since 7 509 */ 510 /** 511 * Indicates that the animation starts and ends at a slow speed, CubicBezier(0.42, 0.0, 0.78, 1.0). 512 * @form 513 * @since 9 514 */ 515 EaseInOut, 516 517 /** 518 * Slow-in, fast-out 519 * @since 7 520 */ 521 /** 522 * Slow-in, fast-out 523 * @form 524 * @since 9 525 */ 526 FastOutSlowIn, 527 528 /** 529 * Linear Out Slow In 530 * @since 7 531 */ 532 /** 533 * Linear Out Slow In 534 * @form 535 * @since 9 536 */ 537 LinearOutSlowIn, 538 539 /** 540 * Fast Out Linear In. 541 * @since 7 542 */ 543 /** 544 * Fast Out Linear In. 545 * @form 546 * @since 9 547 */ 548 FastOutLinearIn, 549 550 /** 551 * Extreme Deceleration. 552 * @since 7 553 */ 554 /** 555 * Extreme Deceleration. 556 * @form 557 * @since 9 558 */ 559 ExtremeDeceleration, 560 561 /** 562 * Sharp. 563 * @since 7 564 */ 565 /** 566 * Sharp. 567 * @form 568 * @since 9 569 */ 570 Sharp, 571 572 /** 573 * Rhythm. 574 * @since 7 575 */ 576 /** 577 * Rhythm. 578 * @form 579 * @since 9 580 */ 581 Rhythm, 582 583 /** 584 * Smooth. 585 * @since 7 586 */ 587 /** 588 * Smooth. 589 * @form 590 * @since 9 591 */ 592 Smooth, 593 594 /** 595 * Damping curve, CubicBezier(0.2, 0.0, 0.2, 1.0). 596 * @since 7 597 */ 598 /** 599 * Damping curve, CubicBezier(0.2, 0.0, 0.2, 1.0). 600 * @form 601 * @since 9 602 */ 603 Friction, 604} 605 606/** 607 * Sets the state before and after the animation starts. 608 * @since 7 609 */ 610declare enum FillMode { 611 /** 612 * Restores to the initial state after the playback is complete. 613 * @since 7 614 */ 615 None, 616 617 /** 618 * Retains the state at the end of the animation when the playback is complete. 619 * @since 7 620 */ 621 Forwards, 622 623 /** 624 * Applies the start attribute value for the period specified by animation-delay before the animation is displayed. 625 * @since 7 626 */ 627 Backwards, 628 629 /** 630 * Both forward and backward fill modes are applied. 631 * @since 7 632 */ 633 Both, 634} 635 636/** 637 * Play Mode 638 * @since 7 639 */ 640/** 641 * Play Mode 642 * @form 643 * @since 9 644 */ 645declare enum PlayMode { 646 /** 647 * The animation plays normally. 648 * @since 7 649 */ 650 /** 651 * The animation plays normally. 652 * @form 653 * @since 9 654 */ 655 Normal, 656 657 /** 658 * The animation plays backwards. 659 * @since 7 660 */ 661 /** 662 * The animation plays backwards. 663 * @form 664 * @since 9 665 */ 666 Reverse, 667 668 /** 669 * The animation plays forward on odd numbers (1, 3, 7...) and backward on even numbers (2, 4, 6...). 670 * @since 7 671 */ 672 /** 673 * The animation plays forward on odd numbers (1, 3, 7...) and backward on even numbers (2, 4, 6...). 674 * @form 675 * @since 9 676 */ 677 Alternate, 678 679 /** 680 * The animation plays backwards on odd numbers (1, 3, 7...) and forwards on even numbers (2, 4, 6...).. 681 * @since 7 682 */ 683 /** 684 * The animation plays backwards on odd numbers (1, 3, 7...) and forwards on even numbers (2, 4, 6...).. 685 * @form 686 * @since 9 687 */ 688 AlternateReverse, 689} 690 691/** 692 * Type of a key. 693 * @since 7 694 */ 695declare enum KeyType { 696 /** 697 * Press the key. 698 * @since 7 699 */ 700 Down, 701 702 /** 703 * The key is released. 704 * @since 7 705 */ 706 Up, 707} 708 709/** 710 * Type of the input device that triggers the current key. 711 * @since 7 712 */ 713declare enum KeySource { 714 /** 715 * The input device type is unknown. 716 * @since 7 717 */ 718 Unknown, 719 720 /** 721 * Set Device Type to Keyboard. 722 * @since 7 723 */ 724 Keyboard, 725} 726 727/** 728 * Edge. 729 * @since 7 730 */ 731declare enum Edge { 732 /** 733 * The top is centered horizontally. 734 * @since 7 735 */ 736 Top, 737 738 /** 739 * Center horizontal and vertical. 740 * @since 7 741 * @deprecated since 9 742 */ 743 Center, 744 745 /** 746 * The bottom is centered horizontally. 747 * @since 7 748 */ 749 Bottom, 750 751 /** 752 * Cross axis direction text baseline alignment. 753 * @since 7 754 * @deprecated since 9 755 */ 756 Baseline, 757 758 /** 759 * Align the head of the cross axis direction. 760 * @since 7 761 */ 762 Start, 763 764 /** 765 * Middle 766 * @since 7 767 * @deprecated since 9 768 */ 769 Middle, 770 771 /** 772 * Align the head of the cross axis direction. 773 * @since 7 774 */ 775 End, 776} 777 778/** 779 * Set Weekend 780 * @since 7 781 */ 782declare enum Week { 783 /** 784 * Monday. 785 * @since 7 786 */ 787 Mon, 788 789 /** 790 * Tuesday. 791 * @since 7 792 */ 793 Tue, 794 795 /** 796 * Wednesday. 797 * @since 7 798 */ 799 Wed, 800 801 /** 802 * Thursday. 803 * @since 7 804 */ 805 Thur, 806 807 /** 808 * Friday. 809 * @since 7 810 */ 811 Fri, 812 813 /** 814 * Saturday. 815 * @since 7 816 */ 817 Sat, 818 819 /** 820 * Sunday. 821 * @since 7 822 */ 823 Sun, 824} 825 826/** 827 * Sets the horizontal layout of elements. 828 * @since 7 829 */ 830/** 831 * Sets the horizontal layout of elements. 832 * @form 833 * @since 9 834 */ 835declare enum Direction { 836 /** 837 * Elements are laid out from left to right. 838 * @since 7 839 */ 840 /** 841 * Elements are laid out from left to right. 842 * @form 843 * @since 9 844 */ 845 Ltr, 846 847 /** 848 * Elements are laid out from right to left. 849 * @since 7 850 */ 851 /** 852 * Elements are laid out from right to left. 853 * @form 854 * @since 9 855 */ 856 Rtl, 857 858 /** 859 * Use the default layout direction. 860 * @since 7 861 */ 862 /** 863 * Use the default layout direction. 864 * @form 865 * @since 9 866 */ 867 Auto, 868} 869 870/** 871 * Used to set the status of the scroll bar. 872 * @since 7 873 */ 874/** 875 * Used to set the status of the scroll bar. 876 * @form 877 * @since 9 878 */ 879declare enum BarState { 880 /** 881 * Not displayed. 882 * @since 7 883 */ 884 /** 885 * Not displayed. 886 * @form 887 * @since 9 888 */ 889 Off, 890 891 /** 892 * On-demand display (displayed when you touch it and disappears after 2 seconds). 893 * @since 7 894 */ 895 /** 896 * On-demand display (displayed when you touch it and disappears after 2 seconds). 897 * @form 898 * @since 9 899 */ 900 Auto, 901 902 /** 903 * Resident display. 904 * @since 7 905 */ 906 /** 907 * Resident display. 908 * @form 909 * @since 9 910 */ 911 On, 912} 913 914/** 915 * Sliding effect 916 * @since 7 917 */ 918/** 919 * Sliding effect 920 * @form 921 * @since 9 922 */ 923declare enum EdgeEffect { 924 /** 925 * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or touch event, and spring back when released. 926 * @since 7 927 */ 928 /** 929 * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or touch event, and spring back when released. 930 * @form 931 * @since 9 932 */ 933 Spring, 934 935 /** 936 * Fade. 937 * @since 7 938 */ 939 /** 940 * Fade. 941 * @form 942 * @since 9 943 */ 944 Fade, 945 946 /** 947 * Sliding to the edge has no effect. 948 * @since 7 949 */ 950 /** 951 * Sliding to the edge has no effect. 952 * @form 953 * @since 9 954 */ 955 None, 956} 957 958/** 959 * Alignment enumeration description. 960 * @since 7 961 */ 962/** 963 * Alignment enumeration description. 964 * @form 965 * @since 9 966 */ 967declare enum Alignment { 968 /** 969 * Top Start. 970 * @since 7 971 */ 972 /** 973 * Top Start. 974 * @form 975 * @since 9 976 */ 977 TopStart, 978 979 /** 980 * The top is centered horizontally. 981 * @since 7 982 */ 983 /** 984 * The top is centered horizontally. 985 * @form 986 * @since 9 987 */ 988 Top, 989 990 /** 991 * Top tail end. 992 * @since 7 993 */ 994 /** 995 * Top tail end. 996 * @form 997 * @since 9 998 */ 999 TopEnd, 1000 1001 /** 1002 * The starting end is centered longitudinally. 1003 * @since 7 1004 */ 1005 /** 1006 * The starting end is centered longitudinally. 1007 * @form 1008 * @since 9 1009 */ 1010 Start, 1011 1012 /** 1013 * Center horizontal and vertical. 1014 * @since 7 1015 */ 1016 /** 1017 * Center horizontal and vertical. 1018 * @form 1019 * @since 9 1020 */ 1021 Center, 1022 1023 /** 1024 * The tail end is centered longitudinally. 1025 * @since 7 1026 */ 1027 /** 1028 * The tail end is centered longitudinally. 1029 * @form 1030 * @since 9 1031 */ 1032 End, 1033 1034 /** 1035 * Bottom starting end. 1036 * @since 7 1037 */ 1038 /** 1039 * Bottom starting end. 1040 * @form 1041 * @since 9 1042 */ 1043 BottomStart, 1044 1045 /** 1046 * The bottom is centered horizontally. 1047 * @since 7 1048 */ 1049 /** 1050 * The bottom is centered horizontally. 1051 * @form 1052 * @since 9 1053 */ 1054 Bottom, 1055 1056 /** 1057 * Bottom end. 1058 * @since 7 1059 */ 1060 /** 1061 * Bottom end. 1062 * @form 1063 * @since 9 1064 */ 1065 BottomEnd, 1066} 1067 1068/** 1069 * TransitionType enumeration description. 1070 * @since 7 1071 */ 1072/** 1073 * TransitionType enumeration description. 1074 * @form 1075 * @since 9 1076 */ 1077declare enum TransitionType { 1078 /** 1079 * Specifies that the current transition action takes effect in all change scenarios of the component. 1080 * @since 7 1081 */ 1082 /** 1083 * Specifies that the current transition action takes effect in all change scenarios of the component. 1084 * @form 1085 * @since 9 1086 */ 1087 All, 1088 1089 /** 1090 * Specifies the insertion scenario in which the current transition action takes effect. 1091 * @since 7 1092 */ 1093 /** 1094 * Specifies the insertion scenario in which the current transition action takes effect. 1095 * @form 1096 * @since 9 1097 */ 1098 Insert, 1099 1100 /** 1101 * Specifies the deletion scenario in which the current transition action takes effect. 1102 * @since 7 1103 */ 1104 /** 1105 * Specifies the deletion scenario in which the current transition action takes effect. 1106 * @form 1107 * @since 9 1108 */ 1109 Delete, 1110} 1111 1112/** 1113 * RelateType enumeration description 1114 * @since 7 1115 */ 1116declare enum RelateType { 1117 /** 1118 * Scales the current component to fill the parent component. 1119 * @since 7 1120 */ 1121 FILL, 1122 1123 /** 1124 * Scales the current component to fit the parent component. 1125 * @since 7 1126 */ 1127 FIT, 1128} 1129 1130/** 1131 * Controls the display or hide of the current component 1132 * @since 7 1133 */ 1134/** 1135 * Controls the display or hide of the current component 1136 * @form 1137 * @since 9 1138 */ 1139declare enum Visibility { 1140 /** 1141 * Show 1142 * @since 7 1143 */ 1144 /** 1145 * Show 1146 * @form 1147 * @since 9 1148 */ 1149 Visible, 1150 1151 /** 1152 * Hide, but participate in layout for placeholder. 1153 * @since 7 1154 */ 1155 /** 1156 * Hide, but participate in layout for placeholder. 1157 * @form 1158 * @since 9 1159 */ 1160 Hidden, 1161 1162 /** 1163 * Hides but does not participate in layout and does not take place. 1164 * @since 7 1165 */ 1166 /** 1167 * Hides but does not participate in layout and does not take place. 1168 * @form 1169 * @since 9 1170 */ 1171 None, 1172} 1173 1174/** 1175 * LineCapStyle enumeration description 1176 * @since 7 1177 */ 1178/** 1179 * LineCapStyle enumeration description 1180 * @form 1181 * @since 9 1182 */ 1183declare enum LineCapStyle { 1184 /** 1185 * The two ends of the dividing line are parallel lines. 1186 * @since 7 1187 */ 1188 /** 1189 * The two ends of the dividing line are parallel lines. 1190 * @form 1191 * @since 9 1192 */ 1193 Butt, 1194 1195 /** 1196 * The two ends of the dividing line are semicircles. 1197 * @since 7 1198 */ 1199 /** 1200 * The two ends of the dividing line are semicircles. 1201 * @form 1202 * @since 9 1203 */ 1204 Round, 1205 1206 /** 1207 * Extends half a circle at the end of the path with a width equal to half the line width and a height equal to the line width. 1208 * @since 7 1209 */ 1210 /** 1211 * Extends half a circle at the end of the path with a width equal to half the line width and a height equal to the line width. 1212 * @form 1213 * @since 9 1214 */ 1215 Square, 1216} 1217 1218/** 1219 * Axis enumeration description. 1220 * @since 7 1221 */ 1222/** 1223 * Axis enumeration description. 1224 * @form 1225 * @since 9 1226 */ 1227declare enum Axis { 1228 /** 1229 * Longitudinal arrangement 1230 * @since 7 1231 */ 1232 /** 1233 * Longitudinal arrangement 1234 * @form 1235 * @since 9 1236 */ 1237 Vertical, 1238 1239 /** 1240 * Horizontal arrangement. 1241 * @since 7 1242 */ 1243 /** 1244 * Horizontal arrangement. 1245 * @form 1246 * @since 9 1247 */ 1248 Horizontal, 1249} 1250 1251/** 1252 * HorizontalAlign enumeration description. 1253 * @since 7 1254 */ 1255/** 1256 * HorizontalAlign enumeration description. 1257 * @form 1258 * @since 9 1259 */ 1260declare enum HorizontalAlign { 1261 /** 1262 * Aligns the start end in the language direction. 1263 * @since 7 1264 */ 1265 /** 1266 * Aligns the start end in the language direction. 1267 * @form 1268 * @since 9 1269 */ 1270 Start, 1271 1272 /** 1273 * Center alignment. The default alignment mode is used. 1274 * @since 7 1275 */ 1276 /** 1277 * Center alignment. The default alignment mode is used. 1278 * @form 1279 * @since 9 1280 */ 1281 Center, 1282 1283 /** 1284 * Aligns the ends in the language direction. 1285 * @since 7 1286 */ 1287 /** 1288 * Aligns the ends in the language direction. 1289 * @form 1290 * @since 9 1291 */ 1292 End, 1293} 1294 1295/** 1296 * FlexAlign enumeration description. 1297 * @since 7 1298 */ 1299/** 1300 * FlexAlign enumeration description. 1301 * @form 1302 * @since 9 1303 */ 1304declare enum FlexAlign { 1305 /** 1306 * The element is aligned at the head of the principal axis, 1307 * the first element is aligned with the head of the row, and subsequent elements are aligned with the previous one. 1308 * @since 7 1309 */ 1310 /** 1311 * The element is aligned at the head of the principal axis, 1312 * the first element is aligned with the head of the row, and subsequent elements are aligned with the previous one. 1313 * @form 1314 * @since 9 1315 */ 1316 Start, 1317 1318 /** 1319 * The elements are centered in the direction of the principal axis, 1320 * and the first element is the same distance from the beginning of the row as the last element is from the end of the row. 1321 * @since 7 1322 */ 1323 /** 1324 * The elements are centered in the direction of the principal axis, 1325 * and the first element is the same distance from the beginning of the row as the last element is from the end of the row. 1326 * @form 1327 * @since 9 1328 */ 1329 Center, 1330 1331 /** 1332 * The element is aligned at the tail of the principal axis, 1333 * the last element is aligned at the end of the row, and the other elements are aligned with the next. 1334 * @since 7 1335 */ 1336 /** 1337 * The element is aligned at the tail of the principal axis, 1338 * the last element is aligned at the end of the row, and the other elements are aligned with the next. 1339 * @form 1340 * @since 9 1341 */ 1342 End, 1343 1344 /** 1345 * Elastic elements are evenly distributed in the direction of the Flex principal axis, 1346 * with the same distance between adjacent elements. 1347 * The first element aligns with the beginning of the line, and the last element aligns with the end of the line. 1348 * @since 7 1349 */ 1350 /** 1351 * Elastic elements are evenly distributed in the direction of the Flex principal axis, 1352 * with the same distance between adjacent elements. 1353 * The first element aligns with the beginning of the line, and the last element aligns with the end of the line. 1354 * @form 1355 * @since 9 1356 */ 1357 SpaceBetween, 1358 1359 /** 1360 * Elastic elements are evenly distributed in the direction of the Flex principal axis, 1361 * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance between 1362 * the first element and the distance between the last element and the end of the row. 1363 * @since 7 1364 */ 1365 /** 1366 * Elastic elements are evenly distributed in the direction of the Flex principal axis, 1367 * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance between 1368 * the first element and the distance between the last element and the end of the row. 1369 * @form 1370 * @since 9 1371 */ 1372 SpaceAround, 1373 1374 /** 1375 * Elements in the Flex axis direction are evenly spaced. 1376 * The spacing between adjacent elements, the spacing between the first element and the beginning of the row, 1377 * and the spacing between the last element and the end of the row are the same. 1378 * @since 7 1379 */ 1380 /** 1381 * Elements in the Flex axis direction are evenly spaced. 1382 * The spacing between adjacent elements, the spacing between the first element and the beginning of the row, 1383 * and the spacing between the last element and the end of the row are the same. 1384 * @form 1385 * @since 9 1386 */ 1387 SpaceEvenly, 1388} 1389 1390/** 1391 * ItemAlign enumeration description 1392 * @since 7 1393 */ 1394/** 1395 * ItemAlign enumeration description 1396 * @form 1397 * @since 9 1398 */ 1399declare enum ItemAlign { 1400 /** 1401 * Use the default configuration in the Flex container. 1402 * @since 7 1403 */ 1404 /** 1405 * Use the default configuration in the Flex container. 1406 * @form 1407 * @since 9 1408 */ 1409 Auto, 1410 1411 /** 1412 * The element is in the Flex container with the cross-axis direction head aligned. 1413 * @since 7 1414 */ 1415 /** 1416 * The element is in the Flex container with the cross-axis direction head aligned. 1417 * @form 1418 * @since 9 1419 */ 1420 Start, 1421 1422 /** 1423 * The element is centered in the Flex container with the cross axis direction aligned. 1424 * @since 7 1425 */ 1426 /** 1427 * The element is centered in the Flex container with the cross axis direction aligned. 1428 * @form 1429 * @since 9 1430 */ 1431 Center, 1432 1433 /** 1434 * The element is bottom aligned in the Flex container with the cross axis direction. 1435 * @since 7 1436 */ 1437 /** 1438 * The element is bottom aligned in the Flex container with the cross axis direction. 1439 * @form 1440 * @since 9 1441 */ 1442 End, 1443 1444 /** 1445 * Element In the Flex container, the cross-axis direction text baseline is aligned. 1446 * @since 7 1447 */ 1448 /** 1449 * Element In the Flex container, the cross-axis direction text baseline is aligned. 1450 * @form 1451 * @since 9 1452 */ 1453 Baseline, 1454 1455 /** 1456 * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container size. 1457 * @since 7 1458 */ 1459 /** 1460 * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container size. 1461 * @form 1462 * @since 9 1463 */ 1464 Stretch, 1465} 1466 1467/** 1468 * FlexDirection enumeration description 1469 * @since 7 1470 */ 1471/** 1472 * FlexDirection enumeration description 1473 * @form 1474 * @since 9 1475 */ 1476declare enum FlexDirection { 1477 /** 1478 * The main axis is consistent with the row direction as the layout mode. 1479 * @since 7 1480 */ 1481 /** 1482 * The main axis is consistent with the row direction as the layout mode. 1483 * @form 1484 * @since 9 1485 */ 1486 Row, 1487 1488 /** 1489 * The main axis is consistent with the column direction as the layout mode. 1490 * @since 7 1491 */ 1492 /** 1493 * The main axis is consistent with the column direction as the layout mode. 1494 * @form 1495 * @since 9 1496 */ 1497 Column, 1498 1499 /** 1500 * The layout is in the opposite direction to the Row direction. 1501 * @since 7 1502 */ 1503 /** 1504 * The layout is in the opposite direction to the Row direction. 1505 * @form 1506 * @since 9 1507 */ 1508 RowReverse, 1509 1510 /** 1511 * Layout in the opposite direction to the column. 1512 * @since 7 1513 */ 1514 /** 1515 * Layout in the opposite direction to the column. 1516 * @form 1517 * @since 9 1518 */ 1519 ColumnReverse, 1520} 1521 1522/** 1523 * FlexWrap enumeration description 1524 * @since 7 1525 */ 1526/** 1527 * FlexWrap enumeration description 1528 * @form 1529 * @since 9 1530 */ 1531declare enum FlexWrap { 1532 /** 1533 * The Flex container has a single row/column layout of elements, and children are allowed to go beyond the container. 1534 * @since 7 1535 */ 1536 /** 1537 * The Flex container has a single row/column layout of elements, and children are allowed to go beyond the container. 1538 * @form 1539 * @since 9 1540 */ 1541 NoWrap, 1542 1543 /** 1544 * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to exceed the container. 1545 * @since 7 1546 */ 1547 /** 1548 * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to exceed the container. 1549 * @form 1550 * @since 9 1551 */ 1552 Wrap, 1553 1554 /** 1555 * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to exceed the container. 1556 * @since 7 1557 */ 1558 /** 1559 * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to exceed the container. 1560 * @form 1561 * @since 9 1562 */ 1563 WrapReverse, 1564} 1565 1566/** 1567 * VerticalAlign enumeration description 1568 * @since 7 1569 */ 1570/** 1571 * VerticalAlign enumeration description 1572 * @form 1573 * @since 9 1574 */ 1575declare enum VerticalAlign { 1576 /** 1577 * Top alignment. 1578 * @since 7 1579 */ 1580 /** 1581 * Top alignment. 1582 * @form 1583 * @since 9 1584 */ 1585 Top, 1586 1587 /** 1588 * Center alignment. The default alignment mode is used. 1589 * @since 7 1590 */ 1591 /** 1592 * Center alignment. The default alignment mode is used. 1593 * @form 1594 * @since 9 1595 */ 1596 Center, 1597 1598 /** 1599 * Bottom alignment. 1600 * @since 7 1601 */ 1602 /** 1603 * Bottom alignment. 1604 * @form 1605 * @since 9 1606 */ 1607 Bottom, 1608} 1609 1610/** 1611 * ImageRepeat enumeration description 1612 * @since 7 1613 */ 1614/** 1615 * ImageRepeat enumeration description 1616 * @form 1617 * @since 9 1618 */ 1619declare enum ImageRepeat { 1620 /** 1621 * Do not draw the picture again. 1622 * @since 7 1623 */ 1624 /** 1625 * Do not draw the picture again. 1626 * @form 1627 * @since 9 1628 */ 1629 NoRepeat, 1630 1631 /** 1632 * Repeat the drawing only on the horizontal axis. 1633 * @since 7 1634 */ 1635 /** 1636 * Repeat the drawing only on the horizontal axis. 1637 * @form 1638 * @since 9 1639 */ 1640 X, 1641 1642 /** 1643 * Repeat the drawing only on the vertical axis. 1644 * @since 7 1645 */ 1646 /** 1647 * Repeat the drawing only on the vertical axis. 1648 * @form 1649 * @since 9 1650 */ 1651 Y, 1652 1653 /** 1654 * Draw the picture repeatedly on both axes. 1655 * @since 7 1656 */ 1657 /** 1658 * Draw the picture repeatedly on both axes. 1659 * @form 1660 * @since 9 1661 */ 1662 XY, 1663} 1664 1665/** 1666 * ImageSize enumeration description 1667 * @since 7 1668 */ 1669/** 1670 * ImageSize enumeration description 1671 * @form 1672 * @since 9 1673 */ 1674declare enum ImageSize { 1675 /** 1676 * Keep the scale of the original image unchanged. 1677 * @since 7 1678 */ 1679 /** 1680 * Keep the scale of the original image unchanged. 1681 * @form 1682 * @since 9 1683 */ 1684 Auto, 1685 1686 /** 1687 * Default value. Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the display boundary. 1688 * @since 7 1689 */ 1690 /** 1691 * Default value. Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the display boundary. 1692 * @form 1693 * @since 9 1694 */ 1695 Cover, 1696 1697 /** 1698 * Keep the aspect ratio to zoom out or zoom in so that the image is completely displayed within the display boundary. 1699 * @since 7 1700 */ 1701 /** 1702 * Keep the aspect ratio to zoom out or zoom in so that the image is completely displayed within the display boundary. 1703 * @form 1704 * @since 9 1705 */ 1706 Contain, 1707} 1708 1709/** 1710 * GradientDirection enumeration description 1711 * @since 7 1712 */ 1713/** 1714 * GradientDirection enumeration description 1715 * @form 1716 * @since 9 1717 */ 1718declare enum GradientDirection { 1719 /** 1720 * Right to left. 1721 * @since 7 1722 */ 1723 /** 1724 * Right to left. 1725 * @form 1726 * @since 9 1727 */ 1728 Left, 1729 1730 /** 1731 * From the bottom up. 1732 * @since 7 1733 */ 1734 /** 1735 * From the bottom up. 1736 * @form 1737 * @since 9 1738 */ 1739 Top, 1740 1741 /** 1742 * From left to right. 1743 * @since 7 1744 */ 1745 /** 1746 * From left to right. 1747 * @form 1748 * @since 9 1749 */ 1750 Right, 1751 1752 /** 1753 * From the top down. 1754 * @since 7 1755 */ 1756 /** 1757 * From the top down. 1758 * @form 1759 * @since 9 1760 */ 1761 Bottom, 1762 1763 /** 1764 * Top Left 1765 * @since 7 1766 */ 1767 /** 1768 * Top Left 1769 * @form 1770 * @since 9 1771 */ 1772 LeftTop, 1773 1774 /** 1775 * Left Bottom 1776 * @since 7 1777 */ 1778 /** 1779 * Left Bottom 1780 * @form 1781 * @since 9 1782 */ 1783 LeftBottom, 1784 1785 /** 1786 * Right Top 1787 * @since 7 1788 */ 1789 /** 1790 * Right Top 1791 * @form 1792 * @since 9 1793 */ 1794 RightTop, 1795 1796 /** 1797 * Right Bottom 1798 * @since 7 1799 */ 1800 /** 1801 * Right Bottom 1802 * @form 1803 * @since 9 1804 */ 1805 RightBottom, 1806 1807 /** 1808 * None 1809 * @since 7 1810 */ 1811 /** 1812 * None 1813 * @form 1814 * @since 9 1815 */ 1816 None, 1817} 1818 1819/** 1820 * SharedTransitionEffectType enumeration description 1821 * @since 7 1822 */ 1823declare enum SharedTransitionEffectType { 1824 /** 1825 * The location of the destination page element remains unchanged, and you can configure the transparency animation. Currently, 1826 * only the static effect configured for redirecting to the target page takes effect. 1827 * @since 7 1828 */ 1829 Static, 1830 1831 /** 1832 * Move the source page element to the destination page element location and scale it appropriately. 1833 * @since 7 1834 */ 1835 Exchange, 1836} 1837 1838/** 1839 * Text style 1840 * @since 7 1841 */ 1842/** 1843 * Text style 1844 * @form 1845 * @since 9 1846 */ 1847declare enum FontStyle { 1848 /** 1849 * Default style. 1850 * @since 7 1851 */ 1852 /** 1853 * Default style. 1854 * @form 1855 * @since 9 1856 */ 1857 Normal, 1858 1859 /** 1860 * Italic style. 1861 * @since 7 1862 */ 1863 /** 1864 * Italic style. 1865 * @form 1866 * @since 9 1867 */ 1868 Italic, 1869} 1870 1871/** 1872 * The font weight of the text 1873 * @since 7 1874 */ 1875/** 1876 * The font weight of the text 1877 * @form 1878 * @since 9 1879 */ 1880declare enum FontWeight { 1881 /** 1882 * Defines a lighter value than [Inherited Value].. 1883 * @since 7 1884 */ 1885 /** 1886 * Defines a lighter value than [Inherited Value].. 1887 * @form 1888 * @since 9 1889 */ 1890 Lighter, 1891 1892 /** 1893 * Normal font. Equivalent to a digital value of 400. 1894 * @since 7 1895 */ 1896 /** 1897 * Normal font. Equivalent to a digital value of 400. 1898 * @form 1899 * @since 9 1900 */ 1901 Normal, 1902 1903 /** 1904 * Defines a more general value than [Inherited Value]. 1905 * @since 7 1906 */ 1907 /** 1908 * Defines a more general value than [Inherited Value]. 1909 * @form 1910 * @since 9 1911 */ 1912 Regular, 1913 1914 /** 1915 * Defines a value that is more centered than [Inherited Value]. 1916 * @since 7 1917 */ 1918 /** 1919 * Defines a value that is more centered than [Inherited Value]. 1920 * @form 1921 * @since 9 1922 */ 1923 Medium, 1924 1925 /** 1926 * Bold. Equivalent to a numeric value of 700. 1927 * @since 7 1928 */ 1929 /** 1930 * Bold. Equivalent to a numeric value of 700. 1931 * @form 1932 * @since 9 1933 */ 1934 Bold, 1935 1936 /** 1937 * Defines a value that is heavier than [Inherited Value]. 1938 * @since 7 1939 */ 1940 /** 1941 * Defines a value that is heavier than [Inherited Value]. 1942 * @form 1943 * @since 9 1944 */ 1945 Bolder, 1946} 1947 1948/** 1949 * Alignment of text. 1950 * @since 7 1951 */ 1952/** 1953 * Alignment of text. 1954 * @form 1955 * @since 9 1956 */ 1957declare enum TextAlign { 1958 /** 1959 * Center the text. 1960 * @since 7 1961 */ 1962 /** 1963 * Center the text. 1964 * @form 1965 * @since 9 1966 */ 1967 Center, 1968 1969 /** 1970 * The text is aligned in the same direction as the writing 1971 * @since 7 1972 */ 1973 /** 1974 * The text is aligned in the same direction as the writing 1975 * @form 1976 * @since 9 1977 */ 1978 Start, 1979 1980 /** 1981 * The text is aligned in the opposite direction of writing 1982 * @since 7 1983 */ 1984 /** 1985 * The text is aligned in the opposite direction of writing 1986 * @form 1987 * @since 9 1988 */ 1989 End, 1990} 1991 1992/** 1993 * Declare how text overflows. 1994 * @since 7 1995 */ 1996/** 1997 * Declare how text overflows. 1998 * @form 1999 * @since 9 2000 */ 2001declare enum TextOverflow { 2002 /** 2003 * When the text is too long, it will be cropped and displayed. 2004 * @since 7 2005 */ 2006 /** 2007 * When the text is too long, it will be cropped and displayed. 2008 * @form 2009 * @since 9 2010 */ 2011 Clip, 2012 2013 /** 2014 * If the text is too long, the text that cannot be displayed shall be replaced by ellipsis. 2015 * @since 7 2016 */ 2017 /** 2018 * If the text is too long, the text that cannot be displayed shall be replaced by ellipsis. 2019 * @form 2020 * @since 9 2021 */ 2022 Ellipsis, 2023 2024 /** 2025 * Text is not cropped when it is too long. 2026 * @since 7 2027 */ 2028 /** 2029 * Text is not cropped when it is too long. 2030 * @form 2031 * @since 9 2032 */ 2033 None, 2034} 2035 2036/** 2037 * Type of text modifier. 2038 * @since 7 2039 */ 2040/** 2041 * Type of text modifier. 2042 * @form 2043 * @since 9 2044 */ 2045declare enum TextDecorationType { 2046 /** 2047 * Do not use text decorative lines. 2048 * @since 7 2049 */ 2050 /** 2051 * Do not use text decorative lines. 2052 * @form 2053 * @since 9 2054 */ 2055 None, 2056 2057 /** 2058 * Underline the words. 2059 * @since 7 2060 */ 2061 /** 2062 * Underline the words. 2063 * @form 2064 * @since 9 2065 */ 2066 Underline, 2067 2068 /** 2069 * Text is in all uppercase. 2070 * @since 7 2071 */ 2072 /** 2073 * Text is in all uppercase. 2074 * @form 2075 * @since 9 2076 */ 2077 Overline, 2078 2079 /** 2080 * A modifier line that passes through the text. 2081 * @since 7 2082 */ 2083 /** 2084 * A modifier line that passes through the text. 2085 * @form 2086 * @since 9 2087 */ 2088 LineThrough, 2089} 2090 2091/** 2092 * Letter type in text 2093 * @since 7 2094 */ 2095/** 2096 * Letter type in text 2097 * @form 2098 * @since 9 2099 */ 2100declare enum TextCase { 2101 /** 2102 * The default is normal. 2103 * @since 7 2104 */ 2105 /** 2106 * The default is normal. 2107 * @form 2108 * @since 9 2109 */ 2110 Normal, 2111 2112 /** 2113 * The text is all lowercase. 2114 * @since 7 2115 */ 2116 /** 2117 * The text is all lowercase. 2118 * @form 2119 * @since 9 2120 */ 2121 LowerCase, 2122 2123 /** 2124 * The text is all uppercase. 2125 * @since 7 2126 */ 2127 /** 2128 * The text is all uppercase. 2129 * @form 2130 * @since 9 2131 */ 2132 UpperCase, 2133} 2134 2135/** 2136 * ResponseType for contextMenu 2137 * @since 8 2138 */ 2139declare enum ResponseType { 2140 /** 2141 * Right click. 2142 * @since 8 2143 */ 2144 RightClick, 2145 2146 /** 2147 * Long press. 2148 * @since 8 2149 */ 2150 LongPress, 2151} 2152 2153/** 2154 * HoverEffect enumeration description 2155 * @since 8 2156 */ 2157declare enum HoverEffect { 2158 /** 2159 * Default effect 2160 * @since 8 2161 */ 2162 Auto, 2163 2164 /** 2165 * Zoom in and out effect 2166 * @since 8 2167 */ 2168 Scale, 2169 2170 /** 2171 * Highlight effect 2172 * @since 8 2173 */ 2174 Highlight, 2175 2176 /** 2177 * None effect 2178 * @since 8 2179 */ 2180 None, 2181} 2182 2183/** 2184 * Placement enumeration description 2185 * @since 8 2186 */ 2187declare enum Placement { 2188 /** 2189 * Left placement 2190 * @since 8 2191 */ 2192 Left, 2193 2194 /** 2195 * Right placement 2196 * @since 8 2197 */ 2198 Right, 2199 2200 /** 2201 * Top placement 2202 * @since 8 2203 */ 2204 Top, 2205 2206 /** 2207 * Bottom placement 2208 * @since 8 2209 */ 2210 Bottom, 2211 2212 /** 2213 * TopLeft placement 2214 * @since 8 2215 */ 2216 TopLeft, 2217 2218 /** 2219 * TopRight placement 2220 * @since 8 2221 */ 2222 TopRight, 2223 2224 /** 2225 * BottomLeft placement 2226 * @since 8 2227 */ 2228 BottomLeft, 2229 2230 /** 2231 * BottomRight placement 2232 * @since 8 2233 */ 2234 BottomRight, 2235 2236 /** 2237 * LeftTop placement 2238 * @since 9 2239 */ 2240 LeftTop, 2241 2242 /** 2243 * LeftBottom placement 2244 * @since 9 2245 */ 2246 LeftBottom, 2247 2248 /** 2249 * RightTop placement 2250 * @since 9 2251 */ 2252 RightTop, 2253 2254 /** 2255 * RightBottom placement 2256 * @since 9 2257 */ 2258 RightBottom, 2259} 2260 2261/** 2262 * Indicates the share option. 2263 * 2264 * @form 2265 * @since 9 2266 */ 2267declare enum CopyOptions { 2268 /** 2269 * Not allow share. 2270 * @form 2271 * @since 9 2272 */ 2273 None = 0, 2274 2275 /** 2276 * Share in app. 2277 * @form 2278 * @since 9 2279 */ 2280 InApp = 1, 2281 2282 /** 2283 * Share in local device. 2284 * @form 2285 * @since 9 2286 */ 2287 LocalDevice = 2, 2288} 2289 2290/** 2291 * Defines the hit test mode. 2292 * @since 9 2293 */ 2294declare enum HitTestMode { 2295 /** 2296 * Both self and children nodes respond to the hit test for touch events, 2297 * but block hit test of the other nodes which is masked by this node. 2298 * @since 9 2299 */ 2300 Default, 2301 2302 /** 2303 * Self respond to the hit test for touch events, 2304 * but block hit test of children and other nodes which is masked by this node. 2305 * @since 9 2306 */ 2307 Block, 2308 2309 /** 2310 * Self and children respond to the hit test for touch events, 2311 * and allow hit test of other nodes which is masked by this node. 2312 * @since 9 2313 */ 2314 Transparent, 2315 2316 /** 2317 * Self not respond to the hit test for touch events, 2318 * but children respond to the hit test for touch events. 2319 * @since 9 2320 */ 2321 None, 2322} 2323 2324/** 2325 * Title height. 2326 * @since 9 2327 */ 2328declare enum TitleHeight { 2329 /** 2330 * Title height when only main title is available. 2331 * @since 9 2332 */ 2333 MainOnly, 2334 2335 /** 2336 * Title height when main title and subtitle are both available. 2337 * @since 9 2338 */ 2339 MainWithSub, 2340}