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