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