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