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