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