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