1 /* 2 * Copyright (c) 2024 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 * @addtogroup ArkUI_NativeModule 18 * @{ 19 * 20 * @brief Provides UI capabilities of ArkUI on the native side, such as UI component creation and destruction, 21 * tree node operations, attribute setting, and event listening. 22 * 23 * @since 12 24 */ 25 26 /** 27 * @file native_type.h 28 * 29 * @brief Defines the common types for the native module. 30 * 31 * @library libace_ndk.z.so 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @kit ArkUI 34 * @since 12 35 */ 36 37 #ifndef ARKUI_NATIVE_TYPE_H 38 #define ARKUI_NATIVE_TYPE_H 39 40 #include <stdint.h> 41 42 #include "drawable_descriptor.h" 43 44 #ifdef __cplusplus 45 extern "C" { 46 #endif 47 48 /** 49 * @brief Defines the ArkUI native component object. 50 * 51 * @since 12 52 */ 53 struct ArkUI_Node; 54 55 /** 56 * @brief Defines the pointer type of the ArkUI node content 57 * 58 * @since 12 59 */ 60 typedef struct ArkUI_NodeContent* ArkUI_NodeContentHandle; 61 62 /** 63 * @brief Defines the custom dialog box controller of ArkUI on the native side. 64 * 65 * @since 12 66 */ 67 struct ArkUI_NativeDialog; 68 69 /** 70 * @brief Sets the size constraints of a component during component layout. 71 * 72 * @since 12 73 */ 74 typedef struct ArkUI_LayoutConstraint ArkUI_LayoutConstraint; 75 76 /** 77 * @brief Defines the structure of the component drawing context. 78 * 79 * @since 12 80 */ 81 typedef struct ArkUI_DrawContext ArkUI_DrawContext; 82 83 /** 84 * @brief Defines the pointer to the ArkUI native component object. 85 * 86 * @since 12 87 */ 88 typedef struct ArkUI_Node* ArkUI_NodeHandle; 89 90 /** 91 * @brief Defines the pointer to the custom dialog box controller of ArkUI on the native side. 92 * 93 * @since 12 94 */ 95 typedef struct ArkUI_NativeDialog* ArkUI_NativeDialogHandle; 96 97 /** 98 * @brief Defines the water flow section configuration. 99 * 100 * @since 12 101 */ 102 typedef struct ArkUI_WaterFlowSectionOption ArkUI_WaterFlowSectionOption; 103 104 /** 105 * @brief Define the configuration information of the Item within the ListitemSwipeActionOption method. 106 * 107 * @since 12 108 */ 109 typedef struct ArkUI_ListItemSwipeActionItem ArkUI_ListItemSwipeActionItem; 110 111 /** 112 * @brief Define the configuration information for the ListitemSwipeActionOption method. 113 * 114 * @since 12 115 */ 116 typedef struct ArkUI_ListItemSwipeActionOption ArkUI_ListItemSwipeActionOption; 117 118 /** 119 * @brief Defines the ArkUI native context object. 120 * 121 * @since 12 122 */ 123 struct ArkUI_Context; 124 125 /** 126 * @brief Defines the pointer to the context instance object pointer definition of ArkUI on the native side. 127 * 128 * @since 12 129 */ 130 typedef struct ArkUI_Context* ArkUI_ContextHandle; 131 132 /** 133 * @brief Defines the navigation indicator style for the swiper. 134 * 135 * @since 12 136 */ 137 typedef struct ArkUI_SwiperIndicator ArkUI_SwiperIndicator; 138 139 /** 140 * @brief specifies the alignment rules for subcomponents set in relative containers. 141 * 142 * @since 12 143 */ 144 typedef struct ArkUI_AlignmentRuleOption ArkUI_AlignmentRuleOption; 145 146 /** 147 * @brief guideLine parameters, used to define the id, direction and position of the guideline. 148 * 149 * @since 12 150 */ 151 typedef struct ArkUI_GuidelineOption ArkUI_GuidelineOption; 152 153 /** 154 * @brief barrier parameter, used to define the id, 155 * direction and components of the barrier that it depends on when generating it. 156 * 157 * @since 12 158 */ 159 typedef struct ArkUI_BarrierOption ArkUI_BarrierOption; 160 161 /** 162 * @brief Define the ChildrenMainSize class information for a List. 163 * 164 * @since 12 165 */ 166 typedef struct ArkUI_ListChildrenMainSize ArkUI_ListChildrenMainSize; 167 168 /** 169 * @brief Defines the image frame. 170 * 171 * @since 12 172 */ 173 typedef struct ArkUI_ImageAnimatorFrameInfo ArkUI_ImageAnimatorFrameInfo; 174 175 /** 176 * @brief Defines the accessibility state for the component. 177 * 178 * @since 12 179 */ 180 typedef struct ArkUI_AccessibilityState ArkUI_AccessibilityState; 181 182 /** 183 * @brief Defines the accessibility value for the component. 184 * 185 * @since 12 186 */ 187 typedef struct ArkUI_AccessibilityValue ArkUI_AccessibilityValue; 188 189 /** 190 * @brief Defines the event callback type. 191 * 192 * @since 12 193 */ 194 typedef struct { 195 /** Custom type. */ 196 void* userData; 197 /** Event callback. */ 198 void (*callback)(void* userData); 199 } ArkUI_ContextCallback; 200 /** 201 * @brief Provides the number types of ArkUI in the native code. 202 * 203 * @since 12 204 */ 205 typedef union { 206 /** Floating-point type. */ 207 float f32; 208 /** Signed integer. */ 209 int32_t i32; 210 /** Unsigned integer. */ 211 uint32_t u32; 212 } ArkUI_NumberValue; 213 214 /** 215 * @brief Enumerates the alignment modes. 216 * 217 * @since 12 218 */ 219 typedef enum { 220 /** Top start. */ 221 ARKUI_ALIGNMENT_TOP_START = 0, 222 /** Top center. */ 223 ARKUI_ALIGNMENT_TOP, 224 /** Top end. */ 225 ARKUI_ALIGNMENT_TOP_END, 226 /** Vertically centered start. */ 227 ARKUI_ALIGNMENT_START, 228 /** Horizontally and vertically centered. */ 229 ARKUI_ALIGNMENT_CENTER, 230 /** Vertically centered end. */ 231 ARKUI_ALIGNMENT_END, 232 /** Bottom start. */ 233 ARKUI_ALIGNMENT_BOTTOM_START, 234 /** Horizontally centered on the bottom. */ 235 ARKUI_ALIGNMENT_BOTTOM, 236 /** Bottom end. */ 237 ARKUI_ALIGNMENT_BOTTOM_END, 238 } ArkUI_Alignment; 239 240 /** 241 * @brief Enumerates the image repeat patterns. 242 * 243 * @since 12 244 */ 245 typedef enum { 246 /** The image is not repeatedly drawn. */ 247 ARKUI_IMAGE_REPEAT_NONE = 0, 248 /** The image is repeatedly drawn only along the x-axis. */ 249 ARKUI_IMAGE_REPEAT_X, 250 /** The image is repeatedly drawn only along the y-axis. */ 251 ARKUI_IMAGE_REPEAT_Y, 252 /** The image is repeatedly drawn along both axes. */ 253 ARKUI_IMAGE_REPEAT_XY, 254 } ArkUI_ImageRepeat; 255 256 /** 257 * @brief Enumerates the font styles. 258 * 259 * @since 12 260 */ 261 typedef enum { 262 /** Standard font style. */ 263 ARKUI_FONT_STYLE_NORMAL = 0, 264 /** Italic font style. */ 265 ARKUI_FONT_STYLE_ITALIC 266 } ArkUI_FontStyle; 267 268 /** 269 * @brief Enumerates the font weights. 270 * 271 * @since 12 272 */ 273 typedef enum { 274 /** 100 */ 275 ARKUI_FONT_WEIGHT_W100 = 0, 276 /** 200 */ 277 ARKUI_FONT_WEIGHT_W200, 278 /** 300 */ 279 ARKUI_FONT_WEIGHT_W300, 280 /** 400 */ 281 ARKUI_FONT_WEIGHT_W400, 282 /** 500 */ 283 ARKUI_FONT_WEIGHT_W500, 284 /** 600 */ 285 ARKUI_FONT_WEIGHT_W600, 286 /** 700 */ 287 ARKUI_FONT_WEIGHT_W700, 288 /** 800 */ 289 ARKUI_FONT_WEIGHT_W800, 290 /** 900 */ 291 ARKUI_FONT_WEIGHT_W900, 292 /** The font weight is bold. */ 293 ARKUI_FONT_WEIGHT_BOLD, 294 /** The font weight is normal. */ 295 ARKUI_FONT_WEIGHT_NORMAL, 296 /** The font weight is bolder. */ 297 ARKUI_FONT_WEIGHT_BOLDER, 298 /** The font weight is lighter. */ 299 ARKUI_FONT_WEIGHT_LIGHTER, 300 /** The font weight is medium. */ 301 ARKUI_FONT_WEIGHT_MEDIUM, 302 /** The font weight is normal. */ 303 ARKUI_FONT_WEIGHT_REGULAR, 304 } ArkUI_FontWeight; 305 306 /** 307 * @brief Enumerates the text alignment mode. 308 * 309 * @since 12 310 */ 311 typedef enum { 312 /** Aligned with the start. */ 313 ARKUI_TEXT_ALIGNMENT_START = 0, 314 /** Horizontally centered. */ 315 ARKUI_TEXT_ALIGNMENT_CENTER, 316 /** Aligned with the end. */ 317 ARKUI_TEXT_ALIGNMENT_END, 318 /** Aligned with both margins. */ 319 ARKUI_TEXT_ALIGNMENT_JUSTIFY, 320 } ArkUI_TextAlignment; 321 322 /** 323 * @brief Enumerates the types of the Enter key for a single-line text box. 324 * 325 * @since 12 326 */ 327 typedef enum { 328 /** The Enter key is labeled "Go." */ 329 ARKUI_ENTER_KEY_TYPE_GO = 2, 330 /** The Enter key is labeled "Search." */ 331 ARKUI_ENTER_KEY_TYPE_SEARCH = 3, 332 /** The Enter key is labeled "Send." */ 333 ARKUI_ENTER_KEY_TYPE_SEND, 334 /** The Enter key is labeled "Next." */ 335 ARKUI_ENTER_KEY_TYPE_NEXT, 336 /** The Enter key is labeled "Done." */ 337 ARKUI_ENTER_KEY_TYPE_DONE, 338 /** The Enter key is labeled "Previous." */ 339 ARKUI_ENTER_KEY_TYPE_PREVIOUS, 340 /** The Enter key is labeled "New Line." */ 341 ARKUI_ENTER_KEY_TYPE_NEW_LINE, 342 } ArkUI_EnterKeyType; 343 344 /** 345 * @brief Enumerates the text input types. 346 * 347 * @since 12 348 */ 349 typedef enum { 350 /** Normal input mode. */ 351 ARKUI_TEXTINPUT_TYPE_NORMAL = 0, 352 /** Number input mode. */ 353 ARKUI_TEXTINPUT_TYPE_NUMBER = 2, 354 /** Phone number input mode. */ 355 ARKUI_TEXTINPUT_TYPE_PHONE_NUMBER = 3, 356 /** Email address input mode. */ 357 ARKUI_TEXTINPUT_TYPE_EMAIL = 5, 358 /** Password input mode. */ 359 ARKUI_TEXTINPUT_TYPE_PASSWORD = 7, 360 /** Numeric password input mode. */ 361 ARKUI_TEXTINPUT_TYPE_NUMBER_PASSWORD = 8, 362 /** Lock screen password input mode. */ 363 ARKUI_TEXTINPUT_TYPE_SCREEN_LOCK_PASSWORD = 9, 364 /** Username input mode. */ 365 ARKUI_TEXTINPUT_TYPE_USER_NAME = 10, 366 /** New password input mode. */ 367 ARKUI_TEXTINPUT_TYPE_NEW_PASSWORD = 11, 368 /** Number input mode with a decimal point. */ 369 ARKUI_TEXTINPUT_TYPE_NUMBER_DECIMAL = 12, 370 } ArkUI_TextInputType; 371 372 /** 373 * @brief Enumerates the text box types. 374 * 375 * @since 12 376 */ 377 typedef enum { 378 /** Normal input mode. */ 379 ARKUI_TEXTAREA_TYPE_NORMAL = 0, 380 /** Number input mode. */ 381 ARKUI_TEXTAREA_TYPE_NUMBER = 2, 382 /** Phone number input mode. */ 383 ARKUI_TEXTAREA_TYPE_PHONE_NUMBER = 3, 384 /** Email address input mode. */ 385 ARKUI_TEXTAREA_TYPE_EMAIL = 5, 386 } ArkUI_TextAreaType; 387 388 /** 389 * @brief Enumerates the styles of the Cancel button. 390 * 391 * @since 12 392 */ 393 typedef enum { 394 /** The Cancel button is always displayed. */ 395 ARKUI_CANCELBUTTON_STYLE_CONSTANT = 0, 396 /** The Cancel button is always hidden. */ 397 ARKUI_CANCELBUTTON_STYLE_INVISIBLE, 398 /** The Cancel button is displayed when there is text input. */ 399 ARKUI_CANCELBUTTON_STYLE_INPUT, 400 } ArkUI_CancelButtonStyle; 401 402 /** 403 * @brief Enumerates the types of the <b><XComponent></b> component. 404 * 405 * @since 12 406 */ 407 typedef enum { 408 /** The custom content of EGL/OpenGL ES and media data is displayed individually on the screen. */ 409 ARKUI_XCOMPONENT_TYPE_SURFACE = 0, 410 /** The custom content of EGL/OpenGL ES and media data is grouped and displayed together with content 411 * of the component. 412 */ 413 ARKUI_XCOMPONENT_TYPE_TEXTURE = 2, 414 } ArkUI_XComponentType; 415 416 /** 417 * @brief Enumerates the styles of the progress indicator. 418 * 419 * @since 12 420 */ 421 typedef enum { 422 /** Linear style. */ 423 ARKUI_PROGRESS_TYPE_LINEAR = 0, 424 /** Indeterminate ring style. */ 425 ARKUI_PROGRESS_TYPE_RING, 426 /** Eclipse style. */ 427 ARKUI_PROGRESS_TYPE_ECLIPSE, 428 /** Determinate ring style. */ 429 ARKUI_PROGRESS_TYPE_SCALE_RING, 430 /** Capsule style. */ 431 ARKUI_PROGRESS_TYPE_CAPSULE, 432 } ArkUI_ProgressType; 433 434 /** 435 * @brief Enumerates the text decoration types. 436 * 437 * @since 12 438 */ 439 typedef enum { 440 /** No text decoration. */ 441 ARKUI_TEXT_DECORATION_TYPE_NONE = 0, 442 /** Line under the text. */ 443 ARKUI_TEXT_DECORATION_TYPE_UNDERLINE, 444 /** Line over the text. */ 445 ARKUI_TEXT_DECORATION_TYPE_OVERLINE, 446 /** Line through the text. */ 447 ARKUI_TEXT_DECORATION_TYPE_LINE_THROUGH, 448 } ArkUI_TextDecorationType; 449 450 /** 451 * @brief Enumerates the text decoration styles. 452 * 453 * @since 12 454 */ 455 typedef enum { 456 /** Single solid line. */ 457 ARKUI_TEXT_DECORATION_STYLE_SOLID = 0, 458 /** Double solid line. */ 459 ARKUI_TEXT_DECORATION_STYLE_DOUBLE, 460 /** Dotted line. */ 461 ARKUI_TEXT_DECORATION_STYLE_DOTTED, 462 /** Dashed line. */ 463 ARKUI_TEXT_DECORATION_STYLE_DASHED, 464 /** Wavy line. */ 465 ARKUI_TEXT_DECORATION_STYLE_WAVY, 466 } ArkUI_TextDecorationStyle; 467 468 /** 469 * @brief Enumerates the text cases. 470 * 471 * @since 12 472 */ 473 typedef enum { 474 /** The original case of the text is retained. */ 475 ARKUI_TEXT_CASE_NORMAL = 0, 476 /** All letters in the text are in lowercase. */ 477 ARKUI_TEXT_CASE_LOWER, 478 /** All letters in the text are in uppercase. */ 479 ARKUI_TEXT_CASE_UPPER, 480 } ArkUI_TextCase; 481 482 /** 483 * @brief Enumerates the text copy and paste modes. 484 * 485 * @since 12 486 */ 487 typedef enum { 488 /** Copy is not allowed. */ 489 ARKUI_COPY_OPTIONS_NONE = 0, 490 /** Intra-application copy is allowed. */ 491 ARKUI_COPY_OPTIONS_IN_APP, 492 /** Intra-device copy is allowed. */ 493 ARKUI_COPY_OPTIONS_LOCAL_DEVICE, 494 /** Cross-device copy is allowed. */ 495 ARKUI_COPY_OPTIONS_CROSS_DEVICE, 496 } ArkUI_CopyOptions; 497 498 /** 499 * @brief Enumerates the shadow types. 500 * 501 * @since 12 502 */ 503 typedef enum { 504 /** Color. */ 505 ARKUI_SHADOW_TYPE_COLOR = 0, 506 /** Blur. */ 507 ARKUI_SHADOW_TYPE_BLUR 508 } ArkUI_ShadowType; 509 510 /** 511 * @brief Enumerates the types of the text picker. 512 * 513 * @since 12 514 */ 515 typedef enum { 516 /** Single-column text picker. */ 517 ARKUI_TEXTPICKER_RANGETYPE_SINGLE = 0, 518 /** Multi-column text picker. */ 519 ARKUI_TEXTPICKER_RANGETYPE_MULTI, 520 /** Single-column text picker with image resources. */ 521 ARKUI_TEXTPICKER_RANGETYPE_RANGE_CONTENT, 522 /** Interconnected multi-column text picker. */ 523 ARKUI_TEXTPICKER_RANGETYPE_CASCADE_RANGE_CONTENT, 524 } ArkUI_TextPickerRangeType; 525 526 /** 527 * @brief Defines the input structure of the single-column text picker with image resources. 528 * 529 * @since 12 530 */ 531 typedef struct { 532 /** Image resource. */ 533 const char* icon; 534 /** Text information. */ 535 const char* text; 536 } ARKUI_TextPickerRangeContent; 537 538 /** 539 * @brief Defines the input structure of the interconnected multi-column text picker. 540 * 541 * @since 12 542 */ 543 typedef struct { 544 /** Text information. */ 545 const char* text; 546 /** Interconnected data. */ 547 const ARKUI_TextPickerRangeContent* children; 548 /** Size of the interconnected data array. */ 549 int32_t size; 550 } ARKUI_TextPickerCascadeRangeContent; 551 552 /** 553 * @brief Enumerates the effects used at the edges of the component when the boundary of the scrollable content is 554 * reached. 555 * 556 * @since 12 557 */ 558 typedef enum { 559 /** Spring effect. When at one of the edges, the component can move beyond the bounds based on the initial 560 * speed or through touches, and produces a bounce effect when the user releases their finger. */ 561 ARKUI_EDGE_EFFECT_SPRING = 0, 562 /** Fade effect. When at one of the edges, the component produces a fade effect. */ 563 ARKUI_EDGE_EFFECT_FADE, 564 /** No effect after the scrollbar is moved to the edge. */ 565 ARKUI_EDGE_EFFECT_NONE, 566 } ArkUI_EdgeEffect; 567 568 /** 569 * @brief Enumerates the scroll directions for the <b><Scroll></b> component. 570 * 571 * @since 12 572 */ 573 typedef enum { 574 /** Only vertical scrolling is supported. */ 575 ARKUI_SCROLL_DIRECTION_VERTICAL = 0, 576 /** Only horizontal scrolling is supported. */ 577 ARKUI_SCROLL_DIRECTION_HORIZONTAL, 578 /** Scrolling is not allowed. */ 579 ARKUI_SCROLL_DIRECTION_NONE = 3, 580 } ArkUI_ScrollDirection; 581 582 /** 583 * @brief Enumerates the alignment modes of list items when scrolling ends. 584 * 585 * @since 12 586 */ 587 typedef enum { 588 /** No alignment. This is the default value. */ 589 ARKUI_SCROLL_SNAP_ALIGN_NONE = 0, 590 /** The first item in the view is aligned at the start of the list. */ 591 ARKUI_SCROLL_SNAP_ALIGN_START, 592 /** The middle items in the view are aligned in the center of the list. */ 593 ARKUI_SCROLL_SNAP_ALIGN_CENTER, 594 /** The last item in the view is aligned at the end of the list. */ 595 ARKUI_SCROLL_SNAP_ALIGN_END, 596 } ArkUI_ScrollSnapAlign; 597 598 /** 599 * @brief Enumerates the scrollbar display modes. 600 * 601 * @since 12 602 */ 603 typedef enum { 604 /** Hide. */ 605 ARKUI_SCROLL_BAR_DISPLAY_MODE_OFF = 0, 606 /** Display on demand (displays when the screen is touched and disappears after 2s). */ 607 ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO, 608 /** Always display. */ 609 ARKUI_SCROLL_BAR_DISPLAY_MODE_ON, 610 } ArkUI_ScrollBarDisplayMode; 611 612 /** 613 * @brief Enumerates the scroll directions for the <b><List></b> component. 614 * 615 * @since 12 616 */ 617 typedef enum { 618 /** Only vertical scrolling is supported. */ 619 ARKUI_AXIS_VERTICAL = 0, 620 /** Only horizontal scrolling is supported. */ 621 ARKUI_AXIS_HORIZONTAL, 622 } ArkUI_Axis; 623 624 /** 625 * @brief Enumerates the modes for pinning the header to the top or the footer to the bottom. 626 * 627 * @since 12 628 */ 629 typedef enum { 630 /** In the list item group, the header is not pinned to the top, and the footer is not pinned to the bottom. */ 631 ARKUI_STICKY_STYLE_NONE = 0, 632 /** In the list item group, the header is pinned to the top, and the footer is not pinned to the bottom. */ 633 ARKUI_STICKY_STYLE_HEADER = 1, 634 /** In the list item group, the footer is pinned to the bottom, and the header is not pinned to the top. */ 635 ARKUI_STICKY_STYLE_FOOTER = 2, 636 /** In the list item group, the footer is pinned to the bottom, and the header is pinned to the top. */ 637 ARKUI_STICKY_STYLE_BOTH = 3, 638 } ArkUI_StickyStyle; 639 640 /** 641 * @brief Enumerates the border styles. 642 * 643 * @since 12 644 */ 645 typedef enum { 646 /** Solid border. */ 647 ARKUI_BORDER_STYLE_SOLID = 0, 648 /** Dashed border. */ 649 ARKUI_BORDER_STYLE_DASHED, 650 /** Dotted border. */ 651 ARKUI_BORDER_STYLE_DOTTED, 652 } ArkUI_BorderStyle; 653 654 /** 655 * @brief Enumerates the hit test modes. 656 * 657 * @since 12 658 */ 659 typedef enum { 660 /** Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from 661 * the hit test. */ 662 ARKUI_HIT_TEST_MODE_DEFAULT = 0, 663 /** The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the 664 * hit test. */ 665 ARKUI_HIT_TEST_MODE_BLOCK, 666 /** Both the node and its child node respond to the hit test of a touch event, and its sibling node is also 667 * considered during the hit test. */ 668 ARKUI_HIT_TEST_MODE_TRANSPARENT, 669 /** The node does not respond to the hit test of a touch event. */ 670 ARKUI_HIT_TEST_MODE_NONE 671 } ArkUI_HitTestMode; 672 673 /** 674 * @brief Enumerates the shadow styles. 675 * 676 * @since 12 677 */ 678 typedef enum { 679 /** Mini shadow. */ 680 ARKUI_SHADOW_STYLE_OUTER_DEFAULT_XS = 0, 681 /** Little shadow. */ 682 ARKUI_SHADOW_STYLE_OUTER_DEFAULT_SM, 683 /** Medium shadow. */ 684 ARKUI_SHADOW_STYLE_OUTER_DEFAULT_MD, 685 /** Large shadow. */ 686 ARKUI_SHADOW_STYLE_OUTER_DEFAULT_LG, 687 /** Floating small shadow. */ 688 ARKUI_SHADOW_STYLE_OUTER_FLOATING_SM, 689 /** Floating medium shadow. */ 690 ARKUI_SHADOW_STYLE_OUTER_FLOATING_MD, 691 } ArkUI_ShadowStyle; 692 693 /** 694 * @brief Enumerates the animation curves. 695 * 696 * @since 12 697 */ 698 typedef enum { 699 /** The animation speed keeps unchanged. */ 700 ARKUI_CURVE_LINEAR = 0, 701 /** The animation starts slowly, accelerates, and then slows down towards the end. */ 702 ARKUI_CURVE_EASE, 703 /** The animation starts at a low speed and then picks up speed until the end. */ 704 ARKUI_CURVE_EASE_IN, 705 /** The animation ends at a low speed. */ 706 ARKUI_CURVE_EASE_OUT, 707 /** The animation starts and ends at a low speed. */ 708 ARKUI_CURVE_EASE_IN_OUT, 709 /** The animation uses the standard curve */ 710 ARKUI_CURVE_FAST_OUT_SLOW_IN, 711 /** The animation uses the deceleration curve. */ 712 ARKUI_CURVE_LINEAR_OUT_SLOW_IN, 713 /** The animation uses the acceleration curve. */ 714 ARKUI_CURVE_FAST_OUT_LINEAR_IN, 715 /** The animation uses the extreme deceleration curve. */ 716 ARKUI_CURVE_EXTREME_DECELERATION, 717 /** The animation uses the sharp curve. */ 718 ARKUI_CURVE_SHARP, 719 /** The animation uses the rhythm curve. */ 720 ARKUI_CURVE_RHYTHM, 721 /** The animation uses the smooth curve. */ 722 ARKUI_CURVE_SMOOTH, 723 /** The animation uses the friction curve */ 724 ARKUI_CURVE_FRICTION, 725 } ArkUI_AnimationCurve; 726 727 /** 728 * @brief Enumerates arrow styles of the navigation point indicator. 729 * 730 * @since 12 731 */ 732 typedef enum { 733 /** The arrow is not displayed for the navigation point indicator. */ 734 ARKUI_SWIPER_ARROW_HIDE = 0, 735 /** The arrow is displayed for the navigation point indicator. */ 736 ARKUI_SWIPER_ARROW_SHOW, 737 /** The arrow is displayed only when the mouse pointer hovers over the navigation point indicator. */ 738 ARKUI_SWIPER_ARROW_SHOW_ON_HOVER, 739 } ArkUI_SwiperArrow; 740 741 /** 742 * @brief Nested scrolling mode for Swiper components and parent components. 743 * 744 * @since 12 745 */ 746 typedef enum { 747 /** Swiper only scrolls on its own and is not linked to its parent component. */ 748 ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY = 0, 749 /** The Swiper itself scrolls first, and the parent component scrolls after it reaches the edge. After the parent 750 * component scrolls to the edge, if the parent component has an edge effect, the parent component triggers the edge 751 * effect; otherwise, the Swiper triggers the edge effect. */ 752 ARKUI_SWIPER_NESTED_SRCOLL_SELF_FIRST, 753 } ArkUI_SwiperNestedScrollMode; 754 755 /** 756 * @brief Enumerates the accessibility modes. 757 * 758 * @since 12 759 */ 760 typedef enum { 761 /** Whether the component can be identified by the accessibility service is dependent on the component. */ 762 ARKUI_ACCESSIBILITY_MODE_AUTO = 0, 763 /** The component can be identified by the accessibility service. */ 764 ARKUI_ACCESSIBILITY_MODE_ENABLED, 765 /** The component cannot be identified by the accessibility service. */ 766 ARKUI_ACCESSIBILITY_MODE_DISABLED, 767 /** The component and all its child components cannot be identified by the accessibility service. */ 768 ARKUI_ACCESSIBILITY_MODE_DISABLED_FOR_DESCENDANTS, 769 } ArkUI_AccessibilityMode; 770 771 /** 772 * @brief Defines whether copy and paste is allowed for text content. 773 * 774 * @since 12 775 */ 776 typedef enum { 777 /** Copy is not allowed. */ 778 ARKUI_TEXT_COPY_OPTIONS_NONE = 0, 779 /** Intra-application copy is allowed. */ 780 ARKUI_TEXT_COPY_OPTIONS_IN_APP, 781 /** Intra-device copy is allowed. */ 782 ARKUI_TEXT_COPY_OPTIONS_LOCAL_DEVICE, 783 /** Cross-device copy is allowed. */ 784 ARKUI_TEXT_COPY_OPTIONS_CROSS_DEVICE, 785 } ArkUI_TextCopyOptions; 786 787 /** 788 * @brief Defines how the adaptive height is determined for the text. 789 * 790 * @since 12 791 */ 792 typedef enum { 793 /** Prioritize the <b>maxLines</b> settings. */ 794 ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MAX_LINES_FIRST = 0, 795 /** Prioritize the <b>minFontSize</b> settings. */ 796 ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MIN_FONT_SIZE_FIRST, 797 /** Prioritize the layout constraint settings in terms of height. */ 798 ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_LAYOUT_CONSTRAINT_FIRST, 799 } ArkUI_TextHeightAdaptivePolicy; 800 801 /** 802 * @brief Defines nested scrolling options. 803 * 804 * @since 12 805 */ 806 typedef enum { 807 /** The scrolling is contained within the component, and no scroll chaining occurs, that is, the parent component 808 * does not scroll when the component scrolling reaches the boundary. */ 809 ARKUI_SCROLL_NESTED_MODE_SELF_ONLY = 0, 810 /** The component scrolls first, and when it hits the boundary, the parent component scrolls. 811 * When the parent component hits the boundary, its edge effect is displayed. If no edge 812 * effect is specified for the parent component, the edge effect of the child component is displayed instead. */ 813 ARKUI_SCROLL_NESTED_MODE_SELF_FIRST, 814 /** The parent component scrolls first, and when it hits the boundary, the component scrolls. 815 * When the component hits the boundary, its edge effect is displayed. If no edge effect is specified for the 816 * component, the edge effect of the parent component is displayed instead. */ 817 ARKUI_SCROLL_NESTED_MODE_PARENT_FIRST, 818 /** The component and its parent component scroll at the same time. When both the component and its parent component 819 * hit the boundary, the edge effect of the component is displayed. If no edge effect is specified for the 820 * component, the edge effect of the parent component is displayed instead. */ 821 ARKUI_SCROLL_NESTED_MODE_PARALLEL, 822 } ArkUI_ScrollNestedMode; 823 824 /** 825 * @brief Defines the edge to which the component scrolls. 826 * 827 * @since 12 828 */ 829 typedef enum { 830 /** Top edge in the vertical direction. */ 831 ARKUI_SCROLL_EDGE_TOP = 0, 832 /** Bottom edge in the vertical direction. */ 833 ARKUI_SCROLL_EDGE_BOTTOM, 834 /** Start position in the horizontal direction. */ 835 ARKUI_SCROLL_EDGE_START, 836 /** End position in the horizontal direction. */ 837 ARKUI_SCROLL_EDGE_END, 838 } ArkUI_ScrollEdge; 839 840 /** 841 * @brief Alignment when scrolling to specific items. 842 * 843 * @since 12 844 */ 845 typedef enum { 846 /** Align the head. Align the head of the specified item with the head of the container.*/ 847 ARKUI_SCROLL_ALIGNMENT_START = 0, 848 /** Center alignment. Align the axis direction of the specified item to the center of the container.*/ 849 ARKUI_SCROLL_ALIGNMENT_CENTER, 850 /** Tail alignment. Align the tail of the specified item with the tail of the container.*/ 851 ARKUI_SCROLL_ALIGNMENT_END, 852 /** Automatic alignment. If the specified item is completely in the display area, no adjustments will be made. 853 * Otherwise, according to the principle of the shortest sliding distance, align the head or tail of the specified 854 * item with the container, so that the specified item is completely in the display area.*/ 855 ARKUI_SCROLL_ALIGNMENT_AUTO, 856 } ArkUI_ScrollAlignment; 857 858 /** 859 * @brief Define the current scrolling state. 860 * 861 * @since 12 862 */ 863 typedef enum { 864 /** Idle state. Trigger when using the method provided by the controller to control scrolling, and trigger when 865 * dragging the scroll bar to scroll.*/ 866 ARKUI_SCROLL_STATE_IDLE = 0, 867 /** Scroll state. Triggered when dragging the container with fingers to scroll.*/ 868 ARKUI_SCROLL_STATE_SCROLL, 869 /** Inertial rolling state. Triggered when inertia rolling and bouncing back to the edge are performed after 870 * releasing the hand quickly.*/ 871 ARKUI_SCROLL_STATE_FLING, 872 } ArkUI_ScrollState; 873 874 /** 875 * @brief Enumerates the types of the slider in the block direction. 876 * 877 * @since 12 878 */ 879 typedef enum { 880 /** Round slider. */ 881 ARKUI_SLIDER_BLOCK_STYLE_DEFAULT = 0, 882 /** Slider with an image background. */ 883 ARKUI_SLIDER_BLOCK_STYLE_IMAGE, 884 /** Slider in a custom shape. */ 885 ARKUI_SLIDER_BLOCK_STYLE_SHAPE, 886 } ArkUI_SliderBlockStyle; 887 888 /** 889 * @brief Enumerates the scroll directions of the slider. 890 * 891 * @since 12 892 */ 893 typedef enum { 894 /** Vertical direction. */ 895 ARKUI_SLIDER_DIRECTION_VERTICAL = 0, 896 /** Horizontal direction. */ 897 ARKUI_SLIDER_DIRECTION_HORIZONTAL, 898 } ArkUI_SliderDirection; 899 900 /** 901 * @brief Enumerates the slider styles. 902 * 903 * @since 12 904 */ 905 typedef enum { 906 /** The slider is on the slider track. */ 907 ARKUI_SLIDER_STYLE_OUT_SET = 0, 908 /** The slider is in the slider track. */ 909 ARKUI_SLIDER_STYLE_IN_SET, 910 /** No slider. */ 911 ARKUI_SLIDER_STYLE_NONE, 912 } ArkUI_SliderStyle; 913 914 /** 915 * @brief Enumerates the shapes of the check box 916 * 917 * @since 12 918 */ 919 typedef enum { 920 /** Circle. */ 921 ArkUI_CHECKBOX_SHAPE_CIRCLE = 0, 922 /** Rounded square. */ 923 ArkUI_CHECKBOX_SHAPE_ROUNDED_SQUARE, 924 } ArkUI_CheckboxShape; 925 926 /** 927 * @brief Enumerates the animation playback modes. 928 * 929 * @since 12 930 */ 931 typedef enum { 932 /** The animation is played forwards. */ 933 ARKUI_ANIMATION_PLAY_MODE_NORMAL = 0, 934 /** The animation is played reversely. */ 935 ARKUI_ANIMATION_PLAY_MODE_REVERSE, 936 /** The animation is played normally for an odd number of times (1, 3, 5...) and reversely for an even number 937 * of times (2, 4, 6...). */ 938 ARKUI_ANIMATION_PLAY_MODE_ALTERNATE, 939 /** The animation is played reversely for an odd number of times (1, 3, 5...) and normally for an even number 940 * of times (2, 4, 6...). */ 941 ARKUI_ANIMATION_PLAY_MODE_ALTERNATE_REVERSE, 942 } ArkUI_AnimationPlayMode; 943 944 /** 945 * @brief Defines the image size. 946 * 947 * @since 12 948 */ 949 typedef enum { 950 /** The original image aspect ratio is retained. */ 951 ARKUI_IMAGE_SIZE_AUTO = 0, 952 /** Default value. The image is scaled with its aspect ratio retained for both sides to be greater than or equal 953 * to the display boundaries. */ 954 ARKUI_IMAGE_SIZE_COVER, 955 /** The image is scaled with its aspect ratio retained for the content to be completely displayed within the display 956 * boundaries. */ 957 ARKUI_IMAGE_SIZE_CONTAIN, 958 } ArkUI_ImageSize; 959 960 /** 961 * @brief Enumerates the adaptive color modes. 962 * 963 * @since 12 964 */ 965 typedef enum { 966 /** Adaptive color mode is not used. */ 967 ARKUI_ADAPTIVE_COLOR_DEFAULT = 0, 968 /** Adaptive color mode is used. */ 969 ARKUI_ADAPTIVE_COLOR_AVERAGE, 970 } ArkUI_AdaptiveColor; 971 972 /** 973 * @brief Enumerates the color modes. 974 * 975 * @since 12 976 */ 977 typedef enum { 978 /** Following the system color mode. */ 979 ARKUI_COLOR_MODE_SYSTEM = 0, 980 /** Light color mode. */ 981 ARKUI_COLOR_MODE_LIGHT, 982 /** Dark color mode. */ 983 ARKUI_COLOR_MODE_DARK, 984 } ArkUI_ColorMode; 985 986 /** 987 * @brief Enumerates the system color modes. 988 * 989 * @since 12 990 */ 991 typedef enum { 992 /** Light color mode. */ 993 ARKUI_SYSTEM_COLOR_MODE_LIGHT = 0, 994 /** Dark color mode. */ 995 ARKUI_SYSTEM_COLOR_MODE_DARK, 996 } ArkUI_SystemColorMode; 997 998 /** 999 * @brief Enumerates the blur styles. 1000 * 1001 * @since 12 1002 */ 1003 typedef enum { 1004 /** Thin material. */ 1005 ARKUI_BLUR_STYLE_THIN = 0, 1006 /** Regular material. */ 1007 ARKUI_BLUR_STYLE_REGULAR, 1008 /** Thick material. */ 1009 ARKUI_BLUR_STYLE_THICK, 1010 /** Material that creates the minimum depth of field effect. */ 1011 ARKUI_BLUR_STYLE_BACKGROUND_THIN, 1012 /** Material that creates a medium shallow depth of field effect. */ 1013 ARKUI_BLUR_STYLE_BACKGROUND_REGULAR, 1014 /** Material that creates a high shallow depth of field effect. */ 1015 ARKUI_BLUR_STYLE_BACKGROUND_THICK, 1016 /** Material that creates the maximum depth of field effect. */ 1017 ARKUI_BLUR_STYLE_BACKGROUND_ULTRA_THICK, 1018 /** No blur. */ 1019 ARKUI_BLUR_STYLE_NONE, 1020 /** Component ultra-thin material. */ 1021 ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THIN, 1022 /** Component thin material. */ 1023 ARKUI_BLUR_STYLE_COMPONENT_THIN, 1024 /** Component regular material. */ 1025 ARKUI_BLUR_STYLE_COMPONENT_REGULAR, 1026 /** Component thick material. */ 1027 ARKUI_BLUR_STYLE_COMPONENT_THICK, 1028 /** Component ultra-thick material. */ 1029 ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THICK, 1030 } ArkUI_BlurStyle; 1031 1032 /** 1033 * @brief Enumerates the vertical alignment modes. 1034 * 1035 * @since 12 1036 */ 1037 typedef enum { 1038 /** Top aligned. */ 1039 ARKUI_VERTICAL_ALIGNMENT_TOP = 0, 1040 /** Center aligned. This is the default alignment mode. */ 1041 ARKUI_VERTICAL_ALIGNMENT_CENTER, 1042 /** Bottom aligned. */ 1043 ARKUI_VERTICAL_ALIGNMENT_BOTTOM, 1044 } ArkUI_VerticalAlignment; 1045 1046 /** 1047 * @brief Enumerates the alignment mode in the horizontal direction. 1048 * 1049 * @since 12 1050 */ 1051 typedef enum { 1052 /** Aligned with the start edge in the same direction as the language in use. */ 1053 ARKUI_HORIZONTAL_ALIGNMENT_START = 0, 1054 /** Center aligned. This is the default alignment mode. */ 1055 ARKUI_HORIZONTAL_ALIGNMENT_CENTER, 1056 /** Aligned with the end edge in the same direction as the language in use. */ 1057 ARKUI_HORIZONTAL_ALIGNMENT_END, 1058 } ArkUI_HorizontalAlignment; 1059 1060 /** 1061 * @brief Enumerates the display modes when the text is too long. 1062 * 1063 * @since 12 1064 */ 1065 typedef enum { 1066 /** Extra-long text is not clipped. */ 1067 ARKUI_TEXT_OVERFLOW_NONE = 0, 1068 /** Extra-long text is clipped. */ 1069 ARKUI_TEXT_OVERFLOW_CLIP, 1070 /** An ellipsis (...) is used to represent text overflow. */ 1071 ARKUI_TEXT_OVERFLOW_ELLIPSIS, 1072 /** Text continuously scrolls when text overflow occurs. */ 1073 ARKUI_TEXT_OVERFLOW_MARQUEE, 1074 } ArkUI_TextOverflow; 1075 1076 /** 1077 * @brief Enumerates the alignment mode of the image with the text. 1078 * 1079 * @since 12 1080 */ 1081 typedef enum { 1082 /** The image is bottom aligned with the text baseline. */ 1083 ARKUI_IMAGE_SPAN_ALIGNMENT_BASELINE = 0, 1084 /** The image is bottom aligned with the text. */ 1085 ARKUI_IMAGE_SPAN_ALIGNMENT_BOTTOM, 1086 /** The image is centered aligned with the text. */ 1087 ARKUI_IMAGE_SPAN_ALIGNMENT_CENTER, 1088 /** The image is top aligned with the text. */ 1089 ARKUI_IMAGE_SPAN_ALIGNMENT_TOP, 1090 } ArkUI_ImageSpanAlignment; 1091 1092 /** 1093 * @brief Defines how the image is resized to fit its container. 1094 *ImageSpanAlignment 1095 * @since 12 1096 */ 1097 typedef enum { 1098 /** The image is scaled with its aspect ratio retained for the content to be completely displayed within the 1099 * display boundaries. */ 1100 ARKUI_OBJECT_FIT_CONTAIN = 0, 1101 /** The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the 1102 * display boundaries. */ 1103 ARKUI_OBJECT_FIT_COVER, 1104 /** The image is scaled automatically to fit the display area. */ 1105 ARKUI_OBJECT_FIT_AUTO, 1106 /** The image is scaled to fill the display area, and its aspect ratio is not retained. */ 1107 ARKUI_OBJECT_FIT_FILL, 1108 /** The image content is displayed with its aspect ratio retained. The size is smaller than or equal to the 1109 * original size. */ 1110 ARKUI_OBJECT_FIT_SCALE_DOWN, 1111 /** The original size is retained. */ 1112 ARKUI_OBJECT_FIT_NONE, 1113 /** Not resized, the image is aligned with the start edge of the top of the container. */ 1114 ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP_START, 1115 /** Not resized, the image is horizontally centered at the top of the container. */ 1116 ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP, 1117 /** Not resized, the image is aligned with the end edge at the top of the container. */ 1118 ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP_END, 1119 /** Not resized, the image is vertically centered on the start edge of the container. */ 1120 ARKUI_OBJECT_FIT_NONE_AND_ALIGN_START, 1121 /** Not resized, the image is horizontally and vertically centered in the container. */ 1122 ARKUI_OBJECT_FIT_NONE_AND_ALIGN_CENTER, 1123 /** Not resized, the image is vertically centered on the end edge of the container. */ 1124 ARKUI_OBJECT_FIT_NONE_AND_ALIGN_END, 1125 /** Not resized, the image is aligned with the start edge at the bottom of the container. */ 1126 ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM_START, 1127 /** Not resized, the image is horizontally centered at the bottom of the container. */ 1128 ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM, 1129 /** Not resized, the image is aligned with the end edge at the bottom of the container. */ 1130 ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM_END, 1131 } ArkUI_ObjectFit; 1132 1133 /** 1134 * @brief Enumerates the image interpolation effect. 1135 * 1136 * @since 12 1137 */ 1138 typedef enum { 1139 /** No image interpolation. */ 1140 ARKUI_IMAGE_INTERPOLATION_NONE = 0, 1141 /** Low quality interpolation. */ 1142 ARKUI_IMAGE_INTERPOLATION_LOW, 1143 /** Medium quality interpolation. */ 1144 ARKUI_IMAGE_INTERPOLATION_MEDIUM, 1145 /** High quality interpolation. This mode produces scaled images of the highest possible quality. */ 1146 ARKUI_IMAGE_INTERPOLATION_HIGH, 1147 } ArkUI_ImageInterpolation; 1148 1149 /** 1150 * @brief Enumerates the blend modes. 1151 * 1152 * @since 12 1153 */ 1154 typedef enum { 1155 /** The top image is superimposed on the bottom image without any blending. */ 1156 ARKUI_BLEND_MODE_NONE = 0, 1157 /** The target pixels covered by the source pixels are erased by being turned to completely transparent. */ 1158 ARKUI_BLEND_MODE_CLEAR, 1159 /** r = s: Only the source pixels are displayed. */ 1160 ARKUI_BLEND_MODE_SRC, 1161 /** r = d: Only the target pixels are displayed. */ 1162 ARKUI_BLEND_MODE_DST, 1163 /** r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels. */ 1164 ARKUI_BLEND_MODE_SRC_OVER, 1165 /** r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels. */ 1166 ARKUI_BLEND_MODE_DST_OVER, 1167 /** r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed. */ 1168 ARKUI_BLEND_MODE_SRC_IN, 1169 /** r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed. */ 1170 ARKUI_BLEND_MODE_DST_IN, 1171 /** r = s * (1 - da): Only the part of the source pixels that do not overlap with the target pixels is displayed. */ 1172 ARKUI_BLEND_MODE_SRC_OUT, 1173 /** r = d * (1 - sa): Only the part of the target pixels that do not overlap with the source pixels is displayed. */ 1174 ARKUI_BLEND_MODE_DST_OUT, 1175 /** r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed and 1176 * the part of the target pixels that do not overlap with the source pixels are displayed. 1177 */ 1178 ARKUI_BLEND_MODE_SRC_ATOP, 1179 /** r = d * sa + s * (1 - da): The part of the target pixels that overlap with the source pixels and the part of 1180 * the source pixels that do not overlap with the target pixels are displayed. 1181 */ 1182 ARKUI_BLEND_MODE_DST_ATOP, 1183 /** r = s * (1 - da) + d * (1 - sa): Only the non-overlapping part between the source pixels and the target pixels 1184 * is displayed. */ 1185 ARKUI_BLEND_MODE_XOR, 1186 /** r = min(s + d, 1): New pixels resulting from adding the source pixels to the target pixels are displayed. */ 1187 ARKUI_BLEND_MODE_PLUS, 1188 /** r = s * d: New pixels resulting from multiplying the source pixels with the target pixels are displayed. */ 1189 ARKUI_BLEND_MODE_MODULATE, 1190 /** r = s + d - s * d: Pixels are blended by adding the source pixels to the target pixels and subtracting the 1191 * product of their multiplication. */ 1192 ARKUI_BLEND_MODE_SCREEN, 1193 /** The MULTIPLY or SCREEN mode is used based on the target pixels. */ 1194 ARKUI_BLEND_MODE_OVERLAY, 1195 /** rc = s + d - max(s * da, d * sa), ra = kSrcOver: When two colors overlap, whichever is darker is used. */ 1196 ARKUI_BLEND_MODE_DARKEN, 1197 /** rc = s + d - min(s * da, d * sa), ra = 1198 kSrcOver: The final pixels are composed of the lightest values of pixels. */ 1199 ARKUI_BLEND_MODE_LIGHTEN, 1200 /** The colors of the target pixels are lightened to reflect the source pixels. */ 1201 ARKUI_BLEND_MODE_COLOR_DODGE, 1202 /** The colors of the target pixels are darkened to reflect the source pixels. */ 1203 ARKUI_BLEND_MODE_COLOR_BURN, 1204 /** The MULTIPLY or SCREEN mode is used, depending on the source pixels. */ 1205 ARKUI_BLEND_MODE_HARD_LIGHT, 1206 /** The LIGHTEN or DARKEN mode is used, depending on the source pixels. */ 1207 ARKUI_BLEND_MODE_SOFT_LIGHT, 1208 /** rc = s + d - 2 * (min(s * da, d * sa)), ra = 1209 kSrcOver: The final pixel is the result of subtracting the darker of the two pixels (source and target) from 1210 the lighter one. */ 1211 ARKUI_BLEND_MODE_DIFFERENCE, 1212 /** rc = s + d - two(s * d), ra = kSrcOver: The final pixel is similar to <b>DIFFERENCE</b>, but with less contrast. 1213 */ 1214 ARKUI_BLEND_MODE_EXCLUSION, 1215 /** r = s * (1 - da) + d * (1 - sa) + s * d: The final pixel is the result of multiplying the source pixel 1216 * by the target pixel. */ 1217 ARKUI_BLEND_MODE_MULTIPLY, 1218 /** The resultant image is created with the luminance and saturation of the source image and the hue of the target 1219 * image. */ 1220 ARKUI_BLEND_MODE_HUE, 1221 /** The resultant image is created with the luminance and hue of the target image and the saturation of the source 1222 * image. */ 1223 ARKUI_BLEND_MODE_SATURATION, 1224 /** The resultant image is created with the saturation and hue of the source image and the luminance of the target 1225 * image. */ 1226 ARKUI_BLEND_MODE_COLOR, 1227 /** The resultant image is created with the saturation and hue of the target image and the luminance of the source 1228 * image. */ 1229 ARKUI_BLEND_MODE_LUMINOSITY, 1230 } ArkUI_BlendMode; 1231 1232 /** 1233 * @brief Enumerates the modes in which components are laid out along the main axis of the container. 1234 * 1235 * @since 12 1236 */ 1237 typedef enum { 1238 /** Components are arranged from left to right. */ 1239 ARKUI_DIRECTION_LTR = 0, 1240 /** Components are arranged from right to left. */ 1241 ARKUI_DIRECTION_RTL, 1242 /** The default layout direction is used. */ 1243 ARKUI_DIRECTION_AUTO = 3, 1244 } ArkUI_Direction; 1245 1246 /** 1247 * @brief Enumerates the modes in which components are laid out along the cross axis of the container. 1248 * 1249 * @since 12 1250 */ 1251 typedef enum { 1252 /** The default configuration in the container is used. */ 1253 ARKUI_ITEM_ALIGNMENT_AUTO = 0, 1254 /** The items in the container are aligned with the cross-start edge. */ 1255 ARKUI_ITEM_ALIGNMENT_START, 1256 /** The items in the container are centered along the cross axis. */ 1257 ARKUI_ITEM_ALIGNMENT_CENTER, 1258 /** The items in the container are aligned with the cross-end edge. */ 1259 ARKUI_ITEM_ALIGNMENT_END, 1260 /** The items in the container are stretched and padded along the cross axis. */ 1261 ARKUI_ITEM_ALIGNMENT_STRETCH, 1262 /** The items in the container are aligned in such a manner that their text baselines are aligned along the 1263 * cross axis. */ 1264 ARKUI_ITEM_ALIGNMENT_BASELINE, 1265 } ArkUI_ItemAlignment; 1266 1267 /** 1268 * @brief Enumerates the foreground colors. 1269 * 1270 * @since 12 1271 */ 1272 typedef enum { 1273 /** The foreground colors are the inverse of the component background colors. */ 1274 ARKUI_COLOR_STRATEGY_INVERT = 0, 1275 /** The shadow colors of the component are the average color obtained from the component background shadow area. */ 1276 ARKUI_COLOR_STRATEGY_AVERAGE, 1277 /** The shadow colors of the component are the primary color obtained from the component background shadow area. */ 1278 ARKUI_COLOR_STRATEGY_PRIMARY, 1279 } ArkUI_ColorStrategy; 1280 1281 /** 1282 * @brief Enumerates the vertical alignment modes. 1283 * 1284 * @since 12 1285 */ 1286 typedef enum { 1287 /** The child components are aligned with the start edge of the main axis. */ 1288 ARKUI_FLEX_ALIGNMENT_START = 1, 1289 /** The child components are aligned in the center of the main axis. */ 1290 ARKUI_FLEX_ALIGNMENT_CENTER = 2, 1291 /** The child components are aligned with the end edge of the main axis. */ 1292 ARKUI_FLEX_ALIGNMENT_END = 3, 1293 /** The child components are evenly distributed along the main axis. The space between any two adjacent components 1294 * is the same. The first component is aligned with the main-start, and the last component is aligned with 1295 * the main-end. */ 1296 ARKUI_FLEX_ALIGNMENT_SPACE_BETWEEN = 6, 1297 /** The child components are evenly distributed along the main axis. The space between any two adjacent components 1298 * is the same. The space between the first component and main-start, and that between the last component and 1299 * cross-main are both half the size of the space between two adjacent components. */ 1300 ARKUI_FLEX_ALIGNMENT_SPACE_AROUND = 7, 1301 /** The child components are evenly distributed along the main axis. The space between the first component 1302 * and main-start, the space between the last component and main-end, and the space between any two adjacent 1303 * components are the same. */ 1304 ARKUI_FLEX_ALIGNMENT_SPACE_EVENLY = 8, 1305 } ArkUI_FlexAlignment; 1306 1307 /** 1308 * @brief Enumerates the directions of the main axis in the flex container. 1309 * 1310 * @since 12 1311 */ 1312 typedef enum { 1313 /** The child components are arranged in the same direction as the main axis runs along the rows. */ 1314 ARKUI_FLEX_DIRECTION_ROW = 0, 1315 /** The child components are arranged in the same direction as the main axis runs down the columns. */ 1316 ARKUI_FLEX_DIRECTION_COLUMN, 1317 /** The child components are arranged opposite to the <b>ROW</b> direction. */ 1318 ARKUI_FLEX_DIRECTION_ROW_REVERSE, 1319 /** The child components are arranged opposite to the <b>COLUMN</b> direction. */ 1320 ARKUI_FLEX_DIRECTION_COLUMN_REVERSE, 1321 } ArkUI_FlexDirection; 1322 1323 /** 1324 * @brief Defines whether the flex container has a single line or multiple lines. 1325 * 1326 * @since 12 1327 */ 1328 typedef enum { 1329 /** The child components in the flex container are arranged in a single line, and they cannot overflow. */ 1330 ARKUI_FLEX_WRAP_NO_WRAP = 0, 1331 /** The child components in the flex container are arranged in multiple lines, and they may overflow. */ 1332 ARKUI_FLEX_WRAP_WRAP, 1333 /** The child components in the flex container are reversely arranged in multiple lines, and they may overflow. */ 1334 ARKUI_FLEX_WRAP_WRAP_REVERSE, 1335 } ArkUI_FlexWrap; 1336 1337 /** 1338 * @brief Enumerates the visibility values. 1339 * 1340 * @since 12 1341 */ 1342 typedef enum { 1343 /** The component is visible. */ 1344 ARKUI_VISIBILITY_VISIBLE = 0, 1345 /** The component is hidden, and a placeholder is used for it in the layout. */ 1346 ARKUI_VISIBILITY_HIDDEN, 1347 /** The component is hidden. It is not involved in the layout, and no placeholder is used for it. */ 1348 ARKUI_VISIBILITY_NONE, 1349 } ArkUI_Visibility; 1350 1351 /** 1352 * @brief Enumerates the alignment modes between the calendar picker and the entry component. 1353 * 1354 * @since 12 1355 */ 1356 typedef enum { 1357 /** Left aligned. */ 1358 ARKUI_CALENDAR_ALIGNMENT_START = 0, 1359 /** Center aligned. */ 1360 ARKUI_CALENDAR_ALIGNMENT_CENTER, 1361 /** Right aligned. */ 1362 ARKUI_CALENDAR_ALIGNMENT_END, 1363 } ArkUI_CalendarAlignment; 1364 1365 /** 1366 * @brief Enumerates the mask types. 1367 * 1368 * @since 12 1369 */ 1370 typedef enum { 1371 /** Rectangle. */ 1372 ARKUI_MASK_TYPE_RECTANGLE = 0, 1373 /** Circle. */ 1374 ARKUI_MASK_TYPE_CIRCLE, 1375 /** Ellipse. */ 1376 ARKUI_MASK_TYPE_ELLIPSE, 1377 /** Path. */ 1378 ARKUI_MASK_TYPE_PATH, 1379 /** Progress indicator. */ 1380 ARKUI_MASK_TYPE_PROGRESS, 1381 } ArkUI_MaskType; 1382 1383 /** 1384 * @brief Enumerates the clipping region types. 1385 * 1386 * @since 12 1387 */ 1388 typedef enum { 1389 /** Rectangle. */ 1390 ARKUI_CLIP_TYPE_RECTANGLE = 0, 1391 /** Circle. */ 1392 ARKUI_CLIP_TYPE_CIRCLE, 1393 /** Ellipse. */ 1394 ARKUI_CLIP_TYPE_ELLIPSE, 1395 /** Path. */ 1396 ARKUI_CLIP_TYPE_PATH, 1397 } ArkUI_ClipType; 1398 1399 /** 1400 * @brief Defines the gradient color stop structure. 1401 * 1402 * @since 12 1403 */ 1404 typedef struct { 1405 /** Color array. */ 1406 const uint32_t* colors; 1407 /** Position array. */ 1408 float* stops; 1409 /** Length array. */ 1410 int size; 1411 } ArkUI_ColorStop; 1412 1413 /** 1414 * @brief Enumerates the custom shapes. 1415 * 1416 * @since 12 1417 */ 1418 typedef enum { 1419 /** Rectangle. */ 1420 ARKUI_SHAPE_TYPE_RECTANGLE = 0, 1421 /** Circle. */ 1422 ARKUI_SHAPE_TYPE_CIRCLE, 1423 /** Ellipse. */ 1424 ARKUI_SHAPE_TYPE_ELLIPSE, 1425 /** Path. */ 1426 ARKUI_SHAPE_TYPE_PATH, 1427 } ArkUI_ShapeType; 1428 1429 /** 1430 * @brief Enumerates the gradient directions. 1431 * 1432 * @since 12 1433 */ 1434 typedef enum { 1435 /** From right to left. */ 1436 ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT = 0, 1437 /** From bottom to top. */ 1438 ARKUI_LINEAR_GRADIENT_DIRECTION_TOP, 1439 /** From left to right. */ 1440 ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT, 1441 /** From top to bottom. */ 1442 ARKUI_LINEAR_GRADIENT_DIRECTION_BOTTOM, 1443 /** From lower right to upper left. */ 1444 ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_TOP, 1445 /** From upper right to lower left. */ 1446 ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_BOTTOM, 1447 /** From lower left to upper right. */ 1448 ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_TOP, 1449 /** From upper left to lower right. */ 1450 ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_BOTTOM, 1451 /** No gradient. */ 1452 ARKUI_LINEAR_GRADIENT_DIRECTION_NONE, 1453 /** Custom direction. */ 1454 ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM, 1455 } ArkUI_LinearGradientDirection; 1456 1457 /** 1458 * @brief Enumerates the word break rules. 1459 * 1460 * @since 12 1461 */ 1462 typedef enum { 1463 /** Word breaks can occur between any two characters for Chinese, Japanese, and Korean (CJK) text, but can occur 1464 * only at a space character for non-CJK text (such as English). */ 1465 ARKUI_WORD_BREAK_NORMAL = 0, 1466 /** Word breaks can occur between any two characters for non-CJK text. CJK text behavior is the same as for 1467 * <b>NORMAL</b>. */ 1468 ARKUI_WORD_BREAK_BREAK_ALL, 1469 /** This option has the same effect as <b>BREAK_ALL</b> for non-CJK text, except that if it preferentially wraps 1470 * lines at appropriate characters (for example, spaces) whenever possible. 1471 CJK text behavior is the same as for <b>NORMAL</b>. */ 1472 ARKUI_WORD_BREAK_BREAK_WORD, 1473 } ArkUI_WordBreak; 1474 1475 /** 1476 * @brief Enumerates the ellipsis positions. 1477 * 1478 * @since 12 1479 */ 1480 typedef enum { 1481 /** An ellipsis is used at the start of the line of text. */ 1482 ARKUI_ELLIPSIS_MODE_START = 0, 1483 /** An ellipsis is used at the center of the line of text. */ 1484 ARKUI_ELLIPSIS_MODE_CENTER, 1485 /** An ellipsis is used at the end of the line of text. */ 1486 ARKUI_ELLIPSIS_MODE_END, 1487 } ArkUI_EllipsisMode; 1488 1489 /** 1490 * @brief Enumerates the image rendering modes. 1491 * 1492 * @since 12 1493 */ 1494 typedef enum { 1495 /** Render image pixels as they are in the original source image. */ 1496 ARKUI_IMAGE_RENDER_MODE_ORIGINAL = 0, 1497 /** Render image pixels to create a monochrome template image. */ 1498 ARKUI_IMAGE_RENDER_MODE_TEMPLATE, 1499 } ArkUI_ImageRenderMode; 1500 1501 /** 1502 * @brief Enumerates the slide-in and slide-out positions of the component from the screen edge during transition. 1503 * 1504 * @since 12 1505 */ 1506 typedef enum { 1507 /** Top edge of the window. */ 1508 ARKUI_TRANSITION_EDGE_TOP = 0, 1509 /** Bottom edge of the window. */ 1510 ARKUI_TRANSITION_EDGE_BOTTOM, 1511 /** Left edge of the window. */ 1512 ARKUI_TRANSITION_EDGE_START, 1513 /** Right edge of the window. */ 1514 ARKUI_TRANSITION_EDGE_END, 1515 } ArkUI_TransitionEdge; 1516 1517 /** 1518 * @brief Defines how the specified blend mode is applied. 1519 * 1520 * @since 12 1521 */ 1522 typedef enum { 1523 /** The content of the view is blended in sequence on the target image. */ 1524 BLEND_APPLY_TYPE_FAST = 0, 1525 /** The content of the component and its child components are drawn on the offscreen canvas, and then blended with 1526 * the existing content on the canvas. */ 1527 BLEND_APPLY_TYPE_OFFSCREEN, 1528 } ArkUI_BlendApplyType; 1529 1530 /** 1531 * @brief Defines a mask area. 1532 * 1533 * @since 12 1534 */ 1535 typedef struct { 1536 /** X coordinate of the mask area. */ 1537 float x; 1538 /** Y coordinate of the mask area. */ 1539 float y; 1540 /** Width of the mask area. */ 1541 float width; 1542 /** Height of the mask area. */ 1543 float height; 1544 } ArkUI_Rect; 1545 1546 /** 1547 * @brief Describes the width and height of a component. 1548 * 1549 * @since 12 1550 */ 1551 typedef struct { 1552 /** Width, in px. */ 1553 int32_t width; 1554 /** Height, in px. */ 1555 int32_t height; 1556 } ArkUI_IntSize; 1557 1558 /** 1559 * @brief Describes the position of a component. 1560 * 1561 * @since 12 1562 */ 1563 typedef struct { 1564 /** Horizontal coordinate, in px. */ 1565 int32_t x; 1566 /** Vertical coordinate, in px. */ 1567 int32_t y; 1568 } ArkUI_IntOffset; 1569 1570 /** 1571 * @brief Enumerates the animation onFinish callback types. 1572 * 1573 * @since 12 1574 */ 1575 typedef enum { 1576 /** The callback is invoked when the entire animation is removed once it has finished. */ 1577 ARKUI_FINISH_CALLBACK_REMOVED = 0, 1578 /** The callback is invoked when the animation logically enters the falling state, though it may still be in its 1579 * long tail state. */ 1580 ARKUI_FINISH_CALLBACK_LOGICALLY, 1581 } ArkUI_FinishCallbackType; 1582 1583 /** 1584 * @brief Enumerates the alignment modes of items along the cross axis. 1585 * 1586 * @since 12 1587 */ 1588 typedef enum { 1589 /** The list items are packed toward the start edge of the list container along the cross axis. */ 1590 ARKUI_LIST_ITEM_ALIGNMENT_START = 0, 1591 /** The list items are centered in the list container along the cross axis. */ 1592 ARKUI_LIST_ITEM_ALIGNMENT_CENTER, 1593 /** The list items are packed toward the end edge of the list container along the cross axis. */ 1594 ARKUI_LIST_ITEM_ALIGNMENT_END, 1595 } ArkUI_ListItemAlignment; 1596 1597 /** 1598 * @brief defines the direction of the barrier line. 1599 * 1600 * @since 12 1601 */ 1602 typedef enum { 1603 /** The barrier is the leftmost of all its referencedIds. */ 1604 ARKUI_BARRIER_DIRECTION_START = 0, 1605 /** The barrier is on the rightmost side of all its referencedIds. */ 1606 ARKUI_BARRIER_DIRECTION_END, 1607 /** The barrier is at the top of all its referencedIds. */ 1608 ARKUI_BARRIER_DIRECTION_TOP, 1609 /** The barrier is at the bottom of all its referencedIds. */ 1610 ARKUI_BARRIER_DIRECTION_BOTTOM 1611 } ArkUI_BarrierDirection; 1612 1613 /** 1614 * @brief defines the style of the chain. 1615 * 1616 * @since 12 1617 */ 1618 typedef enum { 1619 /** Components are evenly distributed among constraint anchor points. */ 1620 ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD = 0, 1621 /** Except for the first and last two sub-components, 1622 * other components are evenly distributed between the constraint anchor points. */ 1623 ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD_INSIDE, 1624 /** No gaps in subcomponents within the chain. */ 1625 ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_PACKED, 1626 } ArkUI_RelativeLayoutChainStyle; 1627 1628 /** 1629 * @brief Describes the margins of a component. 1630 * 1631 * @since 12 1632 */ 1633 typedef struct { 1634 /** Top margin, in vp. */ 1635 float top; 1636 /** Right margin, in vp. */ 1637 float right; 1638 /** Bottom margin, in vp. */ 1639 float bottom; 1640 /** Left margin, in vp. */ 1641 float left; 1642 } ArkUI_Margin; 1643 1644 /** 1645 * @brief Enumerates the component units. 1646 * 1647 * @since 12 1648 */ 1649 typedef enum { 1650 /** Default, which is fp for fonts and vp for non-fonts. */ 1651 ARKUI_LENGTH_METRIC_UNIT_DEFAULT = -1, 1652 /** px. */ 1653 ARKUI_LENGTH_METRIC_UNIT_PX = 0, 1654 /** vp. */ 1655 ARKUI_LENGTH_METRIC_UNIT_VP, 1656 /** fp. */ 1657 ARKUI_LENGTH_METRIC_UNIT_FP 1658 } ArkUI_LengthMetricUnit; 1659 1660 /** 1661 * @brief Enumerates the render fit. 1662 * 1663 * @since 12 1664 */ 1665 typedef enum { 1666 /** Maintains the content size of the animation's final state, 1667 * and the content is always centered with the component.*/ 1668 ARKUI_RENDER_FIT_CENTER = 0, 1669 /** Maintains the content size of the animation's final state, 1670 * and the content is always aligned with the top center of the component. */ 1671 ARKUI_RENDER_FIT_TOP, 1672 /** Maintains the content size of the animation's final state, 1673 * and the content is always aligned with the bottom center of the component. */ 1674 ARKUI_RENDER_FIT_BOTTOM, 1675 /** Maintains the content size of the animation's final state, 1676 * and the content is always aligned to the left of the component. */ 1677 ARKUI_RENDER_FIT_LEFT, 1678 /** Maintains the content size of the animation's final state, 1679 * and the content is always right-aligned with the component. */ 1680 ARKUI_RENDER_FIT_RIGHT, 1681 /** Maintains the content size of the animation's final state, 1682 * and the content is always aligned with the top left corner of the component. */ 1683 ARKUI_RENDER_FIT_TOP_LEFT, 1684 /** Keep the content size of the animation final state, 1685 * and the content is always aligned with the upper right corner of the component. */ 1686 ARKUI_RENDER_FIT_TOP_RIGHT, 1687 /** Keep the content size of the animation final state, 1688 * and the content always aligns with the lower-left corner of the component. */ 1689 ARKUI_RENDER_FIT_BOTTOM_LEFT, 1690 /** Keep the content size of the animation final state, 1691 *and the content always aligns with the lower-right corner of the component. */ 1692 ARKUI_RENDER_FIT_BOTTOM_RIGHT, 1693 /** The aspect ratio of the animation's final state content is not considered, 1694 *and the content is always scaled to the size of the component. */ 1695 ARKUI_RENDER_FIT_RESIZE_FILL, 1696 /** Reduce or enlarge the aspect ratio of the animation final state content, 1697 * so that the content is fully displayed in the component, 1698 * and keep the center aligned with the component. */ 1699 ARKUI_RENDER_FIT_RESIZE_CONTAIN, 1700 /** Keep the aspect ratio of the animation final state content to reduce or enlarge, 1701 * so that the content is fully displayed in the component. 1702 * When there is left over in the broad direction of the component, 1703 * the content is aligned to the left of the component, 1704 * and when there is left over in the high direction of the component, 1705 * the content is aligned to the top of the component. */ 1706 ARKUI_RENDER_FIT_RESIZE_CONTAIN_TOP_LEFT, 1707 /** Keep the aspect ratio of the animation final state content to reduce or enlarge, 1708 * so that the content is fully displayed in the component. 1709 * When there is left in the wide direction of the component, 1710 * the content is aligned with the component on the right. 1711 * When there is left in the high direction of the component, 1712 * the content is aligned with the component on the bottom. */ 1713 ARKUI_RENDER_FIT_RESIZE_CONTAIN_BOTTOM_RIGHT, 1714 /** Keep the aspect ratio of the animation final state content reduced or enlarged, 1715 * so that both sides of the content are greater than or equal to both sides of the component, 1716 * and keep the center aligned with the component to display the middle part of the content. */ 1717 ARKUI_RENDER_FIT_RESIZE_COVER, 1718 /** Keep the aspect ratio of the final content of the animation reduced or enlarged 1719 * so that both sides of the content are exactly greater than or equal to both sides of the component. 1720 * When the content width is left, the content is aligned to the left of the component, 1721 * and the left portion of the content is displayed. When the content is left in the high direction, 1722 * the content and the component remain top aligned, showing the top side of the content. */ 1723 ARKUI_RENDER_FIT_RESIZE_COVER_TOP_LEFT, 1724 /** Keep the aspect ratio of the final content of the animation reduced or enlarged so 1725 * that both sides of the content are exactly greater than or equal to both sides of the component. 1726 * When the content width is left, the content and the component remain right aligned, 1727 * and the right part of the content is displayed. When the content is left in the high direction, 1728 * the content and the component remain aligned at the bottom, 1729 * and the bottom part of the content is displayed. */ 1730 ARKUI_RENDER_FIT_RESIZE_COVER_BOTTOM_RIGHT 1731 } ArkUI_RenderFit; 1732 1733 /** 1734 * @brief Enumerates the button types. 1735 * 1736 * @since 12 1737 */ 1738 typedef enum { 1739 /** Normal button (without rounded corners by default). */ 1740 ARKUI_BUTTON_TYPE_NORMAL = 0, 1741 /** Capsule-type button (the round corner is half of the height by default). */ 1742 ARKUI_BUTTON_TYPE_CAPSULE, 1743 /** Circle button. */ 1744 ARKUI_BUTTON_TYPE_CIRCLE, 1745 } ArkUI_ButtonType; 1746 1747 /** 1748 * @brief Enumerates the autofill types. 1749 * 1750 * @since 12 1751 */ 1752 typedef enum { 1753 /** Username. Password Vault, when enabled, can automatically save and fill in usernames. */ 1754 ARKUI_TEXTINPUT_CONTENT_TYPE_USER_NAME = 0, 1755 /** Password. Password Vault, when enabled, can automatically save and fill in passwords. */ 1756 ARKUI_TEXTINPUT_CONTENT_TYPE_PASSWORD, 1757 /** New password. Password Vault, when enabled, can automatically generate a new password. */ 1758 ARKUI_TEXTINPUT_CONTENT_TYPE_NEW_PASSWORD, 1759 /** Full street address. The scenario-based autofill feature, when enabled, can automatically save and fill in full 1760 * street addresses. */ 1761 ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_STREET_ADDRESS, 1762 /** House number. The scenario-based autofill feature, when enabled, can automatically save and fill in house 1763 * numbers. */ 1764 ARKUI_TEXTINPUT_CONTENT_TYPE_HOUSE_NUMBER, 1765 /** District and county. The scenario-based autofill feature, when enabled, can automatically save and fill in 1766 * districts and counties. */ 1767 ARKUI_TEXTINPUT_CONTENT_TYPE_DISTRICT_ADDRESS, 1768 /** City. The scenario-based autofill feature, when enabled, can automatically save and fill in cities. */ 1769 ARKUI_TEXTINPUT_CONTENT_TYPE_CITY_ADDRESS, 1770 /** Province. The scenario-based autofill feature, when enabled, can automatically save and fill in provinces. */ 1771 ARKUI_TEXTINPUT_CONTENT_TYPE_PROVINCE_ADDRESS, 1772 /** Country. The scenario-based autofill feature, when enabled, can automatically save and fill in countries. */ 1773 ARKUI_TEXTINPUT_CONTENT_TYPE_COUNTRY_ADDRESS, 1774 /** Full name. The scenario-based autofill feature, when enabled, can automatically save and fill in full names. */ 1775 ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FULL_NAME, 1776 /** Last name. The scenario-based autofill feature, when enabled, can automatically save and fill in last names. */ 1777 ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_LAST_NAME, 1778 /** First name. The scenario-based autofill feature, when enabled, can automatically save and fill in first names. 1779 */ 1780 ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FIRST_NAME, 1781 /** Phone number. The scenario-based autofill feature, when enabled, can automatically save and fill in phone 1782 * numbers. */ 1783 ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_NUMBER, 1784 /** Country code. The scenario-based autofill feature, when enabled, can automatically save and fill in country 1785 * codes. */ 1786 ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_COUNTRY_CODE, 1787 /** Phone number with country code. The scenario-based autofill feature, when enabled, can automatically save and 1788 * fill in phone numbers with country codes. */ 1789 ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_PHONE_NUMBER, 1790 /** Email address. The scenario-based autofill feature, when enabled, can automatically save and fill in email 1791 * addresses. */ 1792 ARKUI_TEXTINPUT_CONTENT_EMAIL_ADDRESS, 1793 /** Bank card number. The scenario-based autofill feature, when enabled, can automatically save and fill in bank 1794 * card numbers. */ 1795 ARKUI_TEXTINPUT_CONTENT_TYPE_BANK_CARD_NUMBER, 1796 /** ID card number. The scenario-based autofill feature, when enabled, can automatically save and fill in ID card 1797 * numbers. */ 1798 ARKUI_TEXTINPUT_CONTENT_TYPE_ID_CARD_NUMBER, 1799 /** Nickname. The scenario-based autofill feature, when enabled, can automatically save and fill in nicknames. */ 1800 ARKUI_TEXTINPUT_CONTENT_TYPE_NICKNAME, 1801 /** Address information without street address. The scenario-based autofill feature, when enabled, can automatically 1802 * save and fill in address information without street addresses. */ 1803 ARKUI_TEXTINPUT_CONTENT_TYPE_DETAIL_INFO_WITHOUT_STREET, 1804 /** Standard address. The scenario-based autofill feature, when enabled, can automatically save and fill in standard 1805 * addresses. */ 1806 ARKUI_TEXTINPUT_CONTENT_TYPE_FORMAT_ADDRESS, 1807 } ArkUI_TextInputContentType; 1808 1809 /** 1810 * @brief Defines the text input style. 1811 * 1812 * @since 12 1813 */ 1814 typedef enum { 1815 /** Default style. The caret width is fixed at 1.5 vp, and the caret height is subject to the background height and 1816 * font size of the selected text. */ 1817 ARKUI_TEXTINPUT_STYLE_DEFAULT = 0, 1818 /** Inline input style. The background height of the selected text is the same as the height of the text box. */ 1819 ARKUI_TEXTINPUT_STYLE_INLINE 1820 } ArkUI_TextInputStyle; 1821 1822 /** 1823 * @brief Defines the entity type for text recognition. 1824 * 1825 * @since 12 1826 */ 1827 typedef enum { 1828 /** Phone Number.*/ 1829 ARKUI_TEXT_DATA_DETECTOR_TYPE_PHONE_NUMBER = 0, 1830 /** Link. */ 1831 ARKUI_TEXT_DATA_DETECTOR_TYPE_URL, 1832 /** Mailbox. */ 1833 ARKUI_TEXT_DATA_DETECTOR_TYPE_EMAIL, 1834 /** Address. */ 1835 ARKUI_TEXT_DATA_DETECTOR_TYPE_ADDRESS, 1836 } ArkUI_TextDataDetectorType; 1837 1838 /** 1839 * @brief Define the navigation indicator type of the swiper. 1840 * 1841 * @since 12 1842 */ 1843 typedef enum { 1844 /** dot type. */ 1845 ARKUI_SWIPER_INDICATOR_TYPE_DOT, 1846 /** digit type. */ 1847 ARKUI_SWIPER_INDICATOR_TYPE_DIGIT, 1848 } ArkUI_SwiperIndicatorType; 1849 1850 /** 1851 * @brief Define the pattern of element arrangement in the main axis direction of the Swiper component. 1852 * 1853 * @since 12 1854 */ 1855 typedef enum { 1856 /** In the folded state, when the ListItem slides in the opposite direction to the main axis, 1857 * the operation item is hidden.*/ 1858 ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_COLLAPSED = 0, 1859 /** In the folded state, when the ListItem slides in the opposite direction to the spindle, 1860 * the operation item is displayed.*/ 1861 ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_EXPANDED, 1862 /** Long distance state, the state of deleting a ListItem after it enters the long distance deletion area.*/ 1863 ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_ACTIONING, 1864 } ArkUI_ListItemSwipeActionState; 1865 1866 /** 1867 * @brief Define the explicit and implicit mode of the SwipeAction method for the Listitem component. 1868 * 1869 * @since 12 1870 */ 1871 typedef enum { 1872 /** The ListItem can continue to be scratched after the distance exceeds the size of the scratched component.*/ 1873 ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_SPRING = 0, 1874 /** The sliding distance of the ListItem cannot exceed the size of the scratched component.*/ 1875 ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_NONE, 1876 } ArkUI_ListItemSwipeEdgeEffect; 1877 1878 /** 1879 * @brief Define error code enumeration values. 1880 * 1881 * @since 12 1882 */ 1883 typedef enum { 1884 /** @error No errors. */ 1885 ARKUI_ERROR_CODE_NO_ERROR = 0, 1886 /** @error Parameter error. */ 1887 ARKUI_ERROR_CODE_PARAM_INVALID = 401, 1888 /** @error The component does not support specific properties or events. */ 1889 ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED = 106102, 1890 /** @error The corresponding operation does not support nodes created by ArkTS. */ 1891 ARKUI_ERROR_CODE_ARKTS_NODE_NOT_SUPPORTED = 106103, 1892 /** @error The lazy loading adapter is not bound to the component. */ 1893 ARKUI_ERROR_CODE_ADAPTER_NOT_BOUND = 106104, 1894 /** @error The adapter already exists. */ 1895 ARKUI_ERROR_CODE_ADAPTER_EXIST = 106105, 1896 /** @error The corresponding node already has a child node and cannot add an adapter. */ 1897 ARKUI_ERROR_CODE_CHILD_NODE_EXIST = 106106, 1898 /** The parameter length in the parameter event exceeds the limit. */ 1899 ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INDEX_OUT_OF_RANGE = 106107, 1900 /** The data does not exist in the component event. */ 1901 ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID = 106108, 1902 /** The component event does not support return values. */ 1903 ARKUI_ERROR_CODE_NODE_EVENT_NO_RETURN = 106109, 1904 /** The index value is invalid. */ 1905 ARKUI_ERROR_CODE_NODE_INDEX_INVALID = 106200, 1906 /** Failed to query route navigation information. */ 1907 ARKUI_ERROR_CODE_GET_INFO_FAILED = 106201, 1908 /** The buffer size is not large enough. */ 1909 ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR = 106202, 1910 /** The component is not a scroll container. */ 1911 ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER = 180001, 1912 /** The buffer is not large enough. */ 1913 ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH = 180002, 1914 } ArkUI_ErrorCode; 1915 1916 /** 1917 * @brief Defines the playback status for the image animator. 1918 * 1919 * @since 12 1920 */ 1921 typedef enum { 1922 /** The animation is in the initial state. */ 1923 ARKUI_ANIMATION_STATUS_INITIAL, 1924 /** The animation is being played. */ 1925 ARKUI_ANIMATION_STATUS_RUNNING, 1926 /** The animation is paused. */ 1927 ARKUI_ANIMATION_STATUS_PAUSED, 1928 /** The animation is stopped. */ 1929 ARKUI_ANIMATION_STATUS_STOPPED, 1930 } ArkUI_AnimationStatus; 1931 1932 /** 1933 * @brief Defines the status before and after execution of the animation in the current playback direction. 1934 * 1935 * @since 12 1936 */ 1937 typedef enum { 1938 /** Before execution, the animation does not apply any styles to the target component. 1939 * After execution, the animation restores the target component to its default state. */ 1940 ARKUI_ANIMATION_FILL_MODE_NONE, 1941 /** The target component retains the state set by the last keyframe encountered 1942 * during execution of the animation. */ 1943 ARKUI_ANIMATION_FILL_MODE_FORWARDS, 1944 /** The animation applies the values defined in the first relevant keyframe once it is applied to 1945 * the target component, and retains the values during the period set by delay. */ 1946 ARKUI_ANIMATION_FILL_MODE_BACKWARDS, 1947 /** The animation follows the rules for both Forwards and Backwards, 1948 * extending the animation attributes in both directions. */ 1949 ARKUI_ANIMATION_FILL_MODE_BOTH, 1950 } ArkUI_AnimationFillMode; 1951 1952 /** 1953 * @brief Defines the state type for the accessibility checkbox. 1954 * 1955 * @since 12 1956 */ 1957 typedef enum { 1958 /** The Checkbox unchecked. */ 1959 ARKUI_ACCESSIBILITY_UNCHECKED = 0, 1960 /** The Checkbox checked. */ 1961 ARKUI_ACCESSIBILITY_CHECKED, 1962 } ArkUI_AccessibilityCheckedState; 1963 1964 /** 1965 1966 /** 1967 * @brief Enumerates the animation playback modes. 1968 * 1969 * @since 12 1970 */ 1971 typedef enum { 1972 /** The animation plays in forward loop mode. */ 1973 ARKUI_ANIMATION_DIRECTION_NORMAL = 0, 1974 /** The animation plays in reverse loop mode. */ 1975 ARKUI_ANIMATION_DIRECTION_REVERSE, 1976 /** The animation plays in alternating loop mode. When the animation is played for an odd number of times, the 1977 * playback is in forward direction. When the animation is played for an even number of times, the playback is in 1978 * reverse direction. */ 1979 ARKUI_ANIMATION_DIRECTION_ALTERNATE, 1980 /** The animation plays in reverse alternating loop mode. When the animation is played for an odd number of times, 1981 * the playback is in reverse direction. When the animation is played for an even number of times, the playback is 1982 * in forward direction. */ 1983 ARKUI_ANIMATION_DIRECTION_ALTERNATE_REVERSE, 1984 } ArkUI_AnimationDirection; 1985 1986 /** 1987 * @brief Define the rolling source enumeration value. 1988 * 1989 * @since 12 1990 */ 1991 typedef enum { 1992 /** Finger drag. */ 1993 ARKUI_SCROLL_SOURCE_DRAG = 0, 1994 /** Inertial roll after finger drag. */ 1995 ARKUI_SCROLL_SOURCE_FLING, 1996 /** Execute the EdgeEffect.Spring edge effect when crossing the boundary.*/ 1997 ARKUI_SCROLL_SOURCE_EDGE_EFFECT, 1998 /** Other user input other than dragging, such as mouse wheel, keyboard events, etc.*/ 1999 ARKUI_SCROLL_SOURCE_OTHER_USER_INPUT, 2000 /** Drag the scroll bar.*/ 2001 ARKUI_SCROLL_SOURCE_SCROLL_BAR, 2002 /** Inertia scrolling after dragging the scroll bar.*/ 2003 ARKUI_SCROLL_SOURCE_SCROLL_BAR_FLING, 2004 /** The scroll controller causes unanimated scrolling.*/ 2005 ARKUI_SCROLL_SOURCE_SCROLLER, 2006 /** The scroll controller causes the scroll to drive the painting.*/ 2007 ARKUI_SCROLL_SOURCE_ANIMATION, 2008 } ArkUI_ScrollSource; 2009 2010 /** 2011 * @brief Define accessible action types. 2012 * 2013 * @since 12 2014 */ 2015 typedef enum { 2016 /** click action. */ 2017 ARKUI_ACCESSIBILITY_ACTION_CLICK = 1 << 0, 2018 /** long click action. */ 2019 ARKUI_ACCESSIBILITY_ACTION_LONG_CLICK = 1 << 1, 2020 /** cut action. */ 2021 ARKUI_ACCESSIBILITY_ACTION_CUT = 1 << 2, 2022 /** copy action. */ 2023 ARKUI_ACCESSIBILITY_ACTION_COPY = 1 << 3, 2024 /** paste action. */ 2025 ARKUI_ACCESSIBILITY_ACTION_PASTE = 1 << 4, 2026 } ArkUI_AccessibilityActionType; 2027 2028 /** 2029 * @brief Defines the translation options for component transition. 2030 * 2031 * @since 12 2032 */ 2033 typedef struct { 2034 /** Translation distance along the x-axis. */ 2035 float x; 2036 /** Translation distance along the y-axis. */ 2037 float y; 2038 /** Translation distance along the z-axis. */ 2039 float z; 2040 } ArkUI_TranslationOptions; 2041 2042 /** 2043 * @brief Defines the scaling options for component transition. 2044 * 2045 * @since 12 2046 */ 2047 typedef struct { 2048 /** Scale ratio along the x-axis. */ 2049 float x; 2050 /** Scale ratio along the y-axis. */ 2051 float y; 2052 /** Scale factor along the z-axis (not effective for the current 2D graphics). */ 2053 float z; 2054 /** X coordinate of the center point. */ 2055 float centerX; 2056 /** Y coordinate of the center point. */ 2057 float centerY; 2058 } ArkUI_ScaleOptions; 2059 2060 /** 2061 * @brief Defines the rotation options for component transition. 2062 * 2063 * @since 12 2064 */ 2065 typedef struct { 2066 /** X-component of the rotation vector. */ 2067 float x; 2068 /** Y-component of the rotation vector. */ 2069 float y; 2070 /** Z-component of the rotation vector. */ 2071 float z; 2072 /** Rotation angle. */ 2073 float angle; 2074 /** X coordinate of the center point. */ 2075 float centerX; 2076 /** Y coordinate of the center point. */ 2077 float centerY; 2078 /** Z-axis anchor, that is, the z-component of the 3D rotation center point. */ 2079 float centerZ; 2080 /** Distance from the user to the z=0 plane. */ 2081 float perspective; 2082 } ArkUI_RotationOptions; 2083 2084 /** 2085 * @brief Defines a struct for the measurement information of a custom span. 2086 * 2087 * @since 12 2088 */ 2089 typedef struct ArkUI_CustomSpanMeasureInfo ArkUI_CustomSpanMeasureInfo; 2090 2091 /** 2092 * @brief Defines a struct for the measurement metrics of a custom span. 2093 * 2094 * @since 12 2095 */ 2096 typedef struct ArkUI_CustomSpanMetrics ArkUI_CustomSpanMetrics; 2097 2098 /** 2099 * @brief Defines a struct for the drawing information of a custom span. 2100 * 2101 * @since 12 2102 */ 2103 typedef struct ArkUI_CustomSpanDrawInfo ArkUI_CustomSpanDrawInfo; 2104 2105 /** 2106 * @brief Defines the state of the NavDestination component. 2107 * 2108 * @since 12 2109 */ 2110 typedef enum { 2111 /** The NavDestination show. */ 2112 ARKUI_NAV_DESTINATION_STATE_ON_SHOW = 0, 2113 /** The NavDestination hide. */ 2114 ARKUI_NAV_DESTINATION_STATE_ON_HIDE = 1, 2115 /** The NavDestination is mounted to the component tree. */ 2116 ARKUI_NAV_DESTINATION_STATE_ON_APPEAR = 2, 2117 /** The NavDestination removed from the component tree. */ 2118 ARKUI_NAV_DESTINATION_STATE_ON_DISAPPEAR = 3, 2119 /** Before the NavDestination show. */ 2120 ARKUI_NAV_DESTINATION_STATE_ON_WILL_SHOW = 4, 2121 /** Before the NavDestination hide. */ 2122 ARKUI_NAV_DESTINATION_STATE_ON_WILL_HIDE = 5, 2123 /** Before the NavDestination mount to the component tree. */ 2124 ARKUI_NAV_DESTINATION_STATE_ON_WILL_APPEAR = 6, 2125 /** Before the NavDestination removed from the component tree. */ 2126 ARKUI_NAV_DESTINATION_STATE_ON_WILL_DISAPPEAR = 7, 2127 /** The NavDestination returns from the component.*/ 2128 ARKUI_NAV_DESTINATION_STATE_ON_BACK_PRESS = 100, 2129 } ArkUI_NavDestinationState; 2130 2131 /** 2132 * @brief Define the state of Router Page. 2133 * 2134 * @since 12 2135 */ 2136 typedef enum { 2137 /** The Router Page is about to be created. */ 2138 ARKUI_ROUTER_PAGE_STATE_ABOUT_TO_APPEAR = 0, 2139 /** The Router Page is about to be destroyed. */ 2140 ARKUI_ROUTER_PAGE_STATE_ABOUT_TO_DISAPPEAR = 1, 2141 /** The Router Page show. */ 2142 ARKUI_ROUTER_PAGE_STATE_ON_SHOW = 2, 2143 /** The Router Page hide. */ 2144 ARKUI_ROUTER_PAGE_STATE_ON_HIDE = 3, 2145 /** The Router Page returns. */ 2146 ARKUI_ROUTER_PAGE_STATE_ON_BACK_PRESS = 4, 2147 } ArkUI_RouterPageState; 2148 2149 /** 2150 * @brief defines the enumerated value of the extended security zone. 2151 * 2152 * @since 12 2153 */ 2154 typedef enum { 2155 /** The default security zone includes the status bar and navigation bar. */ 2156 ARKUI_SAFE_AREA_TYPE_SYSTEM = 1, 2157 /** Non-secure areas of the device, such as bangs or hole holes. */ 2158 ARKUI_SAFE_AREA_TYPE_CUTOUT = 1 << 1, 2159 /** Soft keyboard area. */ 2160 ARKUI_SAFE_AREA_TYPE_KEYBOARD = 1 << 2, 2161 } ArkUI_SafeAreaType; 2162 2163 /** 2164 * @brief defines the enumerated value of the direction of the extended security zone. 2165 * 2166 * @since 12 2167 */ 2168 typedef enum { 2169 /** Upper area. */ 2170 ARKUI_SAFE_AREA_EDGE_TOP = 1, 2171 /** Lower area. */ 2172 ARKUI_SAFE_AREA_EDGE_BOTTOM = 1 << 1, 2173 /** Front area. */ 2174 ARKUI_SAFE_AREA_EDGE_START = 1 << 2, 2175 /** Tail area. */ 2176 ARKUI_SAFE_AREA_EDGE_END = 1 << 3, 2177 } ArkUI_SafeAreaEdge; 2178 2179 /** 2180 * @brief Defines parameter used by the system font style callback event. 2181 * 2182 * @since 12 2183 */ 2184 typedef struct ArkUI_SystemFontStyleEvent ArkUI_SystemFontStyleEvent; 2185 2186 /** 2187 * @brief Creates a size constraint. 2188 * 2189 * @since 12 2190 */ 2191 ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Create(); 2192 2193 /** 2194 * @brief Creates a deep copy of a size constraint. 2195 * 2196 * @param Constraint Indicates the pointer to the size constraint. 2197 * @return Returns the pointer to the new size constraint. 2198 * @since 12 2199 */ 2200 ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Copy(const ArkUI_LayoutConstraint* Constraint); 2201 2202 /** 2203 * @brief Destroys the pointer to a size constraint. 2204 * 2205 * @param Constraint Indicates the pointer to the size constraint. 2206 * @since 12 2207 */ 2208 void* OH_ArkUI_LayoutConstraint_Dispose(ArkUI_LayoutConstraint* Constraint); 2209 2210 /** 2211 * @brief Obtains the maximum width for a size constraint, in px. 2212 * 2213 * @param Constraint Indicates the pointer to the size constraint. 2214 * @return Returns the maximum width. 2215 * @since 12 2216 */ 2217 int32_t OH_ArkUI_LayoutConstraint_GetMaxWidth(const ArkUI_LayoutConstraint* Constraint); 2218 2219 /** 2220 * @brief Obtains the minimum width for a size constraint, in px. 2221 * 2222 * @param Constraint Indicates the pointer to the size constraint. 2223 * @return Returns the minimum width. 2224 * @since 12 2225 */ 2226 int32_t OH_ArkUI_LayoutConstraint_GetMinWidth(const ArkUI_LayoutConstraint* Constraint); 2227 2228 /** 2229 * @brief Obtains the maximum height for a size constraint, in px. 2230 * 2231 * @param Constraint Indicates the pointer to the size constraint. 2232 * @return Returns the maximum height. 2233 * @since 12 2234 */ 2235 int32_t OH_ArkUI_LayoutConstraint_GetMaxHeight(const ArkUI_LayoutConstraint* Constraint); 2236 2237 /** 2238 * @brief Obtains the minimum height for a size constraint, in px. 2239 * 2240 * @param Constraint Indicates the pointer to the size constraint. 2241 * @return Returns the minimum height. 2242 * @since 12 2243 */ 2244 int32_t OH_ArkUI_LayoutConstraint_GetMinHeight(const ArkUI_LayoutConstraint* Constraint); 2245 2246 /** 2247 * @brief Obtains the width percentage reference for a size constraint, in px. 2248 * 2249 * @param Constraint Indicates the pointer to the size constraint. 2250 * @return Returns the width percentage reference. 2251 * @since 12 2252 */ 2253 int32_t OH_ArkUI_LayoutConstraint_GetPercentReferenceWidth(const ArkUI_LayoutConstraint* Constraint); 2254 2255 /** 2256 * @brief Obtains the height percentage reference for a size constraint, in px. 2257 * 2258 * @param Constraint Indicates the pointer to the size constraint. 2259 * @return Returns the height percentage reference. 2260 * @since 12 2261 */ 2262 int32_t OH_ArkUI_LayoutConstraint_GetPercentReferenceHeight(const ArkUI_LayoutConstraint* Constraint); 2263 2264 /** 2265 * @brief Sets the maximum width. 2266 * 2267 * @param Constraint Indicates the pointer to the size constraint. 2268 * @param value Indicates the maximum width, in px. 2269 * @since 12 2270 */ 2271 void OH_ArkUI_LayoutConstraint_SetMaxWidth(ArkUI_LayoutConstraint* Constraint, int32_t value); 2272 2273 /** 2274 * @brief Sets the minimum width. 2275 * 2276 * @param Constraint Indicates the pointer to the size constraint. 2277 * @param value Indicates the minimum width, in px. 2278 * @since 12 2279 */ 2280 void OH_ArkUI_LayoutConstraint_SetMinWidth(ArkUI_LayoutConstraint* Constraint, int32_t value); 2281 2282 /** 2283 * @brief Sets the maximum height. 2284 * 2285 * @param Constraint Indicates the pointer to the size constraint. 2286 * @param value Indicates the maximum height, in px. 2287 * @since 12 2288 */ 2289 void OH_ArkUI_LayoutConstraint_SetMaxHeight(ArkUI_LayoutConstraint* Constraint, int32_t value); 2290 2291 /** 2292 * @brief Sets the minimum height. 2293 * 2294 * @param Constraint Indicates the pointer to the size constraint. 2295 * @param value Indicates the minimum height, in px. 2296 * @since 12 2297 */ 2298 void OH_ArkUI_LayoutConstraint_SetMinHeight(ArkUI_LayoutConstraint* Constraint, int32_t value); 2299 2300 /** 2301 * @brief Sets the width percentage reference. 2302 * 2303 * @param Constraint Indicates the pointer to the size constraint. 2304 * @param value Indicates the width percentage reference, in px. 2305 * @since 12 2306 */ 2307 void OH_ArkUI_LayoutConstraint_SetPercentReferenceWidth(ArkUI_LayoutConstraint* Constraint, int32_t value); 2308 2309 /** 2310 * @brief Sets the height percentage reference. 2311 * 2312 * @param Constraint Indicates the pointer to the size constraint. 2313 * @param value Indicates the height percentage reference, in px. 2314 * @since 12 2315 */ 2316 void OH_ArkUI_LayoutConstraint_SetPercentReferenceHeight(ArkUI_LayoutConstraint* Constraint, int32_t value); 2317 2318 /** 2319 * @brief Obtains the pointer to a canvas for drawing, which can be converted into the <b>OH_Drawing_Canvas</b> pointer 2320 * in the <b>Drawing</b> module. 2321 * 2322 * @param context Indicates the pointer to the drawing context. 2323 * @return Returns the pointer to the canvas for drawing. 2324 * @since 12 2325 */ 2326 void* OH_ArkUI_DrawContext_GetCanvas(ArkUI_DrawContext* context); 2327 2328 /** 2329 * @brief Obtains the size of a drawing area. 2330 * 2331 * @param context Indicates the pointer to the drawing context. 2332 * @return Returns the size of the drawing area. 2333 * @since 12 2334 */ 2335 ArkUI_IntSize OH_ArkUI_DrawContext_GetSize(ArkUI_DrawContext* context); 2336 2337 /** 2338 * @brief Creates water flow section configuration. 2339 * 2340 * @return Returns the water flow section configuration. 2341 * @since 12 2342 */ 2343 ArkUI_WaterFlowSectionOption* OH_ArkUI_WaterFlowSectionOption_Create(); 2344 2345 /** 2346 * @brief Destroys the pointer to a water flow section configuration. 2347 * 2348 * @param option Indicates the pointer to a water flow section configuration. 2349 * @since 12 2350 */ 2351 void OH_ArkUI_WaterFlowSectionOption_Dispose(ArkUI_WaterFlowSectionOption* option); 2352 2353 /** 2354 * @brief Sets the FlowItem block configuration information array length. 2355 * 2356 * @param option FlowItem Indicates the packet configuration. 2357 * @param size Array Length. 2358 * @since 12 2359 */ 2360 void OH_ArkUI_WaterFlowSectionOption_SetSize(ArkUI_WaterFlowSectionOption* option, int32_t size); 2361 2362 /** 2363 * @brief Gets the FlowItem grouping configuration information array length. 2364 * 2365 * @param option FlowItem Indicates the packet configuration. 2366 * @return Array size. If -1 is returned, the return fails. 2367 * The possible cause of the failure is that the option parameter is abnormal, such as a null pointer. 2368 * @since 12 2369 */ 2370 int32_t OH_ArkUI_WaterFlowSectionOption_GetSize(ArkUI_WaterFlowSectionOption* option); 2371 2372 /** 2373 * @brief Sets the number of items in a water flow section. 2374 * 2375 * @param option Indicates the pointer to a water flow section configuration. 2376 * @param index Indicates the index of the target water flow section. 2377 * @param itemCount Indicates the number of items in the water flow section. 2378 * @since 12 2379 */ 2380 void OH_ArkUI_WaterFlowSectionOption_SetItemCount(ArkUI_WaterFlowSectionOption* option, 2381 int32_t index, int32_t itemCount); 2382 2383 /** 2384 * @brief Obtains the number of items in the water flow section that matches the specified index. 2385 * 2386 * @param option Indicates the pointer to a water flow section configuration. 2387 * @param index Indicates the index of the target water flow section. 2388 * @return Returns the number of items in the water flow section. 2389 * @since 12 2390 */ 2391 int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index); 2392 2393 /** 2394 * @brief The FlowItem grouping configuration information getsthe spindle size of 2395 * the specified Item based on flowItemIndex. 2396 * 2397 * @param option Indicates the pointer to a water flow section configuration. 2398 * @param index Indicates the index of the target water flow section. 2399 * @param callback Gets the spindle size of the specified Item based on index. 2400 * @since 12 2401 */ 2402 void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex(ArkUI_WaterFlowSectionOption* option, 2403 int32_t index, float(*callback)(int32_t itemIndex)); 2404 2405 /** 2406 * @brief The FlowItem grouping configuration information getsthe spindle size of 2407 * the specified Item based on flowItemIndex. 2408 * 2409 * @param option Indicates the pointer to a water flow section configuration. 2410 * @param index Indicates the index of the target water flow section. 2411 * @param userData FlowItem Custom data. 2412 * @param callback Gets the spindle size of the specified Item based on index. 2413 * @since 12 2414 */ 2415 void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData( 2416 ArkUI_WaterFlowSectionOption* option, int32_t index, void* userData, 2417 float (*callback)(int32_t itemIndex, void* userData)); 2418 2419 /** 2420 * @brief Sets the number of columns (in a vertical layout) or rows (in a horizontal layout) of a water flow. 2421 * 2422 * @param option Indicates the pointer to a water flow section configuration. 2423 * @param index Indicates the index of the target water flow section. 2424 * @param crossCount Indicates the number of columns or rows, depending on the layout direction. 2425 * @since 12 2426 */ 2427 void OH_ArkUI_WaterFlowSectionOption_SetCrossCount( 2428 ArkUI_WaterFlowSectionOption* option, int32_t index, int32_t crossCount); 2429 2430 /** 2431 * @brief Obtains the number of columns (in a vertical layout) or rows (in a horizontal layout) in the water flow section 2432 * that matches the specified index. 2433 * 2434 * @param option Indicates the pointer to a water flow section configuration. 2435 * @param index Indicates the index of the target water flow section. 2436 * @return Returns the number of columns or rows. 2437 * @since 12 2438 */ 2439 int32_t OH_ArkUI_WaterFlowSectionOption_GetCrossCount(ArkUI_WaterFlowSectionOption* option, int32_t index); 2440 2441 /** 2442 * @brief Sets the gap between columns in the specified water flow section. 2443 * 2444 * @param option Indicates the pointer to a water flow section configuration. 2445 * @param index Indicates the index of the target water flow section. 2446 * @param columnGap Indicates the gap between columns to set. 2447 * @since 12 2448 */ 2449 void OH_ArkUI_WaterFlowSectionOption_SetColumnGap(ArkUI_WaterFlowSectionOption* option, 2450 int32_t index, float columnGap); 2451 2452 /** 2453 * @brief Obtains the gap between columns in the water flow section that matches the specified index. 2454 * 2455 * @param option Indicates the pointer to a water flow section configuration. 2456 * @param index Indicates the index of the target water flow section. 2457 * @return Returns the gap between columns. 2458 * @since 12 2459 */ 2460 float OH_ArkUI_WaterFlowSectionOption_GetColumnGap(ArkUI_WaterFlowSectionOption* option, int32_t index); 2461 2462 /** 2463 * @brief Sets the gap between rows in the specified water flow section. 2464 * 2465 * @param option Indicates the pointer to a water flow section configuration. 2466 * @param index Indicates the index of the target water flow section. 2467 * @param rowGap Indicates the gap between rows to set. 2468 * @since 12 2469 */ 2470 void OH_ArkUI_WaterFlowSectionOption_SetRowGap(ArkUI_WaterFlowSectionOption* option, 2471 int32_t index, float rowGap); 2472 2473 /** 2474 * @brief Obtains the gap between rows in the water flow section that matches the specified index. 2475 * 2476 * @param option Indicates the pointer to a water flow section configuration. 2477 * @param index Indicates the index of the target water flow section. 2478 * @return Returns the gap between rows. 2479 * @since 12 2480 */ 2481 float OH_ArkUI_WaterFlowSectionOption_GetRowGap(ArkUI_WaterFlowSectionOption* option, int32_t index); 2482 2483 /** 2484 * @brief Sets the margins for the specified water flow section. 2485 * 2486 * @param option Indicates the pointer to a water flow section configuration. 2487 * @param index Indicates the index of the target water flow section. 2488 * @param marginTop Indicates the top margin of the water flow section. 2489 * @param marginRight Indicates the right margin of the water flow section. 2490 * @param marginBottom Indicates the bottom margin of the water flow section. 2491 * @param marginLeft Indicates the left margin of the water flow section. 2492 * @since 12 2493 */ 2494 void OH_ArkUI_WaterFlowSectionOption_SetMargin(ArkUI_WaterFlowSectionOption* option, int32_t index, 2495 float marginTop, float marginRight, float marginBottom, float marginLeft); 2496 2497 /** 2498 * @brief Obtains the margins of the water flow section that matches the specified index. 2499 * 2500 * @param option Indicates the pointer to a water flow section configuration. 2501 * @param index Indicates the index of the target water flow section. 2502 * @return Returns the margins. 2503 * @since 12 2504 */ 2505 ArkUI_Margin OH_ArkUI_WaterFlowSectionOption_GetMargin(ArkUI_WaterFlowSectionOption* option, int32_t index); 2506 2507 /** 2508 * @brief Obtains the number of items in the water flow section that matches the specified index. 2509 * 2510 * @param option Indicates the pointer to a water flow section configuration. 2511 * @param index Indicates the index of the target water flow section. 2512 * @return Returns the number of items in the water flow section. 2513 * @since 12 2514 */ 2515 int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index); 2516 2517 /** 2518 * @brief Creates a navigation indicator. 2519 * 2520 * @param type Indicates the type of the indicator. 2521 * @return Returns the pointer to the new indicator. 2522 * @since 12 2523 */ 2524 ArkUI_SwiperIndicator* OH_ArkUI_SwiperIndicator_Create(ArkUI_SwiperIndicatorType type); 2525 2526 /** 2527 * @brief Destroys the pointer to the indicator. 2528 * 2529 * @param indicator Indicates the pointer to the indicator. 2530 * @since 12 2531 */ 2532 void OH_ArkUI_SwiperIndicator_Dispose(ArkUI_SwiperIndicator* indicator); 2533 2534 /** 2535 * @brief Sets the distance between the navigation point and the start of the swiper. 2536 * 2537 * @param indicator Indicates the pointer to the indicator. 2538 * @param value Indicates the distance between the navigation point and the start of the swiper. 2539 * @since 12 2540 */ 2541 void OH_ArkUI_SwiperIndicator_SetStartPosition(ArkUI_SwiperIndicator* indicator, float value); 2542 2543 /** 2544 * @brief Obtains the distance between the navigation point and the start of the swiper. 2545 * 2546 * @param indicator Indicates the pointer to the indicator. 2547 * @return Returns the distance between the navigation point and the start of the swiper. 2548 * @since 12 2549 */ 2550 float OH_ArkUI_SwiperIndicator_GetStartPosition(ArkUI_SwiperIndicator* indicator); 2551 2552 /** 2553 * @brief Sets the distance between the navigation point and the top of the swiper. 2554 * 2555 * @param indicator Indicates the pointer to the indicator. 2556 * @param value Indicates the distance between the navigation point and the top of the swiper. 2557 * @since 12 2558 */ 2559 void OH_ArkUI_SwiperIndicator_SetTopPosition(ArkUI_SwiperIndicator* indicator, float value); 2560 2561 /** 2562 * @brief Obtains the distance between the navigation point and the top of the swiper. 2563 * 2564 * @param indicator Indicates the pointer to the indicator. 2565 * @return Returns the distance between the navigation point and the top of the swiper. 2566 * @since 12 2567 */ 2568 float OH_ArkUI_SwiperIndicator_GetTopPosition(ArkUI_SwiperIndicator* indicator); 2569 2570 /** 2571 * @brief Sets the distance between the navigation point and the right of the swiper. 2572 * 2573 * @param indicator Indicates the pointer to the indicator. 2574 * @param value Indicates the distance between the navigation point and the right of the swiper. 2575 * @since 12 2576 */ 2577 void OH_ArkUI_SwiperIndicator_SetEndPosition(ArkUI_SwiperIndicator* indicator, float value); 2578 2579 /** 2580 * @brief Obtains the distance between the navigation point and the end of the swiper. 2581 * 2582 * @param indicator Indicates the pointer to the indicator. 2583 * @return Returns the distance between the navigation point and the end of the swiper. 2584 * @since 12 2585 */ 2586 float OH_ArkUI_SwiperIndicator_GetEndPosition(ArkUI_SwiperIndicator* indicator); 2587 2588 /** 2589 * @brief Sets the distance between the navigation point and the bottom of the swiper. 2590 * 2591 * @param indicator Indicates the pointer to the indicator. 2592 * @param value Indicates the distance between the navigation point and the bottom of the swiper. 2593 * @since 12 2594 */ 2595 void OH_ArkUI_SwiperIndicator_SetBottomPosition(ArkUI_SwiperIndicator* indicator, float value); 2596 2597 /** 2598 * @brief Obtains the distance between the navigation point and the bottom of the swiper. 2599 * 2600 * @param indicator Indicates the pointer to the indicator. 2601 * @return Returns the distance between the navigation point and the bottom of the swiper. 2602 * @since 12 2603 */ 2604 float OH_ArkUI_SwiperIndicator_GetBottomPosition(ArkUI_SwiperIndicator* indicator); 2605 2606 /** 2607 * @brief Sets the width of the dot for the dot indicator. 2608 * 2609 * @param indicator Indicates the pointer to the indicator. 2610 * @param value Indicates the width of the dot for the dot indicator. 2611 * @since 12 2612 */ 2613 void OH_ArkUI_SwiperIndicator_SetItemWidth(ArkUI_SwiperIndicator* indicator, float value); 2614 2615 /** 2616 * @brief Obtains the width of the dot for the dot indicator. 2617 * 2618 * @param indicator Indicates the pointer to the indicator. 2619 * @return Returns the width of the dot for the dot indicator. 2620 * @since 12 2621 */ 2622 float OH_ArkUI_SwiperIndicator_GetItemWidth(ArkUI_SwiperIndicator* indicator); 2623 2624 /** 2625 * @brief Sets the height of the dot for the dot indicator. 2626 * 2627 * @param indicator Indicates the pointer to the indicator. 2628 * @param value Indicates the height of the dot for the dot indicator. 2629 * @since 12 2630 */ 2631 void OH_ArkUI_SwiperIndicator_SetItemHeight(ArkUI_SwiperIndicator* indicator, float value); 2632 2633 /** 2634 * @brief Obtains the height of the dot for the dot indicator. 2635 * 2636 * @param indicator Indicates the pointer to the indicator. 2637 * @return Returns the height of the dot for the dot indicator. 2638 * @since 12 2639 */ 2640 float OH_ArkUI_SwiperIndicator_GetItemHeight(ArkUI_SwiperIndicator* indicator); 2641 2642 /** 2643 * @brief Sets the width of the selected dot for the dot indicator. 2644 * 2645 * @param indicator Indicates the pointer to the indicator. 2646 * @param value Indicates the width of the selected dot for the dot indicator. 2647 * @since 12 2648 */ 2649 void OH_ArkUI_SwiperIndicator_SetSelectedItemWidth(ArkUI_SwiperIndicator* indicator, float value); 2650 2651 /** 2652 * @brief Obtains the width of the selected dot for the dot indicator. 2653 * 2654 * @param indicator Indicates the pointer to the indicator. 2655 * @return Returns the width of the selected dot for the dot indicator. 2656 * @since 12 2657 */ 2658 float OH_ArkUI_SwiperIndicator_GetSelectedItemWidth(ArkUI_SwiperIndicator* indicator); 2659 2660 /** 2661 * @brief Sets the height of the selected dot for the dot indicator. 2662 * 2663 * @param indicator Indicates the pointer to the indicator. 2664 * @param value Indicates the height of the selected dot for the dot indicator. 2665 * @since 12 2666 */ 2667 void OH_ArkUI_SwiperIndicator_SetSelectedItemHeight(ArkUI_SwiperIndicator* indicator, float value); 2668 2669 /** 2670 * @brief Obtains the height of the selected dot for the dot indicator. 2671 * 2672 * @param indicator Indicates the pointer to the indicator. 2673 * @return Returns the height of the selected dot for the dot indicator. 2674 * @since 12 2675 */ 2676 float OH_ArkUI_SwiperIndicator_GetSelectedItemHeight(ArkUI_SwiperIndicator* indicator); 2677 2678 /** 2679 * @brief Sets whether to display the mask style of the dot navigation indicator. 2680 * 2681 * @param indicator Indicates the pointer to the indicator. 2682 * @param mask Whether to display the mask style. True means to display. 2683 * @since 12 2684 */ 2685 void OH_ArkUI_SwiperIndicator_SetMask(ArkUI_SwiperIndicator* indicator, int32_t mask); 2686 2687 /** 2688 * @brief Obtains whether to display the mask style of the dot navigation indicator. 2689 * 2690 * @param indicator Indicates the pointer to the indicator. 2691 * @return Returns whether to display the mask style. True means to display. 2692 * @since 12 2693 */ 2694 int32_t OH_ArkUI_SwiperIndicator_GetMask(ArkUI_SwiperIndicator* indicator); 2695 2696 /** 2697 * @brief Sets the color of the dot navigation indicator. 2698 * 2699 * @param indicator Indicates the pointer to the indicator. 2700 * @param color the color of the dot navigation indicator, in 0xARGB format. 2701 * @since 12 2702 */ 2703 void OH_ArkUI_SwiperIndicator_SetColor(ArkUI_SwiperIndicator* indicator, uint32_t color); 2704 2705 /** 2706 * @brief Obtains the color of the dot navigation indicator. 2707 * 2708 * @param indicator Indicates the pointer to the indicator. 2709 * @return Returns the color of the dot navigation indicator, in 0xARGB format. 2710 * @since 12 2711 */ 2712 uint32_t OH_ArkUI_SwiperIndicator_GetColor(ArkUI_SwiperIndicator* indicator); 2713 2714 /** 2715 * @brief Sets the color of the selected dot for the navigation indicator. 2716 * 2717 * @param indicator Indicates the pointer to the indicator. 2718 * @param color the color of the selected dot, in 0xARGB format. 2719 * @since 12 2720 */ 2721 void OH_ArkUI_SwiperIndicator_SetSelectedColor(ArkUI_SwiperIndicator* indicator, uint32_t selectedColor); 2722 2723 /** 2724 * @brief Obtains the color of the selected dot for the dot navigation indicator. 2725 * 2726 * @param indicator Indicates the pointer to the indicator. 2727 * @return Returns the color of the selected dot, in 0xARGB format. 2728 * @since 12 2729 */ 2730 uint32_t OH_ArkUI_SwiperIndicator_GetSelectedColor(ArkUI_SwiperIndicator* indicator); 2731 2732 /** 2733 * @brief Sets the number of maxDisplayCount for the dot navigation indicator. 2734 * 2735 * @param indicator Indicates the pointer to the indicator. 2736 * @param maxDisplayCount the maxDisplayCount of the navigation dot, span is 6-9. 2737 * @return {@link ARKUI_ERROR_CODE_NO_ERROR} Success. 2738 * {@link ARKUI_ERROR_CODE_PARAM_INVALID} indicator is null or maxDisplayCount less then 6 or 2739 * maxDisplayCount more then 9 2740 * @since 12 2741 */ 2742 int32_t OH_ArkUI_SwiperIndicator_SetMaxDisplayCount(ArkUI_SwiperIndicator* indicator, int32_t maxDisplayCount); 2743 2744 /** 2745 * @brief Obtains the number of maxDisplayCount for the dot navigation indicator. 2746 * 2747 * @param indicator Indicates the pointer to the indicator. 2748 * @return Returns the number of the maxDisplayCount, span is 6-9. 2749 * 0 - indicator is null 2750 * @since 12 2751 */ 2752 int32_t OH_ArkUI_SwiperIndicator_GetMaxDisplayCount(ArkUI_SwiperIndicator* indicator); 2753 2754 /** 2755 * @brief Create auxiliary line information in the RelativeContaine container. 2756 * 2757 * @param size The number of auxiliary lines. 2758 * @return auxiliary line information. 2759 * @since 12 2760 */ 2761 ArkUI_GuidelineOption* OH_ArkUI_GuidelineOption_Create(int32_t size); 2762 2763 /** 2764 * @brief Destroy auxiliary line information. 2765 * 2766 * @param guideline auxiliary line information. 2767 * @since 12 2768 */ 2769 void OH_ArkUI_GuidelineOption_Dispose(ArkUI_GuidelineOption* guideline); 2770 2771 /** 2772 * @brief Set the Id of the auxiliary line. 2773 * 2774 * @param guideline auxiliary line information. 2775 * @param value id, must be unique and cannot have the same name as the component in the container. 2776 * @param index auxiliary line index value. 2777 * @since 12 2778 */ 2779 void OH_ArkUI_GuidelineOption_SetId(ArkUI_GuidelineOption* guideline, const char* value, int32_t index); 2780 2781 /** 2782 * @brief Set the direction of the auxiliary line. 2783 * 2784 * @param guideline auxiliary line information. 2785 * @param value direction. 2786 * @param index auxiliary line index value. 2787 * @since 12 2788 */ 2789 void OH_ArkUI_GuidelineOption_SetDirection(ArkUI_GuidelineOption* guideline, ArkUI_Axis value, int32_t index); 2790 2791 /** 2792 * @brief Set the distance from the left or top of the container. 2793 * 2794 * @param guideline auxiliary line information. 2795 * @param value The distance from the left or top of the container. 2796 * @param index auxiliary line index value. 2797 * @since 12 2798 */ 2799 void OH_ArkUI_GuidelineOption_SetPositionStart(ArkUI_GuidelineOption* guideline, float value, int32_t index); 2800 2801 /** 2802 * @brief Set the distance from the right or bottom of the container. 2803 * 2804 * @param guideline auxiliary line information. 2805 * @param value The distance from the right side or bottom of the container. 2806 * @param index auxiliary line index value. 2807 * @since 12 2808 */ 2809 void OH_ArkUI_GuidelineOption_SetPositionEnd(ArkUI_GuidelineOption* guideline, float value, int32_t index); 2810 2811 /** 2812 * @brief Get the Id of the auxiliary line. 2813 * 2814 * @param guideline auxiliary line information. 2815 * @param index auxiliary line index value. 2816 * @return Id. 2817 * @since 12 2818 */ 2819 const char* OH_ArkUI_GuidelineOption_GetId(ArkUI_GuidelineOption* guideline, int32_t index); 2820 2821 /** 2822 * @brief Get the direction of the auxiliary line. 2823 * 2824 * @param guideline auxiliary line information. 2825 * @param index auxiliary line index value. 2826 * @return direction. 2827 * @since 12 2828 */ 2829 ArkUI_Axis OH_ArkUI_GuidelineOption_GetDirection(ArkUI_GuidelineOption* guideline, int32_t index); 2830 2831 /** 2832 * @brief Get the distance from the left or top of the container. 2833 * 2834 * @param guideline auxiliary line information. 2835 * @param index auxiliary line index value. 2836 * @return The distance from the left or top of the container. 2837 * @since 12 2838 */ 2839 float OH_ArkUI_GuidelineOption_GetPositionStart(ArkUI_GuidelineOption* guideline, int32_t index); 2840 2841 /** 2842 * @brief Get the distance from the right side or bottom of the container. 2843 * 2844 * @param guideline auxiliary line information. 2845 * @param index auxiliary line index value. 2846 * @return The distance from the right side or bottom of the container. 2847 * @since 12 2848 */ 2849 float OH_ArkUI_GuidelineOption_GetPositionEnd(ArkUI_GuidelineOption* guideline, int32_t index); 2850 2851 /** 2852 * @brief creates barrier information within the RelativeContaine container. 2853 * 2854 * @param size Number of barriers. 2855 * @return barrier information. 2856 * @since 12 2857 */ 2858 ArkUI_BarrierOption* OH_ArkUI_BarrierOption_Create(int32_t size); 2859 2860 /** 2861 * @brief Destroy barrier information. 2862 * 2863 * @param barrierStyle barrier information. 2864 * @since 12 2865 */ 2866 void OH_ArkUI_BarrierOption_Dispose(ArkUI_BarrierOption* barrierStyle); 2867 2868 /** 2869 * @brief Set the Id of the barrier. 2870 * 2871 * @param barrierStyle barrier information. 2872 * @param value id, must be unique and cannot have the same name as the component in the container. 2873 * @param index Barrier index value. 2874 * @since 12 2875 */ 2876 void OH_ArkUI_BarrierOption_SetId(ArkUI_BarrierOption* barrierStyle, const char* value, int32_t index); 2877 2878 /** 2879 * @brief Set the direction of the barrier. 2880 * 2881 * @param barrierStyle barrier information. 2882 * @param value direction. 2883 * @param index Barrier index value. 2884 * @since 12 2885 */ 2886 void OH_ArkUI_BarrierOption_SetDirection( 2887 ArkUI_BarrierOption* barrierStyle, ArkUI_BarrierDirection value, int32_t index); 2888 2889 /** 2890 * @brief Sets the dependent component of the barrier. 2891 * 2892 * @param barrierStyle barrier information. 2893 * @param value The ID of the dependent component. 2894 * @param index Barrier index value. 2895 * @since 12 2896 */ 2897 void OH_ArkUI_BarrierOption_SetReferencedId(ArkUI_BarrierOption* barrierStyle, const char* value, int32_t index); 2898 2899 /** 2900 * @brief Get the Id of the barrier. 2901 * 2902 * @param barrierStyle auxiliary line information. 2903 * @param index auxiliary line index value. 2904 * @return The Id of the barrier. 2905 * @since 12 2906 */ 2907 const char* OH_ArkUI_BarrierOption_GetId(ArkUI_BarrierOption* barrierStyle, int32_t index); 2908 2909 /** 2910 * @brief Gets the direction of the barrier. 2911 * 2912 * @param barrierStyle auxiliary line information. 2913 * @param index auxiliary line index value. 2914 * @return The direction of the barrier. 2915 * @since 12 2916 */ 2917 ArkUI_BarrierDirection OH_ArkUI_BarrierOption_GetDirection(ArkUI_BarrierOption* barrierStyle, int32_t index); 2918 2919 /** 2920 * @brief Get the dependent components of the barrier. 2921 * 2922 * @param barrierStyle auxiliary line information. 2923 * @param index auxiliary line index value. 2924 * @param referencedIndex dependent component Id index value. 2925 * @return The barrier's dependent components. 2926 * @since 12 2927 */ 2928 const char* OH_ArkUI_BarrierOption_GetReferencedId( 2929 ArkUI_BarrierOption* barrierStyle, int32_t index, int32_t referencedIndex); 2930 2931 /** 2932 * @brief Gets the number of dependent components of the barrier. 2933 * 2934 * @param barrierStyle auxiliary line information. 2935 * @param index auxiliary line index value. 2936 * @return The number of dependent components of the barrier. 2937 * @since 12 2938 */ 2939 int32_t OH_ArkUI_BarrierOption_GetReferencedIdSize(ArkUI_BarrierOption* barrierStyle, int32_t index); 2940 2941 /** 2942 * @brief creates alignment rule information for subcomponents in relative containers. 2943 * 2944 * @return Alignment rule information. 2945 * @since 12 2946 */ 2947 ArkUI_AlignmentRuleOption* OH_ArkUI_AlignmentRuleOption_Create(); 2948 2949 /** 2950 * @brief Destroys the alignment rule information of subcomponents in relative containers. 2951 * 2952 * @param option Alignment rule information of subcomponents in the relative container. 2953 * @since 12 2954 */ 2955 void OH_ArkUI_AlignmentRuleOption_Dispose(ArkUI_AlignmentRuleOption* option); 2956 2957 /** 2958 * @brief Set the start alignment parameter. 2959 * 2960 * @param option Alignment rule information of subcomponents in the relative container. 2961 * @param id The id value of the anchor component. 2962 * @param value Alignment relative to the anchor component. 2963 * @since 12 2964 */ 2965 void OH_ArkUI_AlignmentRuleOption_SetStart( 2966 ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment); 2967 2968 /** 2969 * @brief Set the end alignment parameter. 2970 * 2971 * @param option Alignment rule information of subcomponents in the relative container. 2972 * @param id The id value of the anchor component. 2973 * @param value Alignment relative to the anchor component. 2974 * @since 12 2975 */ 2976 void OH_ArkUI_AlignmentRuleOption_SetEnd( 2977 ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment); 2978 2979 /** 2980 * @brief Set the parameters for horizontal center alignment. 2981 * 2982 * @param option Alignment rule information of subcomponents in the relative container. 2983 * @param id The id value of the anchor component. 2984 * @param value Alignment relative to anchor component 2985 * @since 12 2986 */ 2987 void OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal( 2988 ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment); 2989 2990 /** 2991 * @brief Set the parameters for top alignment. 2992 * 2993 * @param option Alignment rule information of subcomponents in the relative container. 2994 * @param id The id value of the anchor component. 2995 * @param value Alignment relative to anchor component 2996 * @since 12 2997 */ 2998 void OH_ArkUI_AlignmentRuleOption_SetTop(ArkUI_AlignmentRuleOption* option, const char* id, 2999 ArkUI_VerticalAlignment alignment); 3000 3001 /** 3002 * @brief Set the bottom alignment parameters. 3003 * 3004 * @param option Alignment rule information of subcomponents in the relative container. 3005 * @param id The id value of the anchor component. 3006 * @param value Alignment relative to anchor component 3007 * @since 12 3008 */ 3009 void OH_ArkUI_AlignmentRuleOption_SetBottom( 3010 ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment); 3011 3012 /** 3013 * @brief Set the parameters for vertical center alignment. 3014 * 3015 * @param option Alignment rule information of subcomponents in the relative container. 3016 * @param id The id value of the anchor component. 3017 * @param value Alignment relative to the anchor component. 3018 * @since 12 3019 */ 3020 void OH_ArkUI_AlignmentRuleOption_SetCenterVertical( 3021 ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment); 3022 3023 /** 3024 * @brief Sets the horizontal offset parameter of the component under the anchor point constraint. 3025 * 3026 * @param option Alignment rule information of subcomponents in the relative container. 3027 * @param horizontal bias value in the horizontal direction. 3028 * @since 12 3029 */ 3030 void OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal(ArkUI_AlignmentRuleOption* option, float horizontal); 3031 3032 /** 3033 * @brief Set the vertical offset parameter of the component under the anchor point constraint. 3034 * 3035 * @param option Alignment rule information of subcomponents in the relative container. 3036 * @param horizontal bias value in the vertical direction. 3037 * @since 12 3038 */ 3039 void OH_ArkUI_AlignmentRuleOption_SetBiasVertical(ArkUI_AlignmentRuleOption* option, float vertical); 3040 3041 /** 3042 * @brief Get the Id of the start-aligned parameter. 3043 * 3044 * @param option Alignment rule information of subcomponents in the relative container. 3045 * @return The id value of the anchor component. 3046 * @since 12 3047 */ 3048 const char* OH_ArkUI_AlignmentRuleOption_GetStartId(ArkUI_AlignmentRuleOption* option); 3049 3050 /** 3051 * @brief Gets the alignment of the start-aligned parameter. 3052 * 3053 * @param option Alignment rule information of subcomponents in the relative container. 3054 * @return The alignment of the parameters. 3055 * @since 12 3056 */ 3057 ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetStartAlignment(ArkUI_AlignmentRuleOption* option); 3058 3059 /** 3060 * @brief Get the end alignment parameter. 3061 * 3062 * @param option Alignment rule information of subcomponents in the relative container. 3063 * @return End-aligned parameter id. 3064 * @since 12 3065 */ 3066 const char* OH_ArkUI_AlignmentRuleOption_GetEndId(ArkUI_AlignmentRuleOption* option); 3067 3068 /** 3069 * @brief Get the end alignment parameter. 3070 * 3071 * @param option Alignment rule information of subcomponents in the relative container. 3072 * @return The alignment of the end-aligned parameter. 3073 * @since 12 3074 */ 3075 ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetEndAlignment(ArkUI_AlignmentRuleOption* option); 3076 3077 /** 3078 * @brief Gets the parameters of horizontal center alignment. 3079 * 3080 * @param option Alignment rule information of subcomponents in the relative container. 3081 * @return The id of the parameter of horizontal center alignment. 3082 * @since 12 3083 */ 3084 const char* OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal(ArkUI_AlignmentRuleOption* option); 3085 3086 /** 3087 * @brief Gets the parameters of horizontal center alignment. 3088 * 3089 * @param option Alignment rule information of subcomponents in the relative container. 3090 * @return The alignment of the horizontally centered alignment parameter. 3091 * @since 12 3092 */ 3093 ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal(ArkUI_AlignmentRuleOption* option); 3094 3095 /** 3096 * @brief Get the top-aligned parameters. 3097 * 3098 * @param option Alignment rule information of subcomponents in the relative container. 3099 * @return Top aligned parameter id. 3100 * @since 12 3101 */ 3102 const char* OH_ArkUI_AlignmentRuleOption_GetTopId(ArkUI_AlignmentRuleOption* option); 3103 3104 /** 3105 * @brief Get the top-aligned parameters. 3106 * 3107 * @param option Alignment rule information of subcomponents in the relative container. 3108 * @return The alignment of the top-aligned parameter. 3109 * @since 12 3110 */ 3111 ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetTopAlignment(ArkUI_AlignmentRuleOption* option); 3112 3113 /** 3114 * @brief Get the bottom alignment parameters. 3115 * 3116 * @param option Alignment rule information of subcomponents in the relative container. 3117 * @return The id of the bottom-aligned parameter. 3118 * @since 12 3119 */ 3120 const char* OH_ArkUI_AlignmentRuleOption_GetBottomId(ArkUI_AlignmentRuleOption* option); 3121 3122 /** 3123 * @brief Get the bottom alignment parameters. 3124 * 3125 * @param option Alignment rule information of subcomponents in the relative container. 3126 * @return The alignment of the bottom-aligned parameter. 3127 * @since 12 3128 */ 3129 ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetBottomAlignment(ArkUI_AlignmentRuleOption* option); 3130 3131 /** 3132 * @brief Gets the parameters of vertical center alignment. 3133 * 3134 * @param option Alignment rule information of subcomponents in the relative container. 3135 * @return The id of the vertical center alignment parameter. 3136 * @since 12 3137 */ 3138 const char* OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical(ArkUI_AlignmentRuleOption* option); 3139 3140 /** 3141 * @brief Gets the parameters of vertical center alignment. 3142 * 3143 * @param option Alignment rule information of subcomponents in the relative container. 3144 * @return The alignment of the vertical center alignment parameter. 3145 * @since 12 3146 */ 3147 ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical(ArkUI_AlignmentRuleOption* option); 3148 3149 /** 3150 * @brief Get the bias value in the horizontal direction. 3151 * 3152 * @param option Alignment rule information of subcomponents in the relative container. 3153 * @return The bias value in the horizontal direction. 3154 * @since 12 3155 */ 3156 float OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(ArkUI_AlignmentRuleOption* option); 3157 3158 /** 3159 * @brief Get the bias value in the vertical direction. 3160 * 3161 * @param option Alignment rule information of subcomponents in the relative container. 3162 * @return bias value in vertical direction. 3163 * @since 12 3164 */ 3165 float OH_ArkUI_AlignmentRuleOption_GetBiasVertical(ArkUI_AlignmentRuleOption* option); 3166 3167 /** 3168 * @brief Create a configuration item for the ListitemSwipeActionItem interface settings. 3169 * 3170 * @return List Item SwipeActionItem configuration item instance. If the object returns a null pointer, 3171 * it indicates creation failure, and the reason for the failure may be that the address space is full. 3172 * @since 12 3173 */ 3174 ArkUI_ListItemSwipeActionItem* OH_ArkUI_ListItemSwipeActionItem_Create(); 3175 3176 /** 3177 * @brief Destroy the ListitemSwipeActionItem instance. 3178 * 3179 * @param option List Item SwipeActionItem instance to be destroyed. 3180 * @since 12 3181 */ 3182 void OH_ArkUI_ListItemSwipeActionItem_Dispose(ArkUI_ListItemSwipeActionItem* item); 3183 3184 /** 3185 * @brief Set the layout content of ListItem SwipeActionItem. 3186 * 3187 * @param option List Item SwipeActionItem instance. 3188 * @param builder Layout information. 3189 * @since 12 3190 */ 3191 void OH_ArkUI_ListItemSwipeActionItem_SetContent(ArkUI_ListItemSwipeActionItem* item, ArkUI_NodeHandle node); 3192 3193 /** 3194 * @brief Set the threshold for long-distance sliding deletion distance of components. 3195 * 3196 * @param option List Item SwipeActionItem instance. 3197 * @param distance Component long-distance sliding deletion distance threshold. 3198 * @since 12 3199 */ 3200 void OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item, float distance); 3201 3202 /** 3203 * @brief Obtain the threshold for long-distance sliding deletion distance of components. 3204 * 3205 * @param option List Item SwipeActionItem instance. 3206 * @return Component long-distance sliding deletion distance threshold. If -1.0f is returned, the return fails. 3207 * The possible cause of the failure is that the item parameter is abnormal, such as a null pointer. 3208 * @since 12 3209 */ 3210 float OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item); 3211 3212 /** 3213 * @brief Set the event to be called when a sliding entry enters the deletion area. 3214 * 3215 * @param option List Item SwipeActionItem instance. 3216 * @param callback Callback Events. 3217 * @since 12 3218 */ 3219 void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)()); 3220 3221 /** 3222 * @brief Set the event triggered when a sliding entry enters the deletion area. 3223 * 3224 * @param option List Item SwipeActionItem instance. 3225 * @param userData User defined data. 3226 * @param callback Callback Events. 3227 * @since 12 3228 */ 3229 void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData(ArkUI_ListItemSwipeActionItem* item, 3230 void* userData, void (*callback)(void* userData)); 3231 3232 /** 3233 * @brief Set the event to be called when a component enters the long-range deletion area and deletes a ListItem. 3234 * 3235 * @param option List Item SwipeActionItem instance. 3236 * @param callback Callback Events. 3237 * @since 12 3238 */ 3239 void OH_ArkUI_ListItemSwipeActionItem_SetOnAction(ArkUI_ListItemSwipeActionItem* item, void (*callback)()); 3240 3241 /** 3242 * @brief Set the event triggered when a component enters the long-range deletion area and deletes a ListItem. 3243 * 3244 * @param option List Item SwipeActionItem instance. 3245 * @param userData User defined data. 3246 * @param callback Callback Events. 3247 * @since 12 3248 */ 3249 void OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData(ArkUI_ListItemSwipeActionItem* item, 3250 void* userData, void (*callback)(void* userData)); 3251 3252 /** 3253 * @brief Set the event to be called when a sliding entry exits the deletion area. 3254 * 3255 * @param option List Item SwipeActionItem instance. 3256 * @param callback Callback Events. 3257 * @since 12 3258 */ 3259 void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)()); 3260 3261 /** 3262 * @brief Set the event triggered when a sliding entry exits the deletion area. 3263 * 3264 * @param option List Item SwipeActionItem instance. 3265 * @param userData User defined data. 3266 * @param callback Callback Events. 3267 * @since 12 3268 */ 3269 void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData(ArkUI_ListItemSwipeActionItem* item, 3270 void* userData, void (*callback)(void* userData)); 3271 3272 /** 3273 * @brief Set the event triggered when the sliding state of a list item changes. 3274 * 3275 * @param option List Item SwipeActionItem instance. 3276 * @param callback Callback Events. 3277 * swipeActionState The changed state. 3278 * @since 12 3279 */ 3280 void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange(ArkUI_ListItemSwipeActionItem* item, 3281 void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState)); 3282 3283 /** 3284 * @brief Set the event triggered when the sliding state of a list item changes. 3285 * 3286 * @param option List Item SwipeActionItem instance. 3287 * @param userData User defined data. 3288 * @param callback Callback Events. 3289 * swipeActionState The changed state. 3290 * @since 12 3291 */ 3292 void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData(ArkUI_ListItemSwipeActionItem* item, 3293 void* userData, void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState, void* userData)); 3294 3295 /** 3296 * @brief Create a configuration item for the ListitemSwipeActionOption interface settings. 3297 * 3298 * @return List Item SwipeActionOption configuration item instance.If the object returns a null pointer, 3299 * it indicates a creation failure, and the reason for the failure may be that the address space is full. 3300 * @since 12 3301 */ 3302 ArkUI_ListItemSwipeActionOption* OH_ArkUI_ListItemSwipeActionOption_Create(); 3303 3304 /** 3305 * @brief Destroy the ListitemSwipeActionOption instance. 3306 * 3307 * @param option List Item SwipeActionOption instance to be destroyed. 3308 * @since 12 3309 */ 3310 void OH_ArkUI_ListItemSwipeActionOption_Dispose(ArkUI_ListItemSwipeActionOption* option); 3311 3312 /** 3313 * @brief Set the layout content on the left (vertical layout) or top (horizontal layout) 3314 * of the ListItem SwipeActionItem. 3315 * 3316 * @param option List Item SwipeActionItem instance. 3317 * @param builder Layout information. 3318 * @since 12 3319 */ 3320 void OH_ArkUI_ListItemSwipeActionOption_SetStart(ArkUI_ListItemSwipeActionOption* option, 3321 ArkUI_ListItemSwipeActionItem* item); 3322 3323 /** 3324 * @brief Set the layout content on the right (vertical layout) or bottom (horizontal layout) 3325 * of the ListItem SwipeActionItem. 3326 * 3327 * @param option List Item SwipeActionItem instance. 3328 * @param builder Layout information. 3329 * @since 12 3330 */ 3331 void OH_ArkUI_ListItemSwipeActionOption_SetEnd(ArkUI_ListItemSwipeActionOption* option, 3332 ArkUI_ListItemSwipeActionItem* item); 3333 3334 /** 3335 * @brief Set the sliding effect. 3336 * 3337 * @param option List Item SwipeActionItem instance. 3338 * @param edgeEffect Sliding effect. 3339 * @since 12 3340 */ 3341 void OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect(ArkUI_ListItemSwipeActionOption* option, 3342 ArkUI_ListItemSwipeEdgeEffect edgeEffect); 3343 3344 /** 3345 * @brief Get the sliding effect. 3346 * 3347 * @param option List Item SwipeActionItem instance. 3348 * @return Sliding effect. The default return value is 0. If -1 is returned, the return fails. 3349 * The possible cause of the failure is that the option parameter is abnormal, such as a null pointer. 3350 * @since 12 3351 */ 3352 int32_t OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect(ArkUI_ListItemSwipeActionOption* option); 3353 3354 /** 3355 * @brief The event called when the sliding operation offset changes. 3356 * 3357 * @param option List Item SwipeActionItem instance. 3358 * @param callback Callback Events. 3359 * offset Slide offset. 3360 * @since 12 3361 */ 3362 void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange(ArkUI_ListItemSwipeActionOption* option, 3363 void (*callback)(float offset)); 3364 3365 /** 3366 * @brief Set the event triggered when the sliding operation offset changes. 3367 * 3368 * @param option List Item SwipeActionItem instance. 3369 * @param userData User defined data. 3370 * @param callback Callback Events. 3371 * offset Slide offset. 3372 * @since 12 3373 */ 3374 void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData(ArkUI_ListItemSwipeActionOption* option, 3375 void* userData, void (*callback)(float offset, void* userData)); 3376 3377 /** 3378 * @brief Create configuration items for the ListChildrenMainSize interface settings. 3379 * 3380 * @return ListChildrenMainSize configuration item instance.If the object returns a null pointer, 3381 * it indicates a creation failure, and the reason for the failure may be that the address space is full. 3382 * @since 12 3383 */ 3384 ArkUI_ListChildrenMainSize* OH_ArkUI_ListChildrenMainSizeOption_Create(); 3385 3386 /** 3387 * @brief Destroy the ListChildrenMainSize instance. 3388 * 3389 * @param option The ListChildrenMainSize instance to be destroyed. 3390 * @since 12 3391 */ 3392 void OH_ArkUI_ListChildrenMainSizeOption_Dispose(ArkUI_ListChildrenMainSize* option); 3393 3394 /** 3395 * @brief Set the default size of ChildrenMainSizeOption for the List component. 3396 * 3397 * @param option ListChildrenMainSize instance. 3398 * @param defaultMainSize The default size of the ListItem under the List, measured in vp. 3399 * @return 0 represents success. If defaultMainSize is less than 0 or option is a null pointer, return 401. 3400 * @since 12 3401 */ 3402 int32_t OH_ArkUI_ListChildrenMainSizeOption_SetDefaultMainSize(ArkUI_ListChildrenMainSize* option, 3403 float defaultMainSize); 3404 3405 /** 3406 * @brief Get the default size of ChildrenMainSizeOption for the List component. 3407 * 3408 * @param option ListChildrenMainSize instance. 3409 * @return The default size of the ListItem under the List is 0, measured in vp. 3410 * When the option is a null pointer, it returns -1. 3411 * @since 12 3412 */ 3413 float OH_ArkUI_ListChildrenMainSizeOption_GetDefaultMainSize(ArkUI_ListChildrenMainSize* option); 3414 3415 /** 3416 * @brief Reset the array size of ChildrenMainSizeOption for the List component. 3417 * 3418 * @param option ListChildrenMainSize instance. 3419 * @param totalSize Array size. 3420 * @since 12 3421 */ 3422 void OH_ArkUI_ListChildrenMainSizeOption_Resize(ArkUI_ListChildrenMainSize* option, int32_t totalSize); 3423 3424 /** 3425 * @brief Resize the ChildrenMainSizeOption array operation on the List component. 3426 * 3427 * @param option ListChildrenMainSize instance. 3428 * @param index To modify the starting position of the MainSize array. 3429 * @param deleteCount The number of MainSize arrays to be deleted starting from index. 3430 * @param addCount The number of MainSize arrays to be added starting from index. 3431 * @return 0 represents success. If the function parameter is abnormal, return 401. 3432 * @since 12 3433 */ 3434 int32_t OH_ArkUI_ListChildrenMainSizeOption_Splice(ArkUI_ListChildrenMainSize* option, int32_t index, 3435 int32_t deleteCount, int32_t addCount); 3436 3437 /** 3438 * @brief Update the value of the ChildrenMainSizeOption array in the List component. 3439 * 3440 * @param option ListChildrenMainSize instance. 3441 * @param index To modify the starting position of the MainSize array. 3442 * @param mainSize The actual modified value. 3443 * @return 0 represents success. If the function parameter is abnormal, return 401. 3444 * @since 12 3445 */ 3446 int32_t OH_ArkUI_ListChildrenMainSizeOption_UpdateSize(ArkUI_ListChildrenMainSize* option, 3447 int32_t index, float mainSize); 3448 3449 /** 3450 * @brief Get the value of the ChildrenMainSizeOption array for the List component. 3451 * 3452 * @param option ListChildrenMainSize instance. 3453 * @param index The index position of the value to be obtained. 3454 * @return The value of the specific position of the array. If the function parameter is abnormal, return -1. 3455 * @since 12 3456 */ 3457 float OH_ArkUI_ListChildrenMainSizeOption_GetMainSize(ArkUI_ListChildrenMainSize* option, int32_t index); 3458 3459 /** 3460 * @brief Creates measurement information for this custom span. 3461 * 3462 * @return Returns a <b>CustomSpanMeasureInfo</b> instance. 3463 * <br> If the result returns nullptr, there may be out of memory. 3464 * @since 12 3465 */ 3466 ArkUI_CustomSpanMeasureInfo* OH_ArkUI_CustomSpanMeasureInfo_Create(void); 3467 3468 /** 3469 * @brief Disposes of measurement information of this custom span. 3470 * 3471 * @param info The CustomSpanMeasureInfo instance to be destroyed. 3472 * @since 12 3473 */ 3474 void OH_ArkUI_CustomSpanMeasureInfo_Dispose(ArkUI_CustomSpanMeasureInfo* info); 3475 3476 /** 3477 * @brief Obtains the font size of a custom span. 3478 * 3479 * @param info Indicates the pointer to the measurement information of a custom span. 3480 * @return Returns the font size. If a parameter error occurs, <b>0.0f</b> is returned. 3481 * <br> Possible causes: Parameter verification failed, the parameter should not be nullptr. 3482 * @since 12 3483 */ 3484 float OH_ArkUI_CustomSpanMeasureInfo_GetFontSize(ArkUI_CustomSpanMeasureInfo* info); 3485 3486 /** 3487 * @brief Creates measurement metrics for this custom span. 3488 * 3489 * @return Returns a <b>CustomSpanMetrics</b> instance. 3490 * <br> If the result returns nullptr, there may be out of memory. 3491 * @since 12 3492 */ 3493 ArkUI_CustomSpanMetrics* OH_ArkUI_CustomSpanMetrics_Create(void); 3494 3495 /** 3496 * @brief Disposes of measurement metrics of this custom span. 3497 * 3498 * @param info The CustomSpanMetrics instance to be destroyed. 3499 * @since 12 3500 */ 3501 void OH_ArkUI_CustomSpanMetrics_Dispose(ArkUI_CustomSpanMetrics* metrics); 3502 3503 /** 3504 * @brief Sets the width for a custom span. 3505 * 3506 * @param metrics Indicates the pointer to a <b>CustomSpanMetrics</b> instance. 3507 * @param width Indicates the width, in px. The width should be greater than 0. 3508 * @return Returns the result code. 3509 * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. 3510 * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. 3511 * <br> Possible causes: Parameter verification failed, the parameter should not be nullptr. 3512 * @since 12 3513 */ 3514 int32_t OH_ArkUI_CustomSpanMetrics_SetWidth(ArkUI_CustomSpanMetrics* metrics, float width); 3515 3516 /** 3517 * @brief Sets the height for a custom span. 3518 * 3519 * @param metrics Indicates the pointer to a <b>CustomSpanMetrics</b> instance. 3520 * @param width Indicates the height, in px. The width should be greater than 0. 3521 * @return Returns the result code. 3522 * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. 3523 * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. 3524 * <br> Possible causes: Parameter verification failed, the parameter should not be nullptr. 3525 * @since 12 3526 */ 3527 int32_t OH_ArkUI_CustomSpanMetrics_SetHeight(ArkUI_CustomSpanMetrics* metrics, float height); 3528 3529 /** 3530 * @brief Creates drawing information for this custom span. 3531 * 3532 * @return Returns a <b>CustomSpanDrawInfo</b> instance. 3533 * <br> If the result returns nullptr, there may be out of memory. 3534 * @since 12 3535 */ 3536 ArkUI_CustomSpanDrawInfo* OH_ArkUI_CustomSpanDrawInfo_Create(void); 3537 3538 /** 3539 * @brief Disposes of drawing information for this custom span. 3540 * 3541 * @param info The CustomSpanDrawInfo instance to be destroyed. 3542 * @since 12 3543 */ 3544 void OH_ArkUI_CustomSpanDrawInfo_Dispose(ArkUI_CustomSpanDrawInfo* info); 3545 3546 /** 3547 * @brief Obtains the x-axis offset of the custom span relative to the mounted component. 3548 * 3549 * @param info Indicates the pointer to the drawing information of a custom span. 3550 * @return Returns the x-axis offset. If a parameter error occurs, <b>0.0f</b> is returned. 3551 * <br> Possible causes: Parameter verification failed, the parameter should not be nullptr. 3552 * @since 12 3553 */ 3554 float OH_ArkUI_CustomSpanDrawInfo_GetXOffset(ArkUI_CustomSpanDrawInfo* info); 3555 3556 /** 3557 * @brief Obtains the top margin of the custom span relative to the mounted component. 3558 * 3559 * @param info Indicates the pointer to the drawing information of a custom span. 3560 * @return Returns the top margin. If a parameter error occurs, <b>0.0f</b> is returned. 3561 * <br> Possible causes: Parameter verification failed, the parameter should not be nullptr. 3562 * @since 12 3563 */ 3564 float OH_ArkUI_CustomSpanDrawInfo_GetLineTop(ArkUI_CustomSpanDrawInfo* info); 3565 3566 /** 3567 * @brief Obtains the bottom margin of the custom span relative to the mounted component. 3568 * 3569 * @param info Indicates the pointer to the drawing information of a custom span. 3570 * @return Returns the bottom margin. If a parameter error occurs, <b>0.0f</b> is returned. 3571 * <br> Possible causes: Parameter verification failed, the parameter should not be nullptr. 3572 * @since 12 3573 */ 3574 float OH_ArkUI_CustomSpanDrawInfo_GetLineBottom(ArkUI_CustomSpanDrawInfo* info); 3575 3576 /** 3577 * @brief Obtains the baseline offset of the custom span relative to the mounted component. 3578 * 3579 * @param info Indicates the pointer to the drawing information of a custom span. 3580 * @return Returns the baseline offset. If a parameter error occurs, <b>0.0f</b> is returned. 3581 * <br> Possible causes: Parameter verification failed, the parameter should not be nullptr. 3582 * @since 12 3583 */ 3584 float OH_ArkUI_CustomSpanDrawInfo_GetBaseline(ArkUI_CustomSpanDrawInfo* info); 3585 3586 /** 3587 * @brief Create a image frame from the image path. 3588 * @param src Indicates the image path. 3589 * @return Returns the pointer to the image frame object. 3590 * If a null pointer is returned, the object fails to be created. The possible cause is that 3591 * the src parameter is abnormal, for example, the pointer is null. 3592 * @since 12 3593 */ 3594 ArkUI_ImageAnimatorFrameInfo* OH_ArkUI_ImageAnimatorFrameInfo_CreateFromString(char* src); 3595 3596 /** 3597 * @brief Create a image frame from the drawable descriptor. 3598 * 3599 * @param drawable Indicates the pointer to the drawable descriptor. 3600 * @return Returns the pointer to the image frame object. 3601 * If a null pointer is returned, the object fails to be created. The possible cause is that 3602 * the drawable parameter is abnormal, for example, the pointer is null. 3603 * @since 12 3604 */ 3605 ArkUI_ImageAnimatorFrameInfo* OH_ArkUI_ImageAnimatorFrameInfo_CreateFromDrawableDescriptor( 3606 ArkUI_DrawableDescriptor* drawable); 3607 3608 /** 3609 * @brief Destroy the pointer to the image frame. 3610 * 3611 * @param imageInfo Indicates the pointer to the image frame. 3612 * @since 12 3613 */ 3614 void OH_ArkUI_ImageAnimatorFrameInfo_Dispose(ArkUI_ImageAnimatorFrameInfo* imageInfo); 3615 3616 /** 3617 * @brief Set the width of the image frame. 3618 * 3619 * @param imageInfo Indicates the pointer to the image frame. 3620 * @param width Indicates the width of the image frame, and the unit is PX. 3621 * @since 12 3622 */ 3623 void OH_ArkUI_ImageAnimatorFrameInfo_SetWidth(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t width); 3624 3625 /** 3626 * @brief Get the width of the image frame. 3627 * 3628 * @param imageInfo Indicates the pointer to the image frame. 3629 * @return Return the width of the image frame, and the unit is PX. Return 0 when the imageInfo is null. 3630 * @since 12 3631 */ 3632 int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetWidth(ArkUI_ImageAnimatorFrameInfo* imageInfo); 3633 3634 /** 3635 * @brief Set the height of the image frame. 3636 * 3637 * @param imageInfo Indicates the pointer to the image frame. 3638 * @param height Indicates the height of the image frame, and the unit is PX. 3639 * @since 12 3640 */ 3641 void OH_ArkUI_ImageAnimatorFrameInfo_SetHeight(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t height); 3642 3643 /** 3644 * @brief Get the height of the image frame. 3645 * 3646 * @param imageInfo Indicates the pointer to the image frame. 3647 * @return Return the height of the image frame, and the unit is PX. Return 0 when the imageInfo is null. 3648 * @since 12 3649 */ 3650 int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetHeight(ArkUI_ImageAnimatorFrameInfo* imageInfo); 3651 3652 /** 3653 * @brief Set the vertical coordinate of the image relative to the upper left corner of the widget. 3654 * 3655 * @param imageInfo Indicates the pointer to the image frame. 3656 * @param top Indicates the vertical coordinate of the image relative to the upper left corner of the widget, 3657 * and the unit is PX. 3658 * @since 12 3659 */ 3660 void OH_ArkUI_ImageAnimatorFrameInfo_SetTop(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t top); 3661 3662 /** 3663 * @brief Get the vertical coordinate of the image relative to the upper left corner of the widget. 3664 * 3665 * @param imageInfo Indicates the pointer to the image frame. 3666 * @return Returns the vertical coordinate of the image relative to the upper left corner of the widget, 3667 * and the unit is PX. Return 0 when the imageInfo is null. 3668 * @since 12 3669 */ 3670 int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetTop(ArkUI_ImageAnimatorFrameInfo* imageInfo); 3671 3672 /** 3673 * @brief Set the horizontal coordinate of the image relative to the upper left corner of the widget. 3674 * 3675 * @param imageInfo Indicates the pointer to the image frame. 3676 * @param left Indicates the horizontal coordinate of the image relative to the upper left corner of the widget, 3677 * and the unit is PX. 3678 * @since 12 3679 */ 3680 void OH_ArkUI_ImageAnimatorFrameInfo_SetLeft(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t left); 3681 3682 /** 3683 * @brief Get the horizontal coordinate of the image relative to the upper left corner of the widget. 3684 * 3685 * @param imageInfo Indicates the pointer to the image frame. 3686 * @return Returns the horizontal coordinate of the image relative to the upper left corner of the widget, 3687 * and the unit is PX. Return 0 when the imageInfo is null. 3688 * @since 12 3689 */ 3690 int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetLeft(ArkUI_ImageAnimatorFrameInfo* imageInfo); 3691 3692 /** 3693 * @brief Set the playback duration of the image frame. 3694 * 3695 * @param imageInfo Indicates the pointer to the image frame. 3696 * @param duration Indicates the playback duration of each image frame, and the unit is milliseconds. 3697 * @since 12 3698 */ 3699 void OH_ArkUI_ImageAnimatorFrameInfo_SetDuration(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t duration); 3700 3701 /** 3702 * @brief Get the playback duration of the image frame. 3703 * 3704 * @param imageInfo Indicates the pointer to the image frame. 3705 * @return Returns the playback duration of the image frame, and the unit is milliseconds. 3706 * Return 0 when the imageInfo is null. 3707 * @since 12 3708 */ 3709 int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetDuration(ArkUI_ImageAnimatorFrameInfo* imageInfo); 3710 3711 /** 3712 * @brief Create accessibility state. 3713 * 3714 * @return Returns the pointer to the accessibility state object. 3715 * If a null pointer is returned, the object fails to be created. The possible cause is that the address space is full. 3716 * @since 12 3717 */ 3718 ArkUI_AccessibilityState* OH_ArkUI_AccessibilityState_Create(void); 3719 3720 /** 3721 * @brief Dispose accessibility state. 3722 * 3723 * @param state accessibility state object. 3724 * @since 12 3725 */ 3726 void OH_ArkUI_AccessibilityState_Dispose(ArkUI_AccessibilityState* state); 3727 3728 /** 3729 * @brief Set accessibility state disabled. 3730 * 3731 * @param state accessibility state object. 3732 * @param isDisabled accessibility state disabled, Value 1 indicates disabled and 0 indicates enbled. 3733 * @since 12 3734 */ 3735 void OH_ArkUI_AccessibilityState_SetDisabled(ArkUI_AccessibilityState* state, int32_t isDisabled); 3736 3737 /** 3738 * @brief Get accessibility state disabled. 3739 * 3740 * @param state accessibility state object. 3741 * @return accessibility state disabled, Value 1 indicates disabled and 0 indicates enbled. The default value is 0. 3742 * If the function parameter is abnormal, return the default value. 3743 * @since 12 3744 */ 3745 int32_t OH_ArkUI_AccessibilityState_IsDisabled(ArkUI_AccessibilityState* state); 3746 3747 /** 3748 * @brief Set accessibility state selected. 3749 * 3750 * @param state accessibility state object. 3751 * @param isSelected accessibility state selected, Value 1 indicates selected, and 0 indicates not selected. 3752 * The default value is 0. 3753 * @since 12 3754 */ 3755 void OH_ArkUI_AccessibilityState_SetSelected(ArkUI_AccessibilityState* state, int32_t isSelected); 3756 3757 /** 3758 * @brief Get accessibility state selected. 3759 * 3760 * @param state accessibility state object. 3761 * @return accessibility state selected, Value 1 indicates selected, and 0 indicates not selected. 3762 * The default value is 0. 3763 * If the function parameter is abnormal, return the default value. 3764 * @since 12 3765 */ 3766 int32_t OH_ArkUI_AccessibilityState_IsSelected(ArkUI_AccessibilityState* state); 3767 3768 /** 3769 * @brief Set accessibility checked state. 3770 * 3771 * @param state accessibility state object. 3772 * @param checkedState checked state, and uses the {@link ArkUI_AccessibilityCheckedState} enumeration value, 3773 * The default value is ARKUI_ACCESSIBILITY_UNCHECKED. 3774 * @since 12 3775 */ 3776 void OH_ArkUI_AccessibilityState_SetCheckedState(ArkUI_AccessibilityState* state, int32_t checkedState); 3777 3778 /** 3779 * @brief Get accessibility checked state. 3780 * 3781 * @param state accessibility state object. 3782 * @return checked state, and uses the {@link ArkUI_AccessibilityCheckedState} enumeration value, 3783 * The default value is ARKUI_ACCESSIBILITY_UNCHECKED. 3784 * If the function parameter is abnormal, return the default value. 3785 * @since 12 3786 */ 3787 int32_t OH_ArkUI_AccessibilityState_GetCheckedState(ArkUI_AccessibilityState* state); 3788 3789 /** 3790 * @brief Create accessibility value. 3791 * 3792 * @return Returns the pointer to the accessibility state object. 3793 * If a null pointer is returned, the object fails to be created. The possible cause is that the address space is full. 3794 * @since 12 3795 */ 3796 ArkUI_AccessibilityValue* OH_ArkUI_AccessibilityValue_Create(void); 3797 3798 /** 3799 * @brief Dispose accessibility value. 3800 * 3801 * @param state accessibility value object. 3802 * @since 12 3803 */ 3804 void OH_ArkUI_AccessibilityValue_Dispose(ArkUI_AccessibilityValue* value); 3805 3806 /** 3807 * @brief Set accessibility minimum value. 3808 * 3809 * @param value accessibility value object. 3810 * @param min minimum value based on range components, The default value is -1. 3811 * @since 12 3812 */ 3813 void OH_ArkUI_AccessibilityValue_SetMin(ArkUI_AccessibilityValue* value, int32_t min); 3814 3815 /** 3816 * @brief Get accessibility minimum value. 3817 * 3818 * @param value accessibility value object. 3819 * @return minimum value based on range components, The default value is -1. 3820 * If the function parameter is abnormal, return -1. 3821 * @since 12 3822 */ 3823 int32_t OH_ArkUI_AccessibilityValue_GetMin(ArkUI_AccessibilityValue* value); 3824 3825 /** 3826 * @brief Set accessibility minimum value. 3827 * 3828 * @param value accessibility value object. 3829 * @param max maximum value based on range components, The default value is -1. 3830 * @since 12 3831 */ 3832 void OH_ArkUI_AccessibilityValue_SetMax(ArkUI_AccessibilityValue* value, int32_t max); 3833 3834 /** 3835 * @brief Get accessibility minimum value. 3836 * 3837 * @param value accessibility value object. 3838 * @return maximum value based on range components, The default value is -1. 3839 * If the function parameter is abnormal, return -1. 3840 * @since 12 3841 */ 3842 int32_t OH_ArkUI_AccessibilityValue_GetMax(ArkUI_AccessibilityValue* value); 3843 3844 /** 3845 * @brief Set accessibility current value. 3846 * 3847 * @param value accessibility value object. 3848 * @param current value based on range components, The default value is -1. 3849 * @since 12 3850 */ 3851 void OH_ArkUI_AccessibilityValue_SetCurrent(ArkUI_AccessibilityValue* value, int32_t current); 3852 3853 /** 3854 * @brief Get accessibility current value. 3855 * 3856 * @param value accessibility value object. 3857 * @return current value based on range components, The default value is -1. 3858 * If the function parameter is abnormal, return -1. 3859 * @since 12 3860 */ 3861 int32_t OH_ArkUI_AccessibilityValue_GetCurrent(ArkUI_AccessibilityValue* value); 3862 3863 /** 3864 * @brief Set accessibility text value. 3865 * 3866 * @param value accessibility value object. 3867 * @param text The textual description information of the component, which defaults to an empty string. 3868 * @since 12 3869 */ 3870 void OH_ArkUI_AccessibilityValue_SetText(ArkUI_AccessibilityValue* value, const char* text); 3871 3872 /** 3873 * @brief Get accessibility text value. 3874 * 3875 * @param value accessibility value object. 3876 * @return The textual description information of the component, which defaults to an empty string; 3877 * If the function parameter is abnormal, return null. 3878 * @since 12 3879 */ 3880 const char* OH_ArkUI_AccessibilityValue_GetText(ArkUI_AccessibilityValue* value); 3881 #ifdef __cplusplus 3882 }; 3883 #endif 3884 3885 #endif // ARKUI_NATIVE_TYPE_H 3886 /** @} */ 3887