openharmony 鸿蒙 capi-native-type-h

2026-08-25 浏览 (1)

native_type.h

Overview

Defines the common types for the native module.

File to include: <arkui/native_type.h>

Library: libace_ndk.z.so

System capability: SystemCapability.ArkUI.ArkUI.Full

Since: 12

Related module: ArkUI_NativeModule

Sample: native_type_sample

Summary

Structs

Nametypedef KeywordDescription
ArkUI_NodeArkUI_NodeDefines an ArkUI native component object.
ArkUI_ContextCallbackArkUI_ContextCallbackDefines event callback.
ArkUI_NumberValueArkUI_NumberValueProvides the number types of ArkUI on the native side.
ARKUI_TextPickerRangeContentARKUI_TextPickerRangeContentDefines the struct of the single-column text picker with image resources.
ARKUI_TextPickerCascadeRangeContentARKUI_TextPickerCascadeRangeContentDefines the struct of the interconnected multi-column text picker.
ArkUI_ColorStopArkUI_ColorStopDefines a gradient color stop.
ArkUI_RectArkUI_RectDefines a mask area.
ArkUI_IntSizeArkUI_IntSizeDescribes the width and height of a component.
ArkUI_IntOffsetArkUI_IntOffsetDescribes the position of a component.
ArkUI_MarginArkUI_MarginDescribes the margins of a component.
ArkUI_TranslationOptionsArkUI_TranslationOptionsDefines the translation options for component transition.
ArkUI_ScaleOptionsArkUI_ScaleOptionsDefines the scaling options for component transition.
ArkUI_RotationOptionsArkUI_RotationOptionsDefines the rotation options for component transition.
ArkUI_NativeDialogArkUI_NativeDialogDefines a custom dialog box controller object for ArkUI on the native side.
ArkUI_LayoutConstraintArkUI_LayoutConstraintDefines layout constraints for a component.
ArkUI_DrawContextArkUI_DrawContextDefines the component drawing context.
ArkUI_Node*ArkUI_NodeHandleDefines the pointer to the ArkUI native component object.
ArkUI_NativeDialog*ArkUI_NativeDialogHandleDefines the handle to the custom dialog box controller of ArkUI on the native side.
ArkUI_GridItemSizeArkUI_GridItemSizeDefines the return value structure for the onGetIrregularSizeByIndex callback in Grid layout options.
ArkUI_GridItemRectArkUI_GridItemRectDefines the return value structure for the onGetRectByIndex callback in Grid layout options.
ArkUI_GridLayoutOptionsArkUI_GridLayoutOptionsDefines the Grid layout options.
ArkUI_WaterFlowSectionOptionArkUI_WaterFlowSectionOptionDefines the FlowItem section configuration.
ArkUI_ListItemSwipeActionItemArkUI_ListItemSwipeActionItemDefines the item configuration for ListItemSwipeActionOption.
ArkUI_ListItemSwipeActionOptionArkUI_ListItemSwipeActionOptionDefines the configuration for ListItemSwipeActionOption.
ArkUI_ContextArkUI_ContextDefines a context object of the ArkUI native UI.
ArkUI_Context*ArkUI_ContextHandleDefines the handle to the ArkUI native UI context.
ArkUI_NodeContent*ArkUI_NodeContentHandleDefines the handle to the ArkUI NodeContent instance on the native side.
ArkUI_AlignmentRuleOptionArkUI_AlignmentRuleOptionDefines the alignment rule in the relative container.
ArkUI_GuidelineOptionArkUI_GuidelineOptionDefines the ID, direction, and position of a guideline.
ArkUI_BarrierOptionArkUI_BarrierOptionDefines the ID, direction, and referenced component of a barrier.
ArkUI_ImageAnimatorFrameInfoArkUI_ImageAnimatorFrameInfoDefines the image frame information.
ArkUI_ListChildrenMainSizeArkUI_ListChildrenMainSizeDefines the ChildrenMainSize information of the List component.
ArkUI_ProgressLinearStyleOptionArkUI_ProgressLinearStyleOptionDefines a struct for the linear progress indicator style.
ArkUI_CustomPropertyArkUI_CustomPropertyDefines a struct for the custom property information.
ArkUI_HostWindowInfoArkUI_HostWindowInfoDefines a struct for the host window information.
ArkUI_ActiveChildrenInfoArkUI_ActiveChildrenInfoDefines a struct for active child node information.
ArkUI_CrossLanguageOptionArkUI_CrossLanguageOptionDefines a cross-language configuration option.
AbilityBase_WantAbilityBase_WantDeclares a Want object.
ArkUI_EmbeddedComponentOptionArkUI_EmbeddedComponentOptionDefines the EmbeddedComponentOption parameter for EmbeddedComponent.
ArkUI_AccessibilityStateArkUI_AccessibilityStateDefines a struct for the component accessibility state.
ArkUI_AccessibilityValueArkUI_AccessibilityValueDefines a struct for the component accessibility value.
ArkUI_SystemFontStyleEventArkUI_SystemFontStyleEventDefines a struct for the system font style event.
ArkUI_CustomSpanMeasureInfoArkUI_CustomSpanMeasureInfoDefines a struct for the measurement information of a custom span.
ArkUI_CustomSpanMetricsArkUI_CustomSpanMetricsDefines a struct for the measurement metrics of a custom span.
ArkUI_CustomSpanDrawInfoArkUI_CustomSpanDrawInfoDefines a struct for the drawing information of a custom span.
ArkUI_SwiperIndicatorArkUI_SwiperIndicatorDefines the style of the navigation indicator for the Swiper component.
ArkUI_SwiperDigitIndicatorArkUI_SwiperDigitIndicatorDefines the style of the digit navigation indicator for the Swiper component.
ArkUI_SwiperArrowStyleArkUI_SwiperArrowStyleDefines the navigation arrow style for the Swiper component.
ArkUI_StyledString_DescriptorArkUI_StyledString_DescriptorDefines a struct for the styled string descriptor object supported by the text component.
ArkUI_SnapshotOptionsArkUI_SnapshotOptionsDefines snapshot options.
ArkUI_TextPickerRangeContentArrayArkUI_TextPickerRangeContentArrayDefines the data selection list for the text picker.
ArkUI_TextCascadePickerRangeContentArrayArkUI_TextCascadePickerRangeContentArrayDefines the content array for a multi-column cascading data picker.
ArkUI_SelectionOptionsArkUI_SelectionOptionsDefines options of the selection operation.
ArkUI_VisibleAreaEventOptionsArkUI_VisibleAreaEventOptionsDefines the created instance of visible area change event parameters.
ArkUI_PositionEdgesArkUI_PositionEdgesProvides position parameters relative to the boundaries of the container's content area.
ArkUI_PixelRoundPolicyArkUI_PixelRoundPolicyDefines a struct for the component pixel rounding policy.
ArkUI_ContentTransitionEffectArkUI_ContentTransitionEffectDefines the content transition effect.
ArkUI_ShowCounterConfigArkUI_ShowCounterConfigDefines the text input character counter configuration.
ArkUI_TextContentBaseControllerArkUI_TextContentBaseControllerDefines the basic controller for text.
ArkUI_TextMenuItemArkUI_TextMenuItemDefines the text menu item structure.
ArkUI_TextMenuItemArrayArkUI_TextMenuItemArrayDefines the text menu item array structure.
ArkUI_TextEditMenuOptionsArkUI_TextEditMenuOptionsDefines the text menu extension structure.
ArkUI_TextSelectionMenuOptionsArkUI_TextSelectionMenuOptionsDefines the custom text selection menu structure.
ArkUI_SelectedDragPreviewStyleArkUI_SelectedDragPreviewStyleDefines the drag preview style of the selected text.
ArkUI_MotionPathOptionsArkUI_MotionPathOptionsDefines the motion path option for path animation.
ArkUI_PickerIndicatorBackgroundArkUI_PickerIndicatorBackgroundDefines the style parameter of the background-style indicator.
ArkUI_PickerIndicatorDividerArkUI_PickerIndicatorDividerDefines the style parameter of the divider-style indicator.
ArkUI_PickerIndicatorStyleArkUI_PickerIndicatorStyleDefines the style of the selected item indicator.
ArkUI_TextMarqueeOptionsArkUI_TextMarqueeOptionsDefines marquee options for text.
ArkUI_Matrix4ArkUI_Matrix4Defines a fourth-order matrix object.
ArkUI_Matrix4RotationOptionsArkUI_Matrix4RotationOptionsDefines a matrix rotation object.
ArkUI_Matrix4ScaleOptionsArkUI_Matrix4ScaleOptionsDefines a matrix scaling object.
ArkUI_Matrix4TranslationOptionsArkUI_Matrix4TranslationOptionsDefines a matrix translation object.
ArkUI_PointFArkUI_PointFDefines a two-dimensional coordinate point struct, where the coordinates are stored as floating-point numbers.
OH_ArkUI_DecorationStyleOptionsOH_ArkUI_DecorationStyleOptionsDefines decoration style options.
OH_ArkUI_TextDataDetectorConfigOH_ArkUI_TextDataDetectorConfigDefines the configuration of text entity recognition.
OH_ArkUI_TextEditorSelectionMenuOptionsOH_ArkUI_TextEditorSelectionMenuOptionsDefines the text selection menu options of the text editor.
OH_ArkUI_TextEditorPlaceholderOptionsOH_ArkUI_TextEditorPlaceholderOptionsDefines the hint text options when no content is entered in the text editor.
OH_ArkUI_TextEditorStyledStringControllerOH_ArkUI_TextEditorStyledStringControllerDefines the styled string controller of the text editor.
OH_ArkUI_TextEditorParagraphStyleOH_ArkUI_TextEditorParagraphStyleDefines the paragraph style of the text editor.
OH_ArkUI_ShadowOptionsOH_ArkUI_ShadowOptionsDefines shadow options.
OH_ArkUI_TextEditorTextStyleOH_ArkUI_TextEditorTextStyleDefines the text style of the text editor.
OH_ArkUI_FontWeightConfigsOH_ArkUI_FontWeightConfigsDefines the font weight configuration of text. OH_ArkUI_FontWeightConfigs_Create can be used to create a text font weight configuration object. OH_ArkUI_FontWeightConfigs_Destroy can be used to destroy the text font weight configuration object. OH_ArkUI_FontWeightConfigs_SetEnableVariableFontWeight can be used to set whether to enable variable font weight adjustment after the object is created. OH_ArkUI_FontWeightConfigs_GetEnableVariableFontWeight can be used to check whether variable font weight adjustment is enabled after the object is created. OH_ArkUI_FontWeightConfigs_SetEnableDeviceFontWeightCategory can be used to set whether the text font weight is updated with the font weight level of the device after the object is created. OH_ArkUI_FontWeightConfigs_GetEnableDeviceFontWeightCategory can be used to check whether the text font weight is updated with the font weight level of the device after the object is created.
OH_ArkUI_FontConfigsOH_ArkUI_FontConfigsDefines the font configuration of text. OH_ArkUI_FontConfigs_Create can be used to create a text font configuration object. OH_ArkUI_FontConfigs_Destroy can be used to destroy the text font configuration object. OH_ArkUI_FontConfigs_SetFontWeightConfigs can be used to set the text font weight after the object is created. OH_ArkUI_FontConfigs_GetFontWeightConfigs can be used to view the text font weight after the object is created.
OH_ArkUI_TextControllerOH_ArkUI_TextControllerDefines a text component controller. OH_ArkUI_TextController_Create can be used to create a text component controller object. OH_ArkUI_TextController_Destroy can be used to destroy the text component controller object. After the object is created, OH_ArkUI_TextController_SetStyledString can be used to set a styled string for the text component.

Enums

Nametypedef KeywordDescription
ArkUI_AlignmentArkUI_AlignmentEnumerates the alignment modes.
ArkUI_ImageRepeatArkUI_ImageRepeatEnumerates the image repeat patterns.
ArkUI_FontStyleArkUI_FontStyleEnumerates the font styles.
ArkUI_FontWeightArkUI_FontWeightEnumerates the font weights.
ArkUI_TextAlignmentArkUI_TextAlignmentEnumerates text alignment modes.
ArkUI_TextVerticalAlignmentArkUI_TextVerticalAlignmentEnumerates text vertical alignment styles.
ArkUI_EnterKeyTypeArkUI_EnterKeyTypeEnumerates the types of the Enter key for a single-line text box.
ArkUI_TextInputTypeArkUI_TextInputTypeEnumerates the input method type of a single-line text.
ArkUI_TextAreaTypeArkUI_TextAreaTypeEnumerates the input method types of a multi-line text.
ArkUI_CancelButtonStyleArkUI_CancelButtonStyleEnumerates the styles of the Cancel button.
ArkUI_XComponentTypeArkUI_XComponentTypeEnumerates the types of the XComponent component.
ArkUI_ProgressTypeArkUI_ProgressTypeEnumerates the styles of the progress indicator.
ArkUI_TextDecorationTypeArkUI_TextDecorationTypeEnumerates the text decoration types.
ArkUI_TextDecorationStyleArkUI_TextDecorationStyleEnumerates the text decoration styles.
ArkUI_TextCaseArkUI_TextCaseEnumerates the text cases.
ArkUI_CopyOptionsArkUI_CopyOptionsEnumerates the text copy and paste modes.
ArkUI_ShadowTypeArkUI_ShadowTypeEnumerates shadow types.
ArkUI_DatePickerModeArkUI_DatePickerModeEnumerates the column display modes of the date picker.
ArkUI_TextPickerRangeTypeArkUI_TextPickerRangeTypeEnumerates the types of the text picker.
ArkUI_AccessibilityCheckedStateArkUI_AccessibilityCheckedStateEnumerates the accessibility check box states.
ArkUI_AccessibilityActionTypeArkUI_AccessibilityActionTypeEnumerates the accessibility action types.
ArkUI_EdgeEffectArkUI_EdgeEffectEnumerates the effects used at the edges of the component when the boundary of the scrollable content is reached.
ArkUI_BarStateArkUI_BarStateEnumerates the text control scrollbar states.
ArkUI_EffectEdgeArkUI_EffectEdgeEnumerates the edges for which the effect takes effect when the boundary of the scrollable content is reached.
ArkUI_ScrollDirectionArkUI_ScrollDirectionEnumerates the scrolling directions of the Scroll component.
ArkUI_ScrollSnapAlignArkUI_ScrollSnapAlignEnumerates the alignment modes of list items when scrolling ends.
ArkUI_ScrollBarDisplayModeArkUI_ScrollBarDisplayModeEnumerates the scrollbar display modes.
ArkUI_AxisArkUI_AxisEnumerates the scroll directions.
ArkUI_StickyStyleArkUI_StickyStyleEnumerates the modes for pinning the header to the top or the footer to the bottom.
ArkUI_ContentClipModeArkUI_ContentClipModeEnumerates the content clipping modes of scrollable components.
ArkUI_WaterFlowLayoutModeArkUI_WaterFlowLayoutModeEnumerates the layout modes of the WaterFlow component.
ArkUI_BorderStyleArkUI_BorderStyleEnumerates the border styles.
ArkUI_HitTestModeArkUI_HitTestModeEnumerates the hit test modes.
ArkUI_ShadowStyleArkUI_ShadowStyleEnumerates shadow styles.
ArkUI_AnimationCurveArkUI_AnimationCurveEnumerates the animation curves.
ArkUI_SwiperArrowArkUI_SwiperArrowEnumerates arrow styles of the navigation indicator.
ArkUI_SwiperNestedScrollModeArkUI_SwiperNestedScrollModeEnumerates the nested scrolling modes of the Swiper component and its parent container.
ArkUI_PageFlipModeArkUI_PageFlipModeEnumerates the page flipping modes using the mouse wheel for the Swiper component.
ArkUI_SwiperAnimationModeArkUI_SwiperAnimationModeEnumerates the animation modes for the Swiper component when jumping to the page with the specified index.
ArkUI_AccessibilityModeArkUI_AccessibilityModeEnumerates the accessibility modes.
ArkUI_TextCopyOptionsArkUI_TextCopyOptionsEnumerates copy options, which define whether copy and paste is allowed for text content.
ArkUI_TextHeightAdaptivePolicyArkUI_TextHeightAdaptivePolicyDefines how the adaptive height is determined for the text.
ArkUI_ScrollNestedModeArkUI_ScrollNestedModeEnumerates nested scrolling modes.
ArkUI_ScrollEdgeArkUI_ScrollEdgeEnumerates the edges to which the component scrolls.
ArkUI_ScrollAlignmentArkUI_ScrollAlignmentDefines how the list item to scroll to is aligned with the container.
ArkUI_ScrollStateArkUI_ScrollStateEnumerates the scrolling states.
ArkUI_SliderBlockStyleArkUI_SliderBlockStyleEnumerates the styles of the slider in the block direction.
ArkUI_SliderDirectionArkUI_SliderDirectionEnumerates the scroll directions of the slider.
ArkUI_SliderStyleArkUI_SliderStyleEnumerates the slider styles.
ArkUI_CheckboxShapeArkUI_CheckboxShapeEnumerates the shapes of the check box.
ArkUI_AnimationPlayModeArkUI_AnimationPlayModeEnumerates the animation playback modes.
ArkUI_ImageSizeArkUI_ImageSizeDefines the image size.
ArkUI_AdaptiveColorArkUI_AdaptiveColorEnumerates the adaptive color modes.
ArkUI_ColorModeArkUI_ColorModeEnumerates the color modes.
ArkUI_SystemColorModeArkUI_SystemColorModeEnumerates the system color modes.
ArkUI_BlurStyleArkUI_BlurStyleEnumerates the blur styles.
ArkUI_BlurStyleActivePolicyArkUI_BlurStyleActivePolicyEnumerates the activation policies for the background blur effect.
ArkUI_VerticalAlignmentArkUI_VerticalAlignmentEnumerates the vertical alignment modes.
ArkUI_HorizontalAlignmentArkUI_HorizontalAlignmentEnumerates the alignment mode in the horizontal direction.
ArkUI_TextOverflowArkUI_TextOverflowEnumerates the display modes when the text is too long.
ArkUI_ImageSpanAlignmentArkUI_ImageSpanAlignmentEnumerates the alignment mode of the image with the text.
ArkUI_ObjectFitArkUI_ObjectFitEnumerates the image filling effects of the Image component.
ArkUI_ImageInterpolationArkUI_ImageInterpolationEnumerates the image interpolation effects.
ArkUI_DynamicRangeModeArkUI_DynamicRangeModeEnumerates the dynamic range modes (for example, SDR/HDR) for images, controlling the display range of image brightness and color gamut.
ArkUI_ImageRotateOrientationArkUI_ImageRotateOrientationEnumerates image rotation directions.
ArkUI_BlendModeArkUI_BlendModeEnumerates the blend modes.
ArkUI_DirectionArkUI_DirectionEnumerates the modes in which components are laid out along the main axis of the container.
ArkUI_ItemAlignmentArkUI_ItemAlignmentEnumerates the modes in which components are laid out along the cross axis of the container.
ArkUI_ColorStrategyArkUI_ColorStrategyEnumerates foreground and shadow colors.
ArkUI_FlexAlignmentArkUI_FlexAlignmentEnumerates the vertical alignment modes.
ArkUI_FlexDirectionArkUI_FlexDirectionEnumerates the directions of the main axis in the flex container.
ArkUI_FlexWrapArkUI_FlexWrapDefines whether the flex container has a single line or multiple lines.
ArkUI_VisibilityArkUI_VisibilityEnumerates the visibility values.
ArkUI_CalendarAlignmentArkUI_CalendarAlignmentEnumerates the alignment modes between the calendar picker and the entry component.
ArkUI_MaskTypeArkUI_MaskTypeEnumerates the mask types. A mask is a means to limit the display area of a component. It uses a specific shape to crop the component content so that only the content in the mask area is visible.
ArkUI_ClipTypeArkUI_ClipTypeEnumerates the clipping region types.
ArkUI_ShapeTypeArkUI_ShapeTypeEnumerates custom shape types.
ArkUI_LinearGradientDirectionArkUI_LinearGradientDirectionEnumerates the gradient directions.
ArkUI_WordBreakArkUI_WordBreakEnumerates the word break rules.
ArkUI_EllipsisModeArkUI_EllipsisModeEnumerates the ellipsis positions.
ArkUI_ImageRenderModeArkUI_ImageRenderModeEnumerates the image rendering modes.
ArkUI_TransitionEdgeArkUI_TransitionEdgeEnumerates the slide-in and slide-out positions of the component from the screen edge during transition.
ArkUI_FinishCallbackTypeArkUI_FinishCallbackTypeEnumerates the callback types for OH_ArkUI_AnimatorOption_RegisterOnFinishCallback in an animation.
ArkUI_ListItemAlignmentArkUI_ListItemAlignmentEnumerates the alignment modes of items along the cross axis.
ArkUI_BlendApplyTypeArkUI_BlendApplyTypeDefines how the specified blend mode is applied.
ArkUI_LengthMetricUnitArkUI_LengthMetricUnitEnumerates the component units.
ArkUI_TextInputContentTypeArkUI_TextInputContentTypeEnumerates the autofill types.
ArkUI_BarrierDirectionArkUI_BarrierDirectionEnumerates the barrier directions.
ArkUI_RelativeLayoutChainStyleArkUI_RelativeLayoutChainStyleEnumerates the chain styles.
ArkUI_TextInputStyleArkUI_TextInputStyleEnumerates the text input styles.
ArkUI_KeyboardAppearanceArkUI_KeyboardAppearanceEnumerates the appearance modes of the keyboard when the text box is focused.
ArkUI_TextDataDetectorTypeArkUI_TextDataDetectorTypeEnumerates the entity types of text recognition.
ArkUI_ButtonTypeArkUI_ButtonTypeEnumerates the button types.
ArkUI_RenderFitArkUI_RenderFitEnumerates the sizing and positioning behaviors of animated content in its final state.
ArkUI_SwiperIndicatorTypeArkUI_SwiperIndicatorTypeEnumerates the navigation indicator types of the Swiper component.
ArkUI_AnimationDirectionArkUI_AnimationDirectionEnumerates the animation playback directions.
ArkUI_ListItemSwipeActionStateArkUI_ListItemSwipeActionStateEnumerates the item states of swipeAction of the Listitem component.
ArkUI_ListItemSwipeEdgeEffectArkUI_ListItemSwipeEdgeEffectEnumerates the item edge effects of swipeAction of the Listitem component.
ArkUI_ListItemSwipeActionDirectionArkUI_ListItemSwipeActionDirectionEnumerates the swipe action menu display directions for ListItem components.
ArkUI_AnimationStatusArkUI_AnimationStatusEnumerates the playback states of the frame-by-frame animation.
ArkUI_AnimationFillModeArkUI_AnimationFillModeEnumerates the states before and after execution of the frame-by-frame animation.
ArkUI_ErrorCodeArkUI_ErrorCodeEnumerates the error codes.
ArkUI_ScrollSourceArkUI_ScrollSourceEnumerates scroll sources.
ArkUI_SafeAreaTypeArkUI_SafeAreaTypeEnumerates the types of expanded safe areas.
ArkUI_SafeAreaEdgeArkUI_SafeAreaEdgeEnumerates the edges for expanding the safe area.
ArkUI_FocusMoveArkUI_FocusMoveEnumerates the focus movement directions.
ArkUI_ListItemGroupAreaArkUI_ListItemGroupAreaEnumerates areas of the ListItemGroup component.
ArkUI_KeyboardAvoidModeArkUI_KeyboardAvoidModeEnumerates the soft keyboard avoidance modes.
ArkUI_HoverModeAreaTypeArkUI_HoverModeAreaTypeEnumerates the types of display areas for the hover mode.
ArkUI_ExpandModeArkUI_ExpandModeEnumerates the expansion mode of child nodes.
ArkUI_NavDestinationStateArkUI_NavDestinationStateEnumerates the NavDestination component states.
ArkUI_RouterPageStateArkUI_RouterPageStateEnumerates the states of a page during routing.
ArkUI_UIStateArkUI_UIStateEnumerates the UI states of a component, used for handling state-specific styles.
ArkUI_FocusWrapModeArkUI_FocusWrapModeEnumerates the focus wrap mode of components.
ArkUI_ItemFillPolicyArkUI_ItemFillPolicyEnumerates preset column layouts for different responsive breakpoints.
ArkUI_EdgeDirectionArkUI_EdgeDirectionEnumerates rectangle edge directions.
ArkUI_CornerDirectionArkUI_CornerDirectionEnumerates corner directions.
ArkUI_LayoutPolicyArkUI_LayoutPolicyEnumerates layout policies.
ArkUI_PixelRoundCalcPolicyArkUI_PixelRoundCalcPolicyEnumerates pixel rounding calculation policies.
ArkUI_GridItemStyleArkUI_GridItemStyleEnumerates styles of grid items.
ArkUI_MenuPolicyArkUI_MenuPolicyEnumerates menu display policies.
ArkUI_ResponseRegionSupportedToolArkUI_ResponseRegionSupportedToolEnumerates the input tool types supported for response region configuration.
ArkUI_TextMenuItemIdArkUI_TextMenuItemIdEnumerates the IDs of text menu items.
ArkUI_TextSpanTypeArkUI_TextSpanTypeEnumerates the text recognition types of a custom text selection menu.
ArkUI_TextResponseTypeArkUI_TextResponseTypeEnumerates the response types of a custom text selection menu.
ArkUI_HoverEffectArkUI_HoverEffectEnumerates the hover effects when a component is hovered over.
ArkUI_FocusPriorityArkUI_FocusPriorityEnumerates the priority levels for focus management within the application. These levels determine the sequence in which UI components receive focus during user interaction.
ArkUI_LayoutSafeAreaTypeArkUI_LayoutSafeAreaTypeEnumerates the types of expanded safe areas.
ArkUI_LayoutSafeAreaEdgeArkUI_LayoutSafeAreaEdgeEnumerates the edges for expanding the safe area.
ArkUI_LocalizedAlignmentArkUI_LocalizedAlignmentDefines the alignment rules of child components in the Stack container.
ArkUI_RenderStrategyArkUI_RenderStrategyDefines rendering strategies for drawing rounded corners.
ArkUI_MarqueeStartPolicyArkUI_MarqueeStartPolicyDefines the start policy of a marquee.
ArkUI_MarqueeUpdatePolicyArkUI_MarqueeUpdatePolicyDefines the update policy of a marquee.
ArkUI_PickerIndicatorTypeArkUI_PickerIndicatorTypeDefines the indicator type of the selected item.
OH_ArkUI_HapticFeedbackModeOH_ArkUI_HapticFeedbackModeEnumerates vibration effect types.
OH_ArkUI_TextEditorSpanTypeOH_ArkUI_TextEditorSpanTypeEnumerates the span types of a custom text selection menu.
OH_ArkUI_TextEditorResponseTypeOH_ArkUI_TextEditorResponseTypeEnumerates the response types of a custom text selection menu.
OH_ArkUI_TextMenuTypeOH_ArkUI_TextMenuTypeEnumerates text menu types.
OH_ArkUI_LineBreakStrategyOH_ArkUI_LineBreakStrategyEnumerates line break policies.

Functions

Nametypedef KeywordDescription
ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Create()-Creates layout constraints.
ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Copy(const ArkUI_LayoutConstraint* Constraint)-Performs a deep copy of a layout constraint.
void* OH_ArkUI_LayoutConstraint_Dispose(ArkUI_LayoutConstraint* Constraint)-Disposes of a layout constraint pointer.
int32_t OH_ArkUI_LayoutConstraint_GetMaxWidth(const ArkUI_LayoutConstraint* Constraint)-Obtains the maximum width using a layout constraint, in px.
int32_t OH_ArkUI_LayoutConstraint_GetMinWidth(const ArkUI_LayoutConstraint* Constraint)-Obtains the minimum width using a layout constraint, in px.
int32_t OH_ArkUI_LayoutConstraint_GetMaxHeight(const ArkUI_LayoutConstraint* Constraint)-Obtains the maximum height using a layout constraint, in px.
int32_t OH_ArkUI_LayoutConstraint_GetMinHeight(const ArkUI_LayoutConstraint* Constraint)-Obtains the minimum height using a layout constraint, in px.
int32_t OH_ArkUI_LayoutConstraint_GetPercentReferenceWidth(const ArkUI_LayoutConstraint* Constraint)-Obtains the width percentage reference using a layout constraint.
int32_t OH_ArkUI_LayoutConstraint_GetPercentReferenceHeight(const ArkUI_LayoutConstraint* Constraint)-Obtains the height percentage reference using a layout constraint.
void OH_ArkUI_LayoutConstraint_SetMaxWidth(ArkUI_LayoutConstraint* Constraint, int32_t value)-Sets the maximum width.
void OH_ArkUI_LayoutConstraint_SetMinWidth(ArkUI_LayoutConstraint* Constraint, int32_t value)-Sets the minimum width.
void OH_ArkUI_LayoutConstraint_SetMaxHeight(ArkUI_LayoutConstraint* Constraint, int32_t value)-Sets the maximum height.
void OH_ArkUI_LayoutConstraint_SetMinHeight(ArkUI_LayoutConstraint* Constraint, int32_t value)-Sets the minimum height.
void OH_ArkUI_LayoutConstraint_SetPercentReferenceWidth(ArkUI_LayoutConstraint* Constraint, int32_t value)-Sets the width percentage reference.
void OH_ArkUI_LayoutConstraint_SetPercentReferenceHeight(ArkUI_LayoutConstraint* Constraint, int32_t value)-Sets the height percentage reference.
void* OH_ArkUI_DrawContext_GetCanvas(ArkUI_DrawContext* context)-Obtains the pointer to a canvas for drawing, which can be converted into the OH_Drawing_Canvas in the Drawing module.
ArkUI_IntSize OH_ArkUI_DrawContext_GetSize(ArkUI_DrawContext* context)-Obtains the size of a drawing area.
ArkUI_WaterFlowSectionOption* OH_ArkUI_WaterFlowSectionOption_Create()-Creates a water flow section configuration.
void OH_ArkUI_WaterFlowSectionOption_Dispose(ArkUI_WaterFlowSectionOption* option)-Disposes of the pointer to a water flow section configuration.
void OH_ArkUI_WaterFlowSectionOption_SetSize(ArkUI_WaterFlowSectionOption* option, int32_t size)-Sets the array length for a water flow section configuration.
int32_t OH_ArkUI_WaterFlowSectionOption_GetSize(ArkUI_WaterFlowSectionOption* option)-Obtains the array length for a water flow section configuration.
void OH_ArkUI_WaterFlowSectionOption_SetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index, int32_t itemCount)-Sets the number of items in a water flow section.
int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index)-Obtains the number of items in the water flow section that matches the specified index.
void OH_ArkUI_WaterFlowSectionOption_SetCrossCount(ArkUI_WaterFlowSectionOption* option, int32_t index, int32_t crossCount)-Sets the number of columns (in a vertical layout) or rows (in a horizontal layout) of a water flow.
int32_t OH_ArkUI_WaterFlowSectionOption_GetCrossCount(ArkUI_WaterFlowSectionOption* option, int32_t index)-Obtains the number of columns (in a vertical layout) or rows (in a horizontal layout) of a water flow section.
void OH_ArkUI_WaterFlowSectionOption_SetColumnGap(ArkUI_WaterFlowSectionOption* option, int32_t index, float columnGap)-Sets the gap between columns in the specified water flow section.
float OH_ArkUI_WaterFlowSectionOption_GetColumnGap(ArkUI_WaterFlowSectionOption* option, int32_t index)-Obtains the gap between columns in the water flow section that matches the specified index.
void OH_ArkUI_WaterFlowSectionOption_SetRowGap(ArkUI_WaterFlowSectionOption* option, int32_t index, float rowGap)-Sets the gap between rows in the specified water flow section.
float OH_ArkUI_WaterFlowSectionOption_GetRowGap(ArkUI_WaterFlowSectionOption* option, int32_t index)-Obtains the gap between rows in the water flow section that matches the specified index.
void OH_ArkUI_WaterFlowSectionOption_SetMargin(ArkUI_WaterFlowSectionOption* option, int32_t index,float marginTop, float marginRight, float marginBottom, float marginLeft)-Sets the margins for the specified water flow section.
ArkUI_Margin OH_ArkUI_WaterFlowSectionOption_GetMargin(ArkUI_WaterFlowSectionOption* option, int32_t index)-Obtains the margins of the water flow section that matches the specified index.
void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex (ArkUI_WaterFlowSectionOption* option, int32_t index, float(*callback)(int32_t itemIndex))-Obtains the main axis size of a specified water flow item based on itemIndex in the water flow section configuration. To use custom data in the callback, call OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData.
void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData (ArkUI_WaterFlowSectionOption* option, int32_t index, void* userData, float (*callback)(int32_t itemIndex, void* userData))-Obtains the main axis size of a specified water flow item based on itemIndex in the water flow section configuration. The difference between this API and OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex is that this API allows you to pass custom data (userData) and receive the data in the callback function.
ArkUI_GuidelineOption* OH_ArkUI_GuidelineOption_Create(int32_t size)-Creates a guideline configuration for this RelativeContainer component.
void OH_ArkUI_GuidelineOption_Dispose(ArkUI_GuidelineOption* guideline)-Disposes of a guideline configuration.
void OH_ArkUI_GuidelineOption_SetId(ArkUI_GuidelineOption* guideline, const char* value, int32_t index)-Sets the ID of a guideline.
void OH_ArkUI_GuidelineOption_SetDirection(ArkUI_GuidelineOption* guideline, ArkUI_Axis value, int32_t index)-Sets the direction of a guideline.
void OH_ArkUI_GuidelineOption_SetPositionStart(ArkUI_GuidelineOption* guideline, float value, int32_t index)-Sets the distance between a guideline and the left or top of the container.
void OH_ArkUI_GuidelineOption_SetPositionEnd(ArkUI_GuidelineOption* guideline, float value, int32_t index)-Sets the distance between a guideline and the right or bottom of the container.
const char* OH_ArkUI_GuidelineOption_GetId(ArkUI_GuidelineOption* guideline, int32_t index)-Obtains the ID of a guideline.
ArkUI_Axis OH_ArkUI_GuidelineOption_GetDirection(ArkUI_GuidelineOption* guideline, int32_t index)-Obtains the direction of a guideline.
float OH_ArkUI_GuidelineOption_GetPositionStart(ArkUI_GuidelineOption* guideline, int32_t index)-Obtains the distance between a guideline and the left or top of the container.
float OH_ArkUI_GuidelineOption_GetPositionEnd(ArkUI_GuidelineOption* guideline, int32_t index)-Obtains the distance between a guideline and the right or bottom of the container.
ArkUI_BarrierOption* OH_ArkUI_BarrierOption_Create(int32_t size)-Creates a barrier configuration for this RelativeContainer component.
void OH_ArkUI_BarrierOption_Dispose(ArkUI_BarrierOption* barrierStyle)-Disposes of a barrier configuration.
void OH_ArkUI_BarrierOption_SetId(ArkUI_BarrierOption* barrierStyle, const char* value, int32_t index)-Sets the ID of a barrier.
void OH_ArkUI_BarrierOption_SetDirection(ArkUI_BarrierOption* barrierStyle, ArkUI_BarrierDirection value, int32_t index)-Sets the direction of a barrier.
void OH_ArkUI_BarrierOption_SetReferencedId(ArkUI_BarrierOption* barrierStyle, const char* value, int32_t index)-Sets the referenced components of a barrier.
const char* OH_ArkUI_BarrierOption_GetId(ArkUI_BarrierOption* barrierStyle, int32_t index)-Obtains the ID of a barrier.
ArkUI_BarrierDirection OH_ArkUI_BarrierOption_GetDirection(ArkUI_BarrierOption* barrierStyle, int32_t index)-Obtains the direction of a barrier.
const char* OH_ArkUI_BarrierOption_GetReferencedId(ArkUI_BarrierOption* barrierStyle, int32_t index , int32_t referencedIndex)-Obtains the referenced components of a barrier.
int32_t OH_ArkUI_BarrierOption_GetReferencedIdSize(ArkUI_BarrierOption* barrierStyle, int32_t index)-Obtains the number of referenced components of a barrier.
ArkUI_AlignmentRuleOption* OH_ArkUI_AlignmentRuleOption_Create()-Creates an alignment rule configuration for this RelativeContainer component.
void OH_ArkUI_AlignmentRuleOption_Dispose(ArkUI_AlignmentRuleOption* option)-Disposes of an alignment rule configuration of this RelativeContainer component.
void OH_ArkUI_AlignmentRuleOption_SetStart(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment)-Sets the left alignment mode of a relative layout.
void OH_ArkUI_AlignmentRuleOption_SetEnd(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment)-Sets the right alignment mode of a relative layout.
void OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment)-Sets the horizontal center alignment mode of a relative layout.
void OH_ArkUI_AlignmentRuleOption_SetTop(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment)-Sets the top alignment mode of a relative layout.
void OH_ArkUI_AlignmentRuleOption_SetBottom(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment)-Sets the bottom alignment mode of a relative layout.
void OH_ArkUI_AlignmentRuleOption_SetCenterVertical(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment)-Sets the vertical center alignment mode of a relative layout.
void OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal(ArkUI_AlignmentRuleOption* option, float horizontal)-Sets the bias value of the component in the horizontal direction under the anchor constraints.
void OH_ArkUI_AlignmentRuleOption_SetBiasVertical(ArkUI_AlignmentRuleOption* option, float vertical)-Sets the bias value of the component in the vertical direction under the anchor constraints.
const char* OH_ArkUI_AlignmentRuleOption_GetStartId(ArkUI_AlignmentRuleOption* option)-Obtains the ID of the left alignment anchor component.
ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetStartAlignment(ArkUI_AlignmentRuleOption* option)-Obtains the left alignment mode.
const char* OH_ArkUI_AlignmentRuleOption_GetEndId(ArkUI_AlignmentRuleOption* option)-Obtains the ID of the right alignment anchor component.
ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetEndAlignment(ArkUI_AlignmentRuleOption* option)-Obtains the right alignment mode.
const char* OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal(ArkUI_AlignmentRuleOption* option)-Obtains the ID of the horizontal center alignment anchor component.
ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal(ArkUI_AlignmentRuleOption* option)-Obtains the horizontal center alignment mode.
const char* OH_ArkUI_AlignmentRuleOption_GetTopId(ArkUI_AlignmentRuleOption* option)-Obtains the ID of the top alignment anchor component.
ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetTopAlignment(ArkUI_AlignmentRuleOption* option)-Obtains the top alignment mode.
const char* OH_ArkUI_AlignmentRuleOption_GetBottomId(ArkUI_AlignmentRuleOption* option)-Obtains the ID of the bottom alignment anchor component.
ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetBottomAlignment(ArkUI_AlignmentRuleOption* option)-Obtains the bottom alignment mode.
const char* OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical(ArkUI_AlignmentRuleOption* option)-Obtains the ID of the vertical center alignment anchor component.
ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical(ArkUI_AlignmentRuleOption* option)-Obtains the vertical center alignment mode.
float OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(ArkUI_AlignmentRuleOption* option)-Obtains the bias value in the horizontal direction.
float OH_ArkUI_AlignmentRuleOption_GetBiasVertical(ArkUI_AlignmentRuleOption* option)-Obtains the bias value in the vertical direction.
ArkUI_SwiperIndicator* OH_ArkUI_SwiperIndicator_Create(ArkUI_SwiperIndicatorType type)-Creates a navigation indicator for the Swiper component.
void OH_ArkUI_SwiperIndicator_Dispose(ArkUI_SwiperIndicator* indicator)-Disposes of the navigation indicator of this Swiper component.
void OH_ArkUI_SwiperIndicator_SetStartPosition(ArkUI_SwiperIndicator* indicator, float value)-Sets the distance between the navigation point and the left edge of the Swiper component.
float OH_ArkUI_SwiperIndicator_GetStartPosition(ArkUI_SwiperIndicator* indicator)-Obtains the distance between the navigation point and the left edge of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetTopPosition(ArkUI_SwiperIndicator* indicator, float value)-Sets the distance between the navigation point and the top edge of the Swiper component.
float OH_ArkUI_SwiperIndicator_GetTopPosition(ArkUI_SwiperIndicator* indicator)-Obtains the distance between the navigation point and the top edge of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetEndPosition(ArkUI_SwiperIndicator* indicator, float value)-Sets the distance between the navigation point and the right edge of the Swiper component.
float OH_ArkUI_SwiperIndicator_GetEndPosition(ArkUI_SwiperIndicator* indicator)-Obtains the distance between the navigation point and the right edge of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetBottomPosition(ArkUI_SwiperIndicator* indicator, float value)-Sets the distance between the navigation point and the bottom edge of the Swiper component.
float OH_ArkUI_SwiperIndicator_GetBottomPosition(ArkUI_SwiperIndicator* indicator)-Obtains the distance between the navigation point and the bottom edge of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* indicator, int32_t ignoreSize)-Sets whether the OH_ArkUI_SwiperIndicator_SetBottomPosition API ignores the indicator size when positioning the indicator.
int32_t OH_ArkUI_SwiperIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* indicator)-Checks whether the OH_ArkUI_SwiperIndicator_SetBottomPosition API ignores the indicator size when positioning the indicator.
void OH_ArkUI_SwiperIndicator_SetItemWidth(ArkUI_SwiperIndicator* indicator, float value)-Sets the width of a dot-style navigation indicator for the Swiper component.
float OH_ArkUI_SwiperIndicator_GetItemWidth(ArkUI_SwiperIndicator* indicator)-Obtains the width of a dot-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetItemHeight(ArkUI_SwiperIndicator* indicator, float value)-Sets the height of a dot-style navigation indicator for the Swiper component.
float OH_ArkUI_SwiperIndicator_GetItemHeight(ArkUI_SwiperIndicator* indicator)-Obtains the height of a dot-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetSelectedItemWidth(ArkUI_SwiperIndicator* indicator, float value)-Sets the width of the selected dot-style navigation indicator for the Swiper component.
float OH_ArkUI_SwiperIndicator_GetSelectedItemWidth(ArkUI_SwiperIndicator* indicator)-Obtains the width of the selected dot-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetSelectedItemHeight(ArkUI_SwiperIndicator* indicator, float value)-Sets the height of the selected dot-style navigation indicator for the Swiper component.
float OH_ArkUI_SwiperIndicator_GetSelectedItemHeight(ArkUI_SwiperIndicator* indicator)-Obtains the height of the selected dot-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetMask(ArkUI_SwiperIndicator* indicator, int32_t mask)-Sets whether to enable the mask for a dot-style navigation indicator for the Swiper component.
int32_t OH_ArkUI_SwiperIndicator_GetMask(ArkUI_SwiperIndicator* indicator)-Obtains whether the mask is enabled for a dot-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetColor(ArkUI_SwiperIndicator* indicator, uint32_t color)-Sets the color of a dot-style navigation indicator for the Swiper component.
uint32_t OH_ArkUI_SwiperIndicator_GetColor(ArkUI_SwiperIndicator* indicator)-Obtains the color of a dot-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetSelectedColor(ArkUI_SwiperIndicator* indicator, uint32_t selectedColor)-Sets the color of the selected dot-style navigation indicator for the Swiper component.
uint32_t OH_ArkUI_SwiperIndicator_GetSelectedColor(ArkUI_SwiperIndicator* indicator)-Obtains the color of the selected dot-style navigation indicator of the Swiper component.
int32_t OH_ArkUI_SwiperIndicator_SetMaxDisplayCount(ArkUI_SwiperIndicator* indicator, int32_t maxDisplayCount)-Sets the maximum number of dots for the dot-style navigation indicator.
int32_t OH_ArkUI_SwiperIndicator_GetMaxDisplayCount(ArkUI_SwiperIndicator* indicator)-Obtains the maximum number of dots for the dot-style navigation indicator.
ArkUI_SwiperDigitIndicator *OH_ArkUI_SwiperDigitIndicator_Create()-Creates a digit-style navigation indicator for the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_Destroy(ArkUI_SwiperDigitIndicator* indicator)-Disposes of the digit-style navigation indicator of this Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetStartPosition(ArkUI_SwiperDigitIndicator* indicator, float value)-Sets the start position of the digit-style navigation indicator for the Swiper component. This determines the distance from the left edge of the Swiper component. For right-to-left scripts, this determines the distance from the right edge of the Swiper component.
float OH_ArkUI_SwiperDigitIndicator_GetStartPosition(ArkUI_SwiperDigitIndicator* indicator)-Obtains the start position of the digit-style navigation indicator for the Swiper component. This indicates the distance from the left edge of the Swiper component. For right-to-left scripts, this indicates the distance from the right edge of the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetTopPosition(ArkUI_SwiperDigitIndicator* indicator, float value)-Sets the distance from the digit-style navigation indicator to the top edge of the Swiper component.
float OH_ArkUI_SwiperDigitIndicator_GetTopPosition(ArkUI_SwiperDigitIndicator* indicator)-Obtains the distance from the digit-style navigation indicator to the top edge of the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetEndPosition(ArkUI_SwiperDigitIndicator* indicator, float value)-Sets the end position of the digit-style navigation indicator for the Swiper component. This determines the distance from the right edge of the Swiper component. For right-to-left scripts, this determines the distance from the left edge of the Swiper component.
float OH_ArkUI_SwiperDigitIndicator_GetEndPosition(ArkUI_SwiperDigitIndicator* indicator)-Obtains the end position of the digit-style navigation indicator for the Swiper component. This indicates the distance from the right edge of the Swiper component. For right-to-left scripts, this indicates the distance from the left edge of the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetBottomPosition(ArkUI_SwiperDigitIndicator* indicator, float value)-Sets the distance from the digit-style navigation indicator to the bottom edge of the Swiper component.
float OH_ArkUI_SwiperDigitIndicator_GetBottomPosition(ArkUI_SwiperDigitIndicator* indicator)-Obtains the distance from the digit-style navigation indicator to the bottom edge of the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetFontColor(ArkUI_SwiperDigitIndicator* indicator, uint32_t color)-Sets the font color of the digit-style navigation indicator for the Swiper component.
uint32_t OH_ArkUI_SwiperDigitIndicator_GetFontColor(ArkUI_SwiperDigitIndicator* indicator)-Obtains the font color of the digit-style navigation indicator for the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontColor(ArkUI_SwiperDigitIndicator* indicator, uint32_t selectedColor)-Sets the font color of the selected digit-style navigation indicator for the Swiper component.
uint32_t OH_ArkUI_SwiperDigitIndicator_GetSelectedFontColor(ArkUI_SwiperDigitIndicator* indicator)-Obtains the font color of the selected digit-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetFontSize(ArkUI_SwiperDigitIndicator* indicator, float size)-Sets the font size of the digit-style navigation indicator for the Swiper component.
float OH_ArkUI_SwiperDigitIndicator_GetFontSize(ArkUI_SwiperDigitIndicator* indicator)-Obtains the font size of the digit-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontSize(ArkUI_SwiperDigitIndicator* indicator, float size)-Sets the font size of the selected digit-style navigation indicator for the Swiper component.
float OH_ArkUI_SwiperDigitIndicator_GetSelectedFontSize(ArkUI_SwiperDigitIndicator* indicator)-Obtains the font size of the selected digit-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetFontWeight(ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight fontWeight)-Sets the font weight of the digit-style navigation indicator for the Swiper component.
ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetFontWeight(ArkUI_SwiperDigitIndicator* indicator)-Obtains the font weight of the digit-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontWeight(ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight selectedFontWeight)-Sets the font weight of the selected digit-style navigation indicator for the Swiper component.
ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight(ArkUI_SwiperDigitIndicator* indicator)-Obtains the font weight of the selected digit-style navigation indicator of the Swiper component.
ArkUI_SwiperArrowStyle *OH_ArkUI_SwiperArrowStyle_Create()-Creates a navigation arrow for the Swiper component.
void OH_ArkUI_SwiperArrowStyle_Destroy(ArkUI_SwiperArrowStyle* arrowStyle)-Destroys the navigation arrow pointer of the Swiper component.
void OH_ArkUI_SwiperArrowStyle_SetShowBackground(ArkUI_SwiperArrowStyle* arrowStyle, int32_t showBackground)-Sets whether to display the background of the navigation arrow for the Swiper component.
int32_t OH_ArkUI_SwiperArrowStyle_GetShowBackground(ArkUI_SwiperArrowStyle* arrowStyle)-Checks whether the background of the navigation arrow is displayed for the Swiper component.
void OH_ArkUI_SwiperArrowStyle_SetShowSidebarMiddle(ArkUI_SwiperArrowStyle* arrowStyle, int32_t showSidebarMiddle)-Sets the position of the navigation arrow for the Swiper component.
int32_t OH_ArkUI_SwiperArrowStyle_GetShowSidebarMiddle(ArkUI_SwiperArrowStyle* arrowStyle)-Obtains the position of the navigation arrow for the Swiper component.
void OH_ArkUI_SwiperArrowStyle_SetBackgroundSize(ArkUI_SwiperArrowStyle* arrowStyle, float backgroundSize)-Sets the background size for the navigation arrow of the Swiper component.
float OH_ArkUI_SwiperArrowStyle_GetBackgroundSize(ArkUI_SwiperArrowStyle* arrowStyle)-Obtains the background size of the navigation arrow of the Swiper component.
void OH_ArkUI_SwiperArrowStyle_SetBackgroundColor(ArkUI_SwiperArrowStyle* arrowStyle, uint32_t backgroundColor)-Sets the background color for the navigation arrow of the Swiper component.
uint32_t OH_ArkUI_SwiperArrowStyle_GetBackgroundColor(ArkUI_SwiperArrowStyle* arrowStyle)-Obtains the background color of the navigation arrow of the Swiper component.
void OH_ArkUI_SwiperArrowStyle_SetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle, float arrowSize)-Sets the size for the navigation arrow of the Swiper component.
float OH_ArkUI_SwiperArrowStyle_GetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle)-Obtains the size of the navigation arrow of the Swiper component.
void OH_ArkUI_SwiperArrowStyle_SetArrowColor(ArkUI_SwiperArrowStyle* arrowStyle, uint32_t arrowColor)-Sets the color for the navigation arrow of the Swiper component.
uint32_t OH_ArkUI_SwiperArrowStyle_GetArrowColor(ArkUI_SwiperArrowStyle* arrowStyle)-Obtains the color of the navigation arrow of the Swiper component.
void OH_ArkUI_SwiperIndicator_SetSpace(ArkUI_SwiperIndicator* indicator, float space)-Sets the spacing between navigation points.
float OH_ArkUI_SwiperIndicator_GetSpace(ArkUI_SwiperIndicator* indicator)-Obtains the spacing between navigation points.
void OH_ArkUI_SwiperDigitIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperDigitIndicator* indicator, int32_t ignoreSize)-Sets whether the OH_ArkUI_SwiperDigitIndicator_SetBottomPosition API ignores the indicator size when positioning the indicator.
int32_t OH_ArkUI_SwiperDigitIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperDigitIndicator* indicator)-Checks whether the OH_ArkUI_SwiperDigitIndicator_SetBottomPosition API ignores the indicator size when positioning the indicator.
ArkUI_ListItemSwipeActionItem* OH_ArkUI_ListItemSwipeActionItem_Create()-Creates a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionItem_Dispose(ArkUI_ListItemSwipeActionItem* item)-Disposes of a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionItem_SetContent(ArkUI_ListItemSwipeActionItem* item, ArkUI_NodeHandle node)-Sets the layout content for a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item, float distance)-Sets the swipe distance threshold for deleting the list item.
float OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item)-Obtains the swipe distance threshold for deleting the list item.
void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)())-Sets the callback invoked each time the list item enters the delete area.
void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData (ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(void* userData))-Sets the callback invoked each time the list item enters the delete area. User-defined data will be passed to the callback event.
void OH_ArkUI_ListItemSwipeActionItem_SetOnAction(ArkUI_ListItemSwipeActionItem* item, void (*callback)())-Sets the callback invoked when the list item is deleted while in the delete area.
void OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData(ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(void* userData))-Sets the callback invoked when the list item is deleted while in the delete area. User-defined data will be passed to the callback event.
void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)())-Sets the callback invoked each time the list item exits the delete area.
void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData (ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(void* userData))-Sets the callback invoked each time the list item exits the delete area. User-defined data will be passed to the callback event.
void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange (ArkUI_ListItemSwipeActionItem* item,void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState))-Sets the callback invoked when the swipe state of the list item changes.
void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData (ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState, void* userData))-Sets the callback invoked when the swipe state of the list item changes. User-defined data will be passed to the callback event.
ArkUI_ListItemSwipeActionOption* OH_ArkUI_ListItemSwipeActionOption_Create()-Creates a ListItemSwipeActionOption instance.
void OH_ArkUI_ListItemSwipeActionOption_Dispose(ArkUI_ListItemSwipeActionOption* option)-Disposes of a ListItemSwipeActionOption instance.
void OH_ArkUI_ListItemSwipeActionOption_SetStart(ArkUI_ListItemSwipeActionOption* option, ArkUI_ListItemSwipeActionItem* item)-Sets the layout content for the left edge (for a vertical layout) or top edge (for a horizontal layout) of a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionOption_SetEnd(ArkUI_ListItemSwipeActionOption* option, ArkUI_ListItemSwipeActionItem* item)-Sets the layout content for the right edge (for a vertical layout) or bottom edge (for a horizontal layout) of a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect(ArkUI_ListItemSwipeActionOption* option, ArkUI_ListItemSwipeEdgeEffect edgeEffect)-Sets the effect used when the scroll boundary is reached.
int32_t OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect(ArkUI_ListItemSwipeActionOption* option)-Obtains the effect used when the scroll boundary is reached.
void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange(ArkUI_ListItemSwipeActionOption* option, void (*callback)(float offset))-Sets the callback invoked when the scroll offset changes.
void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData (ArkUI_ListItemSwipeActionOption* option, void* userData, void (*callback)(float offset, void* userData))-Sets the callback invoked when the scroll offset changes. User-defined data will be passed to the callback event.
int32_t OH_ArkUI_ListItemSwipeAction_Expand(ArkUI_NodeHandle node, ArkUI_ListItemSwipeActionDirection direction)-Expands the swipe action menu for the specified list item.
int32_t OH_ArkUI_ListItemSwipeAction_Collapse(ArkUI_NodeHandle node)-Collapses the swipe action menu for the specified list item.
ArkUI_AccessibilityState* OH_ArkUI_AccessibilityState_Create(void)-Creates an accessibility state.
void OH_ArkUI_AccessibilityState_Dispose(ArkUI_AccessibilityState* state)-Disposes of the pointer to an accessibility state.
void OH_ArkUI_AccessibilityState_SetDisabled(ArkUI_AccessibilityState* state, int32_t isDisabled)-Sets whether an accessibility state is disabled.
int32_t OH_ArkUI_AccessibilityState_IsDisabled(ArkUI_AccessibilityState* state)-Obtains whether an accessibility state is disabled.
void OH_ArkUI_AccessibilityState_SetSelected(ArkUI_AccessibilityState* state, int32_t isSelected)-Sets whether an accessibility state is selected.
int32_t OH_ArkUI_AccessibilityState_IsSelected(ArkUI_AccessibilityState* state)-Obtains whether an accessibility state is selected.
void OH_ArkUI_AccessibilityState_SetCheckedState(ArkUI_AccessibilityState* state, int32_t checkedState)-Sets the check box state of an accessibility state.
int32_t OH_ArkUI_AccessibilityState_GetCheckedState(ArkUI_AccessibilityState* state)-Obtains the check box state of an accessibility state.
ArkUI_AccessibilityValue* OH_ArkUI_AccessibilityValue_Create(void)-Creates an AccessibilityValue instance.
void OH_ArkUI_AccessibilityValue_Dispose(ArkUI_AccessibilityValue* value)-Disposes of the pointer to an AccessibilityValue instance.
void OH_ArkUI_AccessibilityValue_SetMin(ArkUI_AccessibilityValue* value, int32_t min)-Sets the minimum accessibility value.
int32_t OH_ArkUI_AccessibilityValue_GetMin(ArkUI_AccessibilityValue* value)-Obtains the minimum accessibility value.
void OH_ArkUI_AccessibilityValue_SetMax(ArkUI_AccessibilityValue* value, int32_t max)-Sets the maximum accessibility value.
int32_t OH_ArkUI_AccessibilityValue_GetMax(ArkUI_AccessibilityValue* value)-Obtains the maximum accessibility value.
void OH_ArkUI_AccessibilityValue_SetCurrent(ArkUI_AccessibilityValue* value, int32_t current)-Sets the current accessibility value.
int32_t OH_ArkUI_AccessibilityValue_GetCurrent(ArkUI_AccessibilityValue* value)-Obtains the current accessibility value.
void OH_ArkUI_AccessibilityValue_SetRangeMin(ArkUI_AccessibilityValue* value, int32_t rangeMin)-Sets the minimum value for accessibility information of the range-based component.
int32_t OH_ArkUI_AccessibilityValue_GetRangeMin(ArkUI_AccessibilityValue* value)-Obtains the minimum value for accessibility information of the range-based component.
void OH_ArkUI_AccessibilityValue_SetRangeMax(ArkUI_AccessibilityValue* value, int32_t rangeMax)-Sets the maximum value for accessibility information of the range-based component.
int32_t OH_ArkUI_AccessibilityValue_GetRangeMax(ArkUI_AccessibilityValue* value)-Obtains the maximum value for accessibility information of the range-based component.
void OH_ArkUI_AccessibilityValue_SetRangeCurrent(ArkUI_AccessibilityValue* value, int32_t rangeCurrent)-Sets the current value for accessibility information of the range-based component.
int32_t OH_ArkUI_AccessibilityValue_GetRangeCurrent(ArkUI_AccessibilityValue* value)-Obtains the current value for accessibility information of the range-based component.
void OH_ArkUI_AccessibilityValue_SetText(ArkUI_AccessibilityValue* value, const char* text)-Sets the text description of an AccessibilityValue instance.
const char* OH_ArkUI_AccessibilityValue_GetText(ArkUI_AccessibilityValue* value)-Obtains the text description of an AccessibilityValue instance.
ArkUI_ImageAnimatorFrameInfo* OH_ArkUI_ImageAnimatorFrameInfo_CreateFromString(char* src)-Creates an image frame information object based on an image path, with the image format being SVG, PNG, or JPG.
ArkUI_ImageAnimatorFrameInfo* OH_ArkUI_ImageAnimatorFrameInfo_CreateFromDrawableDescriptor(ArkUI_DrawableDescriptor* drawable)-Creates an image frame information object based on a DrawableDescriptor object, with the image format being Resource or PixelMap.
void OH_ArkUI_ImageAnimatorFrameInfo_Dispose(ArkUI_ImageAnimatorFrameInfo* imageInfo)-Disposes of the pointer to an image frame information object.
void OH_ArkUI_ImageAnimatorFrameInfo_SetWidth(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t width)-Sets the image width.
int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetWidth(ArkUI_ImageAnimatorFrameInfo* imageInfo)-Obtains the image width.
void OH_ArkUI_ImageAnimatorFrameInfo_SetHeight(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t height)-Sets the image height.
int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetHeight(ArkUI_ImageAnimatorFrameInfo* imageInfo)-Obtains the image height.
void OH_ArkUI_ImageAnimatorFrameInfo_SetTop(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t top)-Sets the vertical coordinate of an image relative to the upper left corner of the component.
int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetTop(ArkUI_ImageAnimatorFrameInfo* imageInfo)-Obtains the vertical coordinate of an image relative to the upper left corner of the component.
void OH_ArkUI_ImageAnimatorFrameInfo_SetLeft(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t left)-Sets the horizontal coordinate of an image relative to the upper left corner of the component.
int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetLeft(ArkUI_ImageAnimatorFrameInfo* imageInfo)-Obtains the horizontal coordinate of an image relative to the upper left corner of the component.
void OH_ArkUI_ImageAnimatorFrameInfo_SetDuration(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t duration)-Sets the playback duration of an image.
int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetDuration(ArkUI_ImageAnimatorFrameInfo* imageInfo)-Obtains the playback duration of an image.
ArkUI_ListChildrenMainSize* OH_ArkUI_ListChildrenMainSizeOption_Create()-Creates a ListChildrenMainSize instance.
void OH_ArkUI_ListChildrenMainSizeOption_Dispose(ArkUI_ListChildrenMainSize* option)-Disposes of a ListChildrenMainSize instance.
int32_t OH_ArkUI_ListChildrenMainSizeOption_SetDefaultMainSize(ArkUI_ListChildrenMainSize* option, float defaultMainSize)-Sets the default size of the list item in the List component along the main axis. The vertical axis indicates the height, and the horizontal axis indicates the width.
float OH_ArkUI_ListChildrenMainSizeOption_GetDefaultMainSize(ArkUI_ListChildrenMainSize* option)-Obtains the default size of the list item in the List component along the main axis. The vertical axis indicates the height, and the horizontal axis indicates the width.
void OH_ArkUI_ListChildrenMainSizeOption_Resize(ArkUI_ListChildrenMainSize* option, int32_t totalSize)-Adjusts the capacity of the children item size array in the List component along the main axis.
int32_t OH_ArkUI_ListChildrenMainSizeOption_Splice(ArkUI_ListChildrenMainSize* option, int32_t index, int32_t deleteCount, int32_t addCount)-Adjusts the children item size array in the List component along the main axis.
int32_t OH_ArkUI_ListChildrenMainSizeOption_UpdateSize(ArkUI_ListChildrenMainSize* option, int32_t index, float mainSize)-Updates the size at the specified index in the child item size array of the List component along the main axis. The vertical axis indicates the height, and the horizontal axis indicates the width.
float OH_ArkUI_ListChildrenMainSizeOption_GetMainSize(ArkUI_ListChildrenMainSize* option, int32_t index)-Obtains the size at the specified index in the child item size array of the List component along the main axis. The vertical axis indicates the height, and the horizontal axis indicates the width.
ArkUI_CustomSpanMeasureInfo* OH_ArkUI_CustomSpanMeasureInfo_Create(void)-Creates measurement information for this custom span.
void OH_ArkUI_CustomSpanMeasureInfo_Dispose(ArkUI_CustomSpanMeasureInfo* info)-Disposes of measurement information of a custom span.
float OH_ArkUI_CustomSpanMeasureInfo_GetFontSize(ArkUI_CustomSpanMeasureInfo* info)-Obtains the font size of the parent text node of a custom span.
ArkUI_CustomSpanMetrics* OH_ArkUI_CustomSpanMetrics_Create(void)-Creates measurement metrics for this custom span.
void OH_ArkUI_CustomSpanMetrics_Dispose(ArkUI_CustomSpanMetrics* metrics)-Disposes of measurement metrics of this custom span.
int32_t OH_ArkUI_CustomSpanMetrics_SetWidth(ArkUI_CustomSpanMetrics* metrics, float width)-Sets the width for a custom span.
int32_t OH_ArkUI_CustomSpanMetrics_SetHeight(ArkUI_CustomSpanMetrics* metrics, float height)-Sets the height for a custom span.
ArkUI_CustomSpanDrawInfo* OH_ArkUI_CustomSpanDrawInfo_Create(void)-Creates drawing information for this custom span.
void OH_ArkUI_CustomSpanDrawInfo_Dispose(ArkUI_CustomSpanDrawInfo* info)-Disposes of drawing information for this custom span.
float OH_ArkUI_CustomSpanDrawInfo_GetXOffset(ArkUI_CustomSpanDrawInfo* info)-Obtains the x-axis offset of the custom span relative to the mounted component.
float OH_ArkUI_CustomSpanDrawInfo_GetLineTop(ArkUI_CustomSpanDrawInfo* info)-Obtains the top margin of the custom span relative to the mounted component.
float OH_ArkUI_CustomSpanDrawInfo_GetLineBottom(ArkUI_CustomSpanDrawInfo* info)-Obtains the bottom margin of the custom span relative to the mounted component.
float OH_ArkUI_CustomSpanDrawInfo_GetBaseline(ArkUI_CustomSpanDrawInfo* info)-Obtains the baseline offset of the custom span relative to the mounted component.
void OH_ArkUI_CustomProperty_Destroy(ArkUI_CustomProperty* handle)-Destroys a CustomProperty instance.
const char* OH_ArkUI_CustomProperty_GetStringValue(ArkUI_CustomProperty* handle)-Obtains the value of a custom property.
const char* OH_ArkUI_HostWindowInfo_GetName(ArkUI_HostWindowInfo* info)-Obtains the window name from a HostWindowInfo object.
void OH_ArkUI_HostWindowInfo_Destroy(ArkUI_HostWindowInfo* info)-Destroys a HostWindowInfo object.
void OH_ArkUI_ActiveChildrenInfo_Destroy(ArkUI_ActiveChildrenInfo* handle)-Destroys an ActiveChildrenInfo instance.
ArkUI_NodeHandle OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex(ArkUI_ActiveChildrenInfo* handle, int32_t index)-Obtains the child node at the specified index in the specified ActiveChildrenInfo instance.
int32_t OH_ArkUI_ActiveChildrenInfo_GetCount(ArkUI_ActiveChildrenInfo* handle)-Obtains the number of nodes in the specified ActiveChildrenInfo instance.
ArkUI_ProgressLinearStyleOption* OH_ArkUI_ProgressLinearStyleOption_Create(void)-Creates a ProgressLinearStyleOption instance.
void OH_ArkUI_ProgressLinearStyleOption_Destroy(ArkUI_ProgressLinearStyleOption* option)-Destroys a ProgressLinearStyleOption instance.
void OH_ArkUI_ProgressLinearStyleOption_SetSmoothEffectEnabled(ArkUI_ProgressLinearStyleOption* option, bool enabled)-Sets whether to enable the smooth progress effect.
void OH_ArkUI_ProgressLinearStyleOption_SetScanEffectEnabled(ArkUI_ProgressLinearStyleOption* option, bool enabled)-Sets whether to enable the scan effect.
void OH_ArkUI_ProgressLinearStyleOption_SetStrokeWidth(ArkUI_ProgressLinearStyleOption* option, float strokeWidth)-Sets the width of the progress indicator.
void OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius(ArkUI_ProgressLinearStyleOption* option, float strokeRadius)-Sets the corner radius of the progress indicator.
bool OH_ArkUI_ProgressLinearStyleOption_GetSmoothEffectEnabled(ArkUI_ProgressLinearStyleOption* option)-Obtains the enabled status of the smooth progress effect.
bool OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled(ArkUI_ProgressLinearStyleOption* option)-Obtains the enabled status of the scan effect.
float OH_ArkUI_ProgressLinearStyleOption_GetStrokeWidth(ArkUI_ProgressLinearStyleOption* option)-Obtains the stroke width of the progress indicator.
float OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius(ArkUI_ProgressLinearStyleOption* option)-Obtains the corner radius of the progress indicator.
ArkUI_SnapshotOptions* OH_ArkUI_CreateSnapshotOptions()-Creates a snapshot option object, which must be released using OH_ArkUI_DestroySnapshotOptions() when no longer in use.
void OH_ArkUI_DestroySnapshotOptions(ArkUI_SnapshotOptions* snapshotOptions)-Destroys a snapshot option object.
int32_t OH_ArkUI_SnapshotOptions_SetScale(ArkUI_SnapshotOptions* snapshotOptions, float scale)-Sets the scale property in the snapshot options.
int32_t OH_ArkUI_SnapshotOptions_SetColorMode(ArkUI_SnapshotOptions* snapshotOptions, int32_t colorSpace, bool isAuto)-Sets the color space in the screenshot options.
int32_t OH_ArkUI_SnapshotOptions_SetDynamicRangeMode(ArkUI_SnapshotOptions* snapshotOptions, int32_t dynamicRangeMode, bool isAuto)-Sets the dynamic range mode in the screenshot options.
ArkUI_CrossLanguageOption* OH_ArkUI_CrossLanguageOption_Create(void)-Creates an instance of the cross-language configuration option.
void OH_ArkUI_CrossLanguageOption_Destroy(ArkUI_CrossLanguageOption* option)-Destroys an instance of the cross-language configuration option.
void OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus(ArkUI_CrossLanguageOption* option, bool enabled)-Sets whether cross-language attribute setting is allowed in the configuration option.
bool OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus(ArkUI_CrossLanguageOption* option)-Checks whether cross-language attribute setting is allowed in the configuration option.
ArkUI_VisibleAreaEventOptions* OH_ArkUI_VisibleAreaEventOptions_Create()-Creates an instance of visible area change event parameters.
void OH_ArkUI_VisibleAreaEventOptions_Dispose(ArkUI_VisibleAreaEventOptions* option)-Disposes of an instance of visible area change event parameters.
int32_t OH_ArkUI_VisibleAreaEventOptions_SetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t size)-Sets the threshold ratios for visible area changes.
int32_t OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval(ArkUI_VisibleAreaEventOptions *option, int32_t value)-Sets the expected update interval for visible area changes.
int32_t OH_ArkUI_VisibleAreaEventOptions_SetMeasureFromViewport(ArkUI_VisibleAreaEventOptions *option, bool measureFromViewport)-Sets the visible area calculation mode.
int32_t OH_ArkUI_VisibleAreaEventOptions_GetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t* size)-Obtains the threshold ratios for visible area changes.
int32_t OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval(ArkUI_VisibleAreaEventOptions* option)-Obtains the expected update interval for visible area changes.
bool OH_ArkUI_VisibleAreaEventOptions_GetMeasureFromViewport(ArkUI_VisibleAreaEventOptions* option)-Obtains the visible area calculation mode.
ArkUI_TextPickerRangeContentArray* OH_ArkUI_TextPickerRangeContentArray_Create(int32_t length)-Creates a TextPickerRangeContent array object.
void OH_ArkUI_TextPickerRangeContentArray_SetIconAtIndex(ArkUI_TextPickerRangeContentArray* handle, char* icon, int32_t index)-Sets the icon data at the specified position in the TextPickerRangeContent array.
void OH_ArkUI_TextPickerRangeContentArray_SetTextAtIndex(ArkUI_TextPickerRangeContentArray* handle, char* text, int32_t index)-Sets the text data at the specified position in the TextPickerRangeContent array.
void OH_ArkUI_TextPickerRangeContentArray_Destroy(ArkUI_TextPickerRangeContentArray* handle)-Destroys a TextPickerRangeContent array object.
ArkUI_TextCascadePickerRangeContentArray* OH_ArkUI_TextCascadePickerRangeContentArray_Create(int32_t length)-Creates a TextCascadePickerRangeContent array object.
void OH_ArkUI_TextCascadePickerRangeContentArray_SetTextAtIndex (ArkUI_TextCascadePickerRangeContentArray* handle, char* text, int32_t index)-Sets the text data at the specified position in the TextCascadePickerRangeContent array.
void OH_ArkUI_TextCascadePickerRangeContentArray_SetChildAtIndex (ArkUI_TextCascadePickerRangeContentArray* handle, ArkUI_TextCascadePickerRangeContentArray* child, int32_t index)-Sets the child data at the specified position in the TextCascadePickerRangeContent array.
void OH_ArkUI_TextCascadePickerRangeContentArray_Destroy (ArkUI_TextCascadePickerRangeContentArray* handle)-Destroys a TextCascadePickerRangeContent array object.
ArkUI_EmbeddedComponentOption* OH_ArkUI_EmbeddedComponentOption_Create()-Creates an EmbeddedComponent option object.
void OH_ArkUI_EmbeddedComponentOption_Dispose(ArkUI_EmbeddedComponentOption* option)-Disposes of an EmbeddedComponent option object.
void OH_ArkUI_EmbeddedComponentOption_SetOnError (ArkUI_EmbeddedComponentOption* option, void (*callback)(int32_t code, const char* name, const char* message))-Sets the onError callback for the EmbeddedComponent component. This callback is triggered when an error occurs during the running of the EmbeddedComponent component.
void OH_ArkUI_EmbeddedComponentOption_SetOnTerminated (ArkUI_EmbeddedComponentOption* option, void (*callback)(int32_t code, AbilityBase_Want* want))-Sets the onTerminated callback for the EmbeddedComponent component. This callback is triggered when the EmbeddedComponent component exits properly.
ArkUI_PositionEdges* OH_ArkUI_PositionEdges_Create()-Creates a PositionEdges object.
ArkUI_PositionEdges* OH_ArkUI_PositionEdges_Copy(const ArkUI_PositionEdges* edges)-Deeply copies a PositionEdges attribute object.
void OH_ArkUI_PositionEdges_Dispose(ArkUI_PositionEdges* edges)-Disposes of the PositionEdges object.
void OH_ArkUI_PositionEdges_SetTop(ArkUI_PositionEdges* edges, float value)-Sets the value of the PositionEdges object in the top direction.
int32_t OH_ArkUI_PositionEdges_GetTop(ArkUI_PositionEdges* edges, float* value)-Obtains the value of the PositionEdges object in the top direction.
void OH_ArkUI_PositionEdges_SetLeft(ArkUI_PositionEdges* edges, float value)-Sets the value of the PositionEdges object in the left direction.
int32_t OH_ArkUI_PositionEdges_GetLeft(ArkUI_PositionEdges* edges, float* value)-Obtains the value of the PositionEdges object in the left direction.
void OH_ArkUI_PositionEdges_SetBottom(ArkUI_PositionEdges* edges, float value)-Sets the value of the PositionEdges object in the bottom direction.
int32_t OH_ArkUI_PositionEdges_GetBottom(ArkUI_PositionEdges* edges, float* value)-Obtains the value of the PositionEdges object in the bottom direction.
void OH_ArkUI_PositionEdges_SetRight(ArkUI_PositionEdges* edges, float value)-Sets the value of the PositionEdges object in the right direction.
int32_t OH_ArkUI_PositionEdges_GetRight(ArkUI_PositionEdges* edges, float* value)-Obtains the value of the PositionEdges object in the right direction.
ArkUI_PixelRoundPolicy* OH_ArkUI_PixelRoundPolicy_Create()-Creates a PixelRoundPolicy attribute object.
void OH_ArkUI_PixelRoundPolicy_Dispose(ArkUI_PixelRoundPolicy* policy)-Disposes of the PixelRoundPolicy object.
void OH_ArkUI_PixelRoundPolicy_SetTop(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy value)-Sets the top edge pixel rounding policy for the PixelRoundPolicy object.
int32_t OH_ArkUI_PixelRoundPolicy_GetTop(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy* value)-Obtains the top edge pixel rounding policy from the PixelRoundPolicy object.
void OH_ArkUI_PixelRoundPolicy_SetStart(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy value)-Sets the start edge pixel rounding policy for the PixelRoundPolicy object.
int32_t OH_ArkUI_PixelRoundPolicy_GetStart(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy* value)-Obtains the start edge pixel rounding policy from the PixelRoundPolicy object.
void OH_ArkUI_PixelRoundPolicy_SetBottom(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy value)-Sets the bottom edge pixel rounding policy for the PixelRoundPolicy object.
int32_t OH_ArkUI_PixelRoundPolicy_GetBottom(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy* value)-Obtains the bottom edge pixel rounding policy from the PixelRoundPolicy object.
void OH_ArkUI_PixelRoundPolicy_SetEnd(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy value)-Sets the end edge pixel rounding policy for the PixelRoundPolicy object.
int32_t OH_ArkUI_PixelRoundPolicy_GetEnd(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy* value)-Obtains the end edge pixel rounding policy from the PixelRoundPolicy object.
ArkUI_ContentTransitionEffect* OH_ArkUI_ContentTransitionEffect_Create(int32_t type)-Creates a ContentTransitionEffect attribute object.
ArkUI_GridLayoutOptions* OH_ArkUI_GridLayoutOptions_Create()-Creates Grid layout options.
void OH_ArkUI_GridLayoutOptions_Dispose(ArkUI_GridLayoutOptions* option)-Disposes of the Grid layout option.
int32_t OH_ArkUI_GridLayoutOptions_SetIrregularIndexes(ArkUI_GridLayoutOptions* option, uint32_t* irregularIndexes, int32_t size)-Sets the irregular grid item index array for the grid layout.
int32_t OH_ArkUI_GridLayoutOptions_GetIrregularIndexes(ArkUI_GridLayoutOptions* option, uint32_t* irregularIndexes, int32_t* size)-Obtains the irregular grid item index array for the grid layout. When OH_ArkUI_GridLayoutOptions_RegisterGetIrregularSizeByIndexCallback is not set, the grid item specified in this parameter occupies an entire row of the grid that scrolls vertically or an entire column of the grid that scrolls horizontally.
void OH_ArkUI_GridLayoutOptions_RegisterGetIrregularSizeByIndexCallback(ArkUI_GridLayoutOptions* option, void* userData, ArkUI_GridItemSize(*callback)(int32_t itemIndex, void* userData))-Registers a callback to obtain the row and column span for the grid item at the specified index.
void OH_ArkUI_GridLayoutOptions_RegisterGetRectByIndexCallback(ArkUI_GridLayoutOptions* option, void* userData, ArkUI_GridItemRect (*callback)(int32_t itemIndex, void* userData))-Registers a callback to obtain the starting row, starting column, row span, and column span for the grid item at the specified index.
ArkUI_SelectionOptions OH_ArkUI_SelectionOptions_Create()-Creates a selection option.
void OH_ArkUI_SelectionOptions_Dispose(ArkUI_SelectionOptions* options)-Releases a selection option object.
void OH_ArkUI_SelectionOptions_SetMenuPolicy(ArkUI_SelectionOptions* options, ArkUI_MenuPolicy menuPolicy)-Sets the menu pop-up policy for selection options.
ArkUI_MenuPolicy OH_ArkUI_SelectionOptions_GetMenuPolicy(ArkUI_SelectionOptions* options)-Obtains the menu pop-up policy for selection options.
ArkUI_TextContentBaseController* OH_ArkUI_TextContentBaseController_Create()-Creates a basic controller object for text content.
void OH_ArkUI_TextContentBaseController_Dispose(ArkUI_TextContentBaseController* controller)-Destroys a basic controller object for text content.
void OH_ArkUI_TextContentBaseController_DeleteBackward(ArkUI_TextContentBaseController* controller)-Deletes the character before the cursor in editing state; deletes the last character of the text box component in other states.
void OH_ArkUI_TextContentBaseController_ScrollToVisible(ArkUI_TextContentBaseController* controller, int32_t start, int32_t end)-Passes the start and end indexes to the bound text box component, and scrolls the text within the range to the visible area.
ArkUI_TextMenuItem* OH_ArkUI_TextMenuItem_Create()-Creates a text menu item object.
void OH_ArkUI_TextMenuItem_Dispose(ArkUI_TextMenuItem* textMenuItem)-Releases a text menu item object.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetContent(ArkUI_TextMenuItem* item, const char* content)-Sets the title of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetContent(const ArkUI_TextMenuItem* item, char* buffer, int32_t bufferSize, int32_t* writeLength)-Obtains the title of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetIcon(ArkUI_TextMenuItem* item, const char* icon)-Sets the icon path of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetIcon(const ArkUI_TextMenuItem* item, char* buffer, int32_t bufferSize, int32_t* writeLength)-Obtains the icon path of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetLabelInfo(ArkUI_TextMenuItem* item, const char* labelInfo)-Sets the shortcut hint for a text menu item, for example, the shortcut hint for the Copy menu item can be set to Ctrl+C.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetLabelInfo(const ArkUI_TextMenuItem* item, char* buffer, int32_t bufferSize, int32_t* writeLength)-Obtains the shortcut hint for a text menu item, for example, the shortcut hint for the Copy menu item is typically Ctrl+C.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetId(ArkUI_TextMenuItem* item, int32_t id)-Sets the ID of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetId(const ArkUI_TextMenuItem* item, int32_t* id)-Obtains the ID of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_GetSize(ArkUI_TextMenuItemArray* items, int32_t* size)-Obtains the size of the text menu item array.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_GetItem(ArkUI_TextMenuItemArray* items, int32_t index, ArkUI_TextMenuItem** item)-Obtains the text menu item at a specified index from the text menu item array.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_Insert(ArkUI_TextMenuItemArray* items, ArkUI_TextMenuItem* item, int32_t index)-Inserts a text menu item at a specified index into the text menu item array.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_Erase(ArkUI_TextMenuItemArray* items, int32_t index)-Deletes the text menu item at a specified index from the text menu item array.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_Clear(ArkUI_TextMenuItemArray* items)-Clears all text menu items in the text menu item array.
ArkUI_TextEditMenuOptions* OH_ArkUI_TextEditMenuOptions_Create()-Creates a text menu extension object.
void OH_ArkUI_TextEditMenuOptions_Dispose(ArkUI_TextEditMenuOptions* editMenuOptions)-Releases a text menu extension object.
typedef void (*ArkUI_TextCreateMenuCallback)(ArkUI_TextMenuItemArray* items, void* userData)ArkUI_TextCreateMenuCallbackCallback for the text menu creation event. This callback is triggered when a text menu is created, allowing you to set menu data in it.
typedef void (*ArkUI_TextPrepareMenuCallback)(ArkUI_TextMenuItemArray* items, void* userData)ArkUI_TextPrepareMenuCallbackCallback for the text menu preparation event. This callback is called when the text selection area changes and before the menu is displayed, allowing you to set menu data in it.
typedef bool (*ArkUI_TextMenuItemClickCallback)(const ArkUI_TextMenuItem* item,int32_t start, int32_t end, void* userData)ArkUI_TextMenuItemClickCallbackCallback for the text menu item click event. This callback is called when a menu item is clicked. You can intercept the default processing behavior in this callback.
ArkUI_ErrorCode OH_ArkUI_TextEditMenuOptions_RegisterOnCreateMenuCallback(ArkUI_TextEditMenuOptions* editMenuOptions, void* userData, ArkUI_TextCreateMenuCallback cb)-Registers the callback for creating text menus.
ArkUI_ErrorCode OH_ArkUI_TextEditMenuOptions_RegisterOnPrepareMenuCallback(ArkUI_TextEditMenuOptions* editMenuOptions, void* userData, ArkUI_TextPrepareMenuCallback cb)-Registers the callback for preparing text menus.
ArkUI_ErrorCode OH_ArkUI_TextEditMenuOptions_RegisterOnMenuItemClickCallback(ArkUI_TextEditMenuOptions* editMenuOptions, void* userData, ArkUI_TextMenuItemClickCallback cb)-Registers the callback for text menu item clicks.
ArkUI_TextSelectionMenuOptions* OH_ArkUI_TextSelectionMenuOptions_Create()-Creates a custom text selection menu object.
void OH_ArkUI_TextSelectionMenuOptions_Dispose(ArkUI_TextSelectionMenuOptions* selectionMenuOptions)-Releases a custom text selection menu object.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetSpanType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextSpanType textSpanType)-Sets the text recognition type of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetSpanType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextSpanType* spanType)-Obtains the text recognition type of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetContentNode(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_NodeHandle node)-Sets the content node of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetContentNode(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_NodeHandle* node)-Obtains the content node of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetResponseType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextResponseType responseType)-Sets the response type of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetResponseType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextResponseType* responseType)-Obtains the response type of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuShowCallback(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, void* userData, void (*callback)(int32_t start, int32_t end, void* userData))-Registers the callback for the event of showing a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuHideCallback(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, void* userData, void (*callback)(int32_t start, int32_t end, void* userData))-Registers the callback for the event of hiding a custom text selection menu.
ArkUI_TextMarqueeOptions* OH_ArkUI_TextMarqueeOptions_Create()-Creates text marquee options.
void OH_ArkUI_TextMarqueeOptions_Dispose(ArkUI_TextMarqueeOptions* option)-Destroys the pointer to the text marquee option.
void OH_ArkUI_TextMarqueeOptions_SetStart(ArkUI_TextMarqueeOptions* option, bool start)-Sets whether to play the text marquee option.
bool OH_ArkUI_TextMarqueeOptions_GetStart(ArkUI_TextMarqueeOptions* option)-Obtains whether the text marquee option is played.
void OH_ArkUI_TextMarqueeOptions_SetStep(ArkUI_TextMarqueeOptions* option, float step)-Sets the step of the text marquee option.
float OH_ArkUI_TextMarqueeOptions_GetStep(ArkUI_TextMarqueeOptions* option)-Obtains the step of the text marquee option.
void OH_ArkUI_TextMarqueeOptions_SetSpacing(ArkUI_TextMarqueeOptions* option, float spacing)-Sets the distance between the start and end items of the text marquee option.
float OH_ArkUI_TextMarqueeOptions_GetSpacing(ArkUI_TextMarqueeOptions* option)-Obtains the distance between the start and end items of the text marquee option.
void OH_ArkUI_TextMarqueeOptions_SetLoop(ArkUI_TextMarqueeOptions* option, int32_t loop)-Sets the number of repetitions for looping the text marquee option. The value 0 or negative value indicates infinite looping.
int32_t OH_ArkUI_TextMarqueeOptions_GetLoop(ArkUI_TextMarqueeOptions* option)-Obtains the number of repetitions for looping the text marquee option.
void OH_ArkUI_TextMarqueeOptions_SetFromStart(ArkUI_TextMarqueeOptions* option, bool fromStart)-Sets the scrolling direction for looping the text marquee option.
bool OH_ArkUI_TextMarqueeOptions_GetFromStart(ArkUI_TextMarqueeOptions* option)-Obtains the scrolling direction for looping the text marquee option.
void OH_ArkUI_TextMarqueeOptions_SetDelay(ArkUI_TextMarqueeOptions* option, int32_t delay)-Sets the delay of each loop for the text marquee option.
int32_t OH_ArkUI_TextMarqueeOptions_GetDelay(ArkUI_TextMarqueeOptions* option)-Obtains the delay of each loop for the text marquee option.
void OH_ArkUI_TextMarqueeOptions_SetFadeout(ArkUI_TextMarqueeOptions* option, bool fadeout)-Sets whether the text marquee option supports a fade-out effect when the text is too long. When supported, if the text content exceeds the display range, the edges of the partially visible text will have a fade-out effect applied. If both ends have partially visible text, both ends will have the fade-out effect applied. When the fade-out effect is enabled, the NODE_CLIP attribute is automatically fixed at true and cannot be set to false.
bool OH_ArkUI_TextMarqueeOptions_GetFadeout(ArkUI_TextMarqueeOptions* option)-Obtains whether the text marquee option supports a fade-out effect when the text is too long.
void OH_ArkUI_TextMarqueeOptions_SetStartPolicy(ArkUI_TextMarqueeOptions* option, ArkUI_MarqueeStartPolicy startPolicy)-Sets the startup policy of the text marquee option.
ArkUI_MarqueeStartPolicy OH_ArkUI_TextMarqueeOptions_GetStartPolicy(ArkUI_TextMarqueeOptions* option)-Obtains the startup policy of the text marquee option.
void OH_ArkUI_TextMarqueeOptions_SetUpdatePolicy(ArkUI_TextMarqueeOptions* option, ArkUI_MarqueeUpdatePolicy updatePolicy)-Sets the update policy of the text marquee option.
ArkUI_MarqueeUpdatePolicy OH_ArkUI_TextMarqueeOptions_GetUpdatePolicy(ArkUI_TextMarqueeOptions* option)-Obtains the update policy of the text marquee option.
ArkUI_PickerIndicatorStyle OH_ArkUI_PickerIndicatorStyle_Create(ArkUI_PickerIndicatorType type)ArkUI_PickerIndicatorStyleCreates a style instance of the selected item indicator.
void OH_ArkUI_PickerIndicatorStyle_Dispose(ArkUI_PickerIndicatorStyle* style)-Disposes of the style instance of the selected item indicator.
ArkUI_ErrorCode OH_ArkUI_PickerIndicatorStyle_ConfigureBackground(ArkUI_PickerIndicatorStyle* style, ArkUI_PickerIndicatorBackground* background)-Sets the background style parameters. This API takes effect only when the type of the selected item indicator is ARKUI_PICKER_INDICATOR_BACKGROUND.
ArkUI_ErrorCode OH_ArkUI_PickerIndicatorStyle_ConfigureDivider(ArkUI_PickerIndicatorStyle* style, ArkUI_PickerIndicatorDivider* divider)-Sets the divider style parameters. This API takes effect only when the type of the selected item indicator is ARKUI_PICKER_INDICATOR_DIVIDER.
ArkUI_Matrix4ScaleOptions* OH_ArkUI_Matrix4ScaleOptions_Create()-Creates a pointer to the scaling parameter object for matrix operations. In the newly created object, the default scaling coefficients in the x, y, and z directions are 1. The default values of centerX and centerY of the transformation center point are 0.
void OH_ArkUI_Matrix4ScaleOptions_Dispose(ArkUI_Matrix4ScaleOptions* options)-Disposes of the pointer to the scaling parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetX(ArkUI_Matrix4ScaleOptions* options, const float scaleX)-Sets the scaling factor in the x direction of the scaling parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetX(const ArkUI_Matrix4ScaleOptions* options, float* scaleX)-Obtains the scaling factor in the x direction of the scaling parameter object for matrix operations. If the value of x is not set, the default value of the scaling factor in the x direction is 1.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetY(ArkUI_Matrix4ScaleOptions* options, const float scaleY)-Sets the scaling factor in the y direction of the scaling parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetY(const ArkUI_Matrix4ScaleOptions* options, float* scaleY)-Obtains the scaling factor in the y direction of the scaling parameter object for matrix operations. If the value of y is not set, the default value of the scaling factor in the y direction is 1.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetZ(ArkUI_Matrix4ScaleOptions* options, const float scaleZ)-Sets the scaling factor in the z direction of the scaling parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetZ(const ArkUI_Matrix4ScaleOptions* options, float* scaleZ)-Obtains the scaling factor in the z direction of the scaling parameter object for matrix operations. If the value of z is not set, the default value of the scaling factor in the z direction is 1.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetCenterX(ArkUI_Matrix4ScaleOptions* options, const float centerX)-Sets the x coordinate of the transformation center point of the scaling parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetCenterX(const ArkUI_Matrix4ScaleOptions* options, float* centerX)-Obtains the x coordinate of the transformation center point of the scaling parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetCenterY(ArkUI_Matrix4ScaleOptions* options, const float centerY)-Sets the y coordinate of the transformation center point of the scaling parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetCenterY(const ArkUI_Matrix4ScaleOptions* options, float* centerY)-Obtains the y coordinate of the transformation center point of the scaling parameter object for matrix operations.
ArkUI_Matrix4RotationOptions* OH_ArkUI_Matrix4RotationOptions_Create()-Creates a pointer to the rotation parameter object for matrix operations. In the newly created object, the default value of an x-axis offset (centerX) of a single matrix transformation center point relative to a component transformation center point, the default value of a y-axis offset (centerY) of the single matrix transformation center point relative to the component transformation center point, and the default value of a rotation angle (angle) are 0. If none of the direction vectors in the x, y, and z directions is specified, the value is equivalent to x=0, y=0, and z=1, indicating rotation around the z-axis. Once any of the direction vectors in the x, y, and z directions is specified, the unspecified values are equivalent to 0.
void OH_ArkUI_Matrix4RotationOptions_Dispose(ArkUI_Matrix4RotationOptions* options)-Disposes of the pointer to the rotation parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetX(ArkUI_Matrix4RotationOptions* options, const float x)-Sets the direction vector in the x direction of the rotation parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetX(const ArkUI_Matrix4RotationOptions* options, float* x)-Obtains the direction vector in the x direction of the rotation parameter object for matrix operations. If the value of x has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetY(ArkUI_Matrix4RotationOptions* options, const float y)-Sets the direction vector in the y direction of the rotation parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetY(const ArkUI_Matrix4RotationOptions* options, float* y)-Obtains the direction vector in the y direction of the rotation parameter object for matrix operations. If the value of y has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetZ(ArkUI_Matrix4RotationOptions* options, const float z)-Sets the direction vector in the z direction of the rotation parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetZ(const ArkUI_Matrix4RotationOptions* options, float* z)-Obtains the direction vector in the z direction of the rotation parameter object for matrix operations. If the value of z has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetAngle(ArkUI_Matrix4RotationOptions* options, const float angle)-Sets the rotation angle in the rotation parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetAngle(const ArkUI_Matrix4RotationOptions* options, float* angle)-Obtains the rotation angle in the rotation parameter object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetCenterX(ArkUI_Matrix4RotationOptions* options, const float centerX)-Sets the x-axis offset of a single matrix transformation center point relative to a component transformation center point.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetCenterX(const ArkUI_Matrix4RotationOptions* options, float* centerX)-Obtains the x-axis offset of a single matrix transformation center point relative to a component transformation center point.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetCenterY(ArkUI_Matrix4RotationOptions* options, const float centerY)-Sets the y-axis offset of a single matrix transformation center point relative to a component transformation center point.
ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetCenterY(const ArkUI_Matrix4RotationOptions* options, float* centerY)-Obtains the y-axis offset of a single matrix transformation center point relative to a component transformation center point.
ArkUI_Matrix4TranslationOptions* OH_ArkUI_Matrix4TranslationOptions_Create()-Creates a pointer to a translation object for matrix operations. In the newly created object, the default translation distances on the x, y, and z axes are 0.
void OH_ArkUI_Matrix4TranslationOptions_Dispose(ArkUI_Matrix4TranslationOptions* options)-Disposes of a pointer to a translation object for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetX(ArkUI_Matrix4TranslationOptions* options, const float x)-Sets the translation value of a translation object on the x-axis for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetX(const ArkUI_Matrix4TranslationOptions* options, float* x)-Obtains the translation value of a translation object on the x-axis for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetY(ArkUI_Matrix4TranslationOptions* options, const float y)-Sets the translation value of a translation object on the y-axis for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetY(const ArkUI_Matrix4TranslationOptions* options, float* y)-Obtains the translation value of a translation object on the y-axis for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetZ(ArkUI_Matrix4TranslationOptions* options, const float z)-Sets the translation value of a translation object on the z-axis for matrix operations.
ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetZ(const ArkUI_Matrix4TranslationOptions* options, float* z)-Obtains the translation value of a translation object on the z-axis for matrix operations.
ArkUI_Matrix4* OH_ArkUI_Matrix4_CreateIdentity()-Creates a fourth-order identity matrix object.
ArkUI_Matrix4* OH_ArkUI_Matrix4_CreateByElements(const float* elements)-Creates a fourth-order matrix object by specifying each element of the matrix.
void OH_ArkUI_Matrix4_Dispose(ArkUI_Matrix4* matrix)-Disposes of the pointer to the matrix object.
ArkUI_Matrix4* OH_ArkUI_Matrix4_Copy(const ArkUI_Matrix4* matrix)-Creates a copy of a fourth-order matrix object. Performs operations on the same matrix to obtain different matrix objects.
ArkUI_ErrorCode OH_ArkUI_Matrix4_Invert(ArkUI_Matrix4* matrix)-Performs inverse matrix transformation on an input matrix.
ArkUI_ErrorCode OH_ArkUI_Matrix4_Combine(ArkUI_Matrix4* oriMatrix, const ArkUI_Matrix4* anotherMatrix)-Combines another matrix with the original matrix and stores the result matrix in oriMatrix. In this case, the result matrix applies the transformation of oriMatrix and then applies the transformation of anotherMatrix. This function will modify the oriMatrix object.
ArkUI_ErrorCode OH_ArkUI_Matrix4_Translate(ArkUI_Matrix4* matrix, const ArkUI_Matrix4TranslationOptions* translate)(capi-arkui-nativemodule-arkui-matrix4translationoptions)-Applies translation transformation to the original matrix to obtain the translated matrix. Each translation transformation is accumulated on the previous matrix. The input matrix object will be modified after the transformation.
ArkUI_ErrorCode OH_ArkUI_Matrix4_Scale(ArkUI_Matrix4* matrix, const ArkUI_Matrix4ScaleOptions* scale)-Applies scaling transformation to the original matrix to obtain the scaled matrix. Each scaling transformation is accumulated on the previous matrix. This function will modify the input matrix object.
ArkUI_ErrorCode OH_ArkUI_Matrix4_Rotate(ArkUI_Matrix4* matrix, const ArkUI_Matrix4RotationOptions* rotate)-Applies rotation transformation to the original matrix to obtain the rotated matrix. Each rotation transformation is accumulated on the previous matrix. This function will modify the input matrix object.
ArkUI_ErrorCode OH_ArkUI_Matrix4_Skew(ArkUI_Matrix4* matrix, const float skewX, const float skewY)-Applies skew transformation to the original matrix to obtain the skewed matrix. Each skew transformation is accumulated on the previous matrix. The input matrix object will be modified after the transformation.
ArkUI_ErrorCode OH_ArkUI_Matrix4_TransformPoint(const ArkUI_Matrix4* matrix, const ArkUI_PointF* oriPoint, ArkUI_PointF* result)-Calculates the new coordinates of a point after matrix transformation.
ArkUI_ErrorCode OH_ArkUI_Matrix4_SetPolyToPoly(ArkUI_Matrix4* matrix, const ArkUI_PointF* src, const ArkUI_PointF* dst, const uint32_t pointCount)-Maps the vertex coordinates of a polygon to those of another polygon and calculates the required matrix.
ArkUI_ErrorCode OH_ArkUI_Matrix4_GetElements(const ArkUI_Matrix4* matrix, float* result)-Obtains the 16 elements of a fourth-order matrix.
OH_ArkUI_DecorationStyleOptions* OH_ArkUI_DecorationStyleOptions_Create()-Creates a decorative line style object. When the object is no longer used, call OH_ArkUI_DecorationStyleOptions_Destroy to destroy it.
void OH_ArkUI_DecorationStyleOptions_Destroy(OH_ArkUI_DecorationStyleOptions* options)-Destroys the decorative line style object.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetTextDecorationType(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationType type)-Sets the decoration type of the decorative line style.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetTextDecorationType(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationType* type)-Obtains the decoration type of the decorative line style.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetColor(OH_ArkUI_DecorationStyleOptions* options, uint32_t color)-Sets the color of the decorative line.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetColor(OH_ArkUI_DecorationStyleOptions* options, uint32_t* color)-Obtains the color of the decorative line.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetTextDecorationStyle(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationStyle style)-Sets the style of the decorative line.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetTextDecorationStyle(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationStyle* style)-Obtains the style of the decorative line.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetThicknessScale(OH_ArkUI_DecorationStyleOptions* options, float thicknessScale)-Sets the scale factor of the decorative line thickness.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetThicknessScale(OH_ArkUI_DecorationStyleOptions* options, float* thicknessScale)-Obtains the scale factor of the decorative line thickness.
OH_ArkUI_TextDataDetectorConfig* OH_ArkUI_TextDataDetectorConfig_Create()-Creates a text entity recognition configuration object. When the object is no longer used, call OH_ArkUI_TextDataDetectorConfig_Destroy to destroy it.
void OH_ArkUI_TextDataDetectorConfig_Destroy(OH_ArkUI_TextDataDetectorConfig* config)-Destroys the text entity recognition configuration object.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetTypes(OH_ArkUI_TextDataDetectorConfig* config, const ArkUI_TextDataDetectorType* types, int32_t length)-Sets the types of the text entity recognition configuration.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetTypes(OH_ArkUI_TextDataDetectorConfig* config, ArkUI_TextDataDetectorType* buffer, int32_t bufferSize, int32_t* writeLength)-Obtains the types of text entity recognition configuration.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_RegisterOnDetectResultUpdateCallback(OH_ArkUI_TextDataDetectorConfig* config, void* userData, void (*callback)(const char* result, int32_t length, void* userData))-Sets the callback for text entity recognition result updates.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetColor(OH_ArkUI_TextDataDetectorConfig* config, uint32_t color)-Sets the color of the recognized content.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetColor(OH_ArkUI_TextDataDetectorConfig* config, uint32_t* color)-Obtains the color of the recognized content.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetDecorationStyleOptions(OH_ArkUI_TextDataDetectorConfig* config, OH_ArkUI_DecorationStyleOptions* decoration)-Sets the decoration style of the recognized content.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetDecorationStyleOptions(OH_ArkUI_TextDataDetectorConfig* config, OH_ArkUI_DecorationStyleOptions* decoration)-Obtains the decoration style of the recognized content.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetEnablePreviewMenu(OH_ArkUI_TextDataDetectorConfig* config, bool enablePreviewMenu)-Sets whether to display the preview menu when the recognized content is long-pressed.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetEnablePreviewMenu(OH_ArkUI_TextDataDetectorConfig* config, bool* enablePreviewMenu)-Obtains whether the preview menu is displayed when the recognized content is long-pressed.
OH_ArkUI_TextEditorPlaceholderOptions* OH_ArkUI_TextEditorPlaceholderOptions_Create()-Creates an option object for the placeholder text used when there is no input. When the object is no longer used, call OH_ArkUI_TextEditorPlaceholderOptions_Destroy to destroy it.
void OH_ArkUI_TextEditorPlaceholderOptions_Destroy(OH_ArkUI_TextEditorPlaceholderOptions* options)-Destroys the option object for the placeholder text used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetValue(OH_ArkUI_TextEditorPlaceholderOptions* options, const char* value)-Sets the text for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetValue(OH_ArkUI_TextEditorPlaceholderOptions* options, char* buffer, int32_t bufferSize, int32_t* writeLength)-Obtains the text for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontSize(OH_ArkUI_TextEditorPlaceholderOptions* options, float fontSize)-Sets the font size for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontSize(OH_ArkUI_TextEditorPlaceholderOptions* options, float* fontSize)-Obtains the font size for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontWeight(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t fontWeight)-Sets the font weight for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontWeight(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t* fontWeight)-Obtains the font weight for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontFamily(OH_ArkUI_TextEditorPlaceholderOptions* options, const char* fontFamily)-Sets the font family for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontFamily(OH_ArkUI_TextEditorPlaceholderOptions* options, char* buffer, int32_t bufferSize, int32_t* writeLength)-Obtains the font family for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontStyle(OH_ArkUI_TextEditorPlaceholderOptions* options, ArkUI_FontStyle fontStyle)-Sets the font style for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontStyle(OH_ArkUI_TextEditorPlaceholderOptions* options, ArkUI_FontStyle* fontStyle)-Obtains the font style for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontColor(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t fontColor)-Sets the font color for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontColor(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t* fontColor)-Obtains the font color for the placeholder text options used when there is no input.
OH_ArkUI_TextEditorStyledStringController* OH_ArkUI_TextEditorStyledStringController_Create()-Creates a styled string controller object for the text editor. When the object is no longer used, call OH_ArkUI_TextEditorStyledStringController_Destroy to destroy it.
void OH_ArkUI_TextEditorStyledStringController_Destroy(OH_ArkUI_TextEditorStyledStringController* controller)-Destroys the styled string controller object.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetCaretOffset(OH_ArkUI_TextEditorStyledStringController* controller, int32_t caretOffset)-Sets the caret offset using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetCaretOffset(OH_ArkUI_TextEditorStyledStringController* controller, int32_t* caretOffset)-Obtains the caret offset using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetSelection(OH_ArkUI_TextEditorStyledStringController* controller, uint32_t start, uint32_t end, ArkUI_MenuPolicy menuPolicy)-Sets the selected area using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_IsEditing(OH_ArkUI_TextEditorStyledStringController* controller, bool* isEditing)-Obtains the editing status of the text editor using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_StopEditing(OH_ArkUI_TextEditorStyledStringController* controller)-Exits the editing status of the text editor using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetPreviewText(OH_ArkUI_TextEditorStyledStringController* controller, uint32_t* offset, char* buffer, int32_t bufferSize, int32_t* writeLength)-Obtains the preview text using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetCaretRect(OH_ArkUI_TextEditorStyledStringController* controller, ArkUI_Rect* rect)-Obtains the caret-selected rectangle using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_DeleteBackward(OH_ArkUI_TextEditorStyledStringController* controller)-Deletes characters using the styled string controller. If no content is selected, one character before the current caret position is deleted. If content is selected, the selected content is deleted.
OH_ArkUI_TextEditorParagraphStyle* OH_ArkUI_TextEditorParagraphStyle_Create()-Creates a paragraph style object for the text editor. When the object is no longer used, call OH_ArkUI_TextEditorParagraphStyle_Destroy to destroy it.
void OH_ArkUI_TextEditorParagraphStyle_Destroy(OH_ArkUI_TextEditorParagraphStyle* style)-Destroys the paragraph style object.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetTextAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextAlignment align)-Sets the text alignment mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetTextAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextAlignment* align)-Obtains the text alignment mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginPixelMap(OH_ArkUI_TextEditorParagraphStyle* style, struct OH_PixelmapNative* pixelmap)-Sets the PixelMap for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginPixelMap(OH_ArkUI_TextEditorParagraphStyle* style, struct OH_PixelmapNative** pixelmap)-Obtains the PixelMap for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginWidth(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t width)-Sets the width for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginWidth(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t* width)-Obtains the width for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginHeight(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t height)-Sets the height for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginHeight(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t* height)-Obtains the height for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetWordBreak(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_WordBreak wordBreak)-Sets the word breaking mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetWordBreak(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_WordBreak* wordBreak)-Obtains the word breaking mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLineBreakStrategy(OH_ArkUI_TextEditorParagraphStyle* style, OH_ArkUI_LineBreakStrategy lineBreakStrategy)-Sets the line breaking strategy in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLineBreakStrategy(OH_ArkUI_TextEditorParagraphStyle* style, OH_ArkUI_LineBreakStrategy* lineBreakStrategy)-Obtains the line breaking strategy in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetParagraphSpacing(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t paragraphSpacing)-Sets the paragraph spacing in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetParagraphSpacing(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t* paragraphSpacing)-Obtains the paragraph spacing in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetTextVerticalAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextVerticalAlignment verticalAlignment)-Sets the text vertical alignment mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetTextVerticalAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextVerticalAlignment* verticalAlignment)-Obtains the text vertical alignment mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetTextDirection(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextDirection textDirection)-Sets the text direction in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetTextDirection(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextDirection* textDirection)-Obtains the text direction in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetTypingParagraphStyle(OH_ArkUI_TextEditorStyledStringController* controller, OH_ArkUI_TextEditorParagraphStyle* style)-Sets the typing paragraph style using the styled string controller.
OH_ArkUI_ShadowOptions* OH_ArkUI_ShadowOptions_Create()-Creates a shadow option object. When the object is no longer used, call OH_ArkUI_ShadowOptions_Destroy to destroy it.
void OH_ArkUI_ShadowOptions_Destroy(OH_ArkUI_ShadowOptions* options)-Destroys the shadow option object.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetRadius(OH_ArkUI_ShadowOptions* options, float radius)-Sets the blur radius for the shadow options.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetRadius(OH_ArkUI_ShadowOptions* options, float* radius)-Obtains the blur radius for the shadow options.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetType(OH_ArkUI_ShadowOptions* options, ArkUI_ShadowType type)-Sets the shadow type for the shadow options.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetType(OH_ArkUI_ShadowOptions* options, ArkUI_ShadowType* type)-Obtains the shadow type for the shadow options.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetColor(OH_ArkUI_ShadowOptions* options, uint32_t color)-Sets the shadow color for the shadow options.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetColor(OH_ArkUI_ShadowOptions* options, uint32_t* color)-Obtains the shadow color for the shadow options.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetOffsetX(OH_ArkUI_ShadowOptions* options, float offsetX)-Sets the shadow offset on the x-axis.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetOffsetX(OH_ArkUI_ShadowOptions* options, float* offsetX)-Obtains the shadow offset on the x-axis.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetOffsetY(OH_ArkUI_ShadowOptions* options, float offsetY)-Sets the shadow offset on the y-axis.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetOffsetY(OH_ArkUI_ShadowOptions* options, float* offsetY)-Obtains the shadow offset on the y-axis.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetFill(OH_ArkUI_ShadowOptions* options, bool isFill)-Sets whether to fill a component with a shadow.
ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetFill(OH_ArkUI_ShadowOptions* options, bool* isFill)-Obtains whether a component is filled with a shadow.
OH_ArkUI_TextEditorTextStyle* OH_ArkUI_TextEditorTextStyle_Create()-Creates a text style object. When the object is no longer used, call OH_ArkUI_TextEditorTextStyle_Destroy to destroy it.
void OH_ArkUI_TextEditorTextStyle_Destroy(OH_ArkUI_TextEditorTextStyle* style)-Destroys the text style object.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t color)-Sets the font color of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t* color)-Obtains the font color of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontSize(OH_ArkUI_TextEditorTextStyle* style, float size)-Sets the font size of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontSize(OH_ArkUI_TextEditorTextStyle* style, float* size)-Obtains the font size of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontStyle(OH_ArkUI_TextEditorTextStyle* style, ArkUI_FontStyle fontStyle)-Sets the font style of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontStyle(OH_ArkUI_TextEditorTextStyle* style, ArkUI_FontStyle* fontStyle)-Obtains the font style of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontWeight(OH_ArkUI_TextEditorTextStyle* style, uint32_t fontWeight)-Sets the font weight of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontWeight(OH_ArkUI_TextEditorTextStyle* style, uint32_t* fontWeight)-Obtains the font weight of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontFamily(OH_ArkUI_TextEditorTextStyle* style, const char* fontFamily)-Sets the font family of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontFamily(OH_ArkUI_TextEditorTextStyle* style, char* buffer, int32_t bufferSize, int32_t* writeLength)-Obtains the font family of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetDecoration(OH_ArkUI_TextEditorTextStyle* style, OH_ArkUI_DecorationStyleOptions* options)-Sets the text decoration options of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetDecoration(OH_ArkUI_TextEditorTextStyle* style, OH_ArkUI_DecorationStyleOptions* options)-Obtains the text decoration options of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetTextShadows(OH_ArkUI_TextEditorTextStyle* style, const OH_ArkUI_ShadowOptions** options, int32_t length)-Sets the text shadow options of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetTextShadows(OH_ArkUI_TextEditorTextStyle* style, OH_ArkUI_ShadowOptions** shadowOptions, uint32_t shadowOptionsSize, uint32_t* writeLength)-Obtains the text shadow options of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetLineHeight(OH_ArkUI_TextEditorTextStyle* style, int32_t lineHeight)-Sets the line height of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetLineHeight(OH_ArkUI_TextEditorTextStyle* style, int32_t* lineHeight)-Obtains the line height of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetLetterSpacing(OH_ArkUI_TextEditorTextStyle* style, int32_t letterSpacing)-Sets the letter spacing of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetLetterSpacing(OH_ArkUI_TextEditorTextStyle* style, int32_t* letterSpacing)-Obtains the letter spacing of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontFeature(OH_ArkUI_TextEditorTextStyle* style, const char* fontFeature)-Sets the font feature of the text style, such as monospaced digits.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontFeature(OH_ArkUI_TextEditorTextStyle* style, char* buffer, int32_t bufferSize, int32_t* writeLength)-Obtains the font feature of the text style, such as monospaced digits.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetHalfLeading(OH_ArkUI_TextEditorTextStyle* style, bool halfLeading)-Sets whether to evenly distribute the line spacing to the top and bottom of each line in the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetHalfLeading(OH_ArkUI_TextEditorTextStyle* style, bool* halfLeading)-Obtains whether the line spacing is evenly distributed to the top and bottom of each line in the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetTextBackgroundColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t color)-Sets the text background color of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetTextBackgroundColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t* color)-Obtains the text background color of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetTextBackgroundRadius(OH_ArkUI_TextEditorTextStyle* style, float topLeft, float topRight, float bottomLeft, float bottomRight)-Sets the radius of the rounded corners of the text background of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetTextBackgroundRadius(OH_ArkUI_TextEditorTextStyle* style, float* topLeft, float* topRight, float* bottomLeft, float* bottomRight)-Obtains the radius of the rounded corners of the text background of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetTypingStyle(OH_ArkUI_TextEditorStyledStringController* controller, OH_ArkUI_TextEditorTextStyle* style)-Sets the typing style using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetTypingStyle(OH_ArkUI_TextEditorStyledStringController* controller, OH_ArkUI_TextEditorTextStyle* style)-Obtains the typing style using the styled string controller.
OH_ArkUI_TextEditorSelectionMenuOptions* OH_ArkUI_TextEditorSelectionMenuOptions_Create()-Creates a text selection menu option object of the text editor. When the object is no longer used, call OH_ArkUI_TextEditorSelectionMenuOptions_Destroy to destroy it.
void OH_ArkUI_TextEditorSelectionMenuOptions_Destroy(OH_ArkUI_TextEditorSelectionMenuOptions* options)-Destroys the text selection menu option object of the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetSpanType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorSpanType textEditorSpanType)-Sets the span type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetSpanType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorSpanType* textEditorSpanType)-Obtains the span type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetContentNode(OH_ArkUI_TextEditorSelectionMenuOptions* options, ArkUI_NodeHandle node)-Sets the content node of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetContentNode(OH_ArkUI_TextEditorSelectionMenuOptions* options, ArkUI_NodeHandle* node)-Obtains the content node of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetResponseType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorResponseType responseType)-Sets the response type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetResponseType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorResponseType* responseType)-Obtains the response type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetMenuType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextMenuType menuType)-Sets the type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetMenuType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextMenuType* menuType)-Obtains the type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuShowCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(int32_t start, int32_t end, void* callbackUserData))-Sets the callback triggered when the text selection menu is displayed.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuHideCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(int32_t start, int32_t end, void* callbackUserData))-Sets the callback triggered when the text selection menu is hidden.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuAppearCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(int32_t start, int32_t end, void* callbackUserData))-Sets the callback triggered when the text selection menu appears.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuDisappearCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(void* callbackUserData))-Sets the callback triggered when the text selection menu disappears.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetHapticFeedbackMode(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_HapticFeedbackMode mode)-Sets the haptic feedback mode of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetHapticFeedbackMode(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_HapticFeedbackMode* mode)-Obtains the haptic feedback mode of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_CloseSelectionMenu(OH_ArkUI_TextEditorStyledStringController* controller)-Closes the text selection menu of the styled string controller in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetSelection(const OH_ArkUI_TextEditorStyledStringController* controller, uint32_t* start, uint32_t* end)-Obtains the selected area using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetStyledString(const OH_ArkUI_TextEditorStyledStringController* controller, const ArkUI_StyledString_Descriptor* descriptor)-Sets the styled string displayed using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetStyledString(const OH_ArkUI_TextEditorStyledStringController* controller, ArkUI_StyledString_Descriptor* descriptor)-Obtains the styled string displayed using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetStyledPlaceholder(const OH_ArkUI_TextEditorStyledStringController* controller, const ArkUI_StyledString_Descriptor* descriptor)-Sets the placeholder text in the styled string style using the styled string controller.
OH_ArkUI_FontWeightConfigs* OH_ArkUI_FontWeightConfigs_Create()-Creates a text font weight configuration object.
void OH_ArkUI_FontWeightConfigs_Destroy(OH_ArkUI_FontWeightConfigs* option)-Destroys the text font weight configuration object.
void OH_ArkUI_FontWeightConfigs_SetEnableVariableFontWeight(OH_ArkUI_FontWeightConfigs* option, bool enable)-Sets whether to enable variable font weight adjustment.
bool OH_ArkUI_FontWeightConfigs_GetEnableVariableFontWeight(OH_ArkUI_FontWeightConfigs* option)-Obtains whether variable font weight adjustment is enabled for the text font weight configuration object.
void OH_ArkUI_FontWeightConfigs_SetEnableDeviceFontWeightCategory(OH_ArkUI_FontWeightConfigs* option, bool enable)-Sets whether to automatically update the text font weight when the font weight level of the device changes.
bool OH_ArkUI_FontWeightConfigs_GetEnableDeviceFontWeightCategory(OH_ArkUI_FontWeightConfigs* option)-Obtains whether the text font weight is updated along with the font weight level of the device.
OH_ArkUI_FontConfigs* OH_ArkUI_FontConfigs_Create()-Creates a text font configuration object.
void OH_ArkUI_FontConfigs_Destroy(OH_ArkUI_FontConfigs* option)-Destroys the text font configuration object.
void OH_ArkUI_FontConfigs_SetFontWeightConfigs(OH_ArkUI_FontConfigs* option, OH_ArkUI_FontWeightConfigs* fontWeightConfigs)-Sets the text font weight configurations for the text font configuration object.
OH_ArkUI_FontWeightConfigs* OH_ArkUI_FontConfigs_GetFontWeightConfigs(OH_ArkUI_FontConfigs* option)-Obtains the text font weight configurations of the text font configuration object.
OH_ArkUI_TextController* OH_ArkUI_TextController_Create()-Creates a text component controller object.
void OH_ArkUI_TextController_Destroy(OH_ArkUI_TextController* controller)-Destroys the text component controller object.
ArkUI_ErrorCode OH_ArkUI_TextController_SetStyledString(OH_ArkUI_TextController* controller, ArkUI_StyledString_Descriptor* descriptor)-Sets a styled string for the text component.

Enum Description

ArkUI_Alignment

enum ArkUI_Alignment

Description

Enumerates the alignment modes.

Since: 12

ValueDescription
ARKUI_ALIGNMENT_TOP_START = 0Top start. This is the default value.
ARKUI_ALIGNMENT_TOP = 1Top center.
ARKUI_ALIGNMENT_TOP_END = 2Top end.
ARKUI_ALIGNMENT_START = 3Vertically centered start.
ARKUI_ALIGNMENT_CENTER = 4Horizontally and vertically centered.
ARKUI_ALIGNMENT_END = 5Vertically centered end.
ARKUI_ALIGNMENT_BOTTOM_START = 6Bottom start.
ARKUI_ALIGNMENT_BOTTOM = 7Horizontally centered on the bottom.
ARKUI_ALIGNMENT_BOTTOM_END = 8Bottom end.

ArkUI_ImageRepeat

enum ArkUI_ImageRepeat

Description

Enumerates the image repeat patterns.

Since: 12

ValueDescription
ARKUI_IMAGE_REPEAT_NONE = 0The image is not repeatedly drawn.
ARKUI_IMAGE_REPEAT_X = 1The image is repeatedly drawn only along the x-axis.
ARKUI_IMAGE_REPEAT_Y = 2The image is repeatedly drawn only along the y-axis.
ARKUI_IMAGE_REPEAT_XY = 3The image is repeatedly drawn along both axes.

ArkUI_FontStyle

enum ArkUI_FontStyle

Description

Enumerates the font styles.

Since: 12

ValueDescription
ARKUI_FONT_STYLE_NORMAL = 0Standard font style.
ARKUI_FONT_STYLE_ITALIC = 1Italic font style.

ArkUI_FontWeight

enum ArkUI_FontWeight

Description

Enumerates the font weights.

Since: 12

ValueDescription
ARKUI_FONT_WEIGHT_W100 = 0100
ARKUI_FONT_WEIGHT_W200 = 1200
ARKUI_FONT_WEIGHT_W300 = 2300
ARKUI_FONT_WEIGHT_W400 = 3400
ARKUI_FONT_WEIGHT_W500 = 4500
ARKUI_FONT_WEIGHT_W600 = 5600
ARKUI_FONT_WEIGHT_W700 = 6700
ARKUI_FONT_WEIGHT_W800 = 7800
ARKUI_FONT_WEIGHT_W900 = 8900
ARKUI_FONT_WEIGHT_BOLD = 9The font weight is bold.
ARKUI_FONT_WEIGHT_NORMAL = 10The font weight is normal.
ARKUI_FONT_WEIGHT_BOLDER = 11The font weight is bolder.
ARKUI_FONT_WEIGHT_LIGHTER = 12The font weight is lighter.
ARKUI_FONT_WEIGHT_MEDIUM = 13The font weight is medium.
ARKUI_FONT_WEIGHT_REGULAR = 14The font weight is normal.

ArkUI_TextAlignment

enum ArkUI_TextAlignment

Description

Enumerates text alignment modes.

Since: 12

ValueDescription
ARKUI_TEXT_ALIGNMENT_START = 0Aligned with the start.
ARKUI_TEXT_ALIGNMENT_CENTER = 1Horizontally centered.
ARKUI_TEXT_ALIGNMENT_END = 2Aligned with the end.
ARKUI_TEXT_ALIGNMENT_JUSTIFY = 3Aligned with both margins.
ARKUI_TEXT_ALIGNMENT_LEFT_TO_RIGHT = 4Aligned from left to right.
Since: 23
ARKUI_TEXT_ALIGNMENT_RIGHT_TO_LEFT = 5Aligned from right to left.
Since: 23

ArkUI_TextVerticalAlignment

enum ArkUI_TextVerticalAlignment

Description

Enumerates text vertical alignment styles.

Since: 20

ValueDescription
ARKUI_TEXT_VERTICAL_ALIGNMENT_BASELINE = 0Aligned to the baseline.
ARKUI_TEXT_VERTICAL_ALIGNMENT_BOTTOM = 1Bottom aligned.
ARKUI_TEXT_VERTICAL_ALIGNMENT_CENTER = 2The list item is centered along
ARKUI_TEXT_VERTICAL_ALIGNMENT_TOP = 3Top aligned.

ArkUI_TextContentAlign

enum ArkUI_TextContentAlign

Description

Enumerates vertical alignment styles in the text content area.

Since: 21

ValueDescription
ARKUI_TEXT_CONTENT_ALIGN_TOP = 0Top aligned.
ARKUI_TEXT_CONTENT_ALIGN_CENTER = 1The list item is centered along
ARKUI_TEXT_CONTENT_ALIGN_BOTTOM = 2Bottom aligned.

ArkUI_TextDirection

enum ArkUI_TextDirection

Description

Enumerates the text layout directions.

Since: 23

ValueDescription
ARKUI_TEXT_DIRECTION_LTR = 0From left to right.
ARKUI_TEXT_DIRECTION_RTL = 1From right to left.
ARKUI_TEXT_DIRECTION_DEFAULT = 2Follow the component layout.
ARKUI_TEXT_DIRECTION_AUTO = 3Follow the writing direction of the content. For example, for right-to-left (RTL) languages (such as Tibetan and Uyghur), the text is laid out from right to left. For left-to-right (LTR) languages (such as Chinese and English), the text is laid out from left to right.

ArkUI_EnterKeyType

enum ArkUI_EnterKeyType

Description

Enumerates the types of the Enter key for a single-line text box.

Since: 12

ValueDescription
ARKUI_ENTER_KEY_TYPE_GO = 2The Enter key is labeled "Go."
ARKUI_ENTER_KEY_TYPE_SEARCH = 3The Enter key is labeled "Search."
ARKUI_ENTER_KEY_TYPE_SEND = 4The Enter key is labeled "Send."
ARKUI_ENTER_KEY_TYPE_NEXT = 5The Enter key is labeled "Next."
ARKUI_ENTER_KEY_TYPE_DONE = 6The Enter key is labeled "Done."
ARKUI_ENTER_KEY_TYPE_PREVIOUS = 7The Enter key is labeled "Previous."
ARKUI_ENTER_KEY_TYPE_NEW_LINE = 8The Enter key is labeled "Return."

ArkUI_TextInputType

enum ArkUI_TextInputType

Description

Enumerates the input method type of a single-line text.

Since: 12

ValueDescription
ARKUI_TEXTINPUT_TYPE_NORMAL = 0Normal input mode.
ARKUI_TEXTINPUT_TYPE_NUMBER = 2Number input mode.
ARKUI_TEXTINPUT_TYPE_PHONE_NUMBER = 3Phone number input mode.
ARKUI_TEXTINPUT_TYPE_EMAIL = 5Email address input mode.
ARKUI_TEXTINPUT_TYPE_PASSWORD = 7Password input mode.
ARKUI_TEXTINPUT_TYPE_NUMBER_PASSWORD = 8Numeric password input mode.
ARKUI_TEXTINPUT_TYPE_SCREEN_LOCK_PASSWORD = 9Lock screen password input mode.
ARKUI_TEXTINPUT_TYPE_USER_NAME = 10Username input mode.
ARKUI_TEXTINPUT_TYPE_NEW_PASSWORD = 11New password input mode.
ARKUI_TEXTINPUT_TYPE_NUMBER_DECIMAL = 12Number input mode with a decimal point.
ARKUI_TEXTINPUT_TYPE_ONE_TIME_CODE = 14Verification code input mode.
Since: 20

ArkUI_TextAreaType

enum ArkUI_TextAreaType

Description

Enumerates the input method types of a multi-line text.

Since: 12

ValueDescription
ARKUI_TEXTAREA_TYPE_NORMAL = 0Normal input mode.
ARKUI_TEXTAREA_TYPE_NUMBER = 2Number input mode.
ARKUI_TEXTAREA_TYPE_PHONE_NUMBER = 3Phone number input mode.
ARKUI_TEXTAREA_TYPE_EMAIL = 5Email address input mode.
ARKUI_TEXTAREA_TYPE_ONE_TIME_CODE = 14Verification code input mode.
Since: 20

ArkUI_CancelButtonStyle

enum ArkUI_CancelButtonStyle

Description

Enumerates the styles of the Cancel button.

Since: 12

ValueDescription
ARKUI_CANCELBUTTON_STYLE_CONSTANT = 0The Cancel button is always displayed.
ARKUI_CANCELBUTTON_STYLE_INVISIBLE = 1The Cancel button is always hidden.
ARKUI_CANCELBUTTON_STYLE_INPUT = 2The Cancel button is displayed when there is text input.

ArkUI_XComponentType

enum ArkUI_XComponentType

Description

Enumerates the types of the XComponent component.

Since: 12

ValueDescription
ARKUI_XCOMPONENT_TYPE_SURFACE = 0The custom content of EGL/OpenGL ES and media data is displayed individually on the screen.
ARKUI_XCOMPONENT_TYPE_TEXTURE = 2The custom content of EGL/OpenGL ES and media data is grouped and displayed together with content of the component.

ArkUI_ProgressType

enum ArkUI_ProgressType

Description

Enumerates the styles of the progress indicator.

Since: 12

ValueDescription
ARKUI_PROGRESS_TYPE_LINEAR = 0Linear type.
ARKUI_PROGRESS_TYPE_RING = 1Ring style without scale marks.
ARKUI_PROGRESS_TYPE_ECLIPSE = 2Eclipse style.
ARKUI_PROGRESS_TYPE_SCALE_RING = 3Ring style with scale marks.
ARKUI_PROGRESS_TYPE_CAPSULE = 4Capsule style.

ArkUI_TextDecorationType

enum ArkUI_TextDecorationType

Description

Enumerates the text decoration types.

Since: 12

ValueDescription
ARKUI_TEXT_DECORATION_TYPE_NONE = 0No text decoration.
ARKUI_TEXT_DECORATION_TYPE_UNDERLINE = 1Line under the text.
ARKUI_TEXT_DECORATION_TYPE_OVERLINE = 2Line over the text.
ARKUI_TEXT_DECORATION_TYPE_LINE_THROUGH = 3Line through the text.

ArkUI_TextDecorationStyle

enum ArkUI_TextDecorationStyle

Description

Enumerates the text decoration styles.

Since: 12

ValueDescription
ARKUI_TEXT_DECORATION_STYLE_SOLID = 0Single solid line.
ARKUI_TEXT_DECORATION_STYLE_DOUBLE = 1Double solid line.
ARKUI_TEXT_DECORATION_STYLE_DOTTED = 2Dotted line.
ARKUI_TEXT_DECORATION_STYLE_DASHED = 3Dashed style.
ARKUI_TEXT_DECORATION_STYLE_WAVY = 4Wavy line.

ArkUI_TextCase

enum ArkUI_TextCase

Description

Enumerates the text cases.

Since: 12

ValueDescription
ARKUI_TEXT_CASE_NORMAL = 0The original case of the text is retained.
ARKUI_TEXT_CASE_LOWER = 1All letters in the text are in lowercase.
ARKUI_TEXT_CASE_UPPER = 2All letters in the text are in uppercase.

ArkUI_CopyOptions

enum ArkUI_CopyOptions

Description

Enumerates the text copy and paste modes.

Since: 12

ValueDescription
ARKUI_COPY_OPTIONS_NONE = 0Copy is not allowed.
ARKUI_COPY_OPTIONS_IN_APP = 1Intra-application copy is allowed.
ARKUI_COPY_OPTIONS_LOCAL_DEVICE = 2Intra-device copy is allowed.
ARKUI_COPY_OPTIONS_CROSS_DEVICE = 3Cross-device copy is allowed.

ArkUI_ShadowType

enum ArkUI_ShadowType

Description

Enumerates shadow types.

Since: 12

ValueDescription
ARKUI_SHADOW_TYPE_COLOR = 0Color shadow.
ARKUI_SHADOW_TYPE_BLUR = 1Blur shadow.

ArkUI_DatePickerMode

enum ArkUI_DatePickerMode

Description

Enumerates the column display modes of the date picker.

Since: 18

ValueDescription
ARKUI_DATEPICKER_MODE_DATE = 0Default value. The date displays three columns: year, month, and day.
ARKUI_DATEPICKER_YEAR_AND_MONTH = 1The date displays two columns: year and month.
ARKUI_DATEPICKER_MONTH_AND_DAY = 2The date displays two columns: month and day.

ArkUI_TextPickerRangeType

enum ArkUI_TextPickerRangeType

Description

Enumerates the types of the text picker.

Since: 12

ValueDescription
ARKUI_TEXTPICKER_RANGETYPE_SINGLE = 0Single-column text picker.
ARKUI_TEXTPICKER_RANGETYPE_MULTI = 1Multi-column text picker.
ARKUI_TEXTPICKER_RANGETYPE_RANGE_CONTENT = 2Single-column text picker with image resources.
ARKUI_TEXTPICKER_RANGETYPE_CASCADE_RANGE_CONTENT = 3Interconnected multi-column text picker.

ArkUI_AccessibilityCheckedState

enum ArkUI_AccessibilityCheckedState

Description

Enumerates the accessibility check box states.

Since: 12

ValueDescription
ARKUI_ACCESSIBILITY_UNCHECKED = 0The check box is not selected.
ARKUI_ACCESSIBILITY_CHECKED = 1The check box is selected.

ArkUI_AccessibilityActionType

enum ArkUI_AccessibilityActionType

Description

Enumerates the accessibility action types.

Since: 12

ValueDescription
ARKUI_ACCESSIBILITY_ACTION_CLICK = 1 << 0Tapping
ARKUI_ACCESSIBILITY_ACTION_LONG_CLICK = 1 << 1Long press
ARKUI_ACCESSIBILITY_ACTION_CUT = 1 << 2Cut.
ARKUI_ACCESSIBILITY_ACTION_COPY = 1 << 3Copy.
ARKUI_ACCESSIBILITY_ACTION_PASTE = 1 << 4Paste.

ArkUI_EdgeEffect

enum ArkUI_EdgeEffect

Description

Enumerates the effects used at the edges of the component when the boundary of the scrollable content is reached. The default value is ARKUI_EDGE_EFFECT_NONE for the Grid, Scroll, and WaterFlow components, and ARKUI_EDGE_EFFECT_SPRING for the List component.

Since: 12

ValueDescription
ARKUI_EDGE_EFFECT_SPRING = 0Spring effect. When at one of the edges, the component can move beyond the bounds based on the initial speed or through touches, and produces a bounce effect when the user releases their finger.
ARKUI_EDGE_EFFECT_FADE = 1Fade effect. When at one of the edges, the component produces a fade effect.
ARKUI_EDGE_EFFECT_NONE = 2No effect when the component is at one of the edges.

ArkUI_BarState

enum ArkUI_BarState

Description

Enumerates the text control scrollbar states.

Since: 22

ValueDescription
ARKUI_BAR_STATE_OFF = 0Not displayed.
ARKUI_BAR_STATE_AUTO = 1Displayed on demand (The scrollbar is displayed when being touched and disappears 2 seconds later.)
ARKUI_BAR_STATE_ON = 2Always displayed.

ArkUI_EffectEdge

enum ArkUI_EffectEdge

Description

Enumerates the edges for which the effect takes effect when the boundary of the scrollable content is reached.

Since: 18

ValueDescription
ARKUI_EFFECT_EDGE_START = 1Start edge.
ARKUI_EFFECT_EDGE_END = 2End edge.

ArkUI_ScrollDirection

enum ArkUI_ScrollDirection

Description

Enumerates the scrolling directions of the Scroll component.

Since: 12

ValueDescription
ARKUI_SCROLL_DIRECTION_VERTICAL = 0Vertical scrolling only.
ARKUI_SCROLL_DIRECTION_HORIZONTAL = 1Horizontal scrolling only.
ARKUI_SCROLL_DIRECTION_NONE = 3Scrolling disabled.
ARKUI_SCROLL_DIRECTION_FREE = 4Free scrolling in both directions.
Since: 20

ArkUI_ScrollSnapAlign

enum ArkUI_ScrollSnapAlign

Description

Enumerates the alignment modes of list items when scrolling ends.

Since: 12

ValueDescription
ARKUI_SCROLL_SNAP_ALIGN_NONE = 0No alignment mode.
ARKUI_SCROLL_SNAP_ALIGN_START = 1The first item in the view is aligned at the start of the list.
ARKUI_SCROLL_SNAP_ALIGN_CENTER = 2The middle items in the view are aligned in the center of the list.
ARKUI_SCROLL_SNAP_ALIGN_END = 3The last item in the view is aligned at the end of the list.

ArkUI_ScrollBarDisplayMode

enum ArkUI_ScrollBarDisplayMode

Description

Enumerates the scrollbar display modes.

Since: 12

ValueDescription
ARKUI_SCROLL_BAR_DISPLAY_MODE_OFF = 0Not displayed.
ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO = 1Displayed when the screen is touched and hidden after 2s.
ARKUI_SCROLL_BAR_DISPLAY_MODE_ON = 2Always displayed.

ArkUI_Axis

enum ArkUI_Axis

Description

Enumerates scroll directions and List component arrangement directions.

Since: 12

ValueDescription
ARKUI_AXIS_VERTICAL = 0Vertical scrolling only. This is the default value.
ARKUI_AXIS_HORIZONTAL = 1Horizontal scrolling only.

ArkUI_StickyStyle

enum ArkUI_StickyStyle

Description

Enumerates the modes for pinning the header to the top or the footer to the bottom.

Since: 12

ValueDescription
ARKUI_STICKY_STYLE_NONE = 0header and footer of ListItemGroup are not pinned to the top and bottom, respectively.
ARKUI_STICKY_STYLE_HEADER = 1header of ListItemGroup is pinned to the top, and footer is not pinned to the bottom.
ARKUI_STICKY_STYLE_FOOTER = 2header of ListItemGroup is not pinned to the top, and footer is pinned to the bottom.
ARKUI_STICKY_STYLE_BOTH = 3header of ListItemGroup is pinned to the top, and footer is pinned to the bottom.

ArkUI_ContentClipMode

enum ArkUI_ContentClipMode

Description

Enumerates the content clipping modes of scrollable components.

Since: 18

ValueDescription
ARKUI_CONTENT_CLIP_MODE_CONTENT_ONLY = 0Clip to the content area only.
ARKUI_CONTENT_CLIP_MODE_BOUNDARY = 1Clip to the component's boundary area.
ARKUI_CONTENT_CLIP_MODE_SAFE_AREA = 2Clip to the safe area area configured for the component.

ArkUI_WaterFlowLayoutMode

enum ArkUI_WaterFlowLayoutMode

Description

Enumerates the layout modes of the WaterFlow component.

Since: 18

ValueDescription
ARKUI_WATER_FLOW_LAYOUT_MODE_ALWAYS_TOP_DOWN = 0Layout from top to bottom. In scenarios where column switching occurs, the layout starts from the first water flow item to the currently displayed water flow item.
ARKUI_WATER_FLOW_LAYOUT_MODE_SLIDING_WINDOW = 1Sliding window layout. In scenarios where column switching occurs, only the range of water flow items currently on display is re-laid out. As the user scrolls down with their finger, water flow items that enter the display range from above are subsequently laid out.

ArkUI_BorderStyle

enum ArkUI_BorderStyle

Description

Enumerates the border styles.

Since: 12

ValueDescription
ARKUI_BORDER_STYLE_SOLID = 0Solid border. This is the default value.
ARKUI_BORDER_STYLE_DASHED = 1Dashed border.
ARKUI_BORDER_STYLE_DOTTED = 2Dotted border.

ArkUI_HitTestMode

enum ArkUI_HitTestMode

Description

Enumerates the hit test modes.

Since: 12

ValueDescription
ARKUI_HIT_TEST_MODE_DEFAULT = 0Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from the hit test. The node itself and its child nodes respond to the hit test, but block the hit test of sibling nodes. It does not affect the hit test of ancestor nodes.
ARKUI_HIT_TEST_MODE_BLOCK = 1The node itself responds to the hit test and blocks the hit test of child nodes, sibling nodes, and ancestor nodes.
ARKUI_HIT_TEST_MODE_TRANSPARENT = 2Both the node itself and its child nodes respond to the hit test and do not block the hit test of sibling nodes and ancestor nodes.
ARKUI_HIT_TEST_MODE_NONE = 3The node itself does not respond to the hit test and does not block the hit test of child nodes, sibling nodes, and ancestor nodes.
ARKUI_HIT_TEST_MODE_BLOCK_HIERARCHY = 4The node itself and its child nodes respond to the hit test, preventing all sibling nodes and parent nodes with lower priority from participating in the hit test.
Since: 20
ARKUI_HIT_TEST_MODE_BLOCK_DESCENDANTS = 5The node itself does not respond to the hit test, and all its descendants (children, grandchildren, and more) also do not respond to the hit test. It does not affect the hit test of ancestor nodes.
Since: 20

ArkUI_ShadowStyle

enum ArkUI_ShadowStyle

Description

Enumerates shadow styles.

Since: 12

ValueDescription
ARKUI_SHADOW_STYLE_OUTER_DEFAULT_XS = 0Mini shadow.
defaultxs
ARKUI_SHADOW_STYLE_OUTER_DEFAULT_SM = 1Small shadow.
defaultsm
ARKUI_SHADOW_STYLE_OUTER_DEFAULT_MD = 2Medium shadow.
defaultmd
ARKUI_SHADOW_STYLE_OUTER_DEFAULT_LG = 3Large shadow.
defaultlg
ARKUI_SHADOW_STYLE_OUTER_FLOATING_SM = 4Floating small shadow.
floatingsm
ARKUI_SHADOW_STYLE_OUTER_FLOATING_MD = 5Floating medium shadow.
floatingmd

ArkUI_AnimationCurve

enum ArkUI_AnimationCurve

Description

Enumerates the animation curves.

Since: 12

ValueDescription
ARKUI_CURVE_LINEAR = 0The animation speed keeps unchanged.
ARKUI_CURVE_EASE = 1The animation starts slowly, accelerates, and then slows down towards the end.
ARKUI_CURVE_EASE_IN = 2The animation starts at a low speed and then picks up speed until the end.
ARKUI_CURVE_EASE_OUT = 3The animation ends at a low speed.
ARKUI_CURVE_EASE_IN_OUT = 4The animation starts and ends at a low speed, providing a smooth and natural transition.
ARKUI_CURVE_FAST_OUT_SLOW_IN = 5The animation uses the standard curve
ARKUI_CURVE_LINEAR_OUT_SLOW_IN = 6The animation uses the deceleration curve.
ARKUI_CURVE_FAST_OUT_LINEAR_IN = 7The animation uses the acceleration curve.
ARKUI_CURVE_EXTREME_DECELERATION = 8The animation uses the extreme deceleration curve.
ARKUI_CURVE_SHARP = 9The animation uses the sharp curve.
ARKUI_CURVE_RHYTHM = 10The animation uses the rhythm curve.
ARKUI_CURVE_SMOOTH = 11The animation uses the smooth curve.
ARKUI_CURVE_FRICTION = 12The animation uses the friction curve

ArkUI_SwiperArrow

enum ArkUI_SwiperArrow

Description

Enumerates arrow styles of the navigation indicator.

Since: 12

ValueDescription
ARKUI_SWIPER_ARROW_HIDE = 0The arrow is not displayed for the navigation indicator.
ARKUI_SWIPER_ARROW_SHOW = 1The arrow is displayed for the navigation indicator.
ARKUI_SWIPER_ARROW_SHOW_ON_HOVER = 2The arrow is displayed when the mouse pointer hovers over the navigation indicator.

ArkUI_SwiperNestedScrollMode

enum ArkUI_SwiperNestedScrollMode

Description

Enumerates the nested scrolling modes of the Swiper component and its parent container.

Since: 12

ValueDescription
ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY = 0The scrolling is contained within the Swiper component, and no scroll chaining occurs, that is, the parent container does not scroll when the component scrolling reaches the boundary.
ARKUI_SWIPER_NESTED_SRCOLL_SELF_FIRST = 1The Swiper component scrolls first, and when it hits the boundary, the parent container scrolls. When the parent container hits the boundary, its edge effect is displayed. If no edge effect is specified for the parent container, the edge effect of the child component is displayed instead.

ArkUI_PageFlipMode

enum ArkUI_PageFlipMode

Description

Enumerates the modes for flipping pages using the mouse wheel in the Swiper component.

Since: 15

ValueDescription
ARKUI_PAGE_FLIP_MODE_CONTINUOUS = 0Continuous page flipping mode where multiple pages are turned continuously when the user scrolls the mouse wheel without interruption.
ARKUI_PAGE_FLIP_MODE_SINGLE = 1The system does not respond to other mouse wheel events until the page flipping animation ends.

ArkUI_SwiperAnimationMode

enum ArkUI_SwiperAnimationMode

Description

Enumerates the animation modes for redirecting to a target page in the Swiper component.

Since: 15

ValueDescription
ARKUI_SWIPER_NO_ANIMATION = 0No animation is displayed for redirecting to a target page.
ARKUI_SWIPER_DEFAULT_ANIMATION = 1An animation is displayed for redirecting to a target page.
ARKUI_SWIPER_FAST_ANIMATION = 2First redirects to a position near the target page without animation, then animates to a target page.

ArkUI_AccessibilityMode

enum ArkUI_AccessibilityMode

Description

Enumerates the accessibility modes.

Since: 12

ValueDescription
ARKUI_ACCESSIBILITY_MODE_AUTO = 0The mode is automatically set to enabled or disabled based on the component.
ARKUI_ACCESSIBILITY_MODE_ENABLED = 1The component can be identified by the accessibility service.
ARKUI_ACCESSIBILITY_MODE_DISABLED = 2The component cannot be identified by the accessibility service.
ARKUI_ACCESSIBILITY_MODE_DISABLED_FOR_DESCENDANTS = 3The component and all its child components cannot be identified by the accessibility service.

ArkUI_TextCopyOptions

enum ArkUI_TextCopyOptions

Description

Enumerates copy options, which define whether copy and paste is allowed for text content.

Since: 12

ValueDescription
ARKUI_TEXT_COPY_OPTIONS_NONE = 0Copy is not allowed.
ARKUI_TEXT_COPY_OPTIONS_IN_APP = 1Intra-application copy is allowed.
ARKUI_TEXT_COPY_OPTIONS_LOCAL_DEVICE = 2Intra-device copy is allowed.
ARKUI_TEXT_COPY_OPTIONS_CROSS_DEVICE = 3Cross-device copy is allowed.

ArkUI_TextHeightAdaptivePolicy

enum ArkUI_TextHeightAdaptivePolicy

Description

Defines how the adaptive height is determined for the text.

Since: 12

ValueDescription
ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MAX_LINES_FIRST = 0Prioritize the maxLines settings.
ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MIN_FONT_SIZE_FIRST = 1Prioritize the minFontSize settings.
ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_LAYOUT_CONSTRAINT_FIRST = 2Prioritize the layout constraint settings in terms of height.

ArkUI_ScrollNestedMode

enum ArkUI_ScrollNestedMode

Description

Enumerates nested scrolling modes.

Since: 12

ValueDescription
ARKUI_SCROLL_NESTED_MODE_SELF_ONLY = 0The scrolling is contained within the component, and no scroll chaining occurs, that is, the parent component does not scroll when the component scrolling reaches the boundary.
ARKUI_SCROLL_NESTED_MODE_SELF_FIRST = 1The component scrolls first, and when it hits the boundary, the parent component scrolls. When the parent component hits the boundary, its edge effect is displayed. If no edge effect is specified for the parent component, the edge effect of the child component is displayed instead.
ARKUI_SCROLL_NESTED_MODE_PARENT_FIRST = 2The parent component scrolls first, and when it hits the boundary, the component scrolls. When the component hits the boundary, its edge effect is displayed. If no edge effect is specified for the component, the edge effect of the parent component is displayed instead.
ARKUI_SCROLL_NESTED_MODE_PARALLEL = 3The component and its parent component scroll at the same time. When both the component and its parent component hit the boundary, the edge effect of the component is displayed. If no edge effect is specified for the component, the edge effect of the parent component is displayed instead.

ArkUI_ScrollEdge

enum ArkUI_ScrollEdge

Description

Enumerates the edges to which the component scrolls.

Since: 12

ValueDescription
ARKUI_SCROLL_EDGE_TOP = 0Top edge in the vertical direction.
ARKUI_SCROLL_EDGE_BOTTOM = 1Bottom edge in the vertical direction.
ARKUI_SCROLL_EDGE_START = 2Start position in the horizontal direction.
ARKUI_SCROLL_EDGE_END = 3End position in the horizontal direction.

ArkUI_ScrollAlignment

enum ArkUI_ScrollAlignment

Description

Defines how the list item to scroll to is aligned with the container.

Since: 12

ValueDescription
ARKUI_SCROLL_ALIGNMENT_START = 0The start edge of the list item is flush with the start edge of the container.
ARKUI_SCROLL_ALIGNMENT_CENTER = 1The list item is centered along the main axis of the container.
ARKUI_SCROLL_ALIGNMENT_END = 2The end edge of the list item is flush with the end edge of the container.
ARKUI_SCROLL_ALIGNMENT_AUTO = 3The list item is automatically aligned. If the item is fully contained within the display area, no adjustment is performed. Otherwise, the item is aligned so that its start or end edge is flush with the start or end edge of the container, whichever requires a shorter scrolling distance.

ArkUI_ScrollState

enum ArkUI_ScrollState

Description

Enumerates the scrolling states.

Since: 12

ValueDescription
ARKUI_SCROLL_STATE_IDLE = 0Idle. The container enters this state when an API in the controller is used to scroll the container or when the scrollbar is dragged.
ARKUI_SCROLL_STATE_SCROLL = 1Scrolling. The container enters this state when the user drags the container to scroll.
ARKUI_SCROLL_STATE_FLING = 2Inertial scrolling. The container enters this state when inertial scrolling occurs or when the container bounces back after being released from a fling.

ArkUI_SliderBlockStyle

enum ArkUI_SliderBlockStyle

Description

Enumerates the styles of the slider in the block direction.

Since: 12

ValueDescription
ARKUI_SLIDER_BLOCK_STYLE_DEFAULT = 0Round slider.
ARKUI_SLIDER_BLOCK_STYLE_IMAGE = 1Slider with an image background.
ARKUI_SLIDER_BLOCK_STYLE_SHAPE = 2Slider in a custom shape.

ArkUI_SliderDirection

enum ArkUI_SliderDirection

Description

Enumerates the scroll directions of the slider.

Since: 12

ValueDescription
ARKUI_SLIDER_DIRECTION_VERTICAL = 0Vertical direction.
ARKUI_SLIDER_DIRECTION_HORIZONTAL = 1Horizontal direction.

ArkUI_SliderStyle

enum ArkUI_SliderStyle

Description

Enumerates the slider styles.

Since: 12

ValueDescription
ARKUI_SLIDER_STYLE_OUT_SET = 0The slider is on the slider rail.
ARKUI_SLIDER_STYLE_IN_SET = 1The slider is in the slider rail.
ARKUI_SLIDER_STYLE_NONE = 2There is no thumb.

ArkUI_CheckboxShape

enum ArkUI_CheckboxShape

Description

Enumerates the shapes of the check box.

Since: 12

ValueDescription
ArkUI_CHECKBOX_SHAPE_CIRCLE = 0Circle.
ArkUI_CHECKBOX_SHAPE_ROUNDED_SQUARE = 1Rounded square.

ArkUI_AnimationPlayMode

enum ArkUI_AnimationPlayMode

Description

Enumerates the animation playback modes.

Since: 12

ValueDescription
ARKUI_ANIMATION_PLAY_MODE_NORMAL = 0The animation is played forwards.
ARKUI_ANIMATION_PLAY_MODE_REVERSE = 1The animation is played backwards.
ARKUI_ANIMATION_PLAY_MODE_ALTERNATE = 2The animation plays in alternating loop mode. When the animation is played for an odd number of times, the playback is in forward direction. When the animation is played for an even number of times, the playback is in reverse direction.
ARKUI_ANIMATION_PLAY_MODE_ALTERNATE_REVERSE = 3The animation plays in reverse alternating loop mode. When the animation is played for an odd number of times, the playback is in reverse direction. When the animation is played for an even number of times, the playback is in forward direction.

ArkUI_ImageSize

enum ArkUI_ImageSize

Description

Defines the image size.

Since: 12

ValueDescription
ARKUI_IMAGE_SIZE_AUTO = 0The original image aspect ratio is retained.
ARKUI_IMAGE_SIZE_COVER = 1The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the display boundaries.
ARKUI_IMAGE_SIZE_CONTAIN = 2The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries.

ArkUI_AdaptiveColor

enum ArkUI_AdaptiveColor

Description

Enumerates the adaptive color modes.

Since: 12

ValueDescription
ARKUI_ADAPTIVE_COLOR_DEFAULT = 0Adaptive color mode is not used.
ARKUI_ADAPTIVE_COLOR_AVERAGE = 1Adaptive color mode is used.

ArkUI_ColorMode

enum ArkUI_ColorMode

Description

Enumerates the color modes.

Since: 12

ValueDescription
ARKUI_COLOR_MODE_SYSTEM = 0Following the system color mode.
ARKUI_COLOR_MODE_LIGHT = 1Light color mode.
ARKUI_COLOR_MODE_DARK = 2Dark color mode.

ArkUI_SystemColorMode

enum ArkUI_SystemColorMode

Description

Enumerates the system color modes.

Since: 12

ValueDescription
ARKUI_SYSTEM_COLOR_MODE_LIGHT = 0Light mode.
ARKUI_SYSTEM_COLOR_MODE_DARK = 1Dark mode.

ArkUI_BlurStyle

enum ArkUI_BlurStyle

Description

Enumerates the blur styles.

Since: 12

ValueDescription
ARKUI_BLUR_STYLE_THIN = 0Thin material.
thin
ARKUI_BLUR_STYLE_REGULAR = 1Regular material.
regular
ARKUI_BLUR_STYLE_THICK = 2Thick material.
thick
ARKUI_BLUR_STYLE_BACKGROUND_THIN = 3Material that creates the minimum depth of field effect.
backgroundthin
ARKUI_BLUR_STYLE_BACKGROUND_REGULAR = 4Material that creates a medium shallow depth of field effect.
backgroundregular
ARKUI_BLUR_STYLE_BACKGROUND_THICK = 5Material that creates a high shallow depth of field effect.
backgroundthick
ARKUI_BLUR_STYLE_BACKGROUND_ULTRA_THICK = 6Material that creates the maximum depth of field effect.
backgroundultrathick
ARKUI_BLUR_STYLE_NONE = 7No blur.
none
ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THIN = 8Component ultra-thin material.
componentultrathin
ARKUI_BLUR_STYLE_COMPONENT_THIN = 9Component thin material.
componentthin
ARKUI_BLUR_STYLE_COMPONENT_REGULAR = 10Component regular material.
componentregular
ARKUI_BLUR_STYLE_COMPONENT_THICK = 11Component thick material.
componentthick
ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THICK = 12Component ultra-thick material.
componentultrathick

ArkUI_BlurStyleActivePolicy

enum ArkUI_BlurStyleActivePolicy

Description

Enumerates the activation policies for the background blur effect.

Since: 19

ValueDescription
ARKUI_BLUR_STYLE_ACTIVE_POLICY_FOLLOWS_WINDOW_ACTIVE_STATE = 0The blur effect changes according to the window's focus state; it is inactive when the window is not in focus and active when the window is in focus.
ARKUI_BLUR_STYLE_ACTIVE_POLICY_ALWAYS_ACTIVE = 1The blur effect is always active.
ARKUI_BLUR_STYLE_ACTIVE_POLICY_ALWAYS_INACTIVE = 2The blur effect is always inactive.

ArkUI_VerticalAlignment

enum ArkUI_VerticalAlignment

Description

Enumerates the vertical alignment modes.

Since: 12

ValueDescription
ARKUI_VERTICAL_ALIGNMENT_TOP = 0Top aligned.
ARKUI_VERTICAL_ALIGNMENT_CENTER = 1Aligned with the center. This is the default alignment mode.
ARKUI_VERTICAL_ALIGNMENT_BOTTOM = 2Bottom aligned.

ArkUI_HorizontalAlignment

enum ArkUI_HorizontalAlignment

Description

Enumerates the alignment mode in the horizontal direction.

Since: 12

ValueDescription
ARKUI_HORIZONTAL_ALIGNMENT_START = 0Aligned with the start edge in the same direction as the language in use.
ARKUI_HORIZONTAL_ALIGNMENT_CENTER = 1Aligned with the center. This is the default alignment mode.
ARKUI_HORIZONTAL_ALIGNMENT_END = 2Aligned with the end edge in the same direction as the language in use.

ArkUI_TextOverflow

enum ArkUI_TextOverflow

Description

Enumerates the display modes when the text is too long.

Since: 12

ValueDescription
ARKUI_TEXT_OVERFLOW_NONE = 0Extra-long text is not clipped.
ARKUI_TEXT_OVERFLOW_CLIP = 1Extra-long text is clipped.
ARKUI_TEXT_OVERFLOW_ELLIPSIS = 2An ellipsis (...) is used to represent text overflow.
ARKUI_TEXT_OVERFLOW_MARQUEE = 3Text continuously scrolls when text overflow occurs.

ArkUI_ImageSpanAlignment

enum ArkUI_ImageSpanAlignment

Description

Enumerates the alignment mode of the image with the text.

Since: 12

ValueDescription
ARKUI_IMAGE_SPAN_ALIGNMENT_BASELINE = 0The image is bottom aligned with the text baseline.
ARKUI_IMAGE_SPAN_ALIGNMENT_BOTTOMThe image is bottom aligned with the text.
ARKUI_IMAGE_SPAN_ALIGNMENT_CENTERThe image is centered aligned with the text.
ARKUI_IMAGE_SPAN_ALIGNMENT_TOPThe image is top aligned with the text.
ARKUI_IMAGE_SPAN_ALIGNMENT_FOLLOW_PARAGRAPHThe image alignment mode follows the text component's alignment mode.
Since: 20

ArkUI_ObjectFit

enum ArkUI_ObjectFit

Description

Enumerates the image filling effects of the Image component.

Since: 12

ValueDescription
ARKUI_OBJECT_FIT_CONTAIN = 0The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries.
ARKUI_OBJECT_FIT_COVER = 1The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the display boundaries.
ARKUI_OBJECT_FIT_AUTO = 2The image is scaled automatically to fit the display area.
ARKUI_OBJECT_FIT_FILL = 3The image is scaled to fill the display area, and its aspect ratio is not retained.
ARKUI_OBJECT_FIT_SCALE_DOWN = 4The image is displayed with its aspect ratio retained, in a size smaller than or equal to the original size.
ARKUI_OBJECT_FIT_NONE = 5The original size is retained.
ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP_START = 6Not resized, the image is aligned with the start edge of the top of the container.
ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP = 7Not resized, the image is horizontally centered at the top of the container.
ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP_END = 8Not resized, the image is aligned with the end edge at the top of the container.
ARKUI_OBJECT_FIT_NONE_AND_ALIGN_START = 9Not resized, the image is vertically centered on the start edge of the container.
ARKUI_OBJECT_FIT_NONE_AND_ALIGN_CENTER = 10Not resized, the image is horizontally and vertically centered in the container.
ARKUI_OBJECT_FIT_NONE_AND_ALIGN_END = 11Not resized, the image is vertically centered on the end edge of the container.
ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM_START = 12Not resized, the image is aligned with the start edge at the bottom of the container.
ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM = 13Not resized, the image is horizontally centered at the bottom of the container.
ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM_END = 14Not resized, the image is aligned with the end edge at the bottom of the container.
ARKUI_OBJECT_FIT_NONE_MATRIX = 15The image maintains its original size. Must be used with NODE_IMAGE_IMAGE_MATRIX.
Since: 21

ArkUI_ImageInterpolation

enum ArkUI_ImageInterpolation

Description

Enumerates the image interpolation effects. This attribute mitigates aliasing during image scaling. This attribute is not applicable to SVG images.

Since: 12

ValueDescription
ARKUI_IMAGE_INTERPOLATION_NONE = 0No image interpolation.
ARKUI_IMAGE_INTERPOLATION_LOW = 1Low quality interpolation.
ARKUI_IMAGE_INTERPOLATION_MEDIUM = 2Medium quality interpolation.
ARKUI_IMAGE_INTERPOLATION_HIGH = 3High quality interpolation. This mode produces scaled images of the highest possible quality.

ArkUI_DynamicRangeMode

enum ArkUI_DynamicRangeMode

Description

Enumerates the dynamic range modes (for example, SDR/HDR) for images, controlling the display range of image brightness and color gamut.

Since: 21

ValueDescription
ARKUI_DYNAMIC_RANGE_MODE_HIGH = 0High dynamic range (HDR), representing the range between minimum and maximum brightness values in an image. A wider range makes image brightness closer to real-world conditions, preventing overexposure (all white) in bright environments and loss of detail (all black) in dark environments.
ARKUI_DYNAMIC_RANGE_MODE_CONSTRAINTConstrained high dynamic range, offering richer brightness and color than SDR while maintaining SDR compatibility. Typically used in scenarios requiring SDR backward compatibility.
ARKUI_DYNAMIC_RANGE_MODE_STANDARDStandard dynamic range (SDR), featuring a limited brightness range (typically 0-100 nits) with reduced contrast between bright and dark areas. Dark areas may lose detail to black, while bright areas may become overexposed to white.

ArkUI_ImageRotateOrientation

enum ArkUI_ImageRotateOrientation

Description

Enumerates image rotation directions.

Since: 21

ValueDescription
ARKUI_ORIENTATION_AUTO = 0Use EXIF metadata for display orientation, with support for rotation and mirroring. EXIF is a file format dedicated for photos taken by digital cameras and is used to record attributes and shooting data of the photos.
ARKUI_ORIENTATION_UPDisplay original pixel data without transformation.
ARKUI_ORIENTATION_RIGHTDisplay the image after rotating it 90 degrees clockwise.
ARKUI_ORIENTATION_DOWNDisplay the image after rotating it 180 degrees clockwise.
ARKUI_ORIENTATION_LEFTDisplay the image after rotating it 270 degrees clockwise.
ARKUI_ORIENTATION_UP_MIRROREDDisplay the image after flipping it horizontally.
ARKUI_ORIENTATION_RIGHT_MIRROREDDisplay the image after flipping it horizontally and then rotating it 90 degrees clockwise.
ARKUI_ORIENTATION_DOWN_MIRROREDDisplay the image after flipping it vertically.
ARKUI_ORIENTATION_LEFT_MIRROREDDisplay the image after flipping it horizontally and then rotating it 270 degrees clockwise.

ArkUI_BlendMode

enum ArkUI_BlendMode

Description

Enumerates the blend modes.

Since: 12

ValueDescription
ARKUI_BLEND_MODE_NONE = 0The top image is superimposed on the bottom image without any blending.
ARKUI_BLEND_MODE_CLEAR = 1The target pixels covered by the source pixels are erased by being turned to completely transparent.
ARKUI_BLEND_MODE_SRC = 2r = s: Only the source pixels are displayed.
ARKUI_BLEND_MODE_DST = 3r = d: Only the target pixels are displayed.
ARKUI_BLEND_MODE_SRC_OVER = 4r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels.
ARKUI_BLEND_MODE_DST_OVER = 5r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels.
ARKUI_BLEND_MODE_SRC_IN = 6r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed.
ARKUI_BLEND_MODE_DST_IN = 7r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed.
ARKUI_BLEND_MODE_SRC_OUT = 8r = s * (1 - da): Only the part of the source pixels that do not overlap with the target pixels is displayed.
ARKUI_BLEND_MODE_DST_OUT = 9r = d * (1 - sa): Only the part of the target pixels that do not overlap with the source pixels is displayed.
ARKUI_BLEND_MODE_SRC_ATOP = 10r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed and the part of the target pixels that do not overlap with the source pixels are displayed.
ARKUI_BLEND_MODE_DST_ATOP = 11r = d * sa + s * (1 - da): The part of the target pixels that overlap with the source pixels and the part of the source pixels that do not overlap with the target pixels are displayed.
ARKUI_BLEND_MODE_XOR = 12r = s * (1 - da) + d * (1 - sa): Only the non-overlapping part between the source pixels and the target pixels is displayed.
ARKUI_BLEND_MODE_PLUS = 13r = min(s + d, 1): New pixels resulting from adding the source pixels to the target pixels are displayed.
ARKUI_BLEND_MODE_MODULATE = 14r = s * d: New pixels resulting from multiplying the source pixels with the target pixels are displayed.
ARKUI_BLEND_MODE_SCREEN = 15r = s + d - s * d: Pixels are blended by adding the source pixels to the target pixels and subtracting the product of their multiplication.
ARKUI_BLEND_MODE_OVERLAY = 16The MULTIPLY or SCREEN mode is used based on the target pixels.
ARKUI_BLEND_MODE_DARKEN = 17rc = s + d - max(s * da, d * sa), ra = kSrcOver: When two colors overlap, whichever is darker is used.
ARKUI_BLEND_MODE_LIGHTEN = 18rc = s + d - min(s * da, d * sa), ra = kSrcOver: The darker of the pixels (source and target) is used.
ARKUI_BLEND_MODE_COLOR_DODGE = 19The colors of the target pixels are lightened to reflect the source pixels.
ARKUI_BLEND_MODE_COLOR_BURN = 20The colors of the target pixels are darkened to reflect the source pixels.
ARKUI_BLEND_MODE_HARD_LIGHT = 21The MULTIPLY or SCREEN mode is used, depending on the source pixels.
ARKUI_BLEND_MODE_SOFT_LIGHT = 22The LIGHTEN or DARKEN mode is used, depending on the source pixels.
ARKUI_BLEND_MODE_DIFFERENCE = 23rc = s + d - 2 * (min(s * da, d * sa)), ra = kSrcOver: The final pixel is the result of subtracting the darker of the two pixels (source and target) from the lighter one.
ARKUI_BLEND_MODE_EXCLUSION = 24rc = s + d - two(s * d), ra = kSrcOver: The final pixel is similar to DIFFERENCE, but with less contrast.
ARKUI_BLEND_MODE_MULTIPLY = 25r = s * (1 - da) + d * (1 - sa) + s * d: The final pixel is the result of multiplying the source pixel by the target pixel.
ARKUI_BLEND_MODE_HUE = 26The resultant image is created with the luminance and saturation of the source image and the hue of the target image.
ARKUI_BLEND_MODE_SATURATION = 27The resultant image is created with the luminance and hue of the target image and the saturation of the source image.
ARKUI_BLEND_MODE_COLOR = 28The resultant image is created with the saturation and hue of the source image and the luminance of the target image.
ARKUI_BLEND_MODE_LUMINOSITY = 29The resultant image is created with the saturation and hue of the target image and the luminance of the source image.

ArkUI_Direction

enum ArkUI_Direction

Description

Enumerates the modes in which components are laid out along the main axis of the container.

Since: 12

ValueDescription
ARKUI_DIRECTION_LTR = 0Components are arranged from left to right. This is the default value.
ARKUI_DIRECTION_RTL = 1Components are arranged from right to left.
ARKUI_DIRECTION_AUTO = 3The system layout direction is used.

ArkUI_ItemAlignment

enum ArkUI_ItemAlignment

Description

Enumerates the modes in which components are laid out along the cross axis of the container.

Since: 12

ValueDescription
ARKUI_ITEM_ALIGNMENT_AUTO = 0The default configuration in the Flex container is used. This is the default value.
ARKUI_ITEM_ALIGNMENT_START = 1The items in the flex container are aligned with the cross-start edge.
ARKUI_ITEM_ALIGNMENT_CENTER = 2The items in the flex container are centered along the cross axis.
ARKUI_ITEM_ALIGNMENT_END = 3The items in the flex container are aligned with the cross-end edge.
ARKUI_ITEM_ALIGNMENT_STRETCH = 4The items in the flex container are stretched and padded along the cross axis.
ARKUI_ITEM_ALIGNMENT_BASELINE = 5The items in the flex container are aligned in such a manner that their text baselines are aligned along the cross axis.

ArkUI_ColorStrategy

enum ArkUI_ColorStrategy

Description

Enumerates foreground and shadow colors.

Since: 12

ValueDescription
ARKUI_COLOR_STRATEGY_INVERT = 0The foreground colors are the inverse of the component background colors.
ARKUI_COLOR_STRATEGY_AVERAGE = 1The shadow colors of the component are the average color obtained from the component background shadow area.
ARKUI_COLOR_STRATEGY_PRIMARY = 2The shadow colors of the component are the primary color obtained from the component background shadow area.

ArkUI_FlexAlignment

enum ArkUI_FlexAlignment

Description

Enumerates the vertical alignment modes.

Since: 12

ValueDescription
ARKUI_FLEX_ALIGNMENT_START = 1The child components are aligned with the start edge of the main axis. This is the default value.
ARKUI_FLEX_ALIGNMENT_CENTER = 2The child components are aligned in the center of the main axis.
ARKUI_FLEX_ALIGNMENT_END = 3The child components are aligned with the end edge of the main axis.
ARKUI_FLEX_ALIGNMENT_SPACE_BETWEEN = 6The child components are evenly distributed along the main axis in Flex. The space between any two adjacent components is the same. The first component is aligned with the main-start, and the last component is aligned with the main-end.
ARKUI_FLEX_ALIGNMENT_SPACE_AROUND = 7The child components are evenly distributed along the main axis. The space between any two adjacent components is the same. The space between the first component and main-start, and that between the last component and cross-main are both half the size of the space between two adjacent components.
ARKUI_FLEX_ALIGNMENT_SPACE_EVENLY = 8The child components are evenly distributed along the main axis. The space between the first component and main-start, the space between the last component and main-end, and the space between any two adjacent components are the same.

ArkUI_FlexDirection

enum ArkUI_FlexDirection

Description

Enumerates the directions of the main axis in the Flex container.

Since: 12

ValueDescription
ARKUI_FLEX_DIRECTION_ROW = 0The child components are arranged in the same direction as the main axis runs down the rows. This is the default value.
ARKUI_FLEX_DIRECTION_COLUMN = 1The child components are arranged in the same direction as the main axis runs down the columns.
ARKUI_FLEX_DIRECTION_ROW_REVERSE = 2The child components are arranged opposite to the ROW direction.
ARKUI_FLEX_DIRECTION_COLUMN_REVERSE = 3The child components are arranged opposite to the COLUMN direction.

ArkUI_FlexWrap

enum ArkUI_FlexWrap

Description

Defines whether the flex container has a single line or multiple lines.

Since: 12

ValueDescription
ARKUI_FLEX_WRAP_NO_WRAP = 0The child components in the flex container are arranged in a single line, and they cannot overflow. This is the default value.
ARKUI_FLEX_WRAP_WRAP = 1The child components in the flex container are arranged in multiple lines, and they may overflow.
ARKUI_FLEX_WRAP_WRAP_REVERSE = 2The child components in the flex container are reversely arranged in multiple lines, and they may overflow.

ArkUI_Visibility

enum ArkUI_Visibility

Description

Enumerates the visibility values.

Since: 12

ValueDescription
ARKUI_VISIBILITY_VISIBLE = 0The component is visible.
ARKUI_VISIBILITY_HIDDEN = 1The component is hidden, and a placeholder is used for it in the layout.
ARKUI_VISIBILITY_NONE = 2The component is hidden. It is not involved in the layout, and no placeholder is used for it.

ArkUI_CalendarAlignment

enum ArkUI_CalendarAlignment

Description

Enumerates the alignment modes between the calendar picker and the entry component.

Since: 12

ValueDescription
ARKUI_CALENDAR_ALIGNMENT_START = 0Left aligned.
ARKUI_CALENDAR_ALIGNMENT_CENTER = 1Center aligned.
ARKUI_CALENDAR_ALIGNMENT_END = 2Right aligned.

ArkUI_MaskType

enum ArkUI_MaskType

Description

Enumerates the mask types. A mask is a means to limit the display area of a component. It uses a specific shape to crop the component content so that only the content in the mask area is visible.

Since: 12

ValueDescription
ARKUI_MASK_TYPE_RECTANGLE = 0Rectangle.
ARKUI_MASK_TYPE_CIRCLE = 1Circle.
ARKUI_MASK_TYPE_ELLIPSE = 2Ellipse.
ARKUI_MASK_TYPE_PATH = 3Path.
ARKUI_MASK_TYPE_PROGRESS = 4Progress indicator.

ArkUI_ClipType

enum ArkUI_ClipType

Description

Enumerates the clipping region types.

Since: 12

ValueDescription
ARKUI_CLIP_TYPE_RECTANGLE = 0Rectangle.
ARKUI_CLIP_TYPE_CIRCLE = 1Circle.
ARKUI_CLIP_TYPE_ELLIPSE = 2Ellipse.
ARKUI_CLIP_TYPE_PATH = 3Path.

ArkUI_ShapeType

enum ArkUI_ShapeType

Description

Enumerates custom shape types.

Since: 12

ValueDescription
ARKUI_SHAPE_TYPE_RECTANGLE = 0Rectangle.
ARKUI_SHAPE_TYPE_CIRCLE = 1Circle.
ARKUI_SHAPE_TYPE_ELLIPSE = 2Ellipse.
ARKUI_SHAPE_TYPE_PATH = 3Path.

ArkUI_LinearGradientDirection

enum ArkUI_LinearGradientDirection

Description

Enumerates the gradient directions.

Since: 12

ValueDescription
ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT = 0From right to left.
ARKUI_LINEAR_GRADIENT_DIRECTION_TOP = 1From bottom to top.
ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT = 2From left to right.
ARKUI_LINEAR_GRADIENT_DIRECTION_BOTTOM = 3From top to bottom.
ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_TOP = 4From lower right to upper left.
ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_BOTTOM = 5From upper right to lower left.
ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_TOP = 6From lower left to upper right.
ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_BOTTOM = 7From upper left to lower right.
ARKUI_LINEAR_GRADIENT_DIRECTION_NONE = 8No gradient.
ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM = 9Custom direction.

ArkUI_WordBreak

enum ArkUI_WordBreak

Description

Enumerates the word break rules.

Since: 12

ValueDescription
ARKUI_WORD_BREAK_NORMAL = 0Word breaks can occur between any two characters for Chinese, Japanese, and Korean (CJK) text, but can occur only at a space character for non-CJK text (such as English).
ARKUI_WORD_BREAK_BREAK_ALLWord breaks can occur between any two characters for non-CJK text. CJK text behavior is the same as for NORMAL.
ARKUI_WORD_BREAK_BREAK_WORDThis option has the same effect as BREAK_ALL for non-CJK text, except that if it preferentially wraps lines at appropriate characters (for example, spaces) whenever possible. CJK text behavior is the same as for NORMAL.
ARKUI_WORD_BREAK_HYPHENATIONLine breaks can occur between any two syllabic units for non-CJK text. CJK text behavior is the same as for NORMAL.
Since: 18

ArkUI_EllipsisMode

enum ArkUI_EllipsisMode

Description

Enumerates the ellipsis positions.

Since: 12

ValueDescription
ARKUI_ELLIPSIS_MODE_START = 0An ellipsis is used at the start of the line of text. This applies to single-line text scenarios.
ARKUI_ELLIPSIS_MODE_CENTER = 1An ellipsis is used at the center of the line of text. This applies to single-line text scenarios.
ARKUI_ELLIPSIS_MODE_END = 2An ellipsis is used at the end of the line of text. This applies to single-line and multi-line text scenarios.
ARKUI_ELLIPSIS_MODE_MULTILINE_START = 3An ellipsis is used at the start of the line of text. This applies to single-line and multi-line text scenarios.
Since: 24
ARKUI_ELLIPSIS_MODE_MULTILINE_CENTER = 4An ellipsis is used at the center of the line of text. This applies to single-line and multi-line text scenarios.
Since: 24

ArkUI_ImageRenderMode

enum ArkUI_ImageRenderMode

Description

Enumerates the image rendering modes.

Since: 12

ValueDescription
ARKUI_IMAGE_RENDER_MODE_ORIGINAL = 0Render image pixels as they are in the original source image.
ARKUI_IMAGE_RENDER_MODE_TEMPLATE = 1Render image pixels to create a monochrome template image.

ArkUI_TransitionEdge

enum ArkUI_TransitionEdge

Description

Enumerates the slide-in and slide-out positions of the component from the screen edge during transition.

Since: 12

ValueDescription
ARKUI_TRANSITION_EDGE_TOP = 0The component slides in and out from the top edge of the screen during transition.
ARKUI_TRANSITION_EDGE_BOTTOM = 1The component slides in and out from the bottom edge of the screen during transition.
ARKUI_TRANSITION_EDGE_START = 2The component slides in and out from the left edge of the screen during transition.
ARKUI_TRANSITION_EDGE_END = 3The component slides in and out from the right edge of the screen during transition.

ArkUI_FinishCallbackType

enum ArkUI_FinishCallbackType

Description

Enumerates the callback types for OH_ArkUI_AnimatorOption_RegisterOnFinishCallback in an animation.

Since: 12

ValueDescription
ARKUI_FINISH_CALLBACK_REMOVED = 0The callback is invoked when the entire animation is removed once it has finished.
ARKUI_FINISH_CALLBACK_LOGICALLY = 1The callback is invoked when the animation logically enters the falling state, though it may still be in its long tail state. The long tail state refers to the residual change process before the animation is completely stopped. In this state, the value change of the animation is very small and close to the target value.

ArkUI_ListItemAlignment

enum ArkUI_ListItemAlignment

Description

Enumerates the alignment modes of items along the cross axis. The default value is ARKUI_LIST_ITEM_ALIGNMENT_START.

Since: 12

ValueDescription
ARKUI_LIST_ITEM_ALIGNMENT_START = 0The list items are packed toward the start edge of the List component along the cross axis.
ARKUI_LIST_ITEM_ALIGNMENT_CENTER = 1The list items are centered in the List component along the cross axis.
ARKUI_LIST_ITEM_ALIGNMENT_END = 2The list items are packed toward the end edge of the List component along the cross axis.

ArkUI_BlendApplyType

enum ArkUI_BlendApplyType

Description

Defines how the specified blend mode is applied.

Since: 12

ValueDescription
BLEND_APPLY_TYPE_FAST = 0The content of the view is blended in sequence on the target image.
BLEND_APPLY_TYPE_OFFSCREEN = 1The content of the component and its child components are drawn on the offscreen canvas, and then blended with the existing content on the canvas.

ArkUI_LengthMetricUnit

enum ArkUI_LengthMetricUnit

Description

Enumerates the component units.

Since: 12

ValueDescription
ARKUI_LENGTH_METRIC_UNIT_DEFAULT = -1Default, which is fp for fonts and vp for non-fonts.
ARKUI_LENGTH_METRIC_UNIT_PX = 0px.
ARKUI_LENGTH_METRIC_UNIT_VP = 1vp.
ARKUI_LENGTH_METRIC_UNIT_FP = 2fp.

ArkUI_TextInputContentType

enum ArkUI_TextInputContentType

Description

Enumerates the autofill types.

Since: 12

ValueDescription
ARKUI_TEXTINPUT_CONTENT_TYPE_USER_NAME = 0Username. Password Vault, when enabled, can automatically save and fill in usernames.
ARKUI_TEXTINPUT_CONTENT_TYPE_PASSWORDPassword. Password Vault, when enabled, can automatically save and fill in passwords.
ARKUI_TEXTINPUT_CONTENT_TYPE_NEW_PASSWORDNew password. Password Vault, when enabled, can automatically generate a new password.
ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_STREET_ADDRESSFull street address. The scenario-based autofill feature, when enabled, can automatically save and fill in full street addresses.
ARKUI_TEXTINPUT_CONTENT_TYPE_HOUSE_NUMBERHouse number. The scenario-based autofill feature, when enabled, can automatically save and fill in house numbers.
ARKUI_TEXTINPUT_CONTENT_TYPE_DISTRICT_ADDRESSDistrict and county. The scenario-based autofill feature, when enabled, can automatically save and fill in districts and counties.
ARKUI_TEXTINPUT_CONTENT_TYPE_CITY_ADDRESSCity. The scenario-based autofill feature, when enabled, can automatically save and fill in cities.
ARKUI_TEXTINPUT_CONTENT_TYPE_PROVINCE_ADDRESSProvince. The scenario-based autofill feature, when enabled, can automatically save and fill in provinces.
ARKUI_TEXTINPUT_CONTENT_TYPE_COUNTRY_ADDRESSCountry. The scenario-based autofill feature, when enabled, can automatically save and fill in countries.
ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FULL_NAMEFull name. The scenario-based autofill feature, when enabled, can automatically save and fill in full names.
ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_LAST_NAMELast name. The scenario-based autofill feature, when enabled, can automatically save and fill in last names.
ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FIRST_NAMEFirst name. The scenario-based autofill feature, when enabled, can automatically save and fill in first names.
ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_NUMBERPhone number. The scenario-based autofill feature, when enabled, can automatically save and fill in phone numbers.
ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_COUNTRY_CODECountry code. The scenario-based autofill feature, when enabled, can automatically save and fill in country codes.
ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_PHONE_NUMBERPhone number with country code. The scenario-based autofill feature, when enabled, can automatically save and fill in phone numbers with country codes.
ARKUI_TEXTINPUT_CONTENT_EMAIL_ADDRESSEmail address. The scenario-based autofill feature, when enabled, can automatically save and fill in email addresses.
ARKUI_TEXTINPUT_CONTENT_TYPE_BANK_CARD_NUMBERBank card number. The scenario-based autofill feature, when enabled, can automatically save and fill in bank card numbers.
ARKUI_TEXTINPUT_CONTENT_TYPE_ID_CARD_NUMBERID card number. The scenario-based autofill feature, when enabled, can automatically save and fill in ID card numbers.
ARKUI_TEXTINPUT_CONTENT_TYPE_NICKNAMENickname. The scenario-based autofill feature, when enabled, can automatically save and fill in nicknames.
ARKUI_TEXTINPUT_CONTENT_TYPE_DETAIL_INFO_WITHOUT_STREETAddress information without street address. The scenario-based autofill feature, when enabled, can automatically save and fill in address information without street addresses.
ARKUI_TEXTINPUT_CONTENT_TYPE_FORMAT_ADDRESSStandard address. The scenario-based autofill feature, when enabled, can automatically save and fill in standard addresses.
ARKUI_TEXTINPUT_CONTENT_TYPE_PASSPORT_NUMBERPassport number. The scenario-based autofill feature, when enabled, can automatically save and fill in passport numbers.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_VALIDITYPassport validity period. The scenario-based autofill feature, when enabled, can automatically save and fill in passport validity periods.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_ISSUE_ATPassport place of issue. The scenario-based autofill feature, when enabled, can automatically save and fill in the place of issue for passports.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_ORGANIZATIONInvoice title. The scenario-based autofill feature, when enabled, can automatically save and fill in invoice titles.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_TAX_IDTax ID. The scenario-based autofill feature, when enabled, can automatically save and fill in tax IDs.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_ADDRESS_CITY_AND_STATELocation. The scenario-based autofill feature, when enabled, can automatically save and fill in locations.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_FLIGHT_NUMBERFlight number. Currently not supported for automatic saving and auto-filling.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_NUMBERDriver's license number. Currently not supported for automatic saving and auto-filling.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_FILE_NUMBERDriver's license file number. Currently not supported for automatic saving and auto-filling.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_PLATELicense plate number. The scenario-based autofill feature, when enabled, can automatically save and fill in license plate numbers.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_ENGINE_NUMBERVehicle registration engine number. Currently not supported for automatic saving and auto-filling.
Since: 18
ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_CHASSIS_NUMBERChassis number. Currently not supported for automatic saving and auto-filling.
Since: 18

ArkUI_BarrierDirection

enum ArkUI_BarrierDirection

Description

Enumerates the barrier directions.

Since: 12

ValueDescription
ARKUI_BARRIER_DIRECTION_START = 0The barrier is on the left side of all the referenced components specified by referencedId. This is the default value.
ARKUI_BARRIER_DIRECTION_END = 1The barrier is on the right side of all the referenced components specified by referencedId.
ARKUI_BARRIER_DIRECTION_TOP = 2The barrier is at the top of all the referenced components specified by referencedId.
ARKUI_BARRIER_DIRECTION_BOTTOM = 3The barrier is at the bottom of all the referenced components specified by referencedId.

ArkUI_RelativeLayoutChainStyle

enum ArkUI_RelativeLayoutChainStyle

Description

Enumerates the chain styles.

Since: 12

ValueDescription
ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD = 0Child components are evenly distributed among constraint anchors. This is the default value.
ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD_INSIDE = 1All child components except the first and last ones are evenly distributed among constraint anchors.
ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_PACKED = 2There is no gap between child components in the chain.

ArkUI_TextInputStyle

enum ArkUI_TextInputStyle

Description

Enumerates the text input styles.

Since: 12

ValueDescription
ARKUI_TEXTINPUT_STYLE_DEFAULT = 0Default style. The caret width is fixed at 1.5 vp, and the caret height is subject to the background height and font size of the selected text.
ARKUI_TEXTINPUT_STYLE_INLINEInline input style. The background height of the selected text is the same as the height of the text box.

ArkUI_KeyboardAppearance

enum ArkUI_KeyboardAppearance

Description

Enumerates the appearance modes of the keyboard when the text box is focused.

Since: 15

ValueDescription
ARKUI_KEYBOARD_APPEARANCE_NONE_IMMERSIVE = 0Default appearance mode, not using the immersive style.
ARKUI_KEYBOARD_APPEARANCE_IMMERSIVE = 1Immersive style, following the system color mode.
ARKUI_KEYBOARD_APPEARANCE_LIGHT_IMMERSIVE = 2Immersive style in light mode.
ARKUI_KEYBOARD_APPEARANCE_DARK_IMMERSIVE = 3Immersive style in dark mode.

ArkUI_TextDataDetectorType

enum ArkUI_TextDataDetectorType

Description

Enumerates the entity types of text recognition.

Since: 12

ValueDescription
ARKUI_TEXT_DATA_DETECTOR_TYPE_PHONE_NUMBER = 0Phone number.
ARKUI_TEXT_DATA_DETECTOR_TYPE_URLURL.
ARKUI_TEXT_DATA_DETECTOR_TYPE_EMAILEmail address.
ARKUI_TEXT_DATA_DETECTOR_TYPE_ADDRESSAddress.

ArkUI_ButtonType

enum ArkUI_ButtonType

Description

Enumerates the button types.

Since: 12

ValueDescription
ARKUI_BUTTON_TYPE_NORMAL = 0Normal button (without rounded corners by default).
ARKUI_BUTTON_TYPE_CAPSULE = 1Capsule-type button (the round corner is half of the height by default).
ARKUI_BUTTON_TYPE_CIRCLE = 2Circle button.
ARKUI_BUTTON_ROUNDED_RECTANGLE = 8Rounded rectangle button
Since: 19

ArkUI_RenderFit

enum ArkUI_RenderFit

Description

Enumerates the sizing and positioning behaviors of animated content in its final state.

Since: 12

ValueDescription
ARKUI_RENDER_FIT_CENTER = 0The component's content stays at the final size and always aligned with the center of the component.
ARKUI_RENDER_FIT_TOP = 1The component's content stays at the final size and always aligned with the top center of the component.
ARKUI_RENDER_FIT_BOTTOM = 2The component's content stays at the final size and always aligned with the bottom center of the component.
ARKUI_RENDER_FIT_LEFT = 3The component's content stays at the final size and always aligned with the left of the component.
ARKUI_RENDER_FIT_RIGHT = 4The component's content stays at the final size and always aligned with the right of the component.
ARKUI_RENDER_FIT_TOP_LEFT = 5The component's content stays at the final size and always aligned with the upper left corner of the component.
ARKUI_RENDER_FIT_TOP_RIGHT = 6The component's content stays at the final size and always aligned with the upper right corner of the component.
ARKUI_RENDER_FIT_BOTTOM_LEFT = 7The component's content stays at the final size and always aligned with the lower left corner of the component.
ARKUI_RENDER_FIT_BOTTOM_RIGHT = 8The component's content stays at the final size and always aligned with the lower right corner of the component.
ARKUI_RENDER_FIT_RESIZE_FILL = 9The component's content is always resized to fill the component's content box, without considering its aspect ratio in the final state.
ARKUI_RENDER_FIT_RESIZE_CONTAIN = 10While maintaining its aspect ratio in the final state, the component's content is scaled to fit within the component's content box. It is always aligned with the center of the component.
ARKUI_RENDER_FIT_RESIZE_CONTAIN_TOP_LEFT = 11While maintaining its aspect ratio in the final state, the component's content is scaled to fit within the component's content box. When there is remaining space in the width direction of the component, the content is left-aligned with the component. When there is remaining space in the height direction of the component, the content is top-aligned with the component.
ARKUI_RENDER_FIT_RESIZE_CONTAIN_BOTTOM_RIGHT = 12While maintaining its aspect ratio in the final state, the component's content is scaled to fit within the component's content box. When there is remaining space in the width direction of the component, the content is right-aligned with the component. When there is remaining space in the height direction of the component, the content is bottom-aligned with the component.
ARKUI_RENDER_FIT_RESIZE_COVER = 13While maintaining its aspect ratio in the final state, the component's content is scaled to cover the component's entire content box. It is always aligned with the center of the component, so that its middle part is displayed.
ARKUI_RENDER_FIT_RESIZE_COVER_TOP_LEFT = 14While maintaining its aspect ratio in the final state, the component's content is scaled to cover the component's entire content box. When there is remaining space in the width direction, the content is left-aligned with the component, so that its left part is displayed. When there is remaining space in the height direction, the content is top-aligned with the component, so that its top part is displayed.
ARKUI_RENDER_FIT_RESIZE_COVER_BOTTOM_RIGHT = 15While maintaining its aspect ratio in the final state, the component's content is scaled to cover the component's entire content box. When there is remaining space in the width direction, the content is right-aligned with the component, so that its right part is displayed. When there is remaining space in the height direction, the content is bottom-aligned with the component, so that its bottom part is displayed.

ArkUI_SwiperIndicatorType

enum ArkUI_SwiperIndicatorType

Description

Enumerates the navigation indicator types of the Swiper component.

Since: 12

ValueDescription
ARKUI_SWIPER_INDICATOR_TYPE_DOT = 0Dot type.
ARKUI_SWIPER_INDICATOR_TYPE_DIGIT = 1Digit type.

ArkUI_AnimationDirection

enum ArkUI_AnimationDirection

Description

Enumerates the animation playback directions.

Since: 12

ValueDescription
ARKUI_ANIMATION_DIRECTION_NORMAL = 0The animation plays in forward loop mode.
ARKUI_ANIMATION_DIRECTION_REVERSE = 1The animation plays in reverse loop mode.
ARKUI_ANIMATION_DIRECTION_ALTERNATE = 2The animation plays in alternating loop mode. When the animation is played for an odd number of times, the playback is in forward direction. When the animation is played for an even number of times, the playback is in reverse direction.
ARKUI_ANIMATION_DIRECTION_ALTERNATE_REVERSE = 3The animation plays in reverse alternating loop mode. When the animation is played for an odd number of times, the playback is in reverse direction. When the animation is played for an even number of times, the playback is in forward direction.

ArkUI_ListItemSwipeActionState

enum ArkUI_ListItemSwipeActionState

Description

Enumerates the item states of SwipeAction of the Listitem component. The default value is ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_COLLAPSED.

Since: 12

ValueDescription
ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_COLLAPSED = 0Collapsed state. When the list item is swiped in the opposite direction of the main axis, the swipe action item is hidden.
ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_EXPANDED = 1Expanded state. When the list item is swiped in the opposite direction of the main axis, the swipe action item is shown.
ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_ACTIONING = 2In-action state. The list item is in this state when it enters the delete area.

ArkUI_ListItemSwipeEdgeEffect

enum ArkUI_ListItemSwipeEdgeEffect

Description

Enumerates the item edge effects of swipeAction of the Listitem component. The default value is ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_SPRING.

Since: 12

ValueDescription
ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_SPRING = 0When the list item scrolls to the edge of the list, it can continue to scroll for a distance.
ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_NONE = 1The list item cannot scroll beyond the edge of the list.

ArkUI_ListItemSwipeActionDirection

enum ArkUI_ListItemSwipeActionDirection

Description

Enumerates the swipe action menu display directions for ListItem components.

Since: 21

ValueDescription
ARKUI_LIST_ITEM_SWIPE_ACTION_DIRECTION_START = 0For vertical lists: left side in LTR mode, right side in RTL mode. For horizontal lists: top side.
ARKUI_LIST_ITEM_SWIPE_ACTION_DIRECTION_END = 1For vertical lists: right side in LTR mode, left side in RTL mode. For horizontal lists: bottom side.

ArkUI_AnimationStatus

enum ArkUI_AnimationStatus

Description

Enumerates the playback states of the frame-by-frame animation.

Since: 12

ValueDescription
ARKUI_ANIMATION_STATUS_INITIAL = 0The animation is in the initial state.
ARKUI_ANIMATION_STATUS_RUNNING = 1The animation is being played.
ARKUI_ANIMATION_STATUS_PAUSED = 2The animation is paused.
ARKUI_ANIMATION_STATUS_STOPPED = 3The animation is stopped.

ArkUI_AnimationFillMode

enum ArkUI_AnimationFillMode

Description

Enumerates the states before and after execution of the frame-by-frame animation.

Since: 12

ValueDescription
ARKUI_ANIMATION_FILL_MODE_NONE = 0Before execution, the animation does not apply any styles to the target component. After execution, the animation restores the target component to its default state.
ARKUI_ANIMATION_FILL_MODE_FORWARDS = 1The target component retains the state set by the last keyframe encountered during execution of the animation.
ARKUI_ANIMATION_FILL_MODE_BACKWARDS = 2The animation applies the values defined in the first relevantage keyframe once it is applied to the target component, and retains the values during the period set by delay.
ARKUI_ANIMATION_FILL_MODE_BOTH = 3The animation follows the rules of ARKUI_ANIMATION_FILL_MODE_FORWARDS and ARKUI_ANIMATION_FILL_MODE_BACKWARDS to extend the animation properties in both directions.

ArkUI_ErrorCode

enum ArkUI_ErrorCode

Description

Enumerates the error codes.

Since: 12

ValueDescription
ARKUI_ERROR_CODE_NO_ERROR = 0No error.
ARKUI_ERROR_CODE_PARAM_INVALID = 401Parameter error.
ARKUI_ERROR_CODE_CAPI_INIT_ERROR = 500API initialization error.
Since: 18
ARKUI_ERROR_CODE_INTERNAL_ERROR = 100001Internal error, such as failure due to internal environment issues or operation failure caused by internal execution errors.
Since: 15
ARKUI_ERROR_CODE_PARAM_ERROR = 100023Parameter error. For details about the error code, see 100023 Parameter Error.
Since: 21
ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID = 103501The XComponent is in an invalid or unsupported state. For details, see XComponent Error Codes.
Since: 19
ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED = 106102The component does not support specific attributes or events. For details, see Interaction Event Error Codes.
ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE = 106103The corresponding operations cannot be performed on the node created by ArkTS. For details about the error code, see 106103 Operation Not Allowed on Nodes Created by ArkTS.
ARKUI_ERROR_CODE_ADAPTER_NOT_BOUND = 106104The adapter for lazy loading is not bound to the component. For details about the error code, see 106104 Adapter Not Bound.
ERROR_CODE_NATIVE_IMPL_NODE_ADAPTER_EXIST = 106105The adapter already exists. For details about the error code, see 106105 Adapter Already Exists.
ARKUI_ERROR_CODE_CHILD_NODE_EXIST = 106106Failed to add the adapter because the corresponding node already has a subnode. For details about the error code, see 106106 Child Node Exists.
ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INDEX_OUT_OF_RANGE = 106107The parameter length in the parameter event exceeds the limit. For details about the error code, see 106107 Index Out of Range.
ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID = 106108The data does not exist in the component event. For details about the error code, see 106108 Data Not Found.
ARKUI_ERROR_CODE_NODE_EVENT_NO_RETURN = 106109The component event does not support return values. For details about the error code, see 106109 Return Value Not Supported.
ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE = 106110This event type is not supported. For details about the error code, see 106110 Unsupported Event Type.
Since: 21
ARKUI_ERROR_CODE_NODE_INDEX_INVALID = 106200Invalid index.
For details about the error code, see 106200 Invalid Index Value.
ARKUI_ERROR_CODE_GET_INFO_FAILED = 106201Failed to obtain the route navigation information.
For details about the error code, see 106201 Failed to Obtain Route Navigation Information.
ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR = 106202The passed buffer size is invalid (the data is too large).
For details about the error code, see 106202 Invalid Buffer Size.
ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE = 106203The passed node is not mounted to the component tree. For details about the error code, see 106203 Passed Node Not Mounted to Component Tree.
Since: 15
ARKUI_ERROR_CODE_NODE_ON_INVALID_THREAD = 106204Operations on the provided node are not supported on non-UI threads. For details about the error code, see 106204 Operations on the Provided Node Not Supported on Non-UI Threads.
Since: 22
ARKUI_ERROR_CODE_FORCE_DARK_CONFIG_INVALID = 106205The input parameter for the color inversion capability is incorrect. For details about the error code, see 106205 Invalid Input Parameter for the Color Inversion Capability.
Since: 20
ARKUI_ERROR_CODE_NODE_IS_ADOPTED = 106206The node has been accepted as an auxiliary node. For details about the error code, see 106206 The Node Has Been Accepted as an Auxiliary Node.
Since: 22
ARKUI_ERROR_CODE_NODE_HAS_PARENT = 106207The accepted node already has a parent node. For details about the error code, see 106207 The Auxiliary Node to Accept Has a Parent Node.
Since: 22
ARKUI_ERROR_CODE_NODE_CAN_NOT_BE_ADOPTED = 106208The node cannot be accepted as an auxiliary node. For details about the error code, see 106208 The Node Cannot Be Accepted as an Auxiliary Node.
Since: 22
ARKUI_ERROR_CODE_NODE_CAN_NOT_ADOPT_TO = 106209The node cannot accept other nodes. For details about the error code, see 106209 The Node Cannot Accept Other Nodes.
Since: 22
ARKUI_ERROR_CODE_NODE_IS_NOT_IN_ADOPTED_CHILDREN = 106210The node is not an auxiliary node accepted by the target node. For details about the error code, see 106210 The Node Is Not an Affiliated Node Accepted by the Target Node.
Since: 22
ARKUI_ERROR_CODE_NOT_CUSTOM_NODE = 106401The current node is not a custom node. For details, see Render Node Error Codes.
Since: 20
ARKUI_ERROR_CODE_CHILD_EXISTED = 106402The current node already has child nodes. For details, see Render Node Error Codes.
Since: 20
ARKUI_ERROR_CODE_RENDER_PARENT_EXISTED = 106403The current render node has a parent component. For details, see Render Node Error Codes.
Since: 20
ARKUI_ERROR_CODE_RENDER_CHILD_NOT_EXIST = 106404Corresponding render child node not found. For details, see Render Node Error Codes.
Since: 20
ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE = 106405The parameter value is out of range. For details, see Render Node Error Codes.
Since: 20
ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE = 106406The current rendering node is obtained from the FrameNode. For details about the error code, see 106406 Current Render Node Is Obtained from FrameNode.
Since: 22
ARKUI_ERROR_CODE_RENDER_HAS_INVALID_FRAME_NODE = 106407The current rendering node is obtained from the FrameNode and the FrameNode has not been adopted as an affiliated node or has been disposed. For details about the error code, see 106407 Current Render Node Is Obtained from FrameNode and the FrameNode Is Disposed or No Longer Adopted.
Since: 22
ARKUI_ERROR_CODE_RENDER_NOT_ADOPTED_NODE = 106408The current node is not in the adopted state. For details about the error code, see 106408 Current Node Is Not in Adopted State.
Since: 22
ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE = 150001The current node is not focusable. For details about the error code, see 150001 Component Not Focusable.
Since: 15
ARKUI_ERROR_CODE_FOCUS_NON_FOCUSABLE_ANCESTOR = 150002An ancestor of the current node is not focusable. For details about the error code, see 150002 Ancestor Component Not Focusable.
Since: 15
ARKUI_ERROR_CODE_FOCUS_NON_EXISTENT = 150003The current node does not exist. For details about the error code, see 150003 Component Does Not Exist.
Since: 15
ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_TIMEOUT = 160002Snapshot timed out. For details, see Snapshot Error Codes.
Since: 15
ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_MODE_NOT_SUPPORTED = 160003The provided color space or dynamic range mode is not supported. For details, see Snapshot Error Codes.
Since: 23
ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_AUTO_NOT_SUPPORTED = 160004The isAuto setting of the color space or dynamic range mode is not supported for offscreen node snapshots. For details, see Snapshot Error Codes.
Since: 23
ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER = 180001The component is not a scrollable container. For details, see Interaction Event Error Codes.
ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH = 180002The buffer is not large enough. For details, see Interaction Event Error Codes.
ARKUI_ERROR_CODE_NOT_CLONED_POINTER_EVENT = 180003The event is not a cloned event. For details, see Interaction Event Error Codes.
Since: 15
ARKUI_ERROR_CODE_POST_CLONED_COMPONENT_STATUS_ABNORMAL = 180004The component status is abnormal. For details, see Interaction Event Error Codes.
Since: 15
ARKUI_ERROR_CODE_POST_CLONED_NO_COMPONENT_HIT_TO_RESPOND_TO_THE_EVENT = 180005No component hit to respond to the event. For details, see Interaction Event Error Codes.
Since: 15
ARKUI_ERROR_INPUT_EVENT_TYPE_NOT_SUPPORTED = 180006Input event type not supported.
Since: 20
ARKUI_ERROR_CODE_INVALID_STYLED_STRING = 180101Invalid styled string. For details, see Styled String Error Codes.
Since: 14
ARKUI_ERROR_CODE_UI_CONTEXT_INVALID = 190001Invalid UIContext object. For details, see UI Context Error Codes.
Since: 18
ARKUI_ERROR_CODE_CALLBACK_INVALID = 190002Invalid callback function. For details, see UI Context Error Codes.
Since: 18
ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED = 180102The gesture recognizer type is not supported. For details, see Interaction Event Error Codes.
Since: 18
ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED = 190004The operation is not allowed in the current phase. For details, see Drag Event Error Codes.
Since: 19

ArkUI_ScrollSource

enum ArkUI_ScrollSource

Description

Enumerates scroll sources.

Since: 12

ValueDescription
ARKUI_SCROLL_SOURCE_DRAG = 0Finger dragging.
ARKUI_SCROLL_SOURCE_FLING = 1Inertia scrolling after finger dragging.
ARKUI_SCROLL_SOURCE_EDGE_EFFECT = 2EdgeEffect.Spring for boundary crossing.
ARKUI_SCROLL_SOURCE_OTHER_USER_INPUT = 3User input other than dragging, such as mouse wheel and keyboard events.
ARKUI_SCROLL_SOURCE_SCROLL_BAR = 4Scrollbar dragging.
ARKUI_SCROLL_SOURCE_SCROLL_BAR_FLING = 5Inertial scrolling after scrollbar dragging.
ARKUI_SCROLL_SOURCE_SCROLLER = 6Scrolling by the scroll controller (without animation).
ARKUI_SCROLL_SOURCE_ANIMATION = 7Scrolling by the scroll controller (with animation).

ArkUI_SafeAreaType

enum ArkUI_SafeAreaType

Description

Enumerates the types of expanded safe areas.

Since: 12

ValueDescription
ARKUI_SAFE_AREA_TYPE_SYSTEM = 1Default non-safe area of the system, including the status bar and navigation bar. This is the default value.
ARKUI_SAFE_AREA_TYPE_CUTOUT = 1 << 1Non-safe area of the device, for example, the notch area.
ARKUI_SAFE_AREA_TYPE_KEYBOARD = 1 << 2Soft keyboard area.

ArkUI_SafeAreaEdge

enum ArkUI_SafeAreaEdge

Description

Enumerates the edges for expanding the safe area.

Since: 12

ValueDescription
ARKUI_SAFE_AREA_EDGE_TOP = 1Top edge. This is the default value.
ARKUI_SAFE_AREA_EDGE_BOTTOM = 1 << 1Bottom edge.
ARKUI_SAFE_AREA_EDGE_START = 1 << 2Start edge.
ARKUI_SAFE_AREA_EDGE_END = 1 << 3End edge.

ArkUI_FocusMove

enum ArkUI_FocusMove

Description

Enumerates the focus movement directions.

Since: 18

ValueDescription
ARKUI_FOCUS_MOVE_FORWARD = 0Move focus forward.
ARKUI_FOCUS_MOVE_BACKWARD = 1Move focus backward.
ARKUI_FOCUS_MOVE_UP = 2Move focus up.
ARKUI_FOCUS_MOVE_DOWN = 3Move focus down.
ARKUI_FOCUS_MOVE_LEFT = 4Move focus left.
ARKUI_FOCUS_MOVE_RIGHT = 5Move focus right.

ArkUI_ListItemGroupArea

enum ArkUI_ListItemGroupArea

Description

Enumerates the areas in the ListItemGroup component. The default value is ARKUI_LIST_ITEM_GROUP_AREA_OUTSIDE.

Since: 15

ValueDescription
ARKUI_LIST_ITEM_GROUP_AREA_OUTSIDE = 0Outside the area of the ListItemGroup component.
ARKUI_LIST_ITEM_SWIPE_AREA_NONE = 1Area without the header, footer, and ListItem in the ListItemGroup component.
ARKUI_LIST_ITEM_SWIPE_AREA_ITEM = 2List item area of the ListItemGroup component.
ARKUI_LIST_ITEM_SWIPE_AREA_HEADER = 3Header area of the ListItemGroup component.
ARKUI_LIST_ITEM_SWIPE_AREA_FOOTER = 4Footer area of the ListItemGroup component.

ArkUI_KeyboardAvoidMode

enum ArkUI_KeyboardAvoidMode

Description

Enumerates the soft keyboard avoidance modes.

Since: 15

ValueDescription
ARKUI_KEYBOARD_AVOID_MODE_DEFAULT = 0Automatically avoids the soft keyboard and compresses the height when reaching the maximum limit.
ARKUI_KEYBOARD_AVOID_MODE_NONE = 1The layout is not adjusted to avoid the keyboard.

ArkUI_HoverModeAreaType

enum ArkUI_HoverModeAreaType

Description

Enumerates the types of display areas for the hover mode.

Since: 15

ValueDescription
ARKUI_HOVER_MODE_AREA_TYPE_TOP = 0Upper half screen.
ARKUI_HOVER_MODE_AREA_TYPE_BOTTOM = 1Lower half screen.

ArkUI_ExpandMode

enum ArkUI_ExpandMode

Description

Enumerates the expansion mode of child nodes.

Since: 15

ValueDescription
ARKUI_NOT_EXPAND = 0Child nodes are not expanded.
ARKUI_EXPAND = 1Child nodes are expanded immediately upon rendering.
ARKUI_LAZY_EXPAND = 2Lazy expansion, indicating that child nodes are only expanded when needed. For details about the node expansion conditions, see LazyForEach: Lazy Data Loading.

ArkUI_NavDestinationState

enum ArkUI_NavDestinationState

Description

Enumerates the states of the NavDestination component.

Since: 12

ValueDescription
ARKUI_NAV_DESTINATION_STATE_ON_SHOW = 0The NavDestination component is displayed.
ARKUI_NAV_DESTINATION_STATE_ON_HIDE = 1The NavDestination component is hidden.
ARKUI_NAV_DESTINATION_STATE_ON_APPEAR = 2The NavDestination component is mounted to the component tree.
ARKUI_NAV_DESTINATION_STATE_ON_DISAPPEAR = 3The NavDestination component is unmounted from the component tree.
ARKUI_NAV_DESTINATION_STATE_ON_WILL_SHOW = 4The NavDestination is about to be displayed.
ARKUI_NAV_DESTINATION_STATE_ON_WILL_HIDE = 5The NavDestination is about to be hidden.
ARKUI_NAV_DESTINATION_STATE_ON_WILL_APPEAR = 6The NavDestination is about to be mounted to the component tree.
ARKUI_NAV_DESTINATION_STATE_ON_WILL_DISAPPEAR = 7The NavDestination component is about to be unmounted from the component tree.
ARKUI_NAV_DESTINATION_STATE_ON_BACK_PRESS = 100The back button is pressed for the NavDestination component.

ArkUI_RouterPageState

enum ArkUI_RouterPageState

Description

Enumerates the states of Router Page.

Since: 12

ValueDescription
ARKUI_ROUTER_PAGE_STATE_ABOUT_TO_APPEAR = 0The page is about to be displayed.
ARKUI_ROUTER_PAGE_STATE_ABOUT_TO_DISAPPEAR = 1The page is about to be destroyed.
ARKUI_ROUTER_PAGE_STATE_ON_SHOW = 2The page is displayed.
ARKUI_ROUTER_PAGE_STATE_ON_HIDE = 3The page is hidden.
ARKUI_ROUTER_PAGE_STATE_ON_BACK_PRESS = 4The back button is pressed for the page.

ArkUI_UIState

enum ArkUI_UIState

Description

Enumerates the UI states of a component, used for handling state-specific styles.

Since: 20

ValueDescription
UI_STATE_NORMAL = 0Normal state.
UI_STATE_PRESSED = 1 << 0Pressed state.
UI_STATE_FOCUSED = 1 << 1Focused state.
UI_STATE_DISABLED = 1 << 2Disabled state.
UI_STATE_SELECTED = 1 << 3Selected state. This state is supported only by specific component types: Checkbox, Radio, Toggle, List, Grid, and MenuItem.

ArkUI_FocusWrapMode

enum ArkUI_FocusWrapMode

Description

Enumerates the focus wrap mode of components. The default value is ARKUI_FOCUS_WRAP_MODE_DEFAULT for the Grid and List components.

Since: 20

ValueDescription
ARKUI_FOCUS_WRAP_MODE_DEFAULT = 0Default mode, where focus does not wrap when arrow keys are used.
ARKUI_FOCUS_WRAP_WITH_ARROW = 1Auto mode, where focus wraps automatically when arrow keys are used.

ArkUI_ItemFillPolicy

enum ArkUI_ItemFillPolicy

Description

Enumerates column count policies for different responsive breakpoints.

Since: 22

ValueDescription
ARKUI_ITEMFILLPOLICY_NONE = -1No responsive breakpoint policy is set.
ARKUI_ITEMFILLPOLICY_DEFAULT = 0List or Swiper component: 1 column (SM or smaller), 2 columns (MD), 3 columns (LG or larger).
Grid or WaterFlow component: 2 columns (SM or smaller), 3 columns (MD), 5 columns (LG or larger).
ARKUI_ITEMFILLPOLICY_SM1MD2LG3 = 11 column (SM or smaller), 2 columns (MD), 3 columns (LG or larger).
ARKUI_ITEMFILLPOLICY_SM2MD3LG5 = 22 columns (SM or smaller), 3 columns (MD), 5 columns (LG or larger).

ArkUI_ScrollSnapAnimationSpeed

enum ArkUI_ScrollSnapAnimationSpeed

Description

Enumerates scroll snap animation speeds for list components.

Since: 22

ValueDescription
ARKUI_SCROLL_SNAP_ANIMATION_NORMAL = 0Normal scroll snap animation speed.
ARKUI_SCROLL_SNAP_ANIMATION_SLOW = 1Slow scroll snap animation speed.

ArkUI_EdgeDirection

enum ArkUI_EdgeDirection

Description

Enumerates rectangle edge directions.

Since: 20

ValueDescription
ARKUI_EDGE_DIRECTION_ALL = 0All four edges.
ARKUI_EDGE_DIRECTION_LEFT = 1 << 0Left edge.
ARKUI_EDGE_DIRECTION_RIGHT = 1 << 1Right edge.
ARKUI_EDGE_DIRECTION_TOP = 1 << 2Top edge.
ARKUI_EDGE_DIRECTION_BOTTOM = 1 << 3Bottom edge.

ArkUI_CornerDirection

enum ArkUI_CornerDirection

Description

Enumerates corner directions.

Since: 20

ValueDescription
ARKUI_CORNER_DIRECTION_ALL = 0All four corners.
ARKUI_CORNER_DIRECTION_TOP_LEFT = 1 << 0Upper left corner.
ARKUI_CORNER_DIRECTION_TOP_RIGHT = 1 << 1Upper right corner.
ARKUI_CORNER_DIRECTION_BOTTOM_LEFT = 1 << 2Lower left corner.
ARKUI_CORNER_DIRECTION_BOTTOM_RIGHT = 1 << 3Lower right corner.

ArkUI_LayoutPolicy

enum ArkUI_LayoutPolicy

Description

Enumerates layout policies.

Since: 21

ValueDescription
ARKUI_LAYOUTPOLICY_MATCHPARENT = 0The component size matches parent container dimensions.
ARKUI_LAYOUTPOLICY_WRAPCONTENT = 1The component size wraps its content, constrained by parent container bounds.
ARKUI_LAYOUTPOLICY_FIXATIDEALSIZE = 2The component size wraps its content, unconstrained by parent container bounds.

ArkUI_PixelRoundCalcPolicy

enum ArkUI_PixelRoundCalcPolicy

Description

Enumerates pixel rounding calculation policies.

Since: 21

ValueDescription
ARKUI_PIXELROUNDCALCPOLICY_NOFORCEROUND = 0No forced rounding calculation.
ARKUI_PIXELROUNDCALCPOLICY_FORCECEIL = 1Round-up calculation.
ARKUI_PIXELROUNDCALCPOLICY_FORCEFLOOR = 2Round-down calculation.

ArkUI_GridItemAlignment

enum ArkUI_GridItemAlignment

Description

Enumerates the alignment modes of the GridItem component.

Since: 22

ValueDescription
GRID_ITEM_ALIGNMENT_DEFAULT = 0Use the default alignment mode of the grid.
GRID_ITEM_ALIGNMENT_STRETCH = 1Use the height of the tallest grid item in a row as the height for all other grid items in that row.

ArkUI_GridItemStyle

enum ArkUI_GridItemStyle

Description

Enumerates styles of grid items.

Since: 22

ValueDescription
GRID_ITEM_STYLE_NONE = 0No style.
GRID_ITEM_STYLE_PLAIN = 1Hover or press style.

ArkUI_HoverEffect

enum ArkUI_HoverEffect

Description

Enumerates the hover effects when a component is hovered over.

Since: 23

ValueDescription
ARKUI_HOVER_EFFECT_AUTO = 0Default effect.
ARKUI_HOVER_EFFECT_SCALEZoom effect.
ARKUI_HOVER_EFFECT_HIGHLIGHTHighlight effect.
ARKUI_HOVER_EFFECT_NONENo effect.

ArkUI_FocusPriority

enum ArkUI_FocusPriority

Description

Enumerates the priority levels for focus management within the application. These levels determine the sequence in which UI components receive focus during user interaction.

Since: 23

ValueDescription
ARKUI_FOCUS_PRIORITY_AUTO = 0Default priority.
ARKUI_FOCUS_PRIORITY_PRIOR = 2000Priority that indicates the component is prioritized in the container.
ARKUI_FOCUS_PRIORITY_PREVIOUS = 3000Priority of a previously focused node in the container.

ArkUI_MenuPolicy

enum ArkUI_MenuPolicy

Description

Enumerates menu display policies.

Since: 23

ValueDescription
ARKUI_MENU_POLICY_DEFAULT = 0Whether the menu is displayed depends on the underlying default logic.
ARKUI_MENU_POLICY_HIDE = 1The menu is not popped up.
ARKUI_MENU_POLICY_SHOW = 2The menu is popped up.

ArkUI_ResponseRegionSupportedTool

enum ArkUI_ResponseRegionSupportedTool

Description

Enumerates the input tool types supported for response region configuration.

Since: 23

ValueDescription
ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL = 0All.
ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_FINGER = 1Finger.
ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_PEN = 2Stylus.
ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_MOUSE = 3Mouse.

ArkUI_TextMenuItemId

enum ArkUI_TextMenuItemId

Description

Enumerates the IDs of text menu items.

Since: 22

ValueDescription
ARKUI_TEXT_MENU_ITEM_ID_CUT = 0Clip.
ARKUI_TEXT_MENU_ITEM_ID_COPY = 1Copy.
ARKUI_TEXT_MENU_ITEM_ID_PASTE = 2Paste.
ARKUI_TEXT_MENU_ITEM_ID_SELECT_ALL = 3Select all.
ARKUI_TEXT_MENU_ITEM_ID_COLLABORATION_SERVICE = 4Collaboration service. For example, cross-device interaction, including cross-device camera access.
ARKUI_TEXT_MENU_ITEM_ID_CAMERA_INPUT = 5Camera input.
ARKUI_TEXT_MENU_ITEM_ID_AI_WRITER = 6AI-assisted writing. This menu item requires the large language model. If no large language model is available, this menu item does not take effect.
ARKUI_TEXT_MENU_ITEM_ID_TRANSLATE = 7Translate. The translation service is provided for the selected text.
ARKUI_TEXT_MENU_ITEM_ID_SEARCH = 8Search. This menu item launches a browser to search for the selected text.
ARKUI_TEXT_MENU_ITEM_ID_SHARE = 9Share. This menu item launches a window for sharing the selected text.
ARKUI_TEXT_MENU_ITEM_ID_URL = 10Open a link. This menu item provides the redirection service for the selected URL, launching a browser search or application page.
ARKUI_TEXT_MENU_ITEM_ID_EMAIL = 11New Email. This menu item provides the redirection service for the selected email address, launching the email application.
ARKUI_TEXT_MENU_ITEM_ID_PHONE_NUMBER = 12Call. This menu item provides the redirection service for the selected phone number, launching the phone dialer page.
ARKUI_TEXT_MENU_ITEM_ID_ADDRESS = 13Navigate. This menu item provides the redirection service for the selected address, launching the map application.
ARKUI_TEXT_MENU_ITEM_ID_DATA_TIME = 14New event. This menu item provides the redirection service for the selected date and time, launching the page for creating a calendar event.
ARKUI_TEXT_MENU_ITEM_ID_ASK_AI = 15Ask AI. This menu item provides the AI query capability for the selected text.
ARKUI_TEXT_MENU_ITEM_ID_AUTO_FILL = 16Autofill. For example, the account and password can be automatically filled.
Since: 24
ARKUI_TEXT_MENU_ITEM_ID_PASSWORD_VAULT = 17Password vault.
Since: 24
ARKUI_TEXT_MENU_ITEM_ID_APP_RESERVED_BEGIN = 10000Start ID of a custom menu item. In addition to the built-in menu item IDs, you can also customize menu item IDs.
ARKUI_TEXT_MENU_ITEM_ID_APP_RESERVED_END = 20000End ID of a custom menu item. In addition to the built-in menu item IDs, you can also customize menu item IDs.

ArkUI_TextSpanType

enum ArkUI_TextSpanType

Description

Enumerates the recognition types of a custom text selection menu.

Since: 22

ValueDescription
ARKUI_TEXT_SPAN_TYPE_TEXT = 0Text.
ARKUI_TEXT_SPAN_TYPE_IMAGE = 1Image.
ARKUI_TEXT_SPAN_TYPE_MIXED = 2Mixed text and image.
ARKUI_TEXT_SPAN_TYPE_DEFAULT = 3If this type and other types are set, the menu corresponding to the type of the selected text is displayed after the text is selected. If this type is set but other types are not set, the menu corresponding to this type is displayed after the text is selected. For example, if there are two menus whose recognition types are ARKUI_TEXT_SPAN_TYPE_TEXT and ARKUI_TEXT_SPAN_TYPE_DEFAULT respectively, the menu corresponding to ARKUI_TEXT_SPAN_TYPE_TEXT is displayed when the text is selected, and the menu corresponding to ARKUI_TEXT_SPAN_TYPE_DEFAULT is displayed when the image is selected.

ArkUI_TextResponseType

enum ArkUI_TextResponseType

Description

Enumerates the response types of a custom text selection menu.

Since: 22

ValueDescription
ARKUI_TEXT_RESPONSE_TYPE_RIGHT_CLICK = 0The menu is displayed when the component is right-clicked.
ARKUI_TEXT_RESPONSE_TYPE_LONG_PRESS = 1The menu is displayed when the component is long-pressed.
ARKUI_TEXT_RESPONSE_TYPE_SELECT = 2The menu is displayed when the component is selected.
ARKUI_TEXT_RESPONSE_TYPE_DEFAULT = 3If this type and other types are set, the menu corresponding to the type is displayed when the operation of another type is triggered. If this type is set but other types are not set, the menu corresponding to this type is displayed when an operation of another type is triggered. For example, if there are two menus whose response types are ARKUI_TEXT_RESPONSE_TYPE_RIGHT_CLICK and ARKUI_TEXT_RESPONSE_TYPE_DEFAULT respectively, the menu corresponding to ARKUI_TEXT_RESPONSE_TYPE_RIGHT_CLICK is displayed when you right-click the menu, and the menu corresponding to ARKUI_TEXT_RESPONSE_TYPE_DEFAULT is displayed when you hold down the right mouse button.

ArkUI_MarqueeStartPolicy

enum ArkUI_MarqueeStartPolicy

Description

Defines the start policy of a marquee.

Since: 23

ValueDescription
ARKUI_MARQUEESTARTPOLICY_DEFAULT = 0The marquee scrolls continuously by default.
ARKUI_MARQUEESTARTPOLICY_ONFOCUS = 1The marquee scrolls when the focus is obtained or the mouse pointer is hovered over.

ArkUI_MarqueeUpdatePolicy

enum ArkUI_MarqueeUpdatePolicy

Description

Defines the update policy of a marquee.

Since: 23

ValueDescription
ARKUI_MARQUEEUPDATEPOLICY_DEFAULT = 0After the marquee attributes are updated, the marquee scrolls from the start position.
ARKUI_MARQUEEUPDATEPOLICY_PRESERVEPOSITION = 1After the marquee attributes are updated, the marquee scrolls from the current position.

ArkUI_LayoutSafeAreaType

enum ArkUI_LayoutSafeAreaType

Description

Enumerates the types of expanded safe areas.

Since: 23

ValueDescription
ARKUI_LAYOUT_SAFE_AREA_TYPE_SYSTEM = 1Default non-safe area of the system, including the status bar and navigation bar.

ArkUI_LayoutSafeAreaEdge

enum ArkUI_LayoutSafeAreaEdge

Description

Enumerates the edges for expanding the safe area.

Since: 23

ValueDescription
ARKUI_LAYOUT_SAFE_AREA_EDGE_TOP = 1Top edge.
ARKUI_LAYOUT_SAFE_AREA_EDGE_BOTTOM = 1 << 1Bottom edge.
ARKUI_LAYOUT_SAFE_AREA_EDGE_START = 1 << 2Start edge.
ARKUI_LAYOUT_SAFE_AREA_EDGE_END = 1 << 3End edge.
ARKUI_LAYOUT_SAFE_AREA_EDGE_VERTICAL = ARKUI_LAYOUT_SAFE_AREA_EDGE_TOP |ARKUI_LAYOUT_SAFE_AREA_EDGE_BOTTOM = 3Vertical edge.
ARKUI_LAYOUT_SAFE_AREA_EDGE_HORIZONTAL = ARKUI_LAYOUT_SAFE_AREA_EDGE_START |ARKUI_LAYOUT_SAFE_AREA_EDGE_END = 12Horizontal edge.
ARKUI_LAYOUT_SAFE_AREA_EDGE_ALL = ARKUI_LAYOUT_SAFE_AREA_EDGE_VERTICAL |ARKUI_LAYOUT_SAFE_AREA_EDGE_HORIZONTAL = 15All edges.

ArkUI_LocalizedAlignment

enum ArkUI_LocalizedAlignment

Description

Defines the alignment rules of child components in a Stack container.

Since: 23

ValueDescription
ARKUI_LOCALIZED_ALIGNMENT_TOP_START = 0Top start.
ARKUI_LOCALIZED_ALIGNMENT_TOP = 1Top center.
ARKUI_LOCALIZED_ALIGNMENT_TOP_END = 2Top end.
ARKUI_LOCALIZED_ALIGNMENT_START = 3Vertically centered start.
ARKUI_LOCALIZED_ALIGNMENT_CENTER = 4Horizontally and vertically centered.
ARKUI_LOCALIZED_ALIGNMENT_END = 5Vertically centered end.
ARKUI_LOCALIZED_ALIGNMENT_BOTTOM_START = 6Bottom start.
ARKUI_LOCALIZED_ALIGNMENT_BOTTOM = 7Horizontally centered on the bottom.
ARKUI_LOCALIZED_ALIGNMENT_BOTTOM_END = 8Bottom end.

ArkUI_RenderStrategy

enum ArkUI_RenderStrategy

Description

Enumerates strategies for drawing rounded corners.

Since: 23

ValueDescription
ARKUI_RENDERSTRATEGY_FAST = 0Online drawing mode.
ARKUI_RENDERSTRATEGY_OFFSCREEN = 1Off-screen drawing mode.

ArkUI_PickerIndicatorType

enum ArkUI_PickerIndicatorType

Description

Defines the indicator type of the selected item.

Since: 23

ValueDescription
ARKUI_PICKER_INDICATOR_BACKGROUND = 0Background.
ARKUI_PICKER_INDICATOR_DIVIDER = 1Divider.

OH_ArkUI_HapticFeedbackMode

enum OH_ArkUI_HapticFeedbackMode

Description

Enumerates vibration effect types.

Since: 24

ValueDescription
OH_ARKUI_HAPTIC_FEEDBACK_MODE_DISABLED = 0No vibration.
OH_ARKUI_HAPTIC_FEEDBACK_MODE_ENABLED = 1Vibration.
OH_ARKUI_HAPTIC_FEEDBACK_MODE_AUTO = 2System vibration.

OH_ArkUI_TextEditorSpanType

enum OH_ArkUI_TextEditorSpanType

Description

Enumerates the span types of a custom text selection menu.

Since: 24

ValueDescription
OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_TEXT = 0Text span.
OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_IMAGE = 1Image span.
OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_MIXED = 2Mixed span.
OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_BUILDER = 3Custom layout span.
OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_DEFAULT = 4Default span.

OH_ArkUI_TextEditorResponseType

enum OH_ArkUI_TextEditorResponseType

Description

Enumerates the response types of a custom text selection menu.

Since: 24

ValueDescription
OH_ARKUI_TEXT_EDITOR_RESPONSE_TYPE_RIGHT_CLICK = 0The menu is displayed when the component is right-clicked.
OH_ARKUI_TEXT_EDITOR_RESPONSE_TYPE_LONG_PRESS = 1The menu is displayed when the component is long-pressed.
OH_ARKUI_TEXT_EDITOR_RESPONSE_TYPE_SELECT = 2The menu is displayed when the component is selected.
OH_ARKUI_TEXT_EDITOR_RESPONSE_TYPE_DEFAULT = 3Default response type.

OH_ArkUI_TextMenuType

enum OH_ArkUI_TextMenuType

Description

Enumerates text menu types.

Since: 24

ValueDescription
OH_ARKUI_TEXT_EDITOR_SELECTION_MENU = 0Text selection menu.
OH_ARKUI_TEXT_EDITOR_PREVIEW_MENU = 1Preview menu.

OH_ArkUI_LineBreakStrategy

enum OH_ArkUI_LineBreakStrategy

Description

Enumerates line break policies.

Since: 24

ValueDescription
OH_ARKUI_LINE_BREAK_STRATEGY_GREEDY = 0Greedy mode.
Places as many words on a line as possible and moves to the next line only if no more words can fit into the same line.
OH_ARKUI_LINE_BREAK_STRATEGY_HIGH_QUALITY = 1High-quality mode.
Fills in lines as much as possible on the basis of BALANCED, which may results in a large blank area on the last line.
OH_ARKUI_LINE_BREAK_STRATEGY_BALANCE = 2Balance mode.
Without splitting words, the width of each line in a paragraph is the same as much as possible.

Function Description

OH_ArkUI_LayoutConstraint_Create()

ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Create()

Description

Creates layout constraints.

Since: 12

Returns

TypeDescription
ArkUI_LayoutConstraint*Pointer to the created layout constraint.

OH_ArkUI_LayoutConstraint_Copy()

ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Copy(const ArkUI_LayoutConstraint* Constraint)

Description

Performs a deep copy of a layout constraint.

Since: 12

Parameters

NameDescription
const ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.

Returns

TypeDescription
ArkUI_LayoutConstraint*Pointer to the new layout constraint.

OH_ArkUI_LayoutConstraint_Dispose()

void* OH_ArkUI_LayoutConstraint_Dispose(ArkUI_LayoutConstraint* Constraint)

Description

Disposes of a layout constraint pointer.

Since: 12

Parameters

NameDescription
ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.

Returns

TypeDescription
void*Null pointer.

OH_ArkUI_LayoutConstraint_GetMaxWidth()

int32_t OH_ArkUI_LayoutConstraint_GetMaxWidth(const ArkUI_LayoutConstraint* Constraint)

Description

Obtains the maximum width using a layout constraint.

Since: 12

Parameters

NameDescription
const ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.

Returns

TypeDescription
int32_tMaximum width, in pixels.

OH_ArkUI_LayoutConstraint_GetMinWidth()

int32_t OH_ArkUI_LayoutConstraint_GetMinWidth(const ArkUI_LayoutConstraint* Constraint)

Description

Obtains the minimum width using a layout constraint.

Since: 12

Parameters

NameDescription
const ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.

Returns

TypeDescription
int32_tMinimum width, in px.

OH_ArkUI_LayoutConstraint_GetMaxHeight()

int32_t OH_ArkUI_LayoutConstraint_GetMaxHeight(const ArkUI_LayoutConstraint* Constraint)

Description

Obtains the maximum height using a layout constraint.

Since: 12

Parameters

NameDescription
const ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.

Returns

TypeDescription
int32_tMaximum height, in px.

OH_ArkUI_LayoutConstraint_GetMinHeight()

int32_t OH_ArkUI_LayoutConstraint_GetMinHeight(const ArkUI_LayoutConstraint* Constraint)

Description

Obtains the minimum height using a layout constraint.

Since: 12

Parameters

NameDescription
const ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.

Returns

TypeDescription
int32_tMinimum height, in px.

OH_ArkUI_LayoutConstraint_GetPercentReferenceWidth()

int32_t OH_ArkUI_LayoutConstraint_GetPercentReferenceWidth(const ArkUI_LayoutConstraint* Constraint)

Description

Obtains the width percentage reference using a layout constraint.

Since: 12

Parameters

NameDescription
const ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.

Returns

TypeDescription
int32_tWidth percentage reference.

OH_ArkUI_LayoutConstraint_GetPercentReferenceHeight()

int32_t OH_ArkUI_LayoutConstraint_GetPercentReferenceHeight(const ArkUI_LayoutConstraint* Constraint)

Description

Obtains the height percentage reference using a layout constraint.

Since: 12

Parameters

NameDescription
const ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.

Returns

TypeDescription
int32_tHeight percentage reference.

OH_ArkUI_LayoutConstraint_SetMaxWidth()

void OH_ArkUI_LayoutConstraint_SetMaxWidth(ArkUI_LayoutConstraint* Constraint, int32_t value)

Description

Sets the maximum width.

Since: 12

Parameters

NameDescription
ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.
int32_t valueMaximum width, in px. The value range is [0, +∞).

OH_ArkUI_LayoutConstraint_SetMinWidth()

void OH_ArkUI_LayoutConstraint_SetMinWidth(ArkUI_LayoutConstraint* Constraint, int32_t value)

Description

Sets the minimum width.

Since: 12

Parameters

NameDescription
ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.
int32_t valueMinimum width, in px. The value range is [0, +∞).

OH_ArkUI_LayoutConstraint_SetMaxHeight()

void OH_ArkUI_LayoutConstraint_SetMaxHeight(ArkUI_LayoutConstraint* Constraint, int32_t value)

Description

Sets the maximum height.

Since: 12

Parameters

NameDescription
ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.
int32_t valueMaximum height, in px. The value range is [0, +∞).

OH_ArkUI_LayoutConstraint_SetMinHeight()

void OH_ArkUI_LayoutConstraint_SetMinHeight(ArkUI_LayoutConstraint* Constraint, int32_t value)

Description

Sets the minimum height.

Since: 12

Parameters

NameDescription
ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.
int32_t valueMinimum height, in px. The value range is [0, +∞).

OH_ArkUI_LayoutConstraint_SetPercentReferenceWidth()

void OH_ArkUI_LayoutConstraint_SetPercentReferenceWidth(ArkUI_LayoutConstraint* Constraint, int32_t value)

Description

Sets the width percentage reference.

Since: 12

Parameters

NameDescription
ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.
int32_t valueWidth percentage reference. The value range is [0, +∞).

OH_ArkUI_LayoutConstraint_SetPercentReferenceHeight()

void OH_ArkUI_LayoutConstraint_SetPercentReferenceHeight(ArkUI_LayoutConstraint* Constraint, int32_t value)

Description

Sets the height percentage reference.

Since: 12

Parameters

NameDescription
ArkUI_LayoutConstraint* ConstraintPointer to the layout constraint.
int32_t valueHeight percentage reference. The value range is [0, +∞).

OH_ArkUI_DrawContext_GetCanvas()

void* OH_ArkUI_DrawContext_GetCanvas(ArkUI_DrawContext* context)

Description

Obtains the pointer to the canvas for drawing, which can be converted into the OH_Drawing_Canvas pointer of the graphics library for drawing.

Since: 12

Parameters

NameDescription
ArkUI_DrawContext* contextPointer to the drawing context.

Returns

TypeDescription
void*Pointer to the canvas for drawing.

OH_ArkUI_DrawContext_GetSize()

ArkUI_IntSize OH_ArkUI_DrawContext_GetSize(ArkUI_DrawContext* context)

Description

Obtains the size of a drawing area.

Since: 12

Parameters

NameDescription
ArkUI_DrawContext* contextPointer to the drawing context.

Returns

TypeDescription
ArkUI_IntSizeSize of the drawing area.

OH_ArkUI_WaterFlowSectionOption_Create()

ArkUI_WaterFlowSectionOption* OH_ArkUI_WaterFlowSectionOption_Create()

Description

Creates the FlowItem section configuration.

Since: 12

Returns

TypeDescription
ArkUI_WaterFlowSectionOption*Pointer to the FlowItem section configuration.

OH_ArkUI_WaterFlowSectionOption_Dispose()

void OH_ArkUI_WaterFlowSectionOption_Dispose(ArkUI_WaterFlowSectionOption* option)

Description

Disposes of the pointer to the FlowItem section configuration.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to the FlowItem section configuration.

OH_ArkUI_WaterFlowSectionOption_SetSize()

void OH_ArkUI_WaterFlowSectionOption_SetSize(ArkUI_WaterFlowSectionOption* option,int32_t size)

Description

Sets the array length for a water flow section configuration.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to a water flow section configuration.
int32_t sizeSize of the array.

OH_ArkUI_WaterFlowSectionOption_GetSize()

int32_t OH_ArkUI_WaterFlowSectionOption_GetSize(ArkUI_WaterFlowSectionOption* option)

Description

Obtains the length of the FlowItem section configuration array.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to a water flow section configuration.

Returns

TypeDescription
int32_tSize of the array. If -1 is returned, an error code indicating failure is returned. The possible cause is that the option parameter is abnormal, for example, a null pointer.

OH_ArkUI_WaterFlowSectionOption_SetItemCount()

void OH_ArkUI_WaterFlowSectionOption_SetItemCount(ArkUI_WaterFlowSectionOption* option,int32_t index, int32_t itemCount)

Description

Sets the number of water flow items in the section.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to the FlowItem section configuration.
int32_t indexIndex of the target water flow section.
int32_t itemCountNumber of water flow items in the section.

OH_ArkUI_WaterFlowSectionOption_GetItemCount()

int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index)

Description

Obtains the number of water flow items at the corresponding index based on the FlowItem section configuration.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to the FlowItem section configuration.
int32_t indexIndex of the target water flow section.

Returns

TypeDescription
int32_tNumber of items in the water flow section.

OH_ArkUI_WaterFlowSectionOption_SetCrossCount()

void OH_ArkUI_WaterFlowSectionOption_SetCrossCount(ArkUI_WaterFlowSectionOption* option,int32_t index, int32_t crossCount)

Description

Sets the number of columns (in a vertical layout) or rows (in a horizontal layout) of a water flow.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to a water flow section configuration.
int32_t indexIndex of the target water flow section.
int32_t crossCountNumber of columns or rows, depending on the layout direction.

OH_ArkUI_WaterFlowSectionOption_GetCrossCount()

int32_t OH_ArkUI_WaterFlowSectionOption_GetCrossCount(ArkUI_WaterFlowSectionOption* option, int32_t index)

Description

Obtains the number of layout grids at the corresponding index based on the FlowItem section configuration.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to a water flow section configuration.
int32_t indexIndex of the target water flow section.

Returns

TypeDescription
int32_tNumber of columns or rows, depending on the layout direction.

OH_ArkUI_WaterFlowSectionOption_SetColumnGap()

void OH_ArkUI_WaterFlowSectionOption_SetColumnGap(ArkUI_WaterFlowSectionOption* option,int32_t index, float columnGap)

Description

Sets the gap between columns in the specified water flow section.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to a water flow section configuration.
int32_t indexIndex of the target water flow section.
float columnGapGap between columns. Unit: vp.

OH_ArkUI_WaterFlowSectionOption_GetColumnGap()

float OH_ArkUI_WaterFlowSectionOption_GetColumnGap(ArkUI_WaterFlowSectionOption* option, int32_t index)

Description

Obtains the gap between columns in the water flow section that matches the specified index.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to a water flow section configuration.
int32_t indexIndex of the target water flow section.

Returns

TypeDescription
floatGap between columns. Unit: vp.

OH_ArkUI_WaterFlowSectionOption_SetRowGap()

void OH_ArkUI_WaterFlowSectionOption_SetRowGap(ArkUI_WaterFlowSectionOption* option,int32_t index, float rowGap)

Description

Sets the gap between rows in the FlowItem section.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to a water flow section configuration.
int32_t indexIndex of the FlowItem section configuration array.
float rowGapGap between rows. Unit: vp.

OH_ArkUI_WaterFlowSectionOption_GetRowGap()

float OH_ArkUI_WaterFlowSectionOption_GetRowGap(ArkUI_WaterFlowSectionOption* option, int32_t index)

Description

Obtains the gap between rows in the section at the corresponding index based on the FlowItem section configuration.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to the FlowItem section configuration.
int32_t indexIndex of the target water flow section.

Returns

TypeDescription
floatGap between rows. Unit: vp.

OH_ArkUI_WaterFlowSectionOption_SetMargin()

void OH_ArkUI_WaterFlowSectionOption_SetMargin(ArkUI_WaterFlowSectionOption* option, int32_t index,float marginTop, float marginRight, float marginBottom, float marginLeft)

Description

Sets the margins for the specified water flow section.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to the FlowItem section configuration.
int32_t indexIndex of the target water flow section.
float marginTopTop margin of FlowItem.
float marginRightRight margin of FlowItem.
float marginBottomBottom margin of FlowItem.
float marginLeftLeft margin of FlowItem.

OH_ArkUI_WaterFlowSectionOption_GetMargin()

ArkUI_Margin OH_ArkUI_WaterFlowSectionOption_GetMargin(ArkUI_WaterFlowSectionOption* option, int32_t index)

Description

Obtains the top margin of the section at the corresponding index based on the FlowItem section configuration.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to the FlowItem section configuration.
int32_t indexIndex of the target water flow section.

Returns

TypeDescription
ArkUI_MarginMargins. Unit: vp.

OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex()

void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex(ArkUI_WaterFlowSectionOption* option,int32_t index, float(*callback)(int32_t itemIndex))

Description

Obtains the main axis size of a specified water flow item based on itemIndex in the FlowItem section configuration. To use custom data in the callback, call OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to the FlowItem section configuration.
int32_t indexIndex of the target water flow section.
callbackCallback used to return the result. itemIndex indicates the index of FlowItem.

OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData()

void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData(ArkUI_WaterFlowSectionOption* option, int32_t index, void* userData,float (*callback)(int32_t itemIndex, void* userData))

Description

Obtains the main axis size of a specified water flow item based on itemIndex in the FlowItem section configuration. The difference between this API and OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex is that this API allows you to pass custom data (userData) and receive the data in the callback function.

Since: 12

Parameters

NameDescription
ArkUI_WaterFlowSectionOption* optionPointer to the FlowItem section configuration.
int32_t indexIndex of the target water flow section.
void* userDataPointer to user-defined data, which will be passed back to the user in the callback.
callbackCallback used to return the result. itemIndex: index of the water flow item; userData: user-defined data.

OH_ArkUI_GuidelineOption_Create()

ArkUI_GuidelineOption* OH_ArkUI_GuidelineOption_Create(int32_t size)

Description

Creates guideline options in RelativeContainer.

Since: 12

Parameters

NameDescription
int32_t sizeNumber of guidelines. The value range is [0, +∞).

Returns

TypeDescription
ArkUI_GuidelineOption*Pointer to a guideline configuration.

OH_ArkUI_GuidelineOption_Dispose()

void OH_ArkUI_GuidelineOption_Dispose(ArkUI_GuidelineOption* guideline)

Description

Disposes of a guideline configuration.

Since: 12

Parameters

NameDescription
ArkUI_GuidelineOption* guidelinePointer to a guideline configuration.

OH_ArkUI_GuidelineOption_SetId()

void OH_ArkUI_GuidelineOption_SetId(ArkUI_GuidelineOption* guideline, const char* value, int32_t index)

Description

Sets the ID of a guideline.

Since: 12

Parameters

NameDescription
ArkUI_GuidelineOption* guidelinePointer to a guideline configuration.
const char* valuePointer to the ID, which must be unique and cannot be the same as the name of any component in the container.
int32_t indexIndex of the guideline.

OH_ArkUI_GuidelineOption_SetDirection()

void OH_ArkUI_GuidelineOption_SetDirection(ArkUI_GuidelineOption* guideline, ArkUI_Axis value, int32_t index)

Description

Sets the direction of a guideline.

Since: 12

Parameters

NameDescription
ArkUI_GuidelineOption* guidelinePointer to a guideline configuration.
ArkUI_Axis valueDirection.
int32_t indexIndex of the guideline.

OH_ArkUI_GuidelineOption_SetPositionStart()

void OH_ArkUI_GuidelineOption_SetPositionStart(ArkUI_GuidelineOption* guideline, float value, int32_t index)

Description

Sets the distance between a guideline and the left or top of the container.

Since: 12

Parameters

NameDescription
ArkUI_GuidelineOption* guidelinePointer to a guideline configuration.
float valueDistance between a guideline and the left or top edge of the container, in vp.
int32_t indexIndex of the guideline.

OH_ArkUI_GuidelineOption_SetPositionEnd()

void OH_ArkUI_GuidelineOption_SetPositionEnd(ArkUI_GuidelineOption* guideline, float value, int32_t index)

Description

Sets the distance between a guideline and the right or bottom of the container.

Since: 12

Parameters

NameDescription
ArkUI_GuidelineOption* guidelinePointer to a guideline configuration.
float valueDistance between a guideline and the right or bottom edge of the container, in vp.
int32_t indexIndex of the guideline.

OH_ArkUI_GuidelineOption_GetId()

const char* OH_ArkUI_GuidelineOption_GetId(ArkUI_GuidelineOption* guideline, int32_t index)

Description

Obtains the ID of a guideline.

Since: 12

Parameters

NameDescription
ArkUI_GuidelineOption* guidelinePointer to a guideline configuration.
int32_t indexIndex of the guideline.

Returns

TypeDescription
const char*Pointer to the ID of the guideline.

OH_ArkUI_GuidelineOption_GetDirection()

ArkUI_Axis OH_ArkUI_GuidelineOption_GetDirection(ArkUI_GuidelineOption* guideline, int32_t index)

Description

Obtains the direction of a guideline.

Since: 12

Parameters

NameDescription
ArkUI_GuidelineOption* guidelinePointer to a guideline configuration.
int32_t indexIndex of the guideline.

Returns

TypeDescription
ArkUI_AxisDirection.

OH_ArkUI_GuidelineOption_GetPositionStart()

float OH_ArkUI_GuidelineOption_GetPositionStart(ArkUI_GuidelineOption* guideline, int32_t index)

Description

Obtains the distance between the guideline and the left or top of the container.

Since: 12

Parameters

NameDescription
ArkUI_GuidelineOption* guidelinePointer to a guideline configuration.
int32_t indexIndex of the guideline.

Returns

TypeDescription
floatDistance between the guideline and the left or top of the container. The unit is vp.

OH_ArkUI_GuidelineOption_GetPositionEnd()

float OH_ArkUI_GuidelineOption_GetPositionEnd(ArkUI_GuidelineOption* guideline, int32_t index)

Description

Obtains the distance between the guideline and the right or bottom of the container.

Since: 12

Parameters

NameDescription
ArkUI_GuidelineOption* guidelinePointer to a guideline configuration.
int32_t indexIndex of the guideline.

Returns

TypeDescription
floatDistance between the guideline and the right or bottom of the container. The unit is vp.

OH_ArkUI_BarrierOption_Create()

ArkUI_BarrierOption* OH_ArkUI_BarrierOption_Create(int32_t size)

Description

Creates a barrier configuration for this RelativeContainer component.

Since: 12

Parameters

NameDescription
int32_t sizeNumber of barriers. The value range is [0, +∞).

Returns

TypeDescription
ArkUI_BarrierOption*Pointer to the barrier configuration.

OH_ArkUI_BarrierOption_Dispose()

void OH_ArkUI_BarrierOption_Dispose(ArkUI_BarrierOption* barrierStyle)

Description

Disposes of a barrier configuration.

Since: 12

Parameters

NameDescription
ArkUI_BarrierOption* barrierStylePointer to the barrier configuration.

OH_ArkUI_BarrierOption_SetId()

void OH_ArkUI_BarrierOption_SetId(ArkUI_BarrierOption* barrierStyle, const char* value, int32_t index)

Description

Sets the ID of a barrier.

Since: 12

Parameters

NameDescription
ArkUI_BarrierOption* barrierStylePointer to the barrier configuration.
const char* valuePointer to the ID, which must be unique and cannot be the same as the name of any component in the container.
int32_t indexIndex of the barrier.

OH_ArkUI_BarrierOption_SetDirection()

void OH_ArkUI_BarrierOption_SetDirection(ArkUI_BarrierOption* barrierStyle, ArkUI_BarrierDirection value, int32_t index)

Description

Sets the direction of a barrier.

Since: 12

Parameters

NameDescription
ArkUI_BarrierOption* barrierStylePointer to the barrier configuration.
ArkUI_BarrierDirection valueDirection.
int32_t indexIndex of the barrier.

OH_ArkUI_BarrierOption_SetReferencedId()

void OH_ArkUI_BarrierOption_SetReferencedId(ArkUI_BarrierOption* barrierStyle, const char* value, int32_t index)

Description

Sets the referenced components of a barrier.

Since: 12

Parameters

NameDescription
ArkUI_BarrierOption* barrierStylePointer to the barrier configuration.
const char* valuePointer to the referenced component IDs.
int32_t indexIndex of the barrier.

OH_ArkUI_BarrierOption_GetId()

const char* OH_ArkUI_BarrierOption_GetId(ArkUI_BarrierOption* barrierStyle, int32_t index)

Description

Obtains the ID of a barrier.

Since: 12

Parameters

NameDescription
ArkUI_BarrierOption* barrierStylePointer to the barrier configuration.
int32_t indexIndex of the barrier.

Returns

TypeDescription
const char*Pointer to the ID of the barrier.

OH_ArkUI_BarrierOption_GetDirection()

ArkUI_BarrierDirection OH_ArkUI_BarrierOption_GetDirection(ArkUI_BarrierOption* barrierStyle, int32_t index)

Description

Obtains the direction of a barrier.

Since: 12

Parameters

NameDescription
ArkUI_BarrierOption* barrierStylePointer to the barrier configuration.
int32_t indexIndex of the barrier.

Returns

TypeDescription
ArkUI_BarrierDirectionDirection of the barrier.

OH_ArkUI_BarrierOption_GetReferencedId()

const char* OH_ArkUI_BarrierOption_GetReferencedId(ArkUI_BarrierOption* barrierStyle, int32_t index , int32_t referencedIndex)

Description

Obtains the referenced components of a barrier.

Since: 12

Parameters

NameDescription
ArkUI_BarrierOption* barrierStylePointer to the barrier configuration.
int32_t indexIndex of the barrier.
int32_t referencedIndexIndex of the referenced component ID.

Returns

TypeDescription
const char*Pointer to the referenced components of the barrier.

OH_ArkUI_BarrierOption_GetReferencedIdSize()

int32_t OH_ArkUI_BarrierOption_GetReferencedIdSize(ArkUI_BarrierOption* barrierStyle, int32_t index)

Description

Obtains the number of referenced components of a barrier.

Since: 12

Parameters

NameDescription
ArkUI_BarrierOption* barrierStylePointer to the barrier configuration.
int32_t indexIndex of the barrier.

Returns

TypeDescription
int32_tNumber of referenced components of the barrier.

OH_ArkUI_AlignmentRuleOption_Create()

ArkUI_AlignmentRuleOption* OH_ArkUI_AlignmentRuleOption_Create()

Description

Creates an alignment rule configuration for this RelativeContainer component.

Since: 12

Returns

TypeDescription
ArkUI_AlignmentRuleOption*Pointer to the alignment rule information.

OH_ArkUI_AlignmentRuleOption_Dispose()

void OH_ArkUI_AlignmentRuleOption_Dispose(ArkUI_AlignmentRuleOption* option)

Description

Disposes of an alignment rule configuration of this RelativeContainer component.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

OH_ArkUI_AlignmentRuleOption_SetStart()

void OH_ArkUI_AlignmentRuleOption_SetStart(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment)

Description

Sets the left alignment mode of a relative layout.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.
const char* idPointer to the ID of the component that functions as the anchor point.
ArkUI_HorizontalAlignment alignmentAlignment mode relative to the anchor component.

OH_ArkUI_AlignmentRuleOption_SetEnd()

void OH_ArkUI_AlignmentRuleOption_SetEnd(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment)

Description

Sets the right alignment mode of a relative layout.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.
const char* idPointer to the ID of the component that functions as the anchor point.
ArkUI_HorizontalAlignment alignmentAlignment mode relative to the anchor component.

OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal()

void OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment)

Description

Sets the horizontal center alignment mode of a relative layout.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.
const char* idPointer to the ID of the component that functions as the anchor point.
ArkUI_HorizontalAlignment alignmentAlignment mode relative to the anchor component.

OH_ArkUI_AlignmentRuleOption_SetTop()

void OH_ArkUI_AlignmentRuleOption_SetTop(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment)

Description

Sets the top alignment mode of a relative layout.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.
const char* idPointer to the ID of the component that functions as the anchor point.
ArkUI_VerticalAlignment alignmentAlignment mode relative to the anchor component.

OH_ArkUI_AlignmentRuleOption_SetBottom()

void OH_ArkUI_AlignmentRuleOption_SetBottom(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment)

Description

Sets the bottom alignment mode of a relative layout.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.
const char* idPointer to the ID of the component that functions as the anchor point.
ArkUI_VerticalAlignment alignmentAlignment mode relative to the anchor component.

OH_ArkUI_AlignmentRuleOption_SetCenterVertical()

void OH_ArkUI_AlignmentRuleOption_SetCenterVertical(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment)

Description

Sets the vertical center alignment mode of a relative layout.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.
const char* idPointer to the ID of the component that functions as the anchor point.
ArkUI_VerticalAlignment alignmentAlignment mode relative to the anchor component.

OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal()

void OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal(ArkUI_AlignmentRuleOption* option, float horizontal)

Description

Sets the bias value of the component in the horizontal direction under the anchor constraints.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.
float horizontalBias value in the horizontal direction.

OH_ArkUI_AlignmentRuleOption_SetBiasVertical()

void OH_ArkUI_AlignmentRuleOption_SetBiasVertical(ArkUI_AlignmentRuleOption* option, float vertical)

Description

Sets the bias value of the component in the vertical direction under the anchor constraints.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.
float verticalBias value in the vertical direction.

OH_ArkUI_AlignmentRuleOption_GetStartId()

const char* OH_ArkUI_AlignmentRuleOption_GetStartId(ArkUI_AlignmentRuleOption* option)

Description

Obtains the ID of the left alignment anchor component.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
const char*Pointer to the ID of the left alignment anchor component.

OH_ArkUI_AlignmentRuleOption_GetStartAlignment()

ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetStartAlignment(ArkUI_AlignmentRuleOption* option)

Description

Obtains the left alignment mode.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
ArkUI_HorizontalAlignmentAlignment mode in left alignment parameters.

OH_ArkUI_AlignmentRuleOption_GetEndId()

const char* OH_ArkUI_AlignmentRuleOption_GetEndId(ArkUI_AlignmentRuleOption* option)

Description

Obtains the ID of the right alignment anchor component.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
const char*Pointer to the ID of the right alignment anchor component.

OH_ArkUI_AlignmentRuleOption_GetEndAlignment()

ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetEndAlignment(ArkUI_AlignmentRuleOption* option)

Description

Obtains the right alignment mode.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
ArkUI_HorizontalAlignmentRight alignment mode.

OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal()

const char* OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal(ArkUI_AlignmentRuleOption* option)

Description

Obtains the ID of the horizontal center alignment anchor component.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
const char*Pointer to the ID of the horizontal center alignment anchor component.

OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal()

ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal(ArkUI_AlignmentRuleOption* option)

Description

Obtains the horizontal center alignment mode.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
ArkUI_HorizontalAlignmentHorizontal center alignment mode.

OH_ArkUI_AlignmentRuleOption_GetTopId()

const char* OH_ArkUI_AlignmentRuleOption_GetTopId(ArkUI_AlignmentRuleOption* option)

Description

Obtains the ID of the top alignment anchor component.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
const char*Pointer to the ID of the top alignment anchor component.

OH_ArkUI_AlignmentRuleOption_GetTopAlignment()

ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetTopAlignment(ArkUI_AlignmentRuleOption* option)

Description

Obtains the top alignment mode.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
ArkUI_VerticalAlignmentTop alignment mode.

OH_ArkUI_AlignmentRuleOption_GetBottomId()

const char* OH_ArkUI_AlignmentRuleOption_GetBottomId(ArkUI_AlignmentRuleOption* option)

Description

Obtains the ID of the bottom alignment anchor component.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
const char*Pointer to the ID of the bottom alignment anchor component.

OH_ArkUI_AlignmentRuleOption_GetBottomAlignment()

ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetBottomAlignment(ArkUI_AlignmentRuleOption* option)

Description

Obtains the bottom alignment mode.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
ArkUI_VerticalAlignmentBottom alignment mode.

OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical()

const char* OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical(ArkUI_AlignmentRuleOption* option)

Description

Obtains the ID of the vertical center alignment anchor component.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
const char*Pointer to the ID of the vertical center alignment anchor component.

OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical()

ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical(ArkUI_AlignmentRuleOption* option)

Description

Obtains the vertical center alignment mode.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
ArkUI_VerticalAlignmentVertical center alignment mode.

OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal()

float OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(ArkUI_AlignmentRuleOption* option)

Description

Obtains the bias value in the horizontal direction.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
floatBias value in the horizontal direction.

OH_ArkUI_AlignmentRuleOption_GetBiasVertical()

float OH_ArkUI_AlignmentRuleOption_GetBiasVertical(ArkUI_AlignmentRuleOption* option)

Description

Obtains the bias value in the vertical direction.

Since: 12

Parameters

NameDescription
ArkUI_AlignmentRuleOption* optionPointer to an alignment rule configuration.

Returns

TypeDescription
floatBias value in the vertical direction.

OH_ArkUI_SwiperIndicator_Create()

ArkUI_SwiperIndicator* OH_ArkUI_SwiperIndicator_Create(ArkUI_SwiperIndicatorType type)

Description

Creates a navigation indicator for the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicatorType typeType of the navigation indicator.

Returns

TypeDescription
ArkUI_SwiperIndicator*Pointer to the navigation indicator.

OH_ArkUI_SwiperIndicator_Dispose()

void OH_ArkUI_SwiperIndicator_Dispose(ArkUI_SwiperIndicator* indicator)

Description

Disposes of the navigation indicator of this Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

OH_ArkUI_SwiperIndicator_SetStartPosition()

void OH_ArkUI_SwiperIndicator_SetStartPosition(ArkUI_SwiperIndicator* indicator, float value)

Description

Sets the distance between the navigation point and the left edge of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
float valueDistance between the navigation indicator and the left edge of the Swiper component. Default value: 0, in vp.

OH_ArkUI_SwiperIndicator_GetStartPosition()

float OH_ArkUI_SwiperIndicator_GetStartPosition(ArkUI_SwiperIndicator* indicator)

Description

Obtains the distance between the navigation point and the left edge of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
floatDistance between the navigation indicator and the left edge of the Swiper component. Unit: vp.

OH_ArkUI_SwiperIndicator_SetTopPosition()

void OH_ArkUI_SwiperIndicator_SetTopPosition(ArkUI_SwiperIndicator* indicator, float value)

Description

Sets the distance between the navigation point and the top edge of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
float valueDistance between a navigation indicator and the top edge of the Swiper component. Default value: 0, in vp.

OH_ArkUI_SwiperIndicator_GetTopPosition()

float OH_ArkUI_SwiperIndicator_GetTopPosition(ArkUI_SwiperIndicator* indicator)

Description

Obtains the distance between the navigation point and the top edge of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
floatDistance between a navigation indicator and the top edge of the Swiper component. Unit: vp.

OH_ArkUI_SwiperIndicator_SetEndPosition()

void OH_ArkUI_SwiperIndicator_SetEndPosition(ArkUI_SwiperIndicator* indicator, float value)

Description

Sets the distance between the navigation point and the right edge of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
float valueDistance between the navigation indicator and the right edge of the Swiper component. Default value: 0, in vp.

OH_ArkUI_SwiperIndicator_GetEndPosition()

float OH_ArkUI_SwiperIndicator_GetEndPosition(ArkUI_SwiperIndicator* indicator)

Description

Obtains the distance between the navigation point and the right edge of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
floatDistance between the navigation indicator and the right edge of the Swiper component. Unit: vp.

OH_ArkUI_SwiperIndicator_SetBottomPosition()

void OH_ArkUI_SwiperIndicator_SetBottomPosition(ArkUI_SwiperIndicator* indicator, float value)

Description

Sets the distance between the navigation point and the bottom edge of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
float valueDistance between a navigation indicator and the bottom edge of the Swiper component. Default value: 0, in vp.

OH_ArkUI_SwiperIndicator_GetBottomPosition()

float OH_ArkUI_SwiperIndicator_GetBottomPosition(ArkUI_SwiperIndicator* indicator)

Description

Obtains the distance between the navigation point and the bottom edge of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
floatDistance between a navigation indicator and the bottom edge of the Swiper component. Unit: vp.

OH_ArkUI_SwiperIndicator_SetIgnoreSizeOfBottom()

void OH_ArkUI_SwiperIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* indicator, int32_t ignoreSize)

Description

Sets whether the OH_ArkUI_SwiperIndicator_SetBottomPosition API ignores the indicator size when positioning the indicator.

Since: 19

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
int32_t ignoreSizeWhether to ignore the indicator size when positioning the indicator. The value 1 means to ignore the indicator size when positioning the indicator, and 0 means the opposite. Default value: 0.

OH_ArkUI_SwiperIndicator_GetIgnoreSizeOfBottom()

int32_t OH_ArkUI_SwiperIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperIndicator* indicator)

Description

Checks whether the OH_ArkUI_SwiperIndicator_SetBottomPosition API ignores the indicator size when positioning the indicator.

Since: 19

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
int32_tWhether to ignore the indicator size when positioning the indicator.

OH_ArkUI_SwiperIndicator_SetItemWidth()

void OH_ArkUI_SwiperIndicator_SetItemWidth(ArkUI_SwiperIndicator* indicator, float value)

Description

Sets the width of a dot-style navigation indicator for the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
float valueWidth of the dot-style navigation indicator. Default value: 12, in vp.

OH_ArkUI_SwiperIndicator_GetItemWidth()

float OH_ArkUI_SwiperIndicator_GetItemWidth(ArkUI_SwiperIndicator* indicator)

Description

Obtains the width of a dot-style navigation indicator of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
floatWidth of the dot-style navigation indicator. Unit: vp.

OH_ArkUI_SwiperIndicator_SetItemHeight()

void OH_ArkUI_SwiperIndicator_SetItemHeight(ArkUI_SwiperIndicator* indicator, float value)

Description

Sets the height of a dot-style navigation indicator for the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
float valueHeight of the dot-style navigation indicator. Default value: 6, in vp.

OH_ArkUI_SwiperIndicator_GetItemHeight()

float OH_ArkUI_SwiperIndicator_GetItemHeight(ArkUI_SwiperIndicator* indicator)

Description

Obtains the height of a dot-style navigation indicator of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
floatHeight of the dot-style navigation indicator. Unit: vp.

OH_ArkUI_SwiperIndicator_SetSelectedItemWidth()

void OH_ArkUI_SwiperIndicator_SetSelectedItemWidth(ArkUI_SwiperIndicator* indicator, float value)

Description

Sets the width of the selected dot-style navigation indicator for the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
float valueWidth of the dot-style navigation indicator. Default value: 12, in vp.

OH_ArkUI_SwiperIndicator_GetSelectedItemWidth()

float OH_ArkUI_SwiperIndicator_GetSelectedItemWidth(ArkUI_SwiperIndicator* indicator)

Description

Obtains the width of the selected dot-style navigation indicator of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
floatWidth of the dot-style navigation indicator. Unit: vp.

OH_ArkUI_SwiperIndicator_SetSelectedItemHeight()

void OH_ArkUI_SwiperIndicator_SetSelectedItemHeight(ArkUI_SwiperIndicator* indicator, float value)

Description

Sets the height of the selected dot-style navigation indicator for the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
float valueHeight of the dot-style navigation indicator. Default value: 6, in vp.

OH_ArkUI_SwiperIndicator_GetSelectedItemHeight()

float OH_ArkUI_SwiperIndicator_GetSelectedItemHeight(ArkUI_SwiperIndicator* indicator)

Description

Obtains the height of the selected dot-style navigation indicator of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
floatHeight of the dot-style navigation indicator. Unit: vp.

OH_ArkUI_SwiperIndicator_SetMask()

void OH_ArkUI_SwiperIndicator_SetMask(ArkUI_SwiperIndicator* indicator, int32_t mask)

Description

Sets whether to enable the mask for a dot-style navigation indicator for the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
int32_t maskWhether to enable the mask. The value 1 means to enable, and 0 means the opposite.
Default value: 0

OH_ArkUI_SwiperIndicator_GetMask()

int32_t OH_ArkUI_SwiperIndicator_GetMask(ArkUI_SwiperIndicator* indicator)

Description

Obtains whether the mask is enabled for a dot-style navigation indicator of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
int32_tThe value 1 indicates that the mask is enabled; the value 0 indicates that the mask is disabled.

OH_ArkUI_SwiperIndicator_SetColor()

void OH_ArkUI_SwiperIndicator_SetColor(ArkUI_SwiperIndicator* indicator, uint32_t color)

Description

Sets the color of a dot-style navigation indicator for the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
uint32_t colorColor, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Default value: '#1A182431' (light gray)

OH_ArkUI_SwiperIndicator_GetColor()

uint32_t OH_ArkUI_SwiperIndicator_GetColor(ArkUI_SwiperIndicator* indicator)

Description

Obtains the color of a dot-style navigation indicator of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
uint32_tColor, in 0xARGB format. For example, 0xFFFF0000 indicates red.

OH_ArkUI_SwiperIndicator_SetSelectedColor()

void OH_ArkUI_SwiperIndicator_SetSelectedColor(ArkUI_SwiperIndicator* indicator, uint32_t selectedColor)

Description

Sets the color of the selected dot-style navigation indicator for the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
uint32_t selectedColorColor, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Default value: '#007DFF' (blue)

OH_ArkUI_SwiperIndicator_GetSelectedColor()

uint32_t OH_ArkUI_SwiperIndicator_GetSelectedColor(ArkUI_SwiperIndicator* indicator)

Description

Obtains the color of the selected dot-style navigation indicator of the Swiper component.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
uint32_tColor, in 0xARGB format. For example, 0xFFFF0000 indicates red.

OH_ArkUI_SwiperIndicator_SetMaxDisplayCount()

int32_t OH_ArkUI_SwiperIndicator_SetMaxDisplayCount(ArkUI_SwiperIndicator* indicator, int32_t maxDisplayCount)

Description

Sets the maximum number of dots for the dot-style navigation indicator.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
int32_t maxDisplayCountMaximum number of navigation points. Value range: [6, 9].

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if maxDisplayCount is set to an invalid value.

OH_ArkUI_SwiperIndicator_GetMaxDisplayCount()

int32_t OH_ArkUI_SwiperIndicator_GetMaxDisplayCount(ArkUI_SwiperIndicator* indicator)

Description

Obtains the maximum number of dots for the dot-style navigation indicator.

Since: 12

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
int32_tMaximum number of navigation points. Value range: [6, 9].

OH_ArkUI_SwiperDigitIndicator_Create()

ArkUI_SwiperDigitIndicator *OH_ArkUI_SwiperDigitIndicator_Create()

Description

Creates a digit-style navigation indicator for the Swiper component.

Since: 19

Returns

TypeDescription
ArkUI_SwiperDigitIndicator *Pointer to the digit-style navigation indicator.

OH_ArkUI_SwiperDigitIndicator_Destroy()

void OH_ArkUI_SwiperDigitIndicator_Destroy(ArkUI_SwiperDigitIndicator* indicator)

Description

Disposes of the digit-style navigation indicator of this Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

OH_ArkUI_SwiperDigitIndicator_SetStartPosition()

void OH_ArkUI_SwiperDigitIndicator_SetStartPosition(ArkUI_SwiperDigitIndicator* indicator, float value)

Description

Sets the distance between the digit-style navigation indicator and the left edge of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.
float valueDistance between the digit-style navigation indicator and the left edge of the Swiper component. For left-to-right scripts, set the distance between the digit-style navigation indicator and the left edge of the Swiper component. For right-to-left scripts, set the distance between the digit-style navigation indicator and the right side of the Swiper component.
Default value: 0
Unit: vp

OH_ArkUI_SwiperDigitIndicator_GetStartPosition()

float OH_ArkUI_SwiperDigitIndicator_GetStartPosition(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the distance between the digit-style navigation indicator and the left edge of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
floatDistance between the digit-style navigation indicator and the left edge of the Swiper component. For left-to-right scripts, the distance between the digit-style navigation indicator and the left edge of the Swiper component is returned. For right-to-left scripts, the distance between the digit-style navigation indicator and the right side of the Swiper component is returned.
Unit: vp

OH_ArkUI_SwiperDigitIndicator_SetTopPosition()

void OH_ArkUI_SwiperDigitIndicator_SetTopPosition(ArkUI_SwiperDigitIndicator* indicator, float value)

Description

Sets the distance from the digit-style navigation indicator to the top edge of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.
float valueDistance from the digit-style navigation indicator to the top of the Swiper component. Default value: 0, in vp.

OH_ArkUI_SwiperDigitIndicator_GetTopPosition()

float OH_ArkUI_SwiperDigitIndicator_GetTopPosition(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the distance from the digit-style navigation indicator to the top edge of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
floatDistance from the digit-style navigation indicator to the top of the Swiper component. Unit: vp.

OH_ArkUI_SwiperDigitIndicator_SetEndPosition()

void OH_ArkUI_SwiperDigitIndicator_SetEndPosition(ArkUI_SwiperDigitIndicator* indicator, float value)

Description

Sets the distance between the digit-style navigation indicator and the right edge of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.
float valueDistance between the digit-style navigation indicator and the right edge of the Swiper component. For left-to-right scripts, set the distance between the digit-style navigation indicator and the right edge of the Swiper component. For right-to-left scripts, set the digit-style navigation indicator and the left edge of the Swiper component.
Default value: 0
Unit: vp

OH_ArkUI_SwiperDigitIndicator_GetEndPosition()

float OH_ArkUI_SwiperDigitIndicator_GetEndPosition(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the distance between the digit-style navigation indicator and the right edge of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
floatDistance between the digit-style navigation indicator and the right edge of the Swiper component. For left-to-right scripts, the distance between the digit-style navigation indicator and the right edge of the Swiper component is returned. For right-to-left scripts, the digit-style navigation indicator and the left edge of the Swiper component is returned.
Unit: vp

OH_ArkUI_SwiperDigitIndicator_SetBottomPosition()

void OH_ArkUI_SwiperDigitIndicator_SetBottomPosition(ArkUI_SwiperDigitIndicator* indicator, float value)

Description

Sets the distance from the digit-style navigation indicator to the bottom edge of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.
float valueDistance from the digit-style navigation indicator to the bottom of the Swiper component. Default value: 0, in vp.

OH_ArkUI_SwiperDigitIndicator_GetBottomPosition()

float OH_ArkUI_SwiperDigitIndicator_GetBottomPosition(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the distance from the digit-style navigation indicator to the bottom edge of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
floatDistance from the digit-style navigation indicator to the bottom of the Swiper component. Unit: vp.

OH_ArkUI_SwiperDigitIndicator_SetFontColor()

void OH_ArkUI_SwiperDigitIndicator_SetFontColor(ArkUI_SwiperDigitIndicator* indicator, uint32_t color)

Description

Sets the font color of the digit-style navigation indicator for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.
uint32_t colorColor, in 0xARGB format. For example, 0xFFFF0000 indicates red. Default value: 0xFF182431.

OH_ArkUI_SwiperDigitIndicator_GetFontColor()

uint32_t OH_ArkUI_SwiperDigitIndicator_GetFontColor(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the font color of the digit-style navigation indicator for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
uint32_tColor, in 0xARGB format. For example, 0xFFFF0000 indicates red.

OH_ArkUI_SwiperDigitIndicator_SetSelectedFontColor()

void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontColor(ArkUI_SwiperDigitIndicator* indicator, uint32_t selectedColor)

Description

Sets the font color of the selected digit-style navigation indicator for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.
uint32_t selectedColorColor, in 0xARGB format. For example, 0xFFFF0000 indicates red. Default value: 0xFF182431.

OH_ArkUI_SwiperDigitIndicator_GetSelectedFontColor()

uint32_t OH_ArkUI_SwiperDigitIndicator_GetSelectedFontColor(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the font color of the selected digit-style navigation indicator of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
uint32_tColor, in 0xARGB format. For example, 0xFFFF0000 indicates red.

OH_ArkUI_SwiperDigitIndicator_SetFontSize()

void OH_ArkUI_SwiperDigitIndicator_SetFontSize(ArkUI_SwiperDigitIndicator* indicator, float size)

Description

Sets the font size of the digit-style navigation indicator for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.
float sizeFont size, in fp.
Default value: 14

OH_ArkUI_SwiperDigitIndicator_GetFontSize()

float OH_ArkUI_SwiperDigitIndicator_GetFontSize(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the font size of the digit-style navigation indicator of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
floatFont size, in fp.

OH_ArkUI_SwiperDigitIndicator_SetSelectedFontSize()

void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontSize(ArkUI_SwiperDigitIndicator* indicator, float size)

Description

Sets the font size of the selected digit-style navigation indicator for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.
float sizeFont size, in fp.
Default value: 14

OH_ArkUI_SwiperDigitIndicator_GetSelectedFontSize()

float OH_ArkUI_SwiperDigitIndicator_GetSelectedFontSize(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the font size of the selected digit-style navigation indicator of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
floatFont size, in fp.

OH_ArkUI_SwiperDigitIndicator_SetFontWeight()

void OH_ArkUI_SwiperDigitIndicator_SetFontWeight(ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight fontWeight)

Description

Sets the font weight of the digit-style navigation indicator for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator *indicatorPointer to the digit-style navigation indicator.
ArkUI_FontWeight fontWeightFont weight, specified using ArkUI_FontWeight.

OH_ArkUI_SwiperDigitIndicator_GetFontWeight()

ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetFontWeight(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the font weight of the digit-style navigation indicator of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
ArkUI_FontWeightFont weight, specified using ArkUI_FontWeight.

OH_ArkUI_SwiperDigitIndicator_SetSelectedFontWeight()

void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontWeight(ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight selectedFontWeight)

Description

Sets the font weight of the selected digit-style navigation indicator for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator *indicatorPointer to the digit-style navigation indicator.
ArkUI_FontWeight selectedFontWeightFont weight, specified using ArkUI_FontWeight.

OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight()

ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight(ArkUI_SwiperDigitIndicator* indicator)

Description

Obtains the font weight of the selected digit-style navigation indicator of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the digit-style navigation indicator.

Returns

TypeDescription
ArkUI_FontWeightFont weight, specified using ArkUI_FontWeight.

OH_ArkUI_SwiperArrowStyle_Create()

ArkUI_SwiperArrowStyle *OH_ArkUI_SwiperArrowStyle_Create()

Description

Creates a navigation arrow for the Swiper component.

Since: 19

Returns

TypeDescription
ArkUI_SwiperArrowStyle *Pointer to the arrow object.

OH_ArkUI_SwiperArrowStyle_Destroy()

void OH_ArkUI_SwiperArrowStyle_Destroy(ArkUI_SwiperArrowStyle* arrowStyle)

Description

Destroys the navigation arrow pointer of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.

OH_ArkUI_SwiperArrowStyle_SetShowBackground()

void OH_ArkUI_SwiperArrowStyle_SetShowBackground(ArkUI_SwiperArrowStyle* arrowStyle, int32_t showBackground)

Description

Sets whether to display the background of the navigation arrow for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.
int32_t showBackgroundWhether to show the arrow background. The value 1 means to show the background, and 0 means the opposite. The default value is 0.

OH_ArkUI_SwiperArrowStyle_GetShowBackground()

int32_t OH_ArkUI_SwiperArrowStyle_GetShowBackground(ArkUI_SwiperArrowStyle* arrowStyle)

Description

Checks whether the background of the navigation arrow is displayed for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.

Returns

TypeDescription
int32_tWhether the arrow background is displayed. The value 1 means that the background is displayed, and 0 means the opposite.

OH_ArkUI_SwiperArrowStyle_SetShowSidebarMiddle()

void OH_ArkUI_SwiperArrowStyle_SetShowSidebarMiddle(ArkUI_SwiperArrowStyle* arrowStyle, int32_t showSidebarMiddle)

Description

Sets the position of the navigation arrow for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.
int32_t showSidebarMiddlePosition of the arrow. 0: The arrow is displayed on both sides of the navigation indicator. 1: The arrow is displayed on both sides of the Swiper component. The default value is 0.

OH_ArkUI_SwiperArrowStyle_GetShowSidebarMiddle()

int32_t OH_ArkUI_SwiperArrowStyle_GetShowSidebarMiddle(ArkUI_SwiperArrowStyle* arrowStyle)

Description

Obtains the position of the navigation arrow for the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.

Returns

TypeDescription
int32_tPosition of the arrow. 0: The arrow is displayed on both sides of the navigation indicator. 1: The arrow is displayed on both sides of the Swiper component.

OH_ArkUI_SwiperArrowStyle_SetBackgroundSize()

void OH_ArkUI_SwiperArrowStyle_SetBackgroundSize(ArkUI_SwiperArrowStyle* arrowStyle, float backgroundSize)

Description

Sets the background size for the navigation arrow of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.
float backgroundSizeBackground size of the arrow, in vp. Default value: 24 vp when displayed on both sides of the navigation indicator and 32 vp when displayed on both sides of the Swiper component.

OH_ArkUI_SwiperArrowStyle_GetBackgroundSize()

float OH_ArkUI_SwiperArrowStyle_GetBackgroundSize(ArkUI_SwiperArrowStyle* arrowStyle)

Description

Obtains the background size of the navigation arrow of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.

Returns

TypeDescription
floatBackground size of the arrow, in vp.

OH_ArkUI_SwiperArrowStyle_SetBackgroundColor()

void OH_ArkUI_SwiperArrowStyle_SetBackgroundColor(ArkUI_SwiperArrowStyle* arrowStyle, uint32_t backgroundColor)

Description

Sets the background color for the navigation arrow of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.
uint32_t backgroundColorBackground color of the arrow, in 0xARGB format. For example, 0xFFFF0000 indicates red. Default value: 0x00000000 when displayed on both sides of the navigation indicator and 0x19182431 when displayed on both sides of the Swiper component.

OH_ArkUI_SwiperArrowStyle_GetBackgroundColor()

uint32_t OH_ArkUI_SwiperArrowStyle_GetBackgroundColor(ArkUI_SwiperArrowStyle* arrowStyle)

Description

Obtains the background color of the navigation arrow of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.

Returns

TypeDescription
uint32_tBackground color of the arrow, in 0xARGB format. For example, 0xFFFF0000 indicates red.

OH_ArkUI_SwiperArrowStyle_SetArrowSize()

void OH_ArkUI_SwiperArrowStyle_SetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle, float arrowSize)

Description

Sets the size for the navigation arrow of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.
float arrowSizeSize of the arrow, in vp.
Default value: 18 vp when displayed on both sides of the navigation indicator and 24 vp when displayed on both sides of the Swiper component. When the navigation arrow background is displayed, the value of arrowSize is fixed at 3/4 of the value of backgroundSize.

OH_ArkUI_SwiperArrowStyle_GetArrowSize()

float OH_ArkUI_SwiperArrowStyle_GetArrowSize(ArkUI_SwiperArrowStyle* arrowStyle)

Description

Obtains the size of the navigation arrow of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.

Returns

TypeDescription
floatSize of the arrow, in vp.

OH_ArkUI_SwiperArrowStyle_SetArrowColor()

void OH_ArkUI_SwiperArrowStyle_SetArrowColor(ArkUI_SwiperArrowStyle* arrowStyle, uint32_t arrowColor)

Description

Sets the color for the navigation arrow of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.
uint32_t arrowColorColor of the navigation arrow, in 0xARGB format. For example, 0xFFFF0000 indicates red.
Default value: '#182431' (dark blue)

OH_ArkUI_SwiperArrowStyle_GetArrowColor()

uint32_t OH_ArkUI_SwiperArrowStyle_GetArrowColor(ArkUI_SwiperArrowStyle* arrowStyle)

Description

Obtains the color of the navigation arrow of the Swiper component.

Since: 19

Parameters

NameDescription
ArkUI_SwiperArrowStyle* arrowStylePointer to the arrow object.

Returns

TypeDescription
uint32_tColor of the arrow, in 0xARGB format. For example, 0xFFFF0000 indicates red.

OH_ArkUI_SwiperIndicator_SetSpace()

void OH_ArkUI_SwiperIndicator_SetSpace(ArkUI_SwiperIndicator* indicator, float space)

Description

Sets the spacing between navigation points.

Since: 19

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.
float spaceSpacing between navigation points. Default value: 8, in vp.

OH_ArkUI_SwiperIndicator_GetSpace()

float OH_ArkUI_SwiperIndicator_GetSpace(ArkUI_SwiperIndicator* indicator)

Description

Obtains the spacing between navigation points.

Since: 19

Parameters

NameDescription
ArkUI_SwiperIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
floatSpacing between navigation points. Unit: vp.

OH_ArkUI_SwiperDigitIndicator_SetIgnoreSizeOfBottom()

void OH_ArkUI_SwiperDigitIndicator_SetIgnoreSizeOfBottom(ArkUI_SwiperDigitIndicator* indicator, int32_t ignoreSize)

Description

Sets whether the OH_ArkUI_SwiperDigitIndicator_SetBottomPosition API ignores the indicator size when positioning the indicator.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the navigation indicator.
int32_t ignoreSizeWhether to ignore the indicator size when positioning the indicator. The value 1 means to ignore the indicator size when positioning the indicator, and 0 means the opposite. Default value: 0.

OH_ArkUI_SwiperDigitIndicator_GetIgnoreSizeOfBottom()

int32_t OH_ArkUI_SwiperDigitIndicator_GetIgnoreSizeOfBottom(ArkUI_SwiperDigitIndicator* indicator)

Description

Checks whether the OH_ArkUI_SwiperDigitIndicator_SetBottomPosition API ignores the indicator size when positioning the indicator.

Since: 19

Parameters

NameDescription
ArkUI_SwiperDigitIndicator* indicatorPointer to the navigation indicator.

Returns

TypeDescription
int32_tThe value 1 indicates that the navigation indicator size is ignored, and the value 0 indicates that the navigation indicator size is not ignored.

OH_ArkUI_ListItemSwipeActionItem_Create()

ArkUI_ListItemSwipeActionItem* OH_ArkUI_ListItemSwipeActionItem_Create()

Description

Creates a ListItemSwipeActionItem instance.

Since: 12

Returns

TypeDescription
ArkUI_ListItemSwipeActionItem*Pointer to the ListItemSwipeActionItem instance.

OH_ArkUI_ListItemSwipeActionItem_Dispose()

void OH_ArkUI_ListItemSwipeActionItem_Dispose(ArkUI_ListItemSwipeActionItem* item)

Description

Disposes of a ListItemSwipeActionItem instance.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance to dispose of.

OH_ArkUI_ListItemSwipeActionItem_SetContent()

void OH_ArkUI_ListItemSwipeActionItem_SetContent(ArkUI_ListItemSwipeActionItem* item, ArkUI_NodeHandle node)

Description

Sets the layout content for a ListItemSwipeActionItem instance.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
ArkUI_NodeHandle nodeLayout information.

OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance()

void OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item, float distance)

Description

Sets the swipe distance threshold for deleting the list item.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
float distanceSwipe distance threshold for deleting the list item, in vp.

OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance()

float OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item)

Description

Obtains the swipe distance threshold for deleting the list item.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.

Returns

TypeDescription
floatSwipe distance threshold for deleting the list item, in vp. The value 0 is returned if an exception occurs.

OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea()

void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)())

Description

Sets the callback invoked each time the list item enters the delete area.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
callbackCallback event.

OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData()

void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData(ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(void* userData))

Description

Sets the callback invoked each time the list item enters the delete area. User-defined data will be passed to the callback event.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
void* userDataPointer to the user-defined data.
callbackCallback event.

OH_ArkUI_ListItemSwipeActionItem_SetOnAction()

void OH_ArkUI_ListItemSwipeActionItem_SetOnAction(ArkUI_ListItemSwipeActionItem* item, void (*callback)())

Description

Sets the callback invoked when the list item is deleted while in the delete area.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
callbackCallback event.

OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData()

void OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData(ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(void* userData))

Description

Sets the callback invoked when the list item is deleted while in the delete area. User-defined data will be passed to the callback event.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
void* userDataPointer to the user-defined data.
callbackCallback event.

OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea()

void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)())

Description

Sets the callback invoked each time the list item exits the delete area.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
callbackCallback event.

OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData()

void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData(ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(void* userData))

Description

Sets the callback invoked each time the list item exits the delete area. User-defined data will be passed to the callback event.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
void* userDataPointer to the user-defined data.
callbackCallback event.

OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange()

void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange(ArkUI_ListItemSwipeActionItem* item,void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState))

Description

Sets the callback invoked when the swipe state of the list item changes.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
callbackCallback event. The input parameter is swipeActionState, indicating the swipe state of the list item.

OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData()

void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData(ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState, void* userData))

Description

Sets the callback invoked when the swipe state of the list item changes. User-defined data will be passed to the callback event.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionItem* itemPointer to the ListItemSwipeActionItem instance.
void* userDataPointer to the user-defined data.
callbackCallback event. The input parameter is swipeActionState, indicating the swipe state of the list item.

OH_ArkUI_ListItemSwipeActionOption_Create()

ArkUI_ListItemSwipeActionOption* OH_ArkUI_ListItemSwipeActionOption_Create()

Description

Creates a ListItemSwipeActionOption instance.

Since: 12

Returns

TypeDescription
ArkUI_ListItemSwipeActionOption*Pointer to the ListItemSwipeActionOption instance.

OH_ArkUI_ListItemSwipeActionOption_Dispose()

void OH_ArkUI_ListItemSwipeActionOption_Dispose(ArkUI_ListItemSwipeActionOption* option)

Description

Disposes of a ListItemSwipeActionOption instance.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionOption* optionPointer to the ListItemSwipeActionOption instance to dispose of.

OH_ArkUI_ListItemSwipeActionOption_SetStart()

void OH_ArkUI_ListItemSwipeActionOption_SetStart(ArkUI_ListItemSwipeActionOption* option, ArkUI_ListItemSwipeActionItem* item)

Description

Sets the layout content for the left edge (for a vertical layout) or top edge (for a horizontal layout) of a ListItemSwipeActionItem instance.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionOption* optionPointer to the ListItemSwipeActionItem instance.
ArkUI_ListItemSwipeActionItem* itemPointer to the layout information.

OH_ArkUI_ListItemSwipeActionOption_SetEnd()

void OH_ArkUI_ListItemSwipeActionOption_SetEnd(ArkUI_ListItemSwipeActionOption* option,ArkUI_ListItemSwipeActionItem* item)

Description

Sets the layout content for the right edge (for a vertical layout) or bottom edge (for a horizontal layout) of a ListItemSwipeActionItem instance.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionOption* optionPointer to the ListItemSwipeActionItem instance.
ArkUI_ListItemSwipeActionItem* itemPointer to the layout information.

OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect()

void OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect(ArkUI_ListItemSwipeActionOption* option,ArkUI_ListItemSwipeEdgeEffect edgeEffect)

Description

Sets the effect used when the scroll boundary is reached.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionOption* optionPointer to the ListItemSwipeActionItem instance.
ArkUI_ListItemSwipeEdgeEffect edgeEffectEffect used when the boundary of the scrolling area is reached.

OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect()

int32_t OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect(ArkUI_ListItemSwipeActionOption* option)

Description

Obtains the effect used when the scroll boundary is reached.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionOption* optionPointer to the ListItemSwipeActionItem instance.

Returns

TypeDescription
int32_tEffect used when the boundary of the scrolling area is reached. The default return value is ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_SPRING.

OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange()

void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange(ArkUI_ListItemSwipeActionOption* option,void (*callback)(float offset))

Description

Sets the callback invoked when the scroll offset changes.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionOption* optionPointer to the ListItemSwipeActionItem instance.
callbackCallback event. offset: scroll offset, in vp.

OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData()

void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData(ArkUI_ListItemSwipeActionOption* option,void* userData, void (*callback)(float offset, void* userData))

Description

Sets the callback invoked when the scroll offset changes. User-defined data will be passed to the callback event.

Since: 12

Parameters

NameDescription
ArkUI_ListItemSwipeActionOption* optionPointer to the ListItemSwipeActionItem instance.
void* userDataPointer to the user-defined data.
callbackCallback event. offset: scroll offset, in vp.

OH_ArkUI_ListItemSwipeAction_Expand()

int32_t OH_ArkUI_ListItemSwipeAction_Expand(ArkUI_NodeHandle node, ArkUI_ListItemSwipeActionDirection direction)

Description

Expands the swipe action menu for the specified list item.

Since: 21

Parameters

NameDescription
ArkUI_NodeHandle nodeListItem node object.
ArkUI_ListItemSwipeActionDirection directionSwipe action menu display direction for the ListItem component.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_ERROR if the node object type is incorrect.
Returns ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE if the passed node is not mounted to the component tree when the API is called.

NOTE

  • If the List component's NODE_LIST_CACHED_COUNT attribute is configured to preload ListItem child components, swipe action menus can be expanded for preloaded ListItem child components outside the visible area. Otherwise, child components outside the visible area cannot be expanded.

OH_ArkUI_ListItemSwipeAction_Collapse()

int32_t OH_ArkUI_ListItemSwipeAction_Collapse(ArkUI_NodeHandle node)

Description

Collapses the swipe action menu for the specified list item.

Since: 21

Parameters

NameDescription
ArkUI_NodeHandle nodeListItem node object.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_ERROR if the node object type is incorrect.
Returns ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE if the passed node is not mounted to the component tree when the API is called.

OH_ArkUI_AccessibilityState_Create()

ArkUI_AccessibilityState* OH_ArkUI_AccessibilityState_Create(void)

Description

Creates an accessibility state.

Since: 12

Returns

TypeDescription
ArkUI_AccessibilityState*Pointer to the created accessibility state object. If a null pointer is returned, the creation fails. A possible cause is that the application address space is full.

OH_ArkUI_AccessibilityState_Dispose()

void OH_ArkUI_AccessibilityState_Dispose(ArkUI_AccessibilityState* state)

Description

Disposes of the pointer to an accessibility state.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityState* statePointer to the created accessibility state object.

OH_ArkUI_AccessibilityState_SetDisabled()

void OH_ArkUI_AccessibilityState_SetDisabled(ArkUI_AccessibilityState* state, int32_t isDisabled)

Description

Sets whether an accessibility state is disabled.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityState* statePointer to the created accessibility state object.
int32_t isDisabledWhether the accessibility state is disabled. The value 1 means that the accessibility state is disabled, and 0 means the opposite. The default value is 0.

OH_ArkUI_AccessibilityState_IsDisabled()

int32_t OH_ArkUI_AccessibilityState_IsDisabled(ArkUI_AccessibilityState* state)

Description

Obtains whether an accessibility state is disabled.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityState* statePointer to the created accessibility state object.

Returns

TypeDescription
int32_tWhether the accessibility state is disabled. The value 1 means that the accessibility state is disabled, and 0 means the opposite. The default value is 0.
If the value of state is null, the default value is returned.

OH_ArkUI_AccessibilityState_SetSelected()

void OH_ArkUI_AccessibilityState_SetSelected(ArkUI_AccessibilityState* state, int32_t isSelected)

Description

Sets whether an accessibility state is selected.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityState* statePointer to the created accessibility state object.
int32_t isSelectedWhether the accessibility state is selected. The value 1 means that the accessibility state is selected, and 0 means the opposite. The default value is 0.

OH_ArkUI_AccessibilityState_IsSelected()

int32_t OH_ArkUI_AccessibilityState_IsSelected(ArkUI_AccessibilityState* state)

Description

Obtains whether an accessibility state is selected.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityState* statePointer to the created accessibility state object.

Returns

TypeDescription
int32_tWhether the accessibility state is selected. The value 1 means that the accessibility state is selected, and 0 means the opposite. The default value is 0.
If the value of state is null, the default value is returned.

OH_ArkUI_AccessibilityState_SetCheckedState()

void OH_ArkUI_AccessibilityState_SetCheckedState(ArkUI_AccessibilityState* state, int32_t checkedState)

Description

Sets the check box state of an accessibility state.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityState* statePointer to the created accessibility state object.
int32_t checkedStateCheck box status. The parameter type is ArkUI_AccessibilityCheckedState. The default value is ARKUI_ACCESSIBILITY_UNCHECKED.

OH_ArkUI_AccessibilityState_GetCheckedState()

int32_t OH_ArkUI_AccessibilityState_GetCheckedState(ArkUI_AccessibilityState* state)

Description

Obtains the check box state of an accessibility state.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityState* statePointer to the created accessibility state object.

Returns

TypeDescription
int32_tCheck box status. The parameter type is ArkUI_AccessibilityCheckedState. The default value is ARKUI_ACCESSIBILITY_UNCHECKED.
If a parameter error occurs, the default value is returned.

OH_ArkUI_AccessibilityValue_Create()

ArkUI_AccessibilityValue* OH_ArkUI_AccessibilityValue_Create(void)

Description

Creates an AccessibilityValue instance.

Since: 12

Returns

TypeDescription
ArkUI_AccessibilityValue*Pointer to the created AccessibilityValue instance.

OH_ArkUI_AccessibilityValue_Dispose()

void OH_ArkUI_AccessibilityValue_Dispose(ArkUI_AccessibilityValue* value)

Description

Disposes of the pointer to an AccessibilityValue instance.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the created AccessibilityValue instance.

OH_ArkUI_AccessibilityValue_SetMin()

void OH_ArkUI_AccessibilityValue_SetMin(ArkUI_AccessibilityValue* value, int32_t min)

Description

Sets the minimum accessibility value.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the created AccessibilityValue instance.
int32_t minMinimum value for the range-based component. The default value is -1.

OH_ArkUI_AccessibilityValue_GetMin()

int32_t OH_ArkUI_AccessibilityValue_GetMin(ArkUI_AccessibilityValue* value)

Description

Obtains the minimum accessibility value.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the created AccessibilityValue instance.

Returns

TypeDescription
int32_tMinimum value for the range-based component. The default value is -1.
If a parameter error occurs, -1 is returned.

OH_ArkUI_AccessibilityValue_SetMax()

void OH_ArkUI_AccessibilityValue_SetMax(ArkUI_AccessibilityValue* value, int32_t max)

Description

Sets the maximum accessibility value.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the created AccessibilityValue instance.
int32_t maxMaximum value for the range-based component. The default value is -1.

OH_ArkUI_AccessibilityValue_GetMax()

int32_t OH_ArkUI_AccessibilityValue_GetMax(ArkUI_AccessibilityValue* value)

Description

Obtains the maximum accessibility value.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the created AccessibilityValue instance.

Returns

TypeDescription
int32_tMaximum value for the range-based component. The default value is -1.
If a parameter error occurs, -1 is returned.

OH_ArkUI_AccessibilityValue_SetCurrent()

void OH_ArkUI_AccessibilityValue_SetCurrent(ArkUI_AccessibilityValue* value, int32_t current)

Description

Sets the current accessibility value.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the created AccessibilityValue instance.
int32_t currentCurrent value for the range-based component. The default value is -1.

OH_ArkUI_AccessibilityValue_GetCurrent()

int32_t OH_ArkUI_AccessibilityValue_GetCurrent(ArkUI_AccessibilityValue* value)

Description

Obtains the current accessibility value.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the created AccessibilityValue instance.

Returns

TypeDescription
int32_tCurrent value for the range-based component. The default value is -1.
If a parameter error occurs, -1 is returned.

OH_ArkUI_AccessibilityValue_SetRangeMin()

void OH_ArkUI_AccessibilityValue_SetRangeMin(ArkUI_AccessibilityValue* value, int32_t rangeMin)

Description

Sets the minimum value for accessibility information of the range-based component.

Since: 18

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the accessibility information object of the range-based component for which you want to set the minimum value.
int32_t rangeMinMinimum value for the range-based component. The default value is -1.

OH_ArkUI_AccessibilityValue_GetRangeMin()

int32_t OH_ArkUI_AccessibilityValue_GetRangeMin(ArkUI_AccessibilityValue* value)

Description

Obtains the minimum value for accessibility information of the range-based component.

Since: 18

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the accessibility information object of the range-based component for which you want to obtain the minimum value.

Returns

TypeDescription
int32_tMinimum value for the range-based component. The default value is -1.
If a parameter error occurs, -1 is returned.

OH_ArkUI_AccessibilityValue_SetRangeMax()

void OH_ArkUI_AccessibilityValue_SetRangeMax(ArkUI_AccessibilityValue* value, int32_t rangeMax)

Description

Sets the maximum value for accessibility information of the range-based component.

Since: 18

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the accessibility information object of the range-based component for which you want to set the maximum value.
int32_t rangeMaxMaximum value for the range-based component. The default value is -1.

OH_ArkUI_AccessibilityValue_GetRangeMax()

int32_t OH_ArkUI_AccessibilityValue_GetRangeMax(ArkUI_AccessibilityValue* value)

Description

Obtains the maximum value for accessibility information of the range-based component.

Since: 18

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the accessibility information object of the range-based component for which you want to obtain the minimum value.

Returns

TypeDescription
int32_tMaximum value for the range-based component. The default value is -1.
If a parameter error occurs, -1 is returned.

OH_ArkUI_AccessibilityValue_SetRangeCurrent()

void OH_ArkUI_AccessibilityValue_SetRangeCurrent(ArkUI_AccessibilityValue* value, int32_t rangeCurrent)

Description

Sets the current value for accessibility information of the range-based component.

Since: 18

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the accessibility information object of the range-based component for which you want to set the current value.
int32_t rangeCurrentCurrent value for the range-based component. The default value is -1.

OH_ArkUI_AccessibilityValue_GetRangeCurrent()

int32_t OH_ArkUI_AccessibilityValue_GetRangeCurrent(ArkUI_AccessibilityValue* value)

Description

Obtains the current value for accessibility information of the range-based component.

Since: 18

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the accessibility information object of the range-based component for which you want to obtain the current value.

Returns

TypeDescription
int32_tCurrent value for the range-based component. The default value is -1.
If a parameter error occurs, -1 is returned.

OH_ArkUI_AccessibilityValue_SetText()

void OH_ArkUI_AccessibilityValue_SetText(ArkUI_AccessibilityValue* value, const char* text)

Description

Sets the text description of an AccessibilityValue instance.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the created AccessibilityValue instance.
const char* textPointer to the text description. The default value is an empty string.

OH_ArkUI_AccessibilityValue_GetText()

const char* OH_ArkUI_AccessibilityValue_GetText(ArkUI_AccessibilityValue* value)

Description

Obtains the text description of an AccessibilityValue instance.

Since: 12

Parameters

NameDescription
ArkUI_AccessibilityValue* valuePointer to the created AccessibilityValue instance.

Returns

TypeDescription
const char*Pointer to the text description. The default value is an empty string.
If a parameter error occurs, a null pointer is returned.

OH_ArkUI_ImageAnimatorFrameInfo_CreateFromString()

ArkUI_ImageAnimatorFrameInfo* OH_ArkUI_ImageAnimatorFrameInfo_CreateFromString(char* src)

Description

Creates an image frame information object based on an image path, with the image format being SVG, PNG, or JPG. Both relative and absolute paths in the application sandbox are supported.

Since: 12

Parameters

NameDescription
char* srcPointer to the image path, which can be a relative or absolute path in the application sandbox.

Returns

TypeDescription
ArkUI_ImageAnimatorFrameInfo*Pointer to the image frame information object.

OH_ArkUI_ImageAnimatorFrameInfo_CreateFromDrawableDescriptor()

ArkUI_ImageAnimatorFrameInfo* OH_ArkUI_ImageAnimatorFrameInfo_CreateFromDrawableDescriptor(ArkUI_DrawableDescriptor* drawable)

Description

Creates an image frame information object using an ArkUI_DrawableDescriptor object.

Since: 12

Parameters

NameDescription
ArkUI_DrawableDescriptor* drawablePointer to the ArkUI_DrawableDescriptor object created using a PixelMap.

Returns

TypeDescription
ArkUI_ImageAnimatorFrameInfo*Pointer to the image frame information object.

OH_ArkUI_ImageAnimatorFrameInfo_Dispose()

void OH_ArkUI_ImageAnimatorFrameInfo_Dispose(ArkUI_ImageAnimatorFrameInfo* imageInfo)

Description

Disposes of the pointer to an image frame information object.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.

OH_ArkUI_ImageAnimatorFrameInfo_SetWidth()

void OH_ArkUI_ImageAnimatorFrameInfo_SetWidth(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t width)

Description

Sets the image width.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.
int32_t widthImage width, in px.

OH_ArkUI_ImageAnimatorFrameInfo_GetWidth()

int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetWidth(ArkUI_ImageAnimatorFrameInfo* imageInfo)

Description

Obtains the image width.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.

Returns

TypeDescription
int32_tImage width, in PX. If imageInfo is a null pointer, 0 is returned.

OH_ArkUI_ImageAnimatorFrameInfo_SetHeight()

void OH_ArkUI_ImageAnimatorFrameInfo_SetHeight(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t height)

Description

Sets the image height.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.
int32_t heightImage height, in px.

OH_ArkUI_ImageAnimatorFrameInfo_GetHeight()

int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetHeight(ArkUI_ImageAnimatorFrameInfo* imageInfo)

Description

Obtains the image height.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.

Returns

TypeDescription
int32_tImage height, in PX. If imageInfo is a null pointer, 0 is returned.

OH_ArkUI_ImageAnimatorFrameInfo_SetTop()

void OH_ArkUI_ImageAnimatorFrameInfo_SetTop(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t top)

Description

Sets the vertical coordinate of an image relative to the upper left corner of the component.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.
int32_t topVertical coordinate of the image relative to the upper left corner of the component, in px.

OH_ArkUI_ImageAnimatorFrameInfo_GetTop()

int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetTop(ArkUI_ImageAnimatorFrameInfo* imageInfo)

Description

Obtains the vertical coordinate of an image relative to the upper left corner of the component.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.

Returns

TypeDescription
int32_tVertical coordinate of the image relative to the upper left corner of the component, in px. If imageInfo is a null pointer, 0 is returned.

OH_ArkUI_ImageAnimatorFrameInfo_SetLeft()

void OH_ArkUI_ImageAnimatorFrameInfo_SetLeft(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t left)

Description

Sets the horizontal coordinate of an image relative to the upper left corner of the component.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.
int32_t leftHorizontal coordinate of the image relative to the upper left corner of the component, in px.

OH_ArkUI_ImageAnimatorFrameInfo_GetLeft()

int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetLeft(ArkUI_ImageAnimatorFrameInfo* imageInfo)

Description

Obtains the horizontal coordinate of an image relative to the upper left corner of the component.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.

Returns

TypeDescription
int32_tHorizontal coordinate of the image relative to the upper left corner of the component, in px. If imageInfo is a null pointer, 0 is returned.

OH_ArkUI_ImageAnimatorFrameInfo_SetDuration()

void OH_ArkUI_ImageAnimatorFrameInfo_SetDuration(ArkUI_ImageAnimatorFrameInfo* imageInfo, int32_t duration)

Description

Sets the playback duration of an image.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.
int32_t durationPlayback duration of an image, in ms.

OH_ArkUI_ImageAnimatorFrameInfo_GetDuration()

int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetDuration(ArkUI_ImageAnimatorFrameInfo* imageInfo)

Description

Obtains the playback duration of an image.

Since: 12

Parameters

NameDescription
ArkUI_ImageAnimatorFrameInfo* imageInfoPointer to the image frame information object.

Returns

TypeDescription
int32_tPlayback duration of the image, in milliseconds. If imageInfo is a null pointer, 0 is returned.

OH_ArkUI_ListChildrenMainSizeOption_Create()

ArkUI_ListChildrenMainSize* OH_ArkUI_ListChildrenMainSizeOption_Create()

Description

Creates a ListChildrenMainSize instance.

Since: 12

Returns

TypeDescription
ArkUI_ListChildrenMainSize*Pointer to the created ListChildrenMainSize instance.

OH_ArkUI_ListChildrenMainSizeOption_Dispose()

void OH_ArkUI_ListChildrenMainSizeOption_Dispose(ArkUI_ListChildrenMainSize* option)

Description

Disposes of a ListChildrenMainSize instance.

Since: 12

Parameters

NameDescription
ArkUI_ListChildrenMainSize* optionPointer to the ListChildrenMainSize instance to dispose of.

OH_ArkUI_ListChildrenMainSizeOption_SetDefaultMainSize()

int32_t OH_ArkUI_ListChildrenMainSizeOption_SetDefaultMainSize(ArkUI_ListChildrenMainSize* option, float defaultMainSize)

Description

Sets the default size of the list item in the List component along the main axis. The vertical axis indicates the height, and the horizontal axis indicates the width.

Since: 12

Parameters

NameDescription
ArkUI_ListChildrenMainSize* optionPointer to the ListChildrenMainSize instance.
float defaultMainSizeDefault size of the list item along the main axis, in vp.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ListChildrenMainSizeOption_GetDefaultMainSize()

float OH_ArkUI_ListChildrenMainSizeOption_GetDefaultMainSize(ArkUI_ListChildrenMainSize* option)

Description

Obtains the default size of the list item in the List component along the main axis. The vertical axis indicates the height, and the horizontal axis indicates the width.

Since: 12

Parameters

NameDescription
ArkUI_ListChildrenMainSize* optionPointer to the ListChildrenMainSize instance.

Returns

TypeDescription
floatDefault size of the list item along the main axis. The default value is 0. The unit is vp. If option is a null pointer, -1 is returned.

OH_ArkUI_ListChildrenMainSizeOption_Resize()

void OH_ArkUI_ListChildrenMainSizeOption_Resize(ArkUI_ListChildrenMainSize* option, int32_t totalSize)

Description

Adjusts the capacity of the children item size array in the List component along the main axis.

Since: 12

Parameters

NameDescription
ArkUI_ListChildrenMainSize* optionPointer to the ListChildrenMainSize instance.
int32_t totalSizeCapacity of the target array.

OH_ArkUI_ListChildrenMainSizeOption_Splice()

int32_t OH_ArkUI_ListChildrenMainSizeOption_Splice(ArkUI_ListChildrenMainSize* option, int32_t index, int32_t deleteCount, int32_t addCount)

Description

Adjusts the children item size array in the List component along the main axis.

Since: 12

Parameters

NameDescription
ArkUI_ListChildrenMainSize* optionPointer to the ListChildrenMainSize instance.
int32_t indexStart index.
int32_t deleteCountNumber of elements to be deleted from the start position.
int32_t addCountNumber of elements to be added from the start position.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ListChildrenMainSizeOption_UpdateSize()

int32_t OH_ArkUI_ListChildrenMainSizeOption_UpdateSize(ArkUI_ListChildrenMainSize* option, int32_t index, float mainSize)

Description

Updates the size at the specified index in the children item size array of the List component along the main axis. The vertical axis indicates the height, and the horizontal axis indicates the width.

Since: 12

Parameters

NameDescription
ArkUI_ListChildrenMainSize* optionPointer to the ListChildrenMainSize instance.
int32_t indexArray index of the target element.
float mainSizeSize of the main axis, in vp.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ListChildrenMainSizeOption_GetMainSize()

float OH_ArkUI_ListChildrenMainSizeOption_GetMainSize(ArkUI_ListChildrenMainSize* option, int32_t index)

Description

Obtains the size at the specified index in the children item size array of the List component along the main axis. The vertical axis indicates the height, and the horizontal axis indicates the width.

Since: 12

Parameters

NameDescription
ArkUI_ListChildrenMainSize* optionPointer to the ListChildrenMainSize instance.
int32_t indexArray index of the target element.

Returns

TypeDescription
floatValue at the specified index. If a parameter error occurs, -1 is returned.

OH_ArkUI_CustomSpanMeasureInfo_Create()

ArkUI_CustomSpanMeasureInfo* OH_ArkUI_CustomSpanMeasureInfo_Create(void)

Description

Creates measurement information for this custom span.

Since: 12

Returns

TypeDescription
ArkUI_CustomSpanMeasureInfo*Pointer to the CustomSpanMeasureInfo instance.
If a null pointer is returned, the memory may be insufficient.

OH_ArkUI_CustomSpanMeasureInfo_Dispose()

void OH_ArkUI_CustomSpanMeasureInfo_Dispose(ArkUI_CustomSpanMeasureInfo* info)

Description

Disposes of measurement information of a custom span.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanMeasureInfo* infoPointer to the measurement information of a custom span.

OH_ArkUI_CustomSpanMeasureInfo_GetFontSize()

float OH_ArkUI_CustomSpanMeasureInfo_GetFontSize(ArkUI_CustomSpanMeasureInfo* info)

Description

Obtains the font size of the parent text node of a custom span.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanMeasureInfo* infoPointer to the measurement information of a custom span.

Returns

TypeDescription
floatFont size of the parent node text, in fp. If a parameter error occurs, 0.0f is returned.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_CustomSpanMetrics_Create()

ArkUI_CustomSpanMetrics* OH_ArkUI_CustomSpanMetrics_Create(void)

Description

Creates measurement metrics for this custom span.

Since: 12

Returns

TypeDescription
ArkUI_CustomSpanMetrics*Pointer to the CustomSpanMetrics instance.
If a null pointer is returned, the memory may be insufficient.

OH_ArkUI_CustomSpanMetrics_Dispose()

void OH_ArkUI_CustomSpanMetrics_Dispose(ArkUI_CustomSpanMetrics* metrics)

Description

Disposes of measurement metrics of this custom span.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanMetrics* metricsPointer to the CustomSpanMetrics instance.

OH_ArkUI_CustomSpanMetrics_SetWidth()

int32_t OH_ArkUI_CustomSpanMetrics_SetWidth(ArkUI_CustomSpanMetrics* metrics, float width)

Description

Sets the width for a custom span.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanMetrics* metricsPointer to the CustomSpanMetrics instance.
float widthWidth, in vp. The default value is 0.0f. The negative value has the same effect as the default value.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_CustomSpanMetrics_SetHeight()

int32_t OH_ArkUI_CustomSpanMetrics_SetHeight(ArkUI_CustomSpanMetrics* metrics, float height)

Description

Sets the height for a custom span.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanMetrics* metricsPointer to the CustomSpanMetrics instance.
float heightHeight, in vp. The default value is 0.0f. The negative value has the same effect as the default value.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_CustomSpanDrawInfo_Create()

ArkUI_CustomSpanDrawInfo* OH_ArkUI_CustomSpanDrawInfo_Create(void)

Description

Creates drawing information for this custom span.

Since: 12

Returns

TypeDescription
ArkUI_CustomSpanDrawInfo*Pointer to the CustomSpanDrawInfo instance.
If a null pointer is returned, the memory may be insufficient.

OH_ArkUI_CustomSpanDrawInfo_Dispose()

void OH_ArkUI_CustomSpanDrawInfo_Dispose(ArkUI_CustomSpanDrawInfo* info)

Description

Disposes of drawing information for this custom span.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanDrawInfo* infoPointer to the drawing information of a custom span.

OH_ArkUI_CustomSpanDrawInfo_GetXOffset()

float OH_ArkUI_CustomSpanDrawInfo_GetXOffset(ArkUI_CustomSpanDrawInfo* info)

Description

Obtains the x-axis offset of the custom span relative to the mounted component.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanDrawInfo* infoPointer to the drawing information of a custom span.

Returns

TypeDescription
floatX-axis offset, in px. If a parameter error occurs, 0.0f is returned.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_CustomSpanDrawInfo_GetLineTop()

float OH_ArkUI_CustomSpanDrawInfo_GetLineTop(ArkUI_CustomSpanDrawInfo* info)

Description

Obtains the top margin of the custom span relative to the mounted component.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanDrawInfo* infoPointer to the drawing information of a custom span.

Returns

TypeDescription
floatTop margin, in px. If a parameter error occurs, 0.0f is returned.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_CustomSpanDrawInfo_GetLineBottom()

float OH_ArkUI_CustomSpanDrawInfo_GetLineBottom(ArkUI_CustomSpanDrawInfo* info)

Description

Obtains the bottom margin of the custom span relative to the mounted component.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanDrawInfo* infoPointer to the drawing information of a custom span.

Returns

TypeDescription
floatBottom margin, in px. If a parameter error occurs, 0.0f is returned.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_CustomSpanDrawInfo_GetBaseline()

float OH_ArkUI_CustomSpanDrawInfo_GetBaseline(ArkUI_CustomSpanDrawInfo* info)

Description

Obtains the baseline offset of the custom span relative to the mounted component.

Since: 12

Parameters

NameDescription
ArkUI_CustomSpanDrawInfo* infoPointer to the drawing information of a custom span.

Returns

TypeDescription
floatBaseline offset, in px. If a parameter error occurs, 0.0f is returned.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_CustomProperty_Destroy()

void OH_ArkUI_CustomProperty_Destroy(ArkUI_CustomProperty* handle)

Description

Destroys an ArkUI_CustomProperty instance.

Since: 14

Parameters

NameDescription
ArkUI_CustomProperty* handlePointer to the instance to be destroyed.

OH_ArkUI_CustomProperty_GetStringValue()

const char* OH_ArkUI_CustomProperty_GetStringValue(ArkUI_CustomProperty* handle)

Description

Obtains the value of a custom property object.

Since: 14

Parameters

NameDescription
ArkUI_CustomProperty* handlePointer to the custom property object.

Returns

TypeDescription
const char*Pointer to the value of a custom property object.

OH_ArkUI_HostWindowInfo_GetName()

const char* OH_ArkUI_HostWindowInfo_GetName(ArkUI_HostWindowInfo* info)

Description

Obtains the window name in an ArkUI_HostWindowInfo object.

Since: 15

Parameters

NameDescription
ArkUI_HostWindowInfo* infoPointer to the HostWindowInfo object.

Returns

TypeDescription
const char*Pointer to the window name in the ArkUI_HostWindowInfo object.

OH_ArkUI_HostWindowInfo_Destroy()

void OH_ArkUI_HostWindowInfo_Destroy(ArkUI_HostWindowInfo* info)

Description

Destroys an ArkUI_HostWindowInfo object.

Since: 15

Parameters

NameDescription
ArkUI_HostWindowInfo* infoPointer to the ArkUI_HostWindowInfo object to be destroyed.

OH_ArkUI_ActiveChildrenInfo_Destroy()

void OH_ArkUI_ActiveChildrenInfo_Destroy(ArkUI_ActiveChildrenInfo* handle)

Description

Destroys an ArkUI_ActiveChildrenInfo instance.

Since: 14

Parameters

NameDescription
ArkUI_ActiveChildrenInfo* handlePointer to the ArkUI_ActiveChildrenInfo instance to be destroyed.

OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex()

ArkUI_NodeHandle OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex(ArkUI_ActiveChildrenInfo* handle, int32_t index)

Description

Obtains the child node at the specified index in an ArkUI_ActiveChildrenInfo instance.

Since: 14

Parameters

NameDescription
ArkUI_ActiveChildrenInfo* handlePointer to the ArkUI_ActiveChildrenInfo instance from which the information is to be obtained.
int32_t indexIndex of the target child node.

Returns

TypeDescription
ArkUI_NodeHandleHandle to the child node at the specified index, or nullptr if an error occurs.

OH_ArkUI_ActiveChildrenInfo_GetCount()

int32_t OH_ArkUI_ActiveChildrenInfo_GetCount(ArkUI_ActiveChildrenInfo* handle)

Description

Obtains the number of nodes in an ArkUI_ActiveChildrenInfo instance.

Since: 14

Parameters

NameDescription
ArkUI_ActiveChildrenInfo* handlePointer to the ArkUI_ActiveChildrenInfo instance from which the information is to be obtained.

Returns

TypeDescription
int32_tNumber of child nodes. The default value is 0.

OH_ArkUI_ProgressLinearStyleOption_Create()

ArkUI_ProgressLinearStyleOption* OH_ArkUI_ProgressLinearStyleOption_Create(void)

Description

Creates a ProgressLinearStyleOption instance.

Since: 15

Returns

TypeDescription
ArkUI_ProgressLinearStyleOption*Pointer to the ProgressLinearStyleOption instance created.
If a null pointer is returned, the memory may be insufficient.

OH_ArkUI_ProgressLinearStyleOption_Destroy()

void OH_ArkUI_ProgressLinearStyleOption_Destroy(ArkUI_ProgressLinearStyleOption* option)

Description

Destroys a ProgressLinearStyleOption instance.

Since: 15

Parameters

NameDescription
ArkUI_ProgressLinearStyleOption* optionPointer to a ProgressLinearStyleOption instance.

OH_ArkUI_ProgressLinearStyleOption_SetSmoothEffectEnabled()

void OH_ArkUI_ProgressLinearStyleOption_SetSmoothEffectEnabled(ArkUI_ProgressLinearStyleOption* option, bool enabled)

Description

Sets whether to enable the smooth progress effect.

Since: 15

Parameters

NameDescription
ArkUI_ProgressLinearStyleOption* optionPointer to a ProgressLinearStyleOption instance.
bool enabledWhether to enable the smooth effect. When this effect is enabled, the progress changes smoothly from the current value to the target value. When this effect is disabled, the progress changes abruptly to the target value.
true: The smooth effect is enabled.
false: The smooth effect is disabled.
The default value is true.

OH_ArkUI_ProgressLinearStyleOption_SetScanEffectEnabled()

void OH_ArkUI_ProgressLinearStyleOption_SetScanEffectEnabled(ArkUI_ProgressLinearStyleOption* option, bool enabled)

Description

Sets whether to enable the scan effect.

Since: 15

Parameters

NameDescription
ArkUI_ProgressLinearStyleOption* optionPointer to a ProgressLinearStyleOption instance.
bool enabledWhether to enable the scan effect.
true: The scan effect is enabled.
false: The scan effect is disabled.
The default value is false.

OH_ArkUI_ProgressLinearStyleOption_SetStrokeWidth()

void OH_ArkUI_ProgressLinearStyleOption_SetStrokeWidth(ArkUI_ProgressLinearStyleOption* option, float strokeWidth)

Description

Sets the width of the progress indicator.

Since: 15

Parameters

NameDescription
ArkUI_ProgressLinearStyleOption* optionPointer to a ProgressLinearStyleOption instance.
float strokeWidthStroke width of the progress indicator, in vp. Percentage values are not supported. The default value is 4.0vp.

OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius()

void OH_ArkUI_ProgressLinearStyleOption_SetStrokeRadius(ArkUI_ProgressLinearStyleOption* option, float strokeRadius)

Description

Sets the corner radius of the progress indicator.

Since: 15

Parameters

NameDescription
ArkUI_ProgressLinearStyleOption* optionPointer to a ProgressLinearStyleOption instance.
float strokeRadiusCorner radius of the progress indicator, in vp. The value range is [0, strokeWidth/2]. Default value: strokeWidth/2.

OH_ArkUI_ProgressLinearStyleOption_GetSmoothEffectEnabled()

bool OH_ArkUI_ProgressLinearStyleOption_GetSmoothEffectEnabled(ArkUI_ProgressLinearStyleOption* option)

Description

Obtains the enabled status of the smooth progress effect.

Since: 15

Parameters

NameDescription
ArkUI_ProgressLinearStyleOption* optionPointer to a ProgressLinearStyleOption instance.

Returns

TypeDescription
boolWhether the smooth effect is enabled.
true: The smooth effect is enabled.
false: The smooth effect is disabled.
The default value is true.

OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled()

bool OH_ArkUI_ProgressLinearStyleOption_GetScanEffectEnabled(ArkUI_ProgressLinearStyleOption* option)

Description

Obtains the enabled status of the scan effect.

Since: 15

Parameters

NameDescription
ArkUI_ProgressLinearStyleOption* optionPointer to a ProgressLinearStyleOption instance.

Returns

TypeDescription
boolWhether the scan effect is enabled.
true: The scan effect is enabled.
false: The scan effect is disabled.
The default value is false.

OH_ArkUI_ProgressLinearStyleOption_GetStrokeWidth()

float OH_ArkUI_ProgressLinearStyleOption_GetStrokeWidth(ArkUI_ProgressLinearStyleOption* option)

Description

Obtains the stroke width of the progress indicator.

Since: 15

Parameters

NameDescription
ArkUI_ProgressLinearStyleOption* optionPointer to a ProgressLinearStyleOption instance.

Returns

TypeDescription
floatStroke width of the progress indicator, in vp.

OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius()

float OH_ArkUI_ProgressLinearStyleOption_GetStrokeRadius(ArkUI_ProgressLinearStyleOption* option)

Description

Obtains the corner radius of the progress indicator.

Since: 15

Parameters

NameDescription
ArkUI_ProgressLinearStyleOption* optionPointer to a ProgressLinearStyleOption instance.

Returns

TypeDescription
floatCorner radius of the progress indicator, in vp.

OH_ArkUI_CreateSnapshotOptions()

ArkUI_SnapshotOptions* OH_ArkUI_CreateSnapshotOptions()

Description

Creates a snapshot option object, which must be released using OH_ArkUI_DestroySnapshotOptions() when no longer in use.

Since: 15

Returns

TypeDescription
ArkUI_SnapshotOptions*Pointer to the created snapshot option object. If a null pointer is returned, creation failed, possibly due to insufficient memory.

OH_ArkUI_DestroySnapshotOptions()

void OH_ArkUI_DestroySnapshotOptions(ArkUI_SnapshotOptions* snapshotOptions)

Description

Destroys a snapshot option object.

Since: 15

Parameters

NameDescription
ArkUI_SnapshotOptions* snapshotOptionsPointer to the screenshot option.

OH_ArkUI_SnapshotOptions_SetScale()

int32_t OH_ArkUI_SnapshotOptions_SetScale(ArkUI_SnapshotOptions* snapshotOptions, float scale)

Description

Sets the scale property in the snapshot options.

Since: 15

Parameters

NameDescription
ArkUI_SnapshotOptions* snapshotOptionsPointer to the screenshot option.
float scaleScale factor.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_SnapshotOptions_SetColorMode()

int32_t OH_ArkUI_SnapshotOptions_SetColorMode(ArkUI_SnapshotOptions* snapshotOptions, int32_t colorSpace, bool isAuto)

Description

Sets the color space in the screenshot options.

Since: 23

Parameters

NameDescription
ArkUI_SnapshotOptions* snapshotOptionsPointer to the screenshot option.
int32_t colorSpaceColor space used for screenshot.
If the target component's color space is known, specify it through colorSpace and set isAuto to false to achieve optimal snapshot quality.
The supported values are as follows: 3 (RGB color gamut of type Display P3), 4 (RGB color gamut of type sRGB), and 27 (RGB color gamut of type BT.2020).
Default value: 4
This parameter takes effect only when isAuto is set to false.
bool isAutoWhether the system automatically determines the color space to be used.
true: The system automatically determines the color space to be used. If the color space used by the component is uncertain, you are advised to set isAuto to true so that the system can automatically determine the color space to be used.
false: The color space type set through the colorSpace field is used for screenshot.
Default value: false.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_SnapshotOptions_SetDynamicRangeMode()

int32_t OH_ArkUI_SnapshotOptions_SetDynamicRangeMode(ArkUI_SnapshotOptions* snapshotOptions, int32_t dynamicRangeMode, bool isAuto)

Description

Sets the dynamic range mode in the screenshot options.

Since: 23

Parameters

NameDescription
ArkUI_SnapshotOptions* snapshotOptionsPointer to the screenshot option.
int32_t dynamicRangeModeDynamic range mode used for screenshot.
If the dynamic range mode used for screenshot is known, you can specify the dynamic range mode using the dynamicRangeMode field and set isAuto to false to achieve the expected snapshot effect.
The value can be one of the enumerated values of ArkUI_DynamicRangeMode.
Default value: ARKUI_DYNAMIC_RANGE_MODE_STANDARD
This parameter takes effect only when isAuto is set to false.
bool isAutoWhether the system automatically determines the dynamic range mode to be used.
true: whether the system automatically determines the dynamic range mode to be used. If the dynamic range mode used by the component is uncertain, you are advised to set isAuto to true so that the system can automatically determine the dynamic range mode to be used.
false: The dynamic range mode set by the dynamicRangeMode field is used for screenshot.
Default value: false.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_CrossLanguageOption_Create()

ArkUI_CrossLanguageOption* OH_ArkUI_CrossLanguageOption_Create(void)

Description

Creates an instance of the cross-language configuration option.

Since: 15

Returns

TypeDescription
ArkUI_CrossLanguageOption*Pointer to the ArkUI_CrossLanguageOption instance created. If a null pointer is returned, creation failed, possibly due to insufficient memory.

OH_ArkUI_CrossLanguageOption_Destroy()

void OH_ArkUI_CrossLanguageOption_Destroy(ArkUI_CrossLanguageOption* option)

Description

Destroys an instance of the cross-language configuration option.

Since: 15

Parameters

NameDescription
ArkUI_CrossLanguageOption* optionPointer to the cross-language configuration option instance to be destroyed.

OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus()

void OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus(ArkUI_CrossLanguageOption* option, bool enabled)

Description

Sets whether cross-language attribute setting is allowed in the configuration option.

Since: 15

Parameters

NameDescription
ArkUI_CrossLanguageOption* optionPointer to the cross-language configuration option instance.
bool enabledWhether cross-language attribute setting is allowed. true means that cross-language attribute setting is allowed, and false means the opposite. The default value is false.

OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus()

bool OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus(ArkUI_CrossLanguageOption* option)

Description

Checks whether cross-language attribute setting is allowed in the configuration option.

Since: 15

Parameters

NameDescription
ArkUI_CrossLanguageOption* optionPointer to the cross-language configuration option instance.

Returns

TypeDescription
boolWhether cross-language attribute setting is allowed. true means that cross-language attribute setting is allowed, and false means the opposite.

OH_ArkUI_VisibleAreaEventOptions_Create()

ArkUI_VisibleAreaEventOptions* OH_ArkUI_VisibleAreaEventOptions_Create()

Description

Creates an instance of visible area change event parameters.

Since: 17

Returns

TypeDescription
ArkUI_VisibleAreaEventOptions*Pointer to the created instance of visible area change event parameters.

OH_ArkUI_VisibleAreaEventOptions_Dispose()

void OH_ArkUI_VisibleAreaEventOptions_Dispose(ArkUI_VisibleAreaEventOptions* option)

Description

Disposes of an instance of visible area change event parameters.

Since: 17

Parameters

NameDescription
ArkUI_VisibleAreaEventOptions* optionPointer to the instance of visible area change event parameters to be destroyed.

OH_ArkUI_VisibleAreaEventOptions_SetRatios()

int32_t OH_ArkUI_VisibleAreaEventOptions_SetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t size)

Description

Sets the threshold ratios for visible area changes.

Since: 17

Parameters

NameDescription
ArkUI_VisibleAreaEventOptions* optionPointer to the instance of visible area change event parameters.
float* valuePointer to the array of threshold ratios. Each element represents a ratio of the component's visible area (that is, the area of the component that is visible on screen; only the area within the parent component is counted) to the component's total area. The value range of the threshold is [0.0, 1.0]. If the threshold set exceeds this range, the value 0.0 or 1.0 will be used.
int32_t sizeSize of the array of threshold ratios.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval()

int32_t OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval(ArkUI_VisibleAreaEventOptions *option, int32_t value)

Description

Sets the expected update interval for visible area changes.

Since: 17

Parameters

NameDescription
ArkUI_VisibleAreaEventOptions *optionPointer to the instance of visible area change event parameters.
int32_t valueExpected update interval, in ms. Default value: 1000.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_VisibleAreaEventOptions_SetMeasureFromViewport()

int32_t OH_ArkUI_VisibleAreaEventOptions_SetMeasureFromViewport(ArkUI_VisibleAreaEventOptions* option, bool measureFromViewport)

Description

Sets the visible area calculation mode.

Since: 22

Parameters

NameDescription
ArkUI_VisibleAreaEventOptions* optionPointer to the instance of visible area change event parameters.
bool measureFromViewportVisible area calculation mode.
true: The calculation takes the parent component's NODE_CLIP attribute into account. If the parent component's NODE_CLIP attribute is false: Child components can render beyond the parent component's bounds, and the out-of-bounds area is counted as part of the visible area. If the parent component's NODE_CLIP attribute is true: Child components are clipped to the parent component's bounds, and the out-of-bounds area is treated as invisible. false: The area beyond the parent component's bounds is directly treated as invisible, ignoring the parent component's NODE_CLIP attribute.
Default value: false.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_VisibleAreaEventOptions_GetRatios()

int32_t OH_ArkUI_VisibleAreaEventOptions_GetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t* size)

Description

Obtains the threshold ratios for visible area changes.

Since: 17

Parameters

NameDescription
ArkUI_VisibleAreaEventOptions* optionPointer to the instance of visible area change event parameters.
float* valuePointer to the array of threshold ratios.
int32_t* sizePointer to the size of the array of threshold ratios.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the buffer size is insufficient.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval()

int32_t OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval(ArkUI_VisibleAreaEventOptions* option)

Description

Obtains the expected update interval for visible area changes.

Since: 17

Parameters

NameDescription
ArkUI_VisibleAreaEventOptions* optionPointer to the instance of visible area change event parameters.

Returns

TypeDescription
int32_tExpected update interval, in ms. Default value: 1000.

OH_ArkUI_VisibleAreaEventOptions_GetMeasureFromViewport()

bool OH_ArkUI_VisibleAreaEventOptions_GetMeasureFromViewport(ArkUI_VisibleAreaEventOptions* option)

Description

Obtains the visible area calculation mode.

Since: 22

Parameters

NameDescription
ArkUI_VisibleAreaEventOptions* optionPointer to the instance of visible area change event parameters.

Returns

TypeDescription
boolVisible area calculation mode.
true: The calculation takes the parent component's NODE_CLIP attribute into account. If the parent component's NODE_CLIP attribute is false: Child components can render beyond the parent component's bounds, and the out-of-bounds area is counted as part of the visible area. If the parent component's NODE_CLIP attribute is true: Child components are clipped to the parent component's bounds, and the out-of-bounds area is treated as invisible. false: The area beyond the parent component's bounds is directly treated as invisible, ignoring the parent component's NODE_CLIP attribute.
Default value: false.

OH_ArkUI_TextPickerRangeContentArray_Create()

ArkUI_TextPickerRangeContentArray* OH_ArkUI_TextPickerRangeContentArray_Create(int32_t length)

Description

Creates an object of the TextPickerRangeContent array.

Since: 19

Parameters

NameDescription
int32_t lengthLength of the TextPickerRangeContent array.

Returns

TypeDescription
ArkUI_TextPickerRangeContentArray*Pointer to an empty TextPickerRangeContent array.

OH_ArkUI_TextPickerRangeContentArray_SetIconAtIndex()

void OH_ArkUI_TextPickerRangeContentArray_SetIconAtIndex(ArkUI_TextPickerRangeContentArray* handle, char* icon, int32_t index)

Description

Configures the icon data at a specified position in the TextPickerRangeContent array.

Since: 19

Parameters

NameDescription
ArkUI_TextPickerRangeContentArray* handlePointer to the TextPickerRangeContent array.
char* iconPointer to the icon path.
int32_t indexArray index, starting from 0.

OH_ArkUI_TextPickerRangeContentArray_SetTextAtIndex()

void OH_ArkUI_TextPickerRangeContentArray_SetTextAtIndex(ArkUI_TextPickerRangeContentArray* handle, char* text, int32_t index)

Description

Configures the text data at a specified position in the TextPickerRangeContent array.

Since: 19

Parameters

NameDescription
ArkUI_TextPickerRangeContentArray* handlePointer to the TextPickerRangeContent array.
char* textPointer to the text content.
int32_t indexPosition in the array, starting from 0.

OH_ArkUI_TextPickerRangeContentArray_Destroy()

void OH_ArkUI_TextPickerRangeContentArray_Destroy(ArkUI_TextPickerRangeContentArray* handle)

Description

Destroys a TextPickerRangeContent array object.

Since: 19

Parameters

NameDescription
ArkUI_TextPickerRangeContentArray* handlePointer to the TextPickerRangeContent array.

OH_ArkUI_TextCascadePickerRangeContentArray_Create()

ArkUI_TextCascadePickerRangeContentArray* OH_ArkUI_TextCascadePickerRangeContentArray_Create(int32_t length)

Description

Creates an object of the TextCascadePickerRangeContent array.

Since: 19

Parameters

NameDescription
int32_t lengthLength of the TextPickerRangeContent array.

Returns

TypeDescription
ArkUI_TextCascadePickerRangeContentArray*Pointer to an empty TextCascadePickerRangeContent array.

OH_ArkUI_TextCascadePickerRangeContentArray_SetTextAtIndex()

void OH_ArkUI_TextCascadePickerRangeContentArray_SetTextAtIndex(ArkUI_TextCascadePickerRangeContentArray* handle, char* text, int32_t index)

Description

Sets the text data at the specified position in the TextCascadePickerRangeContent array.

Since: 19

Parameters

NameDescription
ArkUI_TextCascadePickerRangeContentArray* handlePointer to the TextCascadePickerRangeContentHandle instance.
char* textPointer to the text content.
int32_t indexPosition in the array, starting from 0.

OH_ArkUI_TextCascadePickerRangeContentArray_SetChildAtIndex()

void OH_ArkUI_TextCascadePickerRangeContentArray_SetChildAtIndex(ArkUI_TextCascadePickerRangeContentArray* handle, ArkUI_TextCascadePickerRangeContentArray* child, int32_t index)

Description

Configures the child data at a specified position in the TextCascadePickerRangeContent array.

Since: 19

Parameters

NameDescription
ArkUI_TextCascadePickerRangeContentArray* handlePointer to the TextCascadePickerRangeContentHandle instance.
ArkUI_TextCascadePickerRangeContentArray* childPointer to the child node array.
int32_t indexPosition in the array, starting from 0.

OH_ArkUI_TextCascadePickerRangeContentArray_Destroy()

void OH_ArkUI_TextCascadePickerRangeContentArray_Destroy(ArkUI_TextCascadePickerRangeContentArray* handle)

Description

Destroys a TextCascadePickerRangeContent array object.

Since: 19

Parameters

NameDescription
ArkUI_TextCascadePickerRangeContentArray* handlePointer to the TextCascadePickerRangeContentHandle instance.

OH_ArkUI_EmbeddedComponentOption_Create()

ArkUI_EmbeddedComponentOption* OH_ArkUI_EmbeddedComponentOption_Create()

Description

Creates an EmbeddedComponent option object.

Since: 20

Returns

TypeDescription
ArkUI_EmbeddedComponentOption*Pointer to the EmbeddedComponent option object.

OH_ArkUI_EmbeddedComponentOption_Dispose()

void OH_ArkUI_EmbeddedComponentOption_Dispose(ArkUI_EmbeddedComponentOption* option)

Description

Disposes of an EmbeddedComponent option object.

Since: 20

Parameters

NameDescription
ArkUI_EmbeddedComponentOption* optionPointer to the target EmbeddedComponent option object.

OH_ArkUI_EmbeddedComponentOption_SetOnError()

void OH_ArkUI_EmbeddedComponentOption_SetOnError(ArkUI_EmbeddedComponentOption* option, void (*callback)(int32_t code, const char* name, const char* message))

Description

Sets the onError callback for the EmbeddedComponent component. This callback is triggered when an error occurs during the running of the EmbeddedComponent component.

Since: 20

Parameters

NameDescription
ArkUI_EmbeddedComponentOption* optionPointer to the EmbeddedComponent option object.
void (*callback)(int32_t code, const char* name, const char* message)User-defined callback function.
- code: error code returned when the API call fails. For details about error codes, see UIExtension Error Codes.
- name: error name returned when the API call fails.
- message: detailed error message returned when the API call fails.

OH_ArkUI_EmbeddedComponentOption_SetOnTerminated()

void OH_ArkUI_EmbeddedComponentOption_SetOnTerminated(ArkUI_EmbeddedComponentOption* option, void (*callback)(int32_t code, AbilityBase_Want* want))

Description

Sets the onTerminated callback for the EmbeddedComponent component. This callback is triggered when the EmbeddedComponent component exits properly.

Since: 20

Parameters

NameDescription
ArkUI_EmbeddedComponentOption* optionPointer to the EmbeddedComponent option object.
void (*callback)(int32_t code, AbilityBase_Want* want)User-defined callback function.
- code: result code returned when the started EmbeddedUIExtensionAbility exits. If the EmbeddedUIExtensionAbility exits by calling terminateSelfWithResult, the result code is the value set by the EmbeddedUIExtensionAbility. If the EmbeddedUIExtensionAbility exits by calling terminateSelf, the result code is the default value 0.
- want: data returned when the EmbeddedUIExtensionAbility exits.

OH_ArkUI_PositionEdges_Create()

ArkUI_PositionEdges* OH_ArkUI_PositionEdges_Create()

Description

Creates a PositionEdges object.

Since: 21

Returns

TypeDescription
ArkUI_PositionEdges*Pointer to the PositionEdges object.

OH_ArkUI_PositionEdges_Copy()

ArkUI_PositionEdges* OH_ArkUI_PositionEdges_Copy(const ArkUI_PositionEdges* edges)

Description

Deeply copies a PositionEdges attribute object.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.

Returns

TypeDescription
ArkUI_PositionEdges*Pointer to the new PositionEdges object.

OH_ArkUI_PositionEdges_Dispose()

void OH_ArkUI_PositionEdges_Dispose(ArkUI_PositionEdges* edges)

Description

Disposes of the PositionEdges object.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.

OH_ArkUI_PositionEdges_SetTop()

void OH_ArkUI_PositionEdges_SetTop(ArkUI_PositionEdges* edges, float value)

Description

Sets the value of the PositionEdges object in the top direction.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.
float valueValue of the PositionEdges object in the corresponding direction, in vp.

OH_ArkUI_PositionEdges_GetTop()

int32_t OH_ArkUI_PositionEdges_GetTop(ArkUI_PositionEdges* edges, float* value)

Description

Obtains the value of the PositionEdges object in the top direction.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.
float* valuePointer to the value of the PositionEdges object in the corresponding direction, in vp.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_PositionEdges_SetLeft()

void OH_ArkUI_PositionEdges_SetLeft(ArkUI_PositionEdges* edges, float value)

Description

Sets the value of the PositionEdges object in the left direction.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.
float valueValue of the PositionEdges object in the corresponding direction, in vp.

OH_ArkUI_PositionEdges_GetLeft()

int32_t OH_ArkUI_PositionEdges_GetLeft(ArkUI_PositionEdges* edges, float* value)

Description

Obtains the value of the PositionEdges object in the left direction.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.
float* valuePointer to the value of the PositionEdges object in the corresponding direction, in vp.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_PositionEdges_SetBottom()

void OH_ArkUI_PositionEdges_SetBottom(ArkUI_PositionEdges* edges, float value)

Description

Sets the value of the PositionEdges object in the bottom direction.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.
float valueValue of the PositionEdges object in the corresponding direction, in vp.

OH_ArkUI_PositionEdges_GetBottom()

int32_t OH_ArkUI_PositionEdges_GetBottom(ArkUI_PositionEdges* edges, float* value)

Description

Obtains the value of the PositionEdges object in the bottom direction.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.
float* valuePointer to the value of the PositionEdges object in the corresponding direction, in vp.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_PositionEdges_SetRight()

void OH_ArkUI_PositionEdges_SetRight(ArkUI_PositionEdges* edges, float value)

Description

Sets the value of the PositionEdges object in the right direction.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.
float valueValue of the PositionEdges object in the corresponding direction, in vp.

OH_ArkUI_PositionEdges_GetRight()

int32_t OH_ArkUI_PositionEdges_GetRight(ArkUI_PositionEdges* edges, float* value)

Description

Obtains the value of the PositionEdges object in the right direction.

Since: 21

Parameters

NameDescription
ArkUI_PositionEdges* edgesPointer to the PositionEdges object.
float* valuePointer to the value of the PositionEdges object in the corresponding direction, in vp.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_PixelRoundPolicy_Create()

ArkUI_PixelRoundPolicy* OH_ArkUI_PixelRoundPolicy_Create()

Description

Creates a PixelRoundPolicy attribute object.

Since: 21

Returns

TypeDescription
ArkUI_PixelRoundPolicy*Pointer to the PixelRoundPolicy object.

OH_ArkUI_PixelRoundPolicy_Dispose()

void OH_ArkUI_PixelRoundPolicy_Dispose(ArkUI_PixelRoundPolicy* policy)

Description

Disposes of the PixelRoundPolicy object.

Since: 21

Parameters

NameDescription
ArkUI_PixelRoundPolicy* policyPointer to the target PixelRoundPolicy object.

OH_ArkUI_PixelRoundPolicy_SetTop()

void OH_ArkUI_PixelRoundPolicy_SetTop(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy value)

Description

Sets the top edge pixel rounding policy for the PixelRoundPolicy object.

Since: 21

Parameters

NameDescription
ArkUI_PixelRoundPolicy* policyPointer to the PixelRoundPolicy object.
ArkUI_PixelRoundCalcPolicy valueSpecific pixel rounding policy.

OH_ArkUI_PixelRoundPolicy_GetTop()

int32_t OH_ArkUI_PixelRoundPolicy_GetTop(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy* value)

Description

Obtains the top edge pixel rounding policy from the PixelRoundPolicy object.

Since: 21

Parameters

NameDescription
ArkUI_PixelRoundPolicy* policyPointer to the PixelRoundPolicy object.
ArkUI_PixelRoundCalcPolicy* valuePointer to the specific pixel rounding policy.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_PixelRoundPolicy_SetStart()

void OH_ArkUI_PixelRoundPolicy_SetStart(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy value)

Description

Sets the start edge pixel rounding policy for the PixelRoundPolicy object.

Since: 21

Parameters

NameDescription
ArkUI_PixelRoundPolicy* policyPointer to the PixelRoundPolicy object.
ArkUI_PixelRoundCalcPolicy valueSpecific pixel rounding policy.

OH_ArkUI_PixelRoundPolicy_GetStart()

int32_t OH_ArkUI_PixelRoundPolicy_GetStart(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy* value)

Description

Obtains the start edge pixel rounding policy from the PixelRoundPolicy object.

Since: 21

Parameters

NameDescription
ArkUI_PixelRoundPolicy* policyPointer to the PixelRoundPolicy object.
ArkUI_PixelRoundCalcPolicy* valuePointer to the specific pixel rounding policy.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_PixelRoundPolicy_SetBottom()

void OH_ArkUI_PixelRoundPolicy_SetBottom(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy value)

Description

Sets the bottom edge pixel rounding policy for the PixelRoundPolicy object.

Since: 21

Parameters

NameDescription
ArkUI_PixelRoundPolicy* policyPointer to the PixelRoundPolicy object.
ArkUI_PixelRoundCalcPolicy valueSpecific pixel rounding policy.

OH_ArkUI_PixelRoundPolicy_GetBottom()

int32_t OH_ArkUI_PixelRoundPolicy_GetBottom(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy* value)

Description

Obtains the bottom edge pixel rounding policy from the PixelRoundPolicy object.

Since: 21

Parameters

NameDescription
ArkUI_PixelRoundPolicy* policyPointer to the PixelRoundPolicy object.
ArkUI_PixelRoundCalcPolicy* valuePointer to the specific pixel rounding policy.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_PixelRoundPolicy_SetEnd()

void OH_ArkUI_PixelRoundPolicy_SetEnd(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy value)

Description

Sets the end edge pixel rounding policy for the PixelRoundPolicy object.

Since: 21

Parameters

NameDescription
ArkUI_PixelRoundPolicy* policyPointer to the PixelRoundPolicy object.
ArkUI_PixelRoundCalcPolicy valueSpecific pixel rounding policy.

OH_ArkUI_PixelRoundPolicy_GetEnd()

int32_t OH_ArkUI_PixelRoundPolicy_GetEnd(ArkUI_PixelRoundPolicy* policy, ArkUI_PixelRoundCalcPolicy* value)

Description

Obtains the end edge pixel rounding policy from the PixelRoundPolicy object.

Since: 21

Parameters

NameDescription
ArkUI_PixelRoundPolicy* policyPointer to the PixelRoundPolicy object.
ArkUI_PixelRoundCalcPolicy* valuePointer to the specific pixel rounding policy.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ContentTransitionEffect_Create()

ArkUI_ContentTransitionEffect* OH_ArkUI_ContentTransitionEffect_Create(int32_t type)

Description

Creates a ContentTransitionEffect attribute object.

Since: 21

Parameters

NameDescription
int32_t typeTransition animation type. 0: No transition animation. 1: Fade-in and fade-out transition animation.

Returns

TypeDescription
ArkUI_ContentTransitionEffect*Pointer to the ContentTransitionEffect object.

OH_ArkUI_GridLayoutOptions_Create()

ArkUI_GridLayoutOptions* OH_ArkUI_GridLayoutOptions_Create()

Description

Creates Grid layout options.

Since: 22

Returns

TypeDescription
ArkUI_GridLayoutOptions*Pointer to the Grid layout option.

OH_ArkUI_GridLayoutOptions_Dispose()

void OH_ArkUI_GridLayoutOptions_Dispose(ArkUI_GridLayoutOptions* option)

Description

Disposes of the Grid layout option.

Since: 22

Parameters

NameDescription
ArkUI_GridLayoutOptions* optionPointer to the Grid layout option.

OH_ArkUI_GridLayoutOptions_SetIrregularIndexes()

int32_t OH_ArkUI_GridLayoutOptions_SetIrregularIndexes(ArkUI_GridLayoutOptions* option, uint32_t* irregularIndexes, int32_t size)

Description

Sets the irregular grid item index array for the grid layout.

Since: 22

Parameters

NameDescription
ArkUI_GridLayoutOptions* optionPointer to the Grid layout option.
uint32_t* irregularIndexesPointer to the GridItem index array.
int32_t sizeSize of the GridItem index array.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_GridLayoutOptions_GetIrregularIndexes()

int32_t OH_ArkUI_GridLayoutOptions_GetIrregularIndexes(ArkUI_GridLayoutOptions* option, uint32_t* irregularIndexes, int32_t* size)

Description

Obtains the irregular grid item index array for the grid layout. When OH_ArkUI_GridLayoutOptions_RegisterGetIrregularSizeByIndexCallback is not set, the grid item specified in this parameter occupies an entire row of the grid that scrolls vertically or an entire column of the grid that scrolls horizontally.

Since: 22

Parameters

NameDescription
ArkUI_GridLayoutOptions* optionPointer to the Grid layout option.
uint32_t* irregularIndexesPointer to the GridItem index array.
int32_t sizeSize of the GridItem index array.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the buffer size is insufficient.
A possible cause is that mandatory parameters are left unspecified.

OH_ArkUI_GridLayoutOptions_RegisterGetIrregularSizeByIndexCallback()

void OH_ArkUI_GridLayoutOptions_RegisterGetIrregularSizeByIndexCallback(ArkUI_GridLayoutOptions* option, void* userData, ArkUI_GridItemSize (*callback)(int32_t itemIndex, void* userData))

Description

Registers a callback to obtain the row and column span for the grid item at the specified index.

Since: 22

Parameters

NameDescription
ArkUI_GridLayoutOptions* optionPointer to the Grid layout option.
void* userDataPointer to the user-defined data.
ArkUI_GridItemSize (*callback)(int32_t itemIndex, void* userData)Callback that returns the row and column span for the grid item at the specified index.
itemIndex: grid item index, which must be within the range set by OH_ArkUI_GridLayoutOptions_SetIrregularIndexes.

OH_ArkUI_GridLayoutOptions_RegisterGetRectByIndexCallback()

void OH_ArkUI_GridLayoutOptions_RegisterGetRectByIndexCallback(ArkUI_GridLayoutOptions* option, void* userData, ArkUI_GridItemRect (*callback)(int32_t itemIndex, void* userData))

Description

Registers a callback to obtain the starting row, starting column, row span, and column span for the grid item at the specified index.

Since: 22

Parameters

NameDescription
ArkUI_GridLayoutOptions* optionPointer to the Grid layout option.
void* userDataPointer to the user-defined data.
ArkUI_GridItemRect (*callback)(int32_t itemIndex, void* userData)Callback that returns the starting row, starting column, row span, and column span for the grid item at the specified index.
itemIndex: grid item index.

OH_ArkUI_ShowCounterConfig_Create()

ArkUI_ShowCounterConfig* OH_ArkUI_ShowCounterConfig_Create()

Description

Creates a text input counter configuration object.

Since: 22

Returns

TypeDescription
ArkUI_ShowCounterConfig*Pointer to the text input counter configuration object.

OH_ArkUI_ShowCounterConfig_Dispose()

void OH_ArkUI_ShowCounterConfig_Dispose(ArkUI_ShowCounterConfig* config)

Description

Disposes of the text input counter configuration object.

Since: 22

Parameters

NameDescription
ArkUI_ShowCounterConfig* configPointer to the text input counter configuration object to be disposed of.

OH_ArkUI_ShowCounterConfig_SetCounterTextColor()

void OH_ArkUI_ShowCounterConfig_SetCounterTextColor(ArkUI_ShowCounterConfig* config, uint32_t color)

Description

Sets the text color of the counter when the text input has not reached the maximum character limit.

Since: 22

Parameters

NameDescription
ArkUI_ShowCounterConfig* configPointer to the text input counter configuration object.
uint32_t colorCounter text color in 0xARGB format.

OH_ArkUI_ShowCounterConfig_SetCounterTextOverflowColor()

void OH_ArkUI_ShowCounterConfig_SetCounterTextOverflowColor(ArkUI_ShowCounterConfig* config, uint32_t color)

Description

Sets the text color of the counter when the text input exceeds the maximum character limit.

Since: 22

Parameters

NameDescription
ArkUI_ShowCounterConfig* configPointer to the text input counter configuration object.
uint32_t colorCounter text color in 0xARGB format.

OH_ArkUI_ShowCounterConfig_GetCounterTextColor()

uint32_t OH_ArkUI_ShowCounterConfig_GetCounterTextColor(ArkUI_ShowCounterConfig* config)

Description

Obtains the text color of the counter when the text input has not reached the maximum character limit.

Since: 22

Parameters

NameDescription
ArkUI_ShowCounterConfig* configPointer to the text input counter configuration object.

Returns

TypeDescription
uint32_tCounter text color in 0xARGB format. Returns 0 if no color has been set via OH_ArkUI_ShowCounterConfig_SetCounterTextColor.

OH_ArkUI_ShowCounterConfig_GetCounterTextOverflowColor()

uint32_t OH_ArkUI_ShowCounterConfig_GetCounterTextOverflowColor(ArkUI_ShowCounterConfig* config)

Description

Obtains the text color of the counter when the text input exceeds the maximum character limit.

Since: 22

Parameters

NameDescription
ArkUI_ShowCounterConfig* configPointer to the text input counter configuration object.

Returns

TypeDescription
uint32_tCounter text color in 0xARGB format. Returns 0 if no color has been set via OH_ArkUI_ShowCounterConfig_SetCounterTextOverflowColor.

OH_ArkUI_SelectionOptions_Create()

ArkUI_SelectionOptions OH_ArkUI_SelectionOptions_Create()

Description

Creates a selection option.

Since: 23

Returns

TypeDescription
ArkUI_SelectionOptions*Pointer to the selection option.

OH_ArkUI_SelectionOptions_Dispose()

void OH_ArkUI_SelectionOptions_Dispose(ArkUI_SelectionOptions* options)

Description

Releases a selection option object.

Since: 23

Parameters

NameDescription
ArkUI_SelectionOptions* optionsPointer to the selection option to be released.

OH_ArkUI_SelectionOptions_SetMenuPolicy()

void OH_ArkUI_SelectionOptions_SetMenuPolicy(ArkUI_SelectionOptions* options, ArkUI_MenuPolicy menuPolicy)

Description

Sets the menu pop-up policy for selection options.

Since: 23

Parameters

NameDescription
ArkUI_SelectionOptions* optionsPointer to the selection option.
ArkUI_MenuPolicy menuPolicyMenu display policy.

OH_ArkUI_SelectionOptions_GetMenuPolicy()

ArkUI_MenuPolicy  OH_ArkUI_SelectionOptions_GetMenuPolicy(ArkUI_SelectionOptions* options)

Description

Obtains the menu pop-up policy for selection options.

Since: 23

Parameters

NameDescription
ArkUI_SelectionOptions* optionsPointer to the selection option.

Returns

TypeDescription
ArkUI_MenuPolicy Menu display policy.

OH_ArkUI_TextContentBaseController_Create()

ArkUI_TextContentBaseController* OH_ArkUI_TextContentBaseController_Create()

Description

Creates a basic controller object for text content.

Since: 23

Returns

TypeDescription
ArkUI_TextContentBaseController*Pointer to the controller object.

OH_ArkUI_TextContentBaseController_Dispose()

void OH_ArkUI_TextContentBaseController_Dispose(ArkUI_TextContentBaseController* controller)

Description

Destroys a basic controller object for text content.

Since: 23

Parameters

NameDescription
ArkUI_TextContentBaseController* controllerPointer to the controller to be destroyed.

OH_ArkUI_TextContentBaseController_DeleteBackward()

void OH_ArkUI_TextContentBaseController_DeleteBackward(ArkUI_TextContentBaseController* controller)

Description

Deletes the character before the cursor in editing state; deletes the last character of the text box component in other states.

Since: 23

Parameters

NameDescription
ArkUI_TextContentBaseController* controllerPointer to the configuration object to be modified.

OH_ArkUI_TextContentBaseController_ScrollToVisible()

void OH_ArkUI_TextContentBaseController_ScrollToVisible(ArkUI_TextContentBaseController* controller, int32_t start, int32_t end)

Description

Passes the start and end indexes to the bound text box component, and scrolls the text within the range to the visible area.

Since: 23

Parameters

NameDescription
ArkUI_TextContentBaseController* controllerPointer to the configuration object to be modified.
Pass the start and end indexes to the bound text box component and scroll the text within the range.
int32_t startStart text index.
The start index must be less than or equal to the end index. Otherwise, the API call is invalid. The value range is [0, Total length of the text in the text box]. If the start index is less than 0, the start index is regarded as 0. If the start index is greater than the total length, the start index is regarded as the total length.
int32_t endEnd text index.
The end index must be greater than or equal to the start index. Otherwise, the API call is invalid. The value range is [0, Total length of the text in the text box]. If the end index is less than 0, the end index is regarded as 0. If the end index is greater than the total length, the end index is regarded as the total length.

OH_ArkUI_TextMenuItem_Create()

ArkUI_TextMenuItem* OH_ArkUI_TextMenuItem_Create()

Description

Creates a text menu item object.

Since: 22

Returns

TypeDescription
ArkUI_TextMenuItem*Pointer to the ArkUI_TextMenuItem object.

OH_ArkUI_TextMenuItem_Dispose()

void OH_ArkUI_TextMenuItem_Dispose(ArkUI_TextMenuItem* textMenuItem)

Description

Releases a text menu item object.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItem* textMenuItemPointer to the ArkUI_TextMenuItem object.

OH_ArkUI_TextMenuItem_SetContent()

ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetContent(ArkUI_TextMenuItem* item, const char* content)

Description

Sets the title of a text menu item.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object.
const char* contentPointer to the title of a text menu item. The default value is an empty string.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItem_GetContent()

ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetContent(const ArkUI_TextMenuItem* item, char* buffer, int32_t bufferSize, int32_t* writeLength)

Description

Obtains the title of a text menu item.

Since: 22

Parameters

NameDescription
const ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object.
char* bufferPointer to the buffer. You can create it and allocate memory to store the title information of the text menu item.
int32_t bufferSizeBuffer size.
int32_t* writeLengthIf the return value is ARKUI_ERROR_CODE_NO_ERROR, the length of the data written to the buffer is returned.
If the return value is ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR, the minimum length required for writing the string to the buffer is returned.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the buffer size is insufficient.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItem_SetIcon()

ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetIcon(ArkUI_TextMenuItem* item, const char* icon)

Description

Sets the icon path of a text menu item.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object.
const char* iconPointer to the icon path of the text menu item. The default value is an empty string.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItem_GetIcon()

ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetIcon(const ArkUI_TextMenuItem* item, char* buffer, int32_t bufferSize, int32_t* writeLength)

Description

Obtains the icon path of a text menu item.

Since: 22

Parameters

NameDescription
const ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object.
char* bufferPointer to the buffer. You can create it and allocate memory to store the icon path of the text menu item.
int32_t bufferSizeBuffer size.
int32_t* writeLengthIf the return value is ARKUI_ERROR_CODE_NO_ERROR, the length of the data written to the buffer is returned.
If the return value is ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR, the minimum length required for writing the string to the buffer is returned.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the buffer size is insufficient.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItem_SetLabelInfo()

ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetLabelInfo(ArkUI_TextMenuItem* item, const char* labelInfo)

Description

Sets the shortcut hint for a text menu item, for example, the shortcut hint for the Copy menu item can be set to Ctrl+C.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object.
const char* labelInfoPointer to the shortcut hint of a text menu item. The default value is an empty string.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItem_GetLabelInfo()

ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetLabelInfo(const ArkUI_TextMenuItem* item, char* buffer, int32_t bufferSize, int32_t* writeLength)

Description

Obtains the shortcut hint for a text menu item, for example, the shortcut hint for the Copy menu item is typically Ctrl+C.

Since: 22

Parameters

NameDescription
const ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object.
char* bufferPointer to the buffer. You can create it and allocate memory to store the shortcut hint of the text menu item.
int32_t bufferSizeBuffer size.
int32_t* writeLengthIf the return value is ARKUI_ERROR_CODE_NO_ERROR, the length of the data written to the buffer is returned.
If the return value is ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR, the minimum length required for writing the string to the buffer is returned.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the buffer size is insufficient.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItem_SetId()

ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetId(ArkUI_TextMenuItem* item, int32_t id)

Description

Sets the ID of a text menu item.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object.
int32_t idID of a text menu item.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItem_GetId()

ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetId(const ArkUI_TextMenuItem* item, int32_t* id)

Description

Obtains the ID of a text menu item.

Since: 22

Parameters

NameDescription
const ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object.
int32_t* idPointer to the ID of a text menu item.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItemArray_GetSize()

ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_GetSize(ArkUI_TextMenuItemArray* items, int32_t* size)

Description

Obtains the size of the text menu item array.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItemArray* itemsPointer to the ArkUI_TextMenuItemArray object.
int32_t* sizePointer to the size of the text menu item array.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItemArray_GetItem()

ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_GetItem(ArkUI_TextMenuItemArray* items, int32_t index, ArkUI_TextMenuItem** item)

Description

Obtains the text menu item at a specified index from the text menu item array.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItemArray* itemsPointer to the ArkUI_TextMenuItemArray object.
int32_t indexIndex position.
ArkUI_TextMenuItem** itemDouble pointer to the ArkUI_TextMenuItem object.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItemArray_Insert()

ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_Insert(ArkUI_TextMenuItemArray* items, ArkUI_TextMenuItem* item, int32_t index)

Description

Inserts a text menu item at a specified index into the text menu item array.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItemArray* itemsPointer to the ArkUI_TextMenuItemArray object.
ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object.
int32_t indexIndex position of the text menu item to be inserted.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItemArray_Erase()

ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_Erase(ArkUI_TextMenuItemArray* items, int32_t index)

Description

Deletes the text menu item at a specified index from the text menu item array.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItemArray* itemsPointer to the ArkUI_TextMenuItemArray object.
int32_t indexIndex of the text menu item to be deleted.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMenuItemArray_Clear()

ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_Clear(ArkUI_TextMenuItemArray* items)

Description

Clears all text menu items in the text menu item array.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItemArray* itemsPointer to the ArkUI_TextMenuItemArray object.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditMenuOptions_Create()

ArkUI_TextEditMenuOptions* OH_ArkUI_TextEditMenuOptions_Create()

Description

Creates a text menu extension object.

Since: 22

Returns

TypeDescription
ArkUI_TextEditMenuOptions* editMenuOptionsPointer to the ArkUI_TextEditMenuOptions object.

OH_ArkUI_TextEditMenuOptions_Dispose()

void OH_ArkUI_TextEditMenuOptions_Dispose(ArkUI_TextEditMenuOptions* editMenuOptions)

Description

Releases a text menu extension object.

Since: 22

Parameters

NameDescription
ArkUI_TextEditMenuOptions* editMenuOptionsPointer to the ArkUI_TextEditMenuOptions object.

ArkUI_TextCreateMenuCallback()

typedef void (*ArkUI_TextCreateMenuCallback)(ArkUI_TextMenuItemArray* items, void* userData)

Description

Callback for the text menu creation event. This callback is triggered when a text menu is created, allowing you to set menu data in it.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItemArray* itemsPointer to the ArkUI_TextMenuItemArray object, which is created and released by the system. You can call OH_ArkUI_TextMenuItemArray_Insert and OH_ArkUI_TextMenuItemArray_Erase to modify the array in the callback.
void* userDataPointer to the user-defined data.

ArkUI_TextPrepareMenuCallback()

typedef void (*ArkUI_TextPrepareMenuCallback)(ArkUI_TextMenuItemArray* items, void* userData)

Description

Callback for the text menu preparation event. This callback is called when the text selection area changes and before the menu is displayed, allowing you to set menu data in it.

Since: 22

Parameters

NameDescription
ArkUI_TextMenuItemArray* itemsPointer to the ArkUI_TextMenuItemArray object, which is created and released by the system. You can call OH_ArkUI_TextMenuItemArray_Insert and OH_ArkUI_TextMenuItemArray_Erase to modify the array in the callback.
void* userDataPointer to the user-defined data.

ArkUI_TextMenuItemClickCallback()

typedef bool (*ArkUI_TextMenuItemClickCallback)(const ArkUI_TextMenuItem* item,int32_t start, int32_t end, void* userData)

Description

Callback for the text menu item click event. This callback is called when a menu item is clicked. You can intercept the default processing behavior in this callback.

Since: 22

Parameters

NameDescription
const ArkUI_TextMenuItem* itemPointer to the ArkUI_TextMenuItem object, indicating the clicked text menu item.
int32_t startStart index of the selected text.
int32_t endEnd index of the selected text.
void* userDataPointer to the user-defined data.

Returns

TypeDescription
boolWhether to intercept the default processing behavior of the system.
true: Intercept the system's default processing behavior. For example, clicking text menu items such as Paste or Copy will only execute the custom processing behavior.
false: Do not intercept the system's default processing behavior. For example, clicking text menu items such as Paste or Copy will first execute the custom processing behavior and then the default processing behavior.

OH_ArkUI_TextEditMenuOptions_RegisterOnCreateMenuCallback()

ArkUI_ErrorCode OH_ArkUI_TextEditMenuOptions_RegisterOnCreateMenuCallback(ArkUI_TextEditMenuOptions* editMenuOptions, void* userData, ArkUI_TextCreateMenuCallback cb)

Description

Registers the callback for creating text menus.

Since: 22

Parameters

NameDescription
ArkUI_TextEditMenuOptions* editMenuOptionsPointer to the ArkUI_TextEditMenuOptions object.
void* userDataPointer to the user-defined data.
ArkUI_TextCreateMenuCallback cbCallback for creating text menus.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditMenuOptions_RegisterOnPrepareMenuCallback()

ArkUI_ErrorCode OH_ArkUI_TextEditMenuOptions_RegisterOnPrepareMenuCallback(ArkUI_TextEditMenuOptions* editMenuOptions, void* userData, ArkUI_TextPrepareMenuCallback cb)

Description

Registers the callback for preparing text menus.

Since: 22

Parameters

NameDescription
ArkUI_TextEditMenuOptions* editMenuOptionsPointer to the ArkUI_TextEditMenuOptions object.
void* userDataPointer to the user-defined data.
ArkUI_TextPrepareMenuCallback cbCallback for preparing text menus.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditMenuOptions_RegisterOnMenuItemClickCallback()

ArkUI_ErrorCode OH_ArkUI_TextEditMenuOptions_RegisterOnMenuItemClickCallback(ArkUI_TextEditMenuOptions* editMenuOptions, void* userData, ArkUI_TextMenuItemClickCallback cb)

Description

Registers the callback for text menu item clicks.

Since: 22

Parameters

NameDescription
ArkUI_TextEditMenuOptions* editMenuOptionsPointer to the ArkUI_TextEditMenuOptions object.
void* userDataPointer to the user-defined data.
ArkUI_TextMenuItemClickCallback cbCallback for text menu item clicks.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextSelectionMenuOptions_Create()

ArkUI_TextSelectionMenuOptions* OH_ArkUI_TextSelectionMenuOptions_Create();

Description

Creates a custom text selection menu object.

Since: 22

Returns

TypeDescription
ArkUI_TextSelectionMenuOptions*Pointer to the ArkUI_TextSelectionMenuOptions object.

OH_ArkUI_TextSelectionMenuOptions_Dispose()

void OH_ArkUI_TextSelectionMenuOptions_Dispose(ArkUI_TextSelectionMenuOptions* selectionMenuOptions)

Description

Releases a custom text selection menu object.

Since: 22

Parameters

NameDescription
ArkUI_TextSelectionMenuOptions* selectionMenuOptionsPointer to the ArkUI_TextSelectionMenuOptions object.

OH_ArkUI_TextSelectionMenuOptions_SetSpanType()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetSpanType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextSpanType textSpanType)

Description

Sets the recognition type of a custom text selection menu.

Since: 22

Parameters

NameDescription
ArkUI_TextSelectionMenuOptions* selectionMenuOptionsPointer to the ArkUI_TextSelectionMenuOptions object.
ArkUI_TextSpanType textSpanTypeRecognition type of a custom text selection menu.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextSelectionMenuOptions_GetSpanType()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetSpanType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextSpanType* spanType)

Description

Obtains the recognition type of a custom text selection menu.

Since: 22

Parameters

NameDescription
ArkUI_TextSelectionMenuOptions* selectionMenuOptionsPointer to the ArkUI_TextSelectionMenuOptions object.
ArkUI_TextSpanType* spanTypePointer to the recognition type of a custom text selection menu.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextSelectionMenuOptions_SetContentNode()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetContentNode(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_NodeHandle node)

Description

Sets the content node of a custom text selection menu.

Since: 22

Parameters

NameDescription
ArkUI_TextSelectionMenuOptions* selectionMenuOptionsPointer to the ArkUI_TextSelectionMenuOptions object.
ArkUI_NodeHandle nodeContent node of the custom text selection menu.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextSelectionMenuOptions_GetContentNode()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetContentNode(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_NodeHandle* node)

Description

Obtains the content node of a custom text selection menu.

Since: 22

Parameters

NameDescription
ArkUI_TextSelectionMenuOptions* selectionMenuOptionsPointer to the ArkUI_TextSelectionMenuOptions object.
ArkUI_NodeHandle* nodePointer to the content node of the custom text selection menu.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextSelectionMenuOptions_SetResponseType()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetResponseType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextResponseType responseType)

Description

Sets the response type of a custom text selection menu.

Since: 22

Parameters

NameDescription
ArkUI_TextSelectionMenuOptions* selectionMenuOptionsPointer to the ArkUI_TextSelectionMenuOptions object.
ArkUI_TextResponseType responseTypeResponse type of the custom text selection menu.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextSelectionMenuOptions_GetResponseType()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetResponseType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextResponseType* responseType)

Description

Obtains the response type of a custom text selection menu.

Since: 22

Parameters

NameDescription
ArkUI_TextSelectionMenuOptions* selectionMenuOptionsPointer to the ArkUI_TextSelectionMenuOptions object.
ArkUI_TextResponseType* responseTypePointer to the response type of the custom text selection menu.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuShowCallback()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuShowCallback(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, void* userData, void (*callback)(int32_t start, int32_t end, void* userData))

Description

Registers the callback for the event of showing a custom text selection menu.

Since: 22

Parameters

NameDescription
ArkUI_TextSelectionMenuOptions* selectionMenuOptionsPointer to the ArkUI_TextSelectionMenuOptions object.
void* userDataPointer to the user-defined data, which can be any value. After the setting, the value is returned through the callback.
void (*callback)(int32_t start, int32_t end, void* userData)Callback for the event of showing a custom text selection menu.
start: start position of the selected text.
end: end position of the selected text.
userData: user-defined data, which corresponds to the input parameter userData of the OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuShowCallback API.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuHideCallback()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuHideCallback(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, void* userData, void (*callback)(int32_t start, int32_t end, void* userData))

Description

Registers the callback for the event of hiding a custom text selection menu.

Since: 22

Parameters

NameDescription
ArkUI_TextSelectionMenuOptions* selectionMenuOptionsPointer to the ArkUI_TextSelectionMenuOptions object.
void* userDataPointer to the user-defined data, which can be any value. After the setting, the value is returned through the callback.
void (*callback)(int32_t start, int32_t end, void* userData)Callback for the event of hiding a custom text selection menu.
start: start position of the selected text.
end: end position of the selected text.
userData: user-defined data, which corresponds to the input parameter userData of the OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuHideCallback API.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextMarqueeOptions_Create

ArkUI_TextMarqueeOptions* OH_ArkUI_TextMarqueeOptions_Create()

Description

Creates text marquee options.

Since: 23

Returns

TypeDescription
ArkUI_TextMarqueeOptions*Pointer to the text marquee option to be created.

OH_ArkUI_TextMarqueeOptions_Dispose

void OH_ArkUI_TextMarqueeOptions_Dispose(ArkUI_TextMarqueeOptions* option)

Description

Destroys the pointer to the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to a text marquee option to be destroyed.

OH_ArkUI_TextMarqueeOptions_SetStart

void OH_ArkUI_TextMarqueeOptions_SetStart(ArkUI_TextMarqueeOptions* option, bool start)

Description

Sets whether to play the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.
bool startWhether to play the text marquee option. true indicates to play; false indicates not to play.

OH_ArkUI_TextMarqueeOptions_GetStart

bool OH_ArkUI_TextMarqueeOptions_GetStart(ArkUI_TextMarqueeOptions* option)

Description

Obtains whether the text marquee option is played.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.

Returns

TypeDescription
boolWhether the text marquee option is played. true indicates the text marquee option is played; false indicates the opposite.

OH_ArkUI_TextMarqueeOptions_SetStep

void OH_ArkUI_TextMarqueeOptions_SetStep(ArkUI_TextMarqueeOptions* option, float step)

Description

Sets the step of the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.
float stepStep. Unit: vp.

OH_ArkUI_TextMarqueeOptions_GetStep

float OH_ArkUI_TextMarqueeOptions_GetStep(ArkUI_TextMarqueeOptions* option)

Description

Obtains the step of the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.

Returns

TypeDescription
floatStep. Unit: vp.

OH_ArkUI_TextMarqueeOptions_SetSpacing

void OH_ArkUI_TextMarqueeOptions_SetSpacing(ArkUI_TextMarqueeOptions* option, float spacing)

Description

Sets the distance between the start and end items of the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.
float spacingSpacing between the start and end items. Unit: vp.

OH_ArkUI_TextMarqueeOptions_GetSpacing

float OH_ArkUI_TextMarqueeOptions_GetSpacing(ArkUI_TextMarqueeOptions* option)

Description

Obtains the distance between the start and end items of the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.

Returns

TypeDescription
floatSpacing between the start and end items. Unit: vp.

OH_ArkUI_TextMarqueeOptions_SetLoop

void OH_ArkUI_TextMarqueeOptions_SetLoop(ArkUI_TextMarqueeOptions* option, int32_t loop)

Description

Sets the number of repetitions for looping the text marquee option. The value 0 or negative value indicates infinite looping.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.
int32_t loopNumber of loops.

OH_ArkUI_TextMarqueeOptions_GetLoop

int32_t OH_ArkUI_TextMarqueeOptions_GetLoop(ArkUI_TextMarqueeOptions* option)

Description

Obtains the number of repetitions for looping the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.

Returns

TypeDescription
int32_tNumber of loops.

OH_ArkUI_TextMarqueeOptions_SetFromStart

void OH_ArkUI_TextMarqueeOptions_SetFromStart(ArkUI_TextMarqueeOptions* option, bool fromStart)

Description

Sets the scrolling direction for looping the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.
bool fromStartScrolling direction for looping the text marquee option. true to scroll from the start; false to scroll in reverse.

OH_ArkUI_TextMarqueeOptions_GetFromStart

bool OH_ArkUI_TextMarqueeOptions_GetFromStart(ArkUI_TextMarqueeOptions* option)

Description

Obtains the scrolling direction for looping the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.

Returns

TypeDescription
boolScrolling direction for looping the text marquee option. true to scroll from the start; false to scroll in reverse.

OH_ArkUI_TextMarqueeOptions_SetDelay

void OH_ArkUI_TextMarqueeOptions_SetDelay(ArkUI_TextMarqueeOptions* option, int32_t delay)

Description

Sets the delay of each loop for the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.
int32_t delayDelay of each loop, in milliseconds.

OH_ArkUI_TextMarqueeOptions_GetDelay

int32_t OH_ArkUI_TextMarqueeOptions_GetDelay(ArkUI_TextMarqueeOptions* option)

Description

Obtains the delay of each loop for the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.

Returns

TypeDescription
int32_tDelay of each loop, in milliseconds.

OH_ArkUI_TextMarqueeOptions_SetFadeout

void OH_ArkUI_TextMarqueeOptions_SetFadeout(ArkUI_TextMarqueeOptions* option, bool fadeout)

Description

Sets whether the text marquee option supports a fade-out effect when the text is too long. When supported, if the text content exceeds the display range, the edges of the partially visible text will have a fade-out effect applied.
If both ends have partially visible text, both ends will have the fade-out effect applied.
When the fade-out effect is enabled, the NODE_CLIP attribute is automatically fixed at true and cannot be set to false.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.
bool fadeoutWhether the text marquee option supports a fade-out effect when the text is too long.
true to apply a fade-out effect when the text is too long, false otherwise.

OH_ArkUI_TextMarqueeOptions_GetFadeout

bool OH_ArkUI_TextMarqueeOptions_GetFadeout(ArkUI_TextMarqueeOptions* option)

Description

Obtains whether the text marquee option supports a fade-out effect when the text is too long.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.

Returns

TypeDescription
boolWhether the text marquee option supports a fade-out effect when the text is too long.

OH_ArkUI_TextMarqueeOptions_SetStartPolicy

void OH_ArkUI_TextMarqueeOptions_SetStartPolicy(ArkUI_TextMarqueeOptions* option, ArkUI_MarqueeStartPolicy startPolicy)

Description

Sets the startup policy of the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.
ArkUI_MarqueeStartPolicy startPolicyStartup policy.

OH_ArkUI_TextMarqueeOptions_GetStartPolicy

ArkUI_MarqueeStartPolicy OH_ArkUI_TextMarqueeOptions_GetStartPolicy(ArkUI_TextMarqueeOptions* option)

Description

Obtains the startup policy of the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.

Returns

TypeDescription
ArkUI_MarqueeStartPolicyStartup policy.

OH_ArkUI_TextMarqueeOptions_SetUpdatePolicy

void OH_ArkUI_TextMarqueeOptions_SetUpdatePolicy(ArkUI_TextMarqueeOptions* option,
    ArkUI_MarqueeUpdatePolicy updatePolicy)

Description

Sets the update policy of the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.
ArkUI_MarqueeUpdatePolicy updatePolicyUpdate policy.

OH_ArkUI_TextMarqueeOptions_GetUpdatePolicy

ArkUI_MarqueeUpdatePolicy OH_ArkUI_TextMarqueeOptions_GetUpdatePolicy(ArkUI_TextMarqueeOptions* option)

Description

Obtains the update policy of the text marquee option.

Since: 23

Parameters

NameDescription
ArkUI_TextMarqueeOptions* optionPointer to the text marquee option.

Returns

TypeDescription
ArkUI_MarqueeUpdatePolicyUpdate policy.

OH_ArkUI_SelectedDragPreviewStyle_Create()

ArkUI_SelectedDragPreviewStyle* OH_ArkUI_SelectedDragPreviewStyle_Create();

Description

Creates a preview style shown when dragging selected text.

Since: 23

Returns

TypeDescription
ArkUI_SelectedDragPreviewStyle*Pointer to the ArkUI_SelectedDragPreviewStyle object.

OH_ArkUI_SelectedDragPreviewStyle_Dispose()

void OH_ArkUI_SelectedDragPreviewStyle_Dispose(ArkUI_SelectedDragPreviewStyle* config)

Description

Destroys the preview style shown when dragging selected text.

Since: 23

Parameters

NameDescription
ArkUI_SelectedDragPreviewStyle* configPointer to the ArkUI_SelectedDragPreviewStyle object.

OH_ArkUI_SelectedDragPreviewStyle_SetColor()

void  OH_ArkUI_SelectedDragPreviewStyle_SetColor(ArkUI_SelectedDragPreviewStyle* config, uint32_t color);

Description

Sets the background color of the preview style shown when dragging selected text.

Since: 23

Parameters

NameDescription
ArkUI_SelectedDragPreviewStyle* configPointer to the ArkUI_SelectedDragPreviewStyle object.
uint32_t colorBackground color of the preview style shown when dragging selected text, in RGBA format.

OH_ArkUI_SelectedDragPreviewStyle_GetColor()

uint32_t OH_ArkUI_SelectedDragPreviewStyle_GetColor(ArkUI_SelectedDragPreviewStyle* config)

Description

Obtains the background color of the preview style shown when dragging selected text.

Since: 23

Parameters

NameDescription
ArkUI_SelectedDragPreviewStyle* configPointer to the ArkUI_SelectedDragPreviewStyle object.

Returns

TypeDescription
uint32_t colorBackground color of the preview style shown when dragging selected text, in RGBA format.

OH_ArkUI_DecorationStyleOptions_Create()

OH_ArkUI_DecorationStyleOptions* OH_ArkUI_DecorationStyleOptions_Create()

Description

Creates a decorative line style object. When the object is no longer used, call OH_ArkUI_DecorationStyleOptions_Destroy to destroy it.

Since: 24

Returns

TypeDescription
OH_ArkUI_DecorationStyleOptions*Pointer to the OH_ArkUI_DecorationStyleOptions object.

OH_ArkUI_DecorationStyleOptions_Destroy()

void OH_ArkUI_DecorationStyleOptions_Destroy(OH_ArkUI_DecorationStyleOptions* options)

Description

Destroys the decorative line style object.

Since: 24

Parameters

NameDescription
OH_ArkUI_DecorationStyleOptions* optionsPointer to the option object to be destroyed.

OH_ArkUI_DecorationStyleOptions_SetTextDecorationType()

ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetTextDecorationType(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationType type)

Description

Sets the decoration type of the decorative line style.

Since: 24

Parameters

NameDescription
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.
ArkUI_TextDecorationType typeDecoration type (ArkUI_TextDecorationType).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_DecorationStyleOptions_GetTextDecorationType()

ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetTextDecorationType(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationType* type)

Description

Obtains the decoration type of the decorative line style.

Since: 24

Parameters

NameDescription
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.
ArkUI_TextDecorationType* typePointer to the decoration type (ArkUI_TextDecorationType).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_DecorationStyleOptions_SetColor()

ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetColor(OH_ArkUI_DecorationStyleOptions* options, uint32_t color)

Description

Sets the color of the decorative line.

Since: 24

Parameters

NameDescription
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.
uint32_t colorColor of the decorative line, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_DecorationStyleOptions_GetColor()

ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetColor(OH_ArkUI_DecorationStyleOptions* options, uint32_t* color)

Description

Obtains the color of the decorative line.

Since: 24

Parameters

NameDescription
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.
uint32_t* colorPointer to the color of the decorative line, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_DecorationStyleOptions_SetTextDecorationStyle()

ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetTextDecorationStyle(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationStyle style)

Description

Sets the style of the decorative line.

Since: 24

Parameters

NameDescription
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.
ArkUI_TextDecorationStyle styleStyle of the decorative line (ArkUI_TextDecorationStyle).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_DecorationStyleOptions_GetTextDecorationStyle()

ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetTextDecorationStyle(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationStyle* style)

Description

Obtains the style of the decorative line.

Since: 24

Parameters

NameDescription
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.
ArkUI_TextDecorationStyle* stylePointer to the style of the decorative line (ArkUI_TextDecorationStyle).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_DecorationStyleOptions_SetThicknessScale()

ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetThicknessScale(OH_ArkUI_DecorationStyleOptions* options, float thicknessScale)

Description

Sets the scale factor of the decorative line thickness.

Since: 24

Parameters

NameDescription
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.
float thicknessScaleScale factor of the decorative line thickness. The value range is [0, +∞).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_DecorationStyleOptions_GetThicknessScale()

ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetThicknessScale(OH_ArkUI_DecorationStyleOptions* options, float* thicknessScale)

Description

Obtains the scale factor of the decorative line thickness.

Since: 24

Parameters

NameDescription
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.
float* thicknessScalePointer to the scale factor of the decorative line thickness.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextDataDetectorConfig_Create()

OH_ArkUI_TextDataDetectorConfig* OH_ArkUI_TextDataDetectorConfig_Create()

Description

Creates a text entity recognition configuration object. When the object is no longer used, call OH_ArkUI_TextDataDetectorConfig_Destroy to destroy it.

Since: 24

Returns

TypeDescription
OH_ArkUI_TextDataDetectorConfig*Pointer to the OH_ArkUI_TextDataDetectorConfig object.

OH_ArkUI_TextDataDetectorConfig_Destroy()

void OH_ArkUI_TextDataDetectorConfig_Destroy(OH_ArkUI_TextDataDetectorConfig* config)

Description

Destroys the text entity recognition configuration object.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.

OH_ArkUI_TextDataDetectorConfig_SetTypes()

ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetTypes(OH_ArkUI_TextDataDetectorConfig* config, const ArkUI_TextDataDetectorType* types, int32_t length)

Description

Sets the types of the text entity recognition configuration.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.
const ArkUI_TextDataDetectorType* typesPointer to the types of the text entity recognition configuration. The value is an enumerated value of ArkUI_TextDataDetectorType.
int32_t lengthType quantity.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextDataDetectorConfig_GetTypes()

ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetTypes(OH_ArkUI_TextDataDetectorConfig* config, ArkUI_TextDataDetectorType* buffer, int32_t bufferSize, int32_t* writeLength)

Description

Obtains the types of the text entity recognition configuration.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.
ArkUI_TextDataDetectorType* bufferPointer to the buffer of the type array.
int32_t bufferSizeMaximum number of types that can be written to the buffer reserved for the types.
int32_t* writeLengthPointer to the number of types that are actually written to the buffer.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the value of bufferSize is less than that of writeLength.

OH_ArkUI_TextDataDetectorConfig_RegisterOnDetectResultUpdateCallback()

ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_RegisterOnDetectResultUpdateCallback(OH_ArkUI_TextDataDetectorConfig* config, void* userData, void (*callback)(const char* result, int32_t length, void* userData))

Description

Sets the callback for text entity recognition result updates.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.
void* userDataPointer to the user data.
void (*callback)(const char* resultPointer to the callback when the recognition result is updated. result indicates the recognized text entity content. length indicates the end position of the selected text. userData indicates the user-defined data, which corresponds to the input parameter userData of the OH_ArkUI_TextDataDetectorConfig_RegisterOnDetectResultUpdateCallback API.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextDataDetectorConfig_SetColor()

ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetColor(OH_ArkUI_TextDataDetectorConfig* config, uint32_t color)

Description

Sets the color of the recognized content.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.
uint32_t colorColor of the recognized content, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextDataDetectorConfig_GetColor()

ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetColor(OH_ArkUI_TextDataDetectorConfig* config, uint32_t* color)

Description

Obtains the color of the recognized content.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.
uint32_t* colorPointer to the color of the recognized content, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextDataDetectorConfig_SetDecorationStyleOptions()

ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetDecorationStyleOptions(OH_ArkUI_TextDataDetectorConfig* config, OH_ArkUI_DecorationStyleOptions* decoration)

Description

Sets the decoration style of the recognized content.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.
OH_ArkUI_DecorationStyleOptions* decorationPointer to the decoration style of the recognized content. The value is an enumerated value of OH_ArkUI_DecorationStyleOptions.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextDataDetectorConfig_GetDecorationStyleOptions()

ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetDecorationStyleOptions(OH_ArkUI_TextDataDetectorConfig* config, OH_ArkUI_DecorationStyleOptions* decoration)

Description

Obtains the decoration style of the recognized content.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.
OH_ArkUI_DecorationStyleOptions* decorationPointer to the decoration style of the recognized content. The value is an enumerated value of OH_ArkUI_DecorationStyleOptions.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextDataDetectorConfig_SetEnablePreviewMenu()

ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetEnablePreviewMenu(OH_ArkUI_TextDataDetectorConfig* config, bool enablePreviewMenu)

Description

Sets whether to display the preview menu when the recognized content is long-pressed.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.
bool enablePreviewMenuWhether to display the preview menu when the recognized content is long-pressed. true means to display the preview menu, and false means the opposite. The default value is false.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextDataDetectorConfig_GetEnablePreviewMenu()

ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetEnablePreviewMenu(OH_ArkUI_TextDataDetectorConfig* config, bool* enablePreviewMenu)

Description

Obtains whether the preview menu is displayed when the recognized content is long-pressed.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextDataDetectorConfig* configPointer to the OH_ArkUI_TextDataDetectorConfig object.
bool* enablePreviewMenuWhether the preview menu is displayed when the recognized content is long-pressed. true means that the preview menu is displayed, and false means the opposite.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_Create()

OH_ArkUI_TextEditorPlaceholderOptions* OH_ArkUI_TextEditorPlaceholderOptions_Create()

Description

Creates an option object for the placeholder text used when there is no input. When the object is no longer used, call OH_ArkUI_TextEditorPlaceholderOptions_Destroy to destroy it.

Since: 24

Returns

TypeDescription
OH_ArkUI_TextEditorPlaceholderOptions*Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object.

OH_ArkUI_TextEditorPlaceholderOptions_Destroy()

void OH_ArkUI_TextEditorPlaceholderOptions_Destroy(OH_ArkUI_TextEditorPlaceholderOptions* options)

Description

Destroys the option object for the placeholder text used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.

OH_ArkUI_TextEditorPlaceholderOptions_SetValue()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetValue(OH_ArkUI_TextEditorPlaceholderOptions* options, const char* value)

Description

Sets the text for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
const char* valuePointer to the placeholder text.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_GetValue()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetValue(OH_ArkUI_TextEditorPlaceholderOptions* options, char* buffer, int32_t bufferSize, int32_t* writeLength)

Description

Obtains the text for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
char* bufferPointer to the buffer for storing the placeholder text in the memory. You need to allocate the memory.
int32_t bufferSizeMaximum number of characters that can be written to the buffer.
int32_t* writeLengthPointer to the number of characters that are actually written to the buffer.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the value of bufferSize is less than that of writeLength.

OH_ArkUI_TextEditorPlaceholderOptions_SetFontSize()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontSize(OH_ArkUI_TextEditorPlaceholderOptions* options, float fontSize)

Description

Sets the font size for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
float fontSizeFont size, in fp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_GetFontSize()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontSize(OH_ArkUI_TextEditorPlaceholderOptions* options, float* fontSize)

Description

Obtains the font size for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
float* fontSizePointer to the font size, in fp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_SetFontWeight()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontWeight(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t fontWeight)

Description

Sets the font weight for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
uint32_t fontWeightFont weight. The value is an integer multiple of 100 within the [100, 900] range, for example, 100 or 900.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_GetFontWeight()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontWeight(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t* fontWeight)

Description

Obtains the font weight for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
uint32_t* fontWeightPointer to the font weight. The value is an integer multiple of 100 within the [100, 900] range, for example, 100 or 900.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_SetFontFamily()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontFamily(OH_ArkUI_TextEditorPlaceholderOptions* options, const char* fontFamily)

Description

Sets the font family for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
const char* fontFamilyPointer to the font family, containing the font names to be set. Different font names are separated by commas (,).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_GetFontFamily()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontFamily(OH_ArkUI_TextEditorPlaceholderOptions* options, char* buffer, int32_t bufferSize, int32_t* writeLength)

Description

Obtains the font family for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
char* bufferPointer to the buffer for storing the font family in the memory. You need to allocate the memory.
int32_t bufferSizeMaximum number of characters that can be written to the buffer.
int32_t* writeLengthPointer to the number of characters that are actually written to the buffer.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the value of bufferSize is less than that of writeLength.

OH_ArkUI_TextEditorPlaceholderOptions_SetFontStyle()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontStyle(OH_ArkUI_TextEditorPlaceholderOptions* options, ArkUI_FontStyle fontStyle)

Description

Sets the font style for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
ArkUI_FontStyle fontStyleFont style. The value is an enumerated value of ArkUI_FontStyle.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_GetFontStyle()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontStyle(OH_ArkUI_TextEditorPlaceholderOptions* options, ArkUI_FontStyle* fontStyle)

Description

Obtains the font style for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
ArkUI_FontStyle* fontStylePointer to the font style. The value is an enumerated value of ArkUI_FontStyle.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_SetFontColor()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontColor(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t fontColor)

Description

Sets the font color for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
uint32_t fontColorFont color, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorPlaceholderOptions_GetFontColor()

ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontColor(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t* fontColor)

Description

Obtains the font color for the placeholder text options used when there is no input.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorPlaceholderOptions* optionsPointer to the OH_ArkUI_TextEditorPlaceholderOptions object.
uint32_t* fontColorPointer to the font color, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_Create()

OH_ArkUI_TextEditorStyledStringController* OH_ArkUI_TextEditorStyledStringController_Create()

Description

Creates a styled string controller object for the text editor. When the object is no longer used, call OH_ArkUI_TextEditorStyledStringController_Destroy to destroy it.

Since: 24

Returns

TypeDescription
OH_ArkUI_TextEditorStyledStringController*Pointer to the OH_ArkUI_TextEditorStyledStringController object.

OH_ArkUI_TextEditorStyledStringController_Destroy()

void OH_ArkUI_TextEditorStyledStringController_Destroy(OH_ArkUI_TextEditorStyledStringController* controller)

Description

Destroys the styled string controller object.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.

OH_ArkUI_TextEditorStyledStringController_SetCaretOffset()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetCaretOffset(OH_ArkUI_TextEditorStyledStringController* controller, int32_t caretOffset)

Description

Sets the caret offset using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
int32_t caretOffsetCaret offset.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_GetCaretOffset()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetCaretOffset(OH_ArkUI_TextEditorStyledStringController* controller, int32_t* caretOffset)

Description

Obtains the caret offset using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
int32_t* caretOffsetPointer to the caret offset.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_SetSelection()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetSelection(OH_ArkUI_TextEditorStyledStringController* controller, uint32_t start, uint32_t end, ArkUI_MenuPolicy menuPolicy)

Description

Sets the selected area using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
uint32_t startStart position of the selected area.
uint32_t endEnd position of the selected area.
ArkUI_MenuPolicy menuPolicyPolicy for displaying the menu in the selected area. The value is an enumerated value of ArkUI_MenuPolicy.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_IsEditing()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_IsEditing(OH_ArkUI_TextEditorStyledStringController* controller, bool* isEditing)

Description

Obtains the editing status of the text editor using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
bool* isEditingWhether the text editor is in the editing state. true means that the text editor is in the editing state, and false means the opposite.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_StopEditing()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_StopEditing(OH_ArkUI_TextEditorStyledStringController* controller)

Description

Exits the editing status of the text editor using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_GetPreviewText()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetPreviewText(OH_ArkUI_TextEditorStyledStringController* controller, uint32_t* offset, char* buffer, int32_t bufferSize, int32_t* writeLength)

Description

Obtains the preview text using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
uint32_t* offsetPointer to the preview text offset.
char* bufferPointer to the buffer for storing the preview text in the memory. You need to allocate the memory.
int32_t bufferSizeMaximum number of characters that can be written to the buffer.
int32_t* writeLengthPointer to the number of characters that are actually written to the buffer.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_GetCaretRect()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetCaretRect(OH_ArkUI_TextEditorStyledStringController* controller, ArkUI_Rect* rect)

Description

Obtains the caret-selected rectangle using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
ArkUI_Rect* rectPointer to the caret-selected rectangle information. The value is an enumerated value of ArkUI_Rect.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_DeleteBackward()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_DeleteBackward(OH_ArkUI_TextEditorStyledStringController* controller)

Description

Deletes characters using the styled string controller. If no content is selected, one character before the current caret position is deleted. If content is selected, the selected content is deleted.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_Create()

OH_ArkUI_TextEditorParagraphStyle* OH_ArkUI_TextEditorParagraphStyle_Create()

Description

Creates a paragraph style object for the text editor. When the object is no longer used, call OH_ArkUI_TextEditorParagraphStyle_Destroy to destroy it.

Since: 24

Returns

TypeDescription
OH_ArkUI_TextEditorParagraphStyle*Pointer to the OH_ArkUI_TextEditorParagraphStyle object.

OH_ArkUI_TextEditorParagraphStyle_Destroy()

void OH_ArkUI_TextEditorParagraphStyle_Destroy(OH_ArkUI_TextEditorParagraphStyle* style)

Description

Destroys the paragraph style object.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.

OH_ArkUI_TextEditorParagraphStyle_SetTextAlign()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetTextAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextAlignment align)

Description

Sets the text alignment mode in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
ArkUI_TextAlignment alignText alignment mode. The value is an enumerated value of ArkUI_TextAlignment.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_GetTextAlign()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetTextAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextAlignment* align)

Description

Obtains the text alignment mode in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
ArkUI_TextAlignment* alignPointer to the text alignment mode. The value is an enumerated value of ArkUI_TextAlignment.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginPixelMap()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginPixelMap(OH_ArkUI_TextEditorParagraphStyle* style, struct OH_PixelmapNative* pixelmap)

Description

Sets the PixelMap for paragraph indentation in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
struct OH_PixelmapNative* pixelmapPointer to the PixelMap for paragraph indentation.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginPixelMap()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginPixelMap(OH_ArkUI_TextEditorParagraphStyle* style, struct OH_PixelmapNative** pixelmap)

Description

Obtains the PixelMap for paragraph indentation in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
struct OH_PixelmapNative** pixelmapDouble pointer to the PixelMap for paragraph indentation.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginWidth()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginWidth(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t width)

Description

Sets the width for paragraph indentation in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
uint32_t widthWidth for paragraph indentation, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginWidth()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginWidth(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t* width)

Description

Obtains the width for paragraph indentation in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
uint32_t* widthPointer to the width for paragraph indentation, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginHeight()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginHeight(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t height)

Description

Sets the height for paragraph indentation in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
uint32_t heightHeight for paragraph indentation, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginHeight()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginHeight(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t* height)

Description

Obtains the height for paragraph indentation in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
uint32_t* heightPointer to the height for paragraph indentation, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_SetWordBreak()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetWordBreak(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_WordBreak wordBreak)

Description

Sets the word breaking mode in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
ArkUI_WordBreak wordBreakWord breaking mode. The value is an enumerated value of ArkUI_WordBreak.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_GetWordBreak()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetWordBreak(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_WordBreak* wordBreak)

Description

Obtains the word breaking mode in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
ArkUI_WordBreak* wordBreakPointer to the word breaking mode. The value is an enumerated value of ArkUI_WordBreak.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_SetLineBreakStrategy()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLineBreakStrategy(OH_ArkUI_TextEditorParagraphStyle* style, OH_ArkUI_LineBreakStrategy lineBreakStrategy)

Description

Sets the line breaking strategy in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
OH_ArkUI_LineBreakStrategy lineBreakStrategyLine breaking strategy. The value is an enumerated value of OH_ArkUI_LineBreakStrategy.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_GetLineBreakStrategy()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLineBreakStrategy(OH_ArkUI_TextEditorParagraphStyle* style, OH_ArkUI_LineBreakStrategy* lineBreakStrategy)

Description

Obtains the line breaking strategy in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
OH_ArkUI_LineBreakStrategy* lineBreakStrategyPointer to the line breaking strategy. The value is an enumerated value of OH_ArkUI_LineBreakStrategy.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_SetParagraphSpacing()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetParagraphSpacing(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t paragraphSpacing)

Description

Sets the paragraph spacing in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
uint32_t paragraphSpacingParagraph spacing, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_GetParagraphSpacing()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetParagraphSpacing(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t* paragraphSpacing)

Description

Obtains the paragraph spacing in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
uint32_t* paragraphSpacingPointer to the paragraph spacing, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_SetTextVerticalAlign()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetTextVerticalAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextVerticalAlignment verticalAlignment)

Description

Sets the text vertical alignment mode in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
ArkUI_TextVerticalAlignment verticalAlignmentText vertical alignment mode. The value is an enumerated value of ArkUI_TextVerticalAlignment.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_GetTextVerticalAlign()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetTextVerticalAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextVerticalAlignment* verticalAlignment)

Description

Obtains the text vertical alignment mode in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
ArkUI_TextVerticalAlignment* verticalAlignmentText vertical alignment mode. The value is an enumerated value of ArkUI_TextVerticalAlignment.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_SetTextDirection()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetTextDirection(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextDirection textDirection)

Description

Sets the text direction in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
ArkUI_TextDirection textDirectionText direction. The value is an enumerated value of ArkUI_TextDirection.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorParagraphStyle_GetTextDirection()

ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetTextDirection(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextDirection* textDirection)

Description

Obtains the text direction in the paragraph style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the OH_ArkUI_TextEditorParagraphStyle object.
ArkUI_TextDirection* textDirectionPointer to the text direction. The value is an enumerated value of ArkUI_TextDirection.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_SetTypingParagraphStyle()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetTypingParagraphStyle(OH_ArkUI_TextEditorStyledStringController* controller, OH_ArkUI_TextEditorParagraphStyle* style)

Description

Sets the typing paragraph style using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
OH_ArkUI_TextEditorParagraphStyle* stylePointer to the typing paragraph style.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_Create()

OH_ArkUI_ShadowOptions* OH_ArkUI_ShadowOptions_Create()

Description

Creates a shadow option object. When the object is no longer used, call OH_ArkUI_ShadowOptions_Destroy to destroy it.

Since: 24

Returns

TypeDescription
OH_ArkUI_ShadowOptions*Pointer to the OH_ArkUI_ShadowOptions object.

OH_ArkUI_ShadowOptions_Destroy()

void OH_ArkUI_ShadowOptions_Destroy(OH_ArkUI_ShadowOptions* options)

Description

Destroys the shadow option object.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.

OH_ArkUI_ShadowOptions_SetRadius()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetRadius(OH_ArkUI_ShadowOptions* options, float radius)

Description

Sets the blur radius for the shadow options.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
float radiusBlur radius of the shadow, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_GetRadius()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetRadius(OH_ArkUI_ShadowOptions* options, float* radius)

Description

Obtains the blur radius for the shadow options.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
float* radiusPointer to the blur radius of the shadow, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_SetType()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetType(OH_ArkUI_ShadowOptions* options, ArkUI_ShadowType type)

Description

Sets the shadow type for the shadow options.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
ArkUI_ShadowType typeShadow type (ArkUI_ShadowType).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_GetType()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetType(OH_ArkUI_ShadowOptions* options, ArkUI_ShadowType* type)

Description

Obtains the shadow type for the shadow options.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
ArkUI_ShadowType* typeShadow type (ArkUI_ShadowType).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_SetColor()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetColor(OH_ArkUI_ShadowOptions* options, uint32_t color)

Description

Sets the shadow color for the shadow options.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
uint32_t colorShadow color, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_GetColor()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetColor(OH_ArkUI_ShadowOptions* options, uint32_t* color)

Description

Obtains the shadow color for the shadow options.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
uint32_t* colorPointer to the shadow color, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_SetOffsetX()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetOffsetX(OH_ArkUI_ShadowOptions* options, float offsetX)

Description

Sets the shadow offset on the x-axis.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
float offsetXShadow offset on the x-axis, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_GetOffsetX()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetOffsetX(OH_ArkUI_ShadowOptions* options, float* offsetX)

Description

Obtains the shadow offset on the x-axis.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
float* offsetXPointer to the shadow offset on the x-axis, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_SetOffsetY()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetOffsetY(OH_ArkUI_ShadowOptions* options, float offsetY)

Description

Sets the shadow offset on the y-axis.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
float offsetYShadow offset on the y-axis, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_GetOffsetY()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetOffsetY(OH_ArkUI_ShadowOptions* options, float* offsetY)

Description

Obtains the shadow offset on the y-axis.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
float* offsetYPointer to the shadow offset on the y-axis, in vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_SetFill()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_SetFill(OH_ArkUI_ShadowOptions* options, bool isFill)

Description

Sets whether to fill a component with a shadow.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
bool isFillWhether to fill a component with a shadow. true means to fill a component with a shadow, and false means the opposite. The default value is false.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_ShadowOptions_GetFill()

ArkUI_ErrorCode OH_ArkUI_ShadowOptions_GetFill(OH_ArkUI_ShadowOptions* options, bool* isFill)

Description

Obtains whether a component is filled with a shadow.

Since: 24

Parameters

NameDescription
OH_ArkUI_ShadowOptions* optionsPointer to the OH_ArkUI_ShadowOptions object.
bool* isFillWhether a component is filled with a shadow. true means that a component is filled with a shadow, and false means the opposite.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_Create()

OH_ArkUI_TextEditorTextStyle* OH_ArkUI_TextEditorTextStyle_Create()

Description

Creates a text style object. When the object is no longer used, call OH_ArkUI_TextEditorTextStyle_Destroy to destroy it.

Since: 24

Returns

TypeDescription
OH_ArkUI_TextEditorTextStyle*Pointer to the OH_ArkUI_TextEditorTextStyle object.

OH_ArkUI_TextEditorTextStyle_Destroy()

void OH_ArkUI_TextEditorTextStyle_Destroy(OH_ArkUI_TextEditorTextStyle* style)

Description

Destroys the text style object.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the OH_ArkUI_TextEditorTextStyle object.

OH_ArkUI_TextEditorTextStyle_SetFontColor()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t color)

Description

Sets the font color of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
uint32_t colorFont color, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetFontColor()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t* color)

Description

Obtains the font color of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
uint32_t* colorPointer to the font color, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetFontSize()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontSize(OH_ArkUI_TextEditorTextStyle* style, float size)

Description

Sets the font size of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
float sizeFont size, in fp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetFontSize()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontSize(OH_ArkUI_TextEditorTextStyle* style, float* size)

Description

Obtains the font size of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
float* sizePointer to the font size, in fp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetFontStyle()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontStyle(OH_ArkUI_TextEditorTextStyle* style, ArkUI_FontStyle fontStyle)

Description

Sets the font style of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
ArkUI_FontStyle fontStyleFont style. The value is an enumerated value of ArkUI_FontStyle.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetFontStyle()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontStyle(OH_ArkUI_TextEditorTextStyle* style, ArkUI_FontStyle* fontStyle)

Description

Obtains the font style of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
ArkUI_FontStyle* fontStylePointer to the font style. The value is an enumerated value of ArkUI_FontStyle.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetFontWeight()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontWeight(OH_ArkUI_TextEditorTextStyle* style, uint32_t fontWeight)

Description

Sets the font weight of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
uint32_t fontWeightFont weight. The value is an integer multiple of 100 within the [100, 900] range, for example, 100 or 900.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetFontWeight()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontWeight(OH_ArkUI_TextEditorTextStyle* style, uint32_t* fontWeight)

Description

Obtains the font weight of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
uint32_t* fontWeightPointer to the font weight. The value is an integer multiple of 100 within the [100, 900] range, for example, 100 or 900.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetFontFamily()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontFamily(OH_ArkUI_TextEditorTextStyle* style, const char* fontFamily)

Description

Sets the font family of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
const char* fontFamilyPointer to the font family, containing the font names to be set. Different font names are separated by commas (,).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetFontFamily()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontFamily(OH_ArkUI_TextEditorTextStyle* style, char* buffer, int32_t bufferSize, int32_t* writeLength)

Description

Obtains the font family of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
char* bufferPointer to the buffer for storing the font family in the memory. You need to allocate the memory.
int32_t bufferSizeMaximum number of characters that can be written to the buffer.
int32_t* writeLengthPointer to the number of characters that are actually written to the buffer.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetDecoration()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetDecoration(OH_ArkUI_TextEditorTextStyle* style, OH_ArkUI_DecorationStyleOptions* options)

Description

Sets the text decoration options of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetDecoration()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetDecoration(OH_ArkUI_TextEditorTextStyle* style, OH_ArkUI_DecorationStyleOptions* options)

Description

Obtains the text decoration options of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
OH_ArkUI_DecorationStyleOptions* optionsPointer to the OH_ArkUI_DecorationStyleOptions object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetTextShadows()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetTextShadows(OH_ArkUI_TextEditorTextStyle* style, const OH_ArkUI_ShadowOptions** options, int32_t length)

Description

Sets the text shadow options of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
const OH_ArkUI_ShadowOptions** optionsDouble pointer to the text shadow options.
int32_t lengthLength of the text shadow options.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetTextShadows()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetTextShadows(OH_ArkUI_TextEditorTextStyle* style, OH_ArkUI_ShadowOptions** shadowOptions, uint32_t shadowOptionsSize, uint32_t* writeLength)

Description

Obtains the text shadow options of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
OH_ArkUI_ShadowOptions** shadowOptionsDouble pointer to the text shadow options.
uint32_t shadowOptionsSizeSize of the shadow option buffer.
uint32_t* writeLengthPointer to the number of actual text shadow options in the text style.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetLineHeight()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetLineHeight(OH_ArkUI_TextEditorTextStyle* style, int32_t lineHeight)

Description

Sets the line height of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
int32_t lineHeightLine height.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetLineHeight()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetLineHeight(OH_ArkUI_TextEditorTextStyle* style, int32_t* lineHeight)

Description

Obtains the line height of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
int32_t* lineHeightPointer to the line height.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetLetterSpacing()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetLetterSpacing(OH_ArkUI_TextEditorTextStyle* style, int32_t letterSpacing)

Description

Sets the letter spacing of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
int32_t letterSpacingLetter spacing.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetLetterSpacing()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetLetterSpacing(OH_ArkUI_TextEditorTextStyle* style, int32_t* letterSpacing)

Description

Obtains the letter spacing of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
int32_t* letterSpacingPointer to the letter spacing.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetFontFeature()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontFeature(OH_ArkUI_TextEditorTextStyle* style, const char* fontFeature)

Description

Sets the font feature of the text style, such as monospaced digits.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
const char* fontFeaturePointer to the font features, containing font features to be set. Multiple features are separated by commas (,).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetFontFeature()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontFeature(OH_ArkUI_TextEditorTextStyle* style, char* buffer, int32_t bufferSize, int32_t* writeLength)

Description

Obtains the font feature of the text style, such as monospaced digits.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
char* bufferPointer to the buffer for storing the font features in the memory. You need to allocate the memory.
int32_t bufferSizeMaximum number of characters that can be written to the buffer.
int32_t* writeLengthPointer to the number of characters that are actually written to the buffer.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetHalfLeading()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetHalfLeading(OH_ArkUI_TextEditorTextStyle* style, bool halfLeading)

Description

Sets whether to evenly distribute the line spacing to the top and bottom of each line in the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
bool halfLeadingWhether to enable half leading.
true means to enable, and false means the opposite. The default value is false.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetHalfLeading()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetHalfLeading(OH_ArkUI_TextEditorTextStyle* style, bool* halfLeading)

Description

Obtains whether the line spacing is evenly distributed to the top and bottom of each line in the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
bool* halfLeadingWhether half leading is enabled.
true means half leading is enabled, and false means the opposite. The default value is false.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetTextBackgroundColor()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetTextBackgroundColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t color)

Description

Sets the text background color of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
uint32_t colorText background color, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetTextBackgroundColor()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetTextBackgroundColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t* color)

Description

Obtains the text background color of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
uint32_t* colorPointer to the text background color, in 0xARGB format.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_SetTextBackgroundRadius()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetTextBackgroundRadius(OH_ArkUI_TextEditorTextStyle* style, float topLeft, float topRight, float bottomLeft, float bottomRight)

Description

Sets the radius of the rounded corner of the text background of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
float topLeftRadius of the rounded corner in the upper left corner of the text background. The unit is vp.
float topRightRadius of the rounded corner in the upper right corner of the text background. The unit is vp.
float bottomLeftRadius of the rounded corner in the lower left corner of the text background. The unit is vp.
float bottomRightRadius of the rounded corner in the lower right corner of the text background. The unit is vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorTextStyle_GetTextBackgroundRadius()

ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetTextBackgroundRadius(OH_ArkUI_TextEditorTextStyle* style, float* topLeft, float* topRight, float* bottomLeft, float* bottomRight)

Description

Obtains the radius of the rounded corner of the text background of the text style.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorTextStyle* stylePointer to the text style of the TextEditor component.
float* topLeftPointer to the radius of the rounded corner in the upper left corner of the text background. The unit is vp.
float* topRightPointer to the radius of the rounded corner in the upper right corner of the text background. The unit is vp.
float* bottomLeftPointer to the radius of the rounded corner in the lower left corner of the text background. The unit is vp.
float* bottomRightPointer to the radius of the rounded corner in the lower right corner of the text background. The unit is vp.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_SetTypingStyle()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetTypingStyle(OH_ArkUI_TextEditorStyledStringController* controller, OH_ArkUI_TextEditorTextStyle* style)

Description

Sets the typing style using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
OH_ArkUI_TextEditorTextStyle* stylePointer to the typing style.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_GetTypingStyle()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetTypingStyle(OH_ArkUI_TextEditorStyledStringController* controller, OH_ArkUI_TextEditorTextStyle* style)

Description

Obtains the typing style using the styled string controller.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
OH_ArkUI_TextEditorTextStyle* stylePointer to the typing style.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_Create()

OH_ArkUI_TextEditorSelectionMenuOptions* OH_ArkUI_TextEditorSelectionMenuOptions_Create()

Description

Creates a text selection menu option object of the text editor. When the object is no longer used, call OH_ArkUI_TextEditorSelectionMenuOptions_Destroy to destroy it.

Since: 24

Returns

TypeDescription
OH_ArkUI_TextEditorSelectionMenuOptions*Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.

OH_ArkUI_TextEditorSelectionMenuOptions_Destroy()

void OH_ArkUI_TextEditorSelectionMenuOptions_Destroy(OH_ArkUI_TextEditorSelectionMenuOptions* options)

Description

Destroys the text selection menu option object of the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.

OH_ArkUI_TextEditorSelectionMenuOptions_SetSpanType()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetSpanType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorSpanType textEditorSpanType)

Description

Sets the span type of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
OH_ArkUI_TextEditorSpanType textEditorSpanTypeSpan type. The value is an enumerated value of OH_ArkUI_TextEditorSpanType.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_GetSpanType()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetSpanType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorSpanType* textEditorSpanType)

Description

Obtains the span type of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
OH_ArkUI_TextEditorSpanType* textEditorSpanTypePointer to the span type. The value is an enumerated value of OH_ArkUI_TextEditorSpanType.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_SetContentNode()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetContentNode(OH_ArkUI_TextEditorSelectionMenuOptions* options, ArkUI_NodeHandle node)

Description

Sets the content node of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
ArkUI_NodeHandle nodeContent node.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_GetContentNode()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetContentNode(OH_ArkUI_TextEditorSelectionMenuOptions* options, ArkUI_NodeHandle* node)

Description

Obtains the content node of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
ArkUI_NodeHandle* nodePointer to the content node.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_SetResponseType()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetResponseType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorResponseType responseType)

Description

Sets the response type of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
OH_ArkUI_TextEditorResponseType responseTypeResponse type. The value is an enumerated value of OH_ArkUI_TextEditorResponseType.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_GetResponseType()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetResponseType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorResponseType* responseType)

Description

Obtains the response type of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
OH_ArkUI_TextEditorResponseType* responseTypePointer to the response type. The value is an enumerated value of OH_ArkUI_TextEditorResponseType.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_SetMenuType()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetMenuType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextMenuType menuType)

Description

Sets the type of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
OH_ArkUI_TextMenuType menuTypeMenu type. The value is an enumerated value of OH_ArkUI_TextMenuType.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_GetMenuType()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetMenuType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextMenuType* menuType)

Description

Obtains the type of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
OH_ArkUI_TextMenuType* menuTypePointer to the menu type. The value is an enumerated value of OH_ArkUI_TextMenuType.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuShowCallback()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuShowCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(int32_t start, int32_t end, void* callbackUserData))

Description

Sets the callback triggered when the text selection menu is displayed.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
void* userDataPointer to the user data.
void (*callback)(int32_t startPointer to the callback when the menu is displayed. start indicates the start offset of the selected content. end indicates the end offset of the selected content. callbackUserData indicates the user data.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuHideCallback()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuHideCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(int32_t start, int32_t end, void* callbackUserData))

Description

Sets the callback triggered when the text selection menu is hidden.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
void* userDataPointer to the user data.
void (*callback)(int32_t startPointer to the callback when the menu is hidden. start indicates the start offset of the selected content. end indicates the end offset of the selected content. callbackUserData indicates the user data.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuAppearCallback()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuAppearCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(int32_t start, int32_t end, void* callbackUserData))

Description

Sets the callback triggered when the text selection menu appears.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
void* userDataPointer to the user data.
void (*callback)(int32_t startPointer to the callback when the menu appears. start indicates the start offset of the selected content. end indicates the end offset of the selected content. callbackUserData indicates the user data.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuDisappearCallback()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuDisappearCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(void* callbackUserData))

Description

Sets the callback triggered when the text selection menu disappears.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
void* userDataPointer to the user data.
void (*callback)(void* callbackUserData)Pointer to the callback when the menu disappears. callbackUserData indicates the user data.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_SetHapticFeedbackMode()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetHapticFeedbackMode(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_HapticFeedbackMode mode)

Description

Sets the haptic feedback mode of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
OH_ArkUI_HapticFeedbackMode modeHaptic feedback mode. The value is an enumerated value of OH_ArkUI_HapticFeedbackMode.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorSelectionMenuOptions_GetHapticFeedbackMode()

ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetHapticFeedbackMode(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_HapticFeedbackMode* mode)

Description

Obtains the haptic feedback mode of the text selection menu in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorSelectionMenuOptions* optionsPointer to the OH_ArkUI_TextEditorSelectionMenuOptions object.
OH_ArkUI_HapticFeedbackMode* modePointer to the haptic feedback mode. The value is an enumerated value of OH_ArkUI_HapticFeedbackMode.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_CloseSelectionMenu()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_CloseSelectionMenu(OH_ArkUI_TextEditorStyledStringController* controller)

Description

Closes the text selection menu of the styled string controller in the text editor.

Since: 24

Parameters

NameDescription
OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_GetSelection()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetSelection(const OH_ArkUI_TextEditorStyledStringController* controller, uint32_t* start, uint32_t* end)

Description

Obtains the selected area using the styled string controller.

Since: 24

Parameters

NameDescription
const OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
uint32_t* startPointer to the start position of the selected area.
uint32_t* endPointer to the end position of the selected area.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_SetStyledString()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetStyledString(const OH_ArkUI_TextEditorStyledStringController* controller, const ArkUI_StyledString_Descriptor* descriptor)

Description

Sets the styled string displayed using the styled string controller.

Since: 24

Parameters

NameDescription
const OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
const ArkUI_StyledString_Descriptor* descriptorPointer to the ArkUI_StyledString_Descriptor object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_GetStyledString()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetStyledString(const OH_ArkUI_TextEditorStyledStringController* controller, ArkUI_StyledString_Descriptor* descriptor)

Description

Obtains the styled string displayed using the styled string controller.

Since: 24

Parameters

NameDescription
const OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
ArkUI_StyledString_Descriptor* descriptorPointer to the ArkUI_StyledString_Descriptor object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_TextEditorStyledStringController_SetStyledPlaceholder()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetStyledPlaceholder(const OH_ArkUI_TextEditorStyledStringController* controller, const ArkUI_StyledString_Descriptor* descriptor)

Description

Sets the placeholder text in the styled string style using the styled string controller.

Since: 24

Parameters

NameDescription
const OH_ArkUI_TextEditorStyledStringController* controllerPointer to the OH_ArkUI_TextEditorStyledStringController object.
const ArkUI_StyledString_Descriptor* descriptorPointer to the ArkUI_StyledString_Descriptor object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_Create()

ArkUI_Matrix4ScaleOptions* OH_ArkUI_Matrix4ScaleOptions_Create()

Description

Creates a pointer to the scaling parameter object for matrix operations. In the newly created object, the default scaling coefficients in the x, y, and z directions are 1. The default values of centerX and centerY of the transformation center point are 0.

Since: 24

Returns

TypeDescription
ArkUI_Matrix4ScaleOptions*Pointer to the new ArkUI_Matrix4ScaleOptions object.

OH_ArkUI_Matrix4ScaleOptions_Dispose()

void OH_ArkUI_Matrix4ScaleOptions_Dispose(ArkUI_Matrix4ScaleOptions* options)

Description

Disposes of the pointer to the scaling parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4ScaleOptions* optionsPointer to the ArkUI_Matrix4ScaleOptions object to be destroyed.

OH_ArkUI_Matrix4ScaleOptions_SetX()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetX(ArkUI_Matrix4ScaleOptions* options, const float scaleX)

Description

Sets the scaling factor in the x direction of the scaling parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
const float scaleXScaling factor in the x direction. The value range is (-∞, +∞).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_GetX()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetX(const ArkUI_Matrix4ScaleOptions* options, float* scaleX)

Description

Obtains the scaling factor in the x direction of the scaling parameter object for matrix operations. If the value of x is not set, the default value of the scaling factor in the x direction is 1.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
float* scaleXPointer to the scaling factor in the x direction.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_SetY()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetY(ArkUI_Matrix4ScaleOptions* options, const float scaleY)

Description

Sets the scaling factor in the y direction of the scaling parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
const float scaleYScaling factor in the y direction. The value range is (-∞, +∞).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_GetY()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetY(const ArkUI_Matrix4ScaleOptions* options, float* scaleY)

Description

Obtains the scaling factor in the y direction of the scaling parameter object for matrix operations. If the value of y is not set, the default value of the scaling factor in the y direction is 1.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
float* scaleYPointer to the scaling factor in the y direction.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_SetZ()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetZ(ArkUI_Matrix4ScaleOptions* options, const float scaleZ)

Description

Sets the scaling factor in the z direction of the scaling parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
const float scaleZScaling factor in the z direction. The value range is (-∞, +∞).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_GetZ()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetZ(const ArkUI_Matrix4ScaleOptions* options, float* scaleZ)

Description

Obtains the scaling factor in the z direction of the scaling parameter object for matrix operations. If the value of z is not set, the default value of the scaling factor in the z direction is 1.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
float* scaleZPointer to the scaling factor in the z direction.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_SetCenterX()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetCenterX(ArkUI_Matrix4ScaleOptions* options, const float centerX)

Description

Sets the x coordinate of the transformation center point of the scaling parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
const float centerXX-coordinate of the transformation center point. The value range is (-∞, +∞). 0 indicates that there is no x-axis offset based on the transformation center. The unit is px.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_GetCenterX()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetCenterX(const ArkUI_Matrix4ScaleOptions* options, float* centerX)

Description

Obtains the x coordinate of the transformation center point of the scaling parameter object for matrix operations.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
float* centerXPointer to the X-coordinate of the transformation center point. The unit is px. The default value is 0.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_SetCenterY()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_SetCenterY(ArkUI_Matrix4ScaleOptions* options, const float centerY)

Description

Sets the y coordinate of the transformation center point of the scaling parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
const float centerYY-coordinate of the transformation center point. The value range is (-∞, +∞). 0 indicates that there is no y-axis offset based on the transformation center. The unit is px.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4ScaleOptions_GetCenterY()

ArkUI_ErrorCode OH_ArkUI_Matrix4ScaleOptions_GetCenterY(const ArkUI_Matrix4ScaleOptions* options, float* centerY)

Description

Obtains the y coordinate of the transformation center point of the scaling parameter object for matrix operations.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4ScaleOptions* optionsPointer to the scaling parameter object for matrix operations.
float* centerYPointer to the Y-coordinate of the transformation center point. The unit is px. The default value is 0.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_Create()

ArkUI_Matrix4RotationOptions* OH_ArkUI_Matrix4RotationOptions_Create()

Description

Creates a pointer to the rotation parameter object for matrix operations. In the newly created object, the default value of an x-axis offset (centerX) of a single matrix transformation center point relative to a component transformation center point, the default value of a y-axis offset (centerY) of the single matrix transformation center point relative to the component transformation center point, and the default value of a rotation angle (angle) are 0. If none of the direction vectors in the x, y, and z directions is specified, the value is equivalent to x=0, y=0, and z=1, indicating rotation around the z-axis. Once any of the direction vectors in the x, y, and z directions is specified, the unspecified values are equivalent to 0.

Since: 24

Returns

TypeDescription
ArkUI_Matrix4RotationOptions*Pointer to the new ArkUI_Matrix4RotationOptions object.

OH_ArkUI_Matrix4RotationOptions_Dispose()

void OH_ArkUI_Matrix4RotationOptions_Dispose(ArkUI_Matrix4RotationOptions* options)

Description

Disposes of the pointer to the rotation parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.

OH_ArkUI_Matrix4RotationOptions_SetX()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetX(ArkUI_Matrix4RotationOptions* options, const float x)

Description

Sets the direction vector in the x direction of the rotation parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
const float xValue of the direction vector in the x direction. The value range is (-∞, +∞).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_GetX()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetX(const ArkUI_Matrix4RotationOptions* options, float* x)

Description

Obtains the direction vector in the x direction of the rotation parameter object for matrix operations. If the value of x has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
float* xPointer to the value of the direction vector in the x direction. If the value of x has never been set, the value is undefined.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_SetY()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetY(ArkUI_Matrix4RotationOptions* options, const float y)

Description

Sets the direction vector in the y direction of the rotation parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
const float yValue of the direction vector in the y direction. The value range is (-∞, +∞).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_GetY()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetY(const ArkUI_Matrix4RotationOptions* options, float* y)

Description

Obtains the direction vector in the y direction of the rotation parameter object for matrix operations. If the value of y has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
float* yPointer to the value of the direction vector in the y direction. If the value of y has never been set, the value is undefined.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_SetZ()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetZ(ArkUI_Matrix4RotationOptions* options, const float z)

Description

Sets the direction vector in the z direction of the rotation parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
const float zValue of the direction vector in the z direction. The value range is (-∞, +∞).

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_GetZ()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetZ(const ArkUI_Matrix4RotationOptions* options, float* z)

Description

Obtains the direction vector in the z direction of the rotation parameter object for matrix operations. If the value of z has never been set, the value is undefined. In this case, ARKUI_ERROR_CODE_PARAM_INVALID is returned.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
float* zPointer to the value of the direction vector in the z direction. If the value of z has never been set, the value is undefined.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_SetAngle()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetAngle(ArkUI_Matrix4RotationOptions* options, const float angle)

Description

Sets the rotation angle in the rotation parameter object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
const float angleValue of the rotation angle. The value range is (-∞, +∞). The unit is degree.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_GetAngle()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetAngle(const ArkUI_Matrix4RotationOptions* options, float* angle)

Description

Obtains the rotation angle in the rotation parameter object for matrix operations.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
float* anglePointer to the value of the rotation angle. The unit is degree. If the angle has never been set, the default value is 0.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_SetCenterX()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetCenterX(ArkUI_Matrix4RotationOptions* options, const float centerX)

Description

Sets the x-axis offset of a single matrix transformation center point relative to a component transformation center point.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
const float centerXX-axis offset of a single matrix transformation center point relative to a component transformation center point. The value range is (-∞, +∞). 0 indicates that there is no x-axis offset based on the transformation center. The unit is px.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_GetCenterX()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetCenterX(const ArkUI_Matrix4RotationOptions* options, float* centerX)

Description

Obtains the x-axis offset of a single matrix transformation center point relative to a component transformation center point.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
float* centerXPointer to the x-axis offset of a single matrix transformation center point relative to a component transformation center point. The unit is px. If centerX has never been set, the default value is 0.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_SetCenterY()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_SetCenterY(ArkUI_Matrix4RotationOptions* options, const float centerY)

Description

Sets the y-axis offset of a single matrix transformation center point relative to a component transformation center point.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
const float centerYY-axis offset of a single matrix transformation center point relative to a component transformation center point. The value range is (-∞, +∞). 0 indicates that there is no y-axis offset based on the transformation center. The unit is px.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4RotationOptions_GetCenterY()

ArkUI_ErrorCode OH_ArkUI_Matrix4RotationOptions_GetCenterY(const ArkUI_Matrix4RotationOptions* options, float* centerY)

Description

Obtains the y-axis offset of a single matrix transformation center point relative to a component transformation center point.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4RotationOptions* optionsPointer to the rotation parameter object for matrix operations.
float* centerYPointer to the y-axis offset of a single matrix transformation center point relative to a component transformation center point. The unit is px. If centerY has never been set, the default value is 0.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4TranslationOptions_Create()

ArkUI_Matrix4TranslationOptions* OH_ArkUI_Matrix4TranslationOptions_Create();

Description

Creates a pointer to a translation object for matrix operations. In the newly created object, the default translation distances on the x, y, and z axes are 0.

Since: 24

Returns

TypeDescription
ArkUI_Matrix4TranslationOptions*Pointer to the new ArkUI_Matrix4TranslationOptions object.

OH_ArkUI_Matrix4TranslationOptions_Dispose()

void OH_ArkUI_Matrix4TranslationOptions_Dispose(ArkUI_Matrix4TranslationOptions* options)

Description

Disposes of a pointer to a translation object for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4TranslationOptions* optionsPointer to the ArkUI_Matrix4TranslationOptions object to be disposed.

OH_ArkUI_Matrix4TranslationOptions_SetX()

ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetX(ArkUI_Matrix4TranslationOptions* options, const float x)

Description

Sets the translation value of a translation object on the x-axis for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4TranslationOptions* optionsPointer to the translation parameter object for matrix operations.
const float xTranslation value on the x-axis. The value range is (-∞, +∞). The unit is px. If the value of x has never been set, the default value is 0.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4TranslationOptions_GetX()

ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetX(const ArkUI_Matrix4TranslationOptions* options, float* x)

Description

Obtains the translation value of a translation object on the x-axis for matrix operations.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4TranslationOptions* optionsPointer to the translation parameter object for matrix operations.
float* xPointer to the translation value on the x-axis.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4TranslationOptions_SetY()

ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetY(ArkUI_Matrix4TranslationOptions* options, const float y);

Description

Sets the translation value of a translation object on the y-axis for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4TranslationOptions* optionsPointer to the translation parameter object for matrix operations.
const float yTranslation value on the y-axis. The value range is (-∞, +∞). The unit is px. If the value of y has never been set, the default value is 0.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4TranslationOptions_GetY()

ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetY(const ArkUI_Matrix4TranslationOptions* options, float* y)

Description

Obtains the translation value of a translation object on the y-axis for matrix operations.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4TranslationOptions* optionsPointer to the translation parameter object for matrix operations.
float* yPointer to the translation value on the y-axis.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4TranslationOptions_SetZ()

ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_SetZ(ArkUI_Matrix4TranslationOptions* options, const float z)

Description

Sets the translation value of a translation object on the z-axis for matrix operations.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4TranslationOptions* optionsPointer to the translation parameter object for matrix operations.
const float zTranslation value on the z-axis. The value range is (-∞, +∞). The unit is px. If the value of z has never been set, the default value is 0.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4TranslationOptions_GetZ()

ArkUI_ErrorCode OH_ArkUI_Matrix4TranslationOptions_GetZ(const ArkUI_Matrix4TranslationOptions* options, float* z)

Description

Obtains the translation value of a translation object on the z-axis for matrix operations.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4TranslationOptions* optionsPointer to the translation parameter object for matrix operations.
float* zPointer to the translation value on the z-axis.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4_CreateIdentity()

ArkUI_Matrix4* OH_ArkUI_Matrix4_CreateIdentity()

Description

Creates a fourth-order identity matrix object.

Since: 24

Returns

TypeDescription
ArkUI_Matrix4*Pointer to the created fourth-order identity matrix object.

OH_ArkUI_Matrix4_CreateByElements()

ArkUI_Matrix4* OH_ArkUI_Matrix4_CreateByElements(const float* elements)

Description

Creates a fourth-order matrix object by specifying each element of the matrix.

Since: 24

Parameters

NameDescription
const float* elementsPointer to the array of expected matrix element data. The array length must be greater than or equal to 16. This parameter cannot be set to a null pointer.

Returns

TypeDescription
ArkUI_Matrix4*Pointer to the created fourth-order matrix object. If the elements pointer is a null pointer, a null value is returned.

OH_ArkUI_Matrix4_Dispose()

void OH_ArkUI_Matrix4_Dispose(ArkUI_Matrix4* matrix)

Description

Disposes of the pointer to the matrix object.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4* matrixPointer to the fourth-order matrix object to be disposed.

OH_ArkUI_Matrix4_Copy()

ArkUI_Matrix4* OH_ArkUI_Matrix4_Copy(const ArkUI_Matrix4* matrix)

Description

Creates a copy of a fourth-order matrix object. Performs operations on the same matrix to obtain different matrix objects.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4* matrixPointer to the original fourth-order matrix object.

Returns

TypeDescription
ArkUI_Matrix4*Pointer to the created fourth-order matrix object.

OH_ArkUI_Matrix4_Invert()

ArkUI_ErrorCode OH_ArkUI_Matrix4_Invert(ArkUI_Matrix4* matrix)

Description

Performs inverse matrix transformation on an input matrix.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4* matrixPointer to the fourth-order matrix object for which inverse matrix transformation is to be performed.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4_Combine()

ArkUI_ErrorCode OH_ArkUI_Matrix4_Combine(ArkUI_Matrix4* oriMatrix, const ArkUI_Matrix4* anotherMatrix)

Description

Combines another matrix with the original matrix and stores the result matrix in oriMatrix. In this case, the result matrix applies the transformation of oriMatrix and then applies the transformation of anotherMatrix. This function will modify the oriMatrix object.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4* oriMatrixPointer to the original fourth-order matrix object.
const ArkUI_Matrix4* anotherMatrixPointer to another matrix object to be merged.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4_Translate()

ArkUI_ErrorCode OH_ArkUI_Matrix4_Translate(ArkUI_Matrix4* matrix, const ArkUI_Matrix4TranslationOptions* translate)

Description

Applies translation transformation to the original matrix to obtain the translated matrix. Each translation transformation is accumulated on the previous matrix. The input matrix object will be modified after the transformation.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4* matrixPointer to the fourth-order matrix object to be translated.
const ArkUI_Matrix4TranslationOptions* translatePointer to the translation object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4_Scale()

ArkUI_ErrorCode OH_ArkUI_Matrix4_Scale(ArkUI_Matrix4* matrix, const ArkUI_Matrix4ScaleOptions* scale)

Description

Applies scaling transformation to the original matrix to obtain the scaled matrix. Each scaling transformation is accumulated on the previous matrix. This function will modify the input matrix object.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4* matrixPointer to the fourth-order matrix object to be scaled.
const ArkUI_Matrix4ScaleOptions* scalePointer to the scaling object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4_Rotate()

ArkUI_ErrorCode OH_ArkUI_Matrix4_Rotate(ArkUI_Matrix4* matrix, const ArkUI_Matrix4RotationOptions* rotate)

Description

Applies rotation transformation to the original matrix to obtain the rotated matrix. Each rotation transformation is accumulated on the previous matrix. This function will modify the input matrix object.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4* matrixPointer to the fourth-order matrix object to be rotated.
const ArkUI_Matrix4RotationOptions* rotatePointer to the rotation object.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4_Skew()

ArkUI_ErrorCode OH_ArkUI_Matrix4_Skew(ArkUI_Matrix4* matrix, const float skewX, const float skewY)

Description

Applies skew transformation to the original matrix to obtain the skewed matrix. Each skew transformation is accumulated on the previous matrix. The input matrix object will be modified after the transformation.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4* matrixPointer to the fourth-order matrix object to be skewed.
const float skewXSkew coefficient in the x direction.
const float skewYSkew coefficient in the y direction.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4_TransformPoint()

ArkUI_ErrorCode OH_ArkUI_Matrix4_TransformPoint(const ArkUI_Matrix4* matrix, const ArkUI_PointF* oriPoint, ArkUI_PointF* result)

Description

Calculates the new coordinates of a point after matrix transformation.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4* matrixPointer to the fourth-order matrix object.
const ArkUI_PointF* oriPointPointer to the original coordinate point.
ArkUI_PointF* resultPointer to the result point. The value cannot be null.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4_SetPolyToPoly()

ArkUI_ErrorCode OH_ArkUI_Matrix4_SetPolyToPoly(ArkUI_Matrix4* matrix, const ArkUI_PointF* src, const ArkUI_PointF* dst, const uint32_t pointCount)

Description

Maps the vertex coordinates of a polygon to those of another polygon and calculates the required matrix.

Since: 24

Parameters

NameDescription
ArkUI_Matrix4* matrixPointer to the fourth-order matrix object, which is used to store the result matrix.
const ArkUI_PointF* srcPointer to the coordinate point array of the original polygon. The array length must be at least the value of pointCount.
const ArkUI_PointF* dstPointer to the coordinate point array of the mapped polygon. The array length must be at least the value of pointCount.
const uint32_t pointCountNumber of polygon points. The value must be 0, 1, 2, 3, or 4.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_Matrix4_GetElements()

ArkUI_ErrorCode OH_ArkUI_Matrix4_GetElements(const ArkUI_Matrix4* matrix, float* result)

Description

Obtains the 16 elements of a fourth-order matrix.

Since: 24

Parameters

NameDescription
const ArkUI_Matrix4* matrixPointer to the fourth-order matrix object.
float* resultPointer to the array of 16 floating-point numbers. The value cannot be null.

Returns

TypeDescription
ArkUI_ErrorCodeResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_MotionPathOptions_Create()

ArkUI_MotionPathOptions* OH_ArkUI_MotionPathOptions_Create()

Description

Create a motion path option for path animation.

Since: 23

Returns

TypeDescription
ArkUI_MotionPathOptions*Pointer to ArkUI_MotionPathOptions.
In the newly created ArkUI_MotionPathOptions object, path (motion path) is an empty string, from (start progress) is 0, to (end progress) is 1, and rotatable (whether the component rotates along the path) is false.

OH_ArkUI_MotionPathOptions_Dispose()

void OH_ArkUI_MotionPathOptions_Dispose(ArkUI_MotionPathOptions* options)

Description

Destroys a motion path option of path animation.

Since: 23

Parameters

NameDescription
ArkUI_MotionPathOptions* optionsPointer to ArkUI_MotionPathOptions.

OH_ArkUI_MotionPathOptions_SetPath()

ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetPath(ArkUI_MotionPathOptions* options, const char* svgPath)

Description

Sets the motion path of path animation.

Since: 23

Parameters

NameDescription
ArkUI_MotionPathOptions* optionsPointer to ArkUI_MotionPathOptions.
const char* svgPathPointer to the motion path string of path animation.
The path supports "start" and "end" as placeholders for the start and end points, for example, "Mstart.x start.y L50 50 Lend.x end.y Z". For details about the path string format, see Path Drawing. Setting this to an empty string is equivalent to not setting a motion path.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_MotionPathOptions_GetPath()

ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetPath(const ArkUI_MotionPathOptions* options, char* svgPathBuffer, const int32_t bufferSize, int32_t* writeLength)

Description

Obtains the motion path string stored in the motion path configuration item of the path animation.

Since: 23

Parameters

NameDescription
const ArkUI_MotionPathOptions* optionsPointer to ArkUI_MotionPathOptions.
char* svgPathBufferPointer to the buffer for storing the motion path string.
const int32_t bufferSizeSize of the buffer that the svgPathBuffer parameter points to.
int32_t* writeLengthPointer to the length of the string actually written to the buffer if ARKUI_ERROR_CODE_NO_ERROR is returned.
When ARKUI_ERROR_CODE_PARAM_INVALID is returned due to an input parameter error, writeLength is not assigned. If the error is due to a copy exception, writeLength indicates the minimum buffer size required to hold the target string.
When ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR is returned, it indicates the minimum buffer size required to hold the target string.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR if the buffer size is insufficient.

OH_ArkUI_MotionPathOptions_SetFrom()

ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetFrom(ArkUI_MotionPathOptions* options, const float from)

Description

Sets the start progress of the path animation. The progress refers to the ratio of the distance already moved along the path to the total path length.

Since: 23

Parameters

NameDescription
ArkUI_MotionPathOptions* optionsPointer to ArkUI_MotionPathOptions.
const float fromStart progress of the path animation, ranging from 0.0 to 1.0. This value must be less than or equal to the end progress specified by to. Otherwise, the error ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE will be returned.
For details about to, see OH_ArkUI_MotionPathOptions_SetTo.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the value of from out of the range of [0.0, 1.0], or is greater than the value of to.

OH_ArkUI_MotionPathOptions_GetFrom()

ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetFrom(const ArkUI_MotionPathOptions* options, float* from)

Description

Obtains the start progress of the path animation.

Since: 23

Parameters

NameDescription
const ArkUI_MotionPathOptions* optionsPointer to ArkUI_MotionPathOptions.
float* fromPointer to the start progress in ArkUI_MotionPathOptions.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_MotionPathOptions_SetTo()

ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetTo(ArkUI_MotionPathOptions* options, const float to)

Description

Sets the end progress of the path animation. The progress refers to the ratio of the distance already moved along the path to the total path length.

Since: 23

Parameters

NameDescription
ArkUI_MotionPathOptions* optionsPointer to ArkUI_MotionPathOptions.
const float toEnd progress of the path animation, ranging from 0.0 to 1.0. This value must be greater than or equal to the start progress specified by from. Otherwise, the error ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE will be returned.
For details about the meaning of from, see OH_ArkUI_MotionPathOptions_SetFrom.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
Returns ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE if the value of to out of the range of [0.0, 1.0], or is less than the value of from.

OH_ArkUI_MotionPathOptions_GetTo()

ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetTo(const ArkUI_MotionPathOptions* options, float* to)

Description

Obtains the end progress of the path animation.

Since: 23

Parameters

NameDescription
const ArkUI_MotionPathOptions* optionsPointer to ArkUI_MotionPathOptions.
float* toPointer to the end progress in ArkUI_MotionPathOptions.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_MotionPathOptions_SetRotatable()

ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_SetRotatable(ArkUI_MotionPathOptions* options, const bool rotatable)

Description

Sets whether a component rotates along the motion path.

Since: 23

Parameters

NameDescription
ArkUI_MotionPathOptions* optionsPointer to ArkUI_MotionPathOptions.
const bool rotatableWhether the component rotates along the path. true: The component rotates along the path. false: The component does not rotate along the path. The default value is false.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_MotionPathOptions_GetRotatable()

ArkUI_ErrorCode OH_ArkUI_MotionPathOptions_GetRotatable(const ArkUI_MotionPathOptions* options, bool* rotatable)

Description

Obtains whether a component rotates along the motion path.

Since: 23

Parameters

NameDescription
const ArkUI_MotionPathOptions* optionsPointer to ArkUI_MotionPathOptions.
bool* rotatablePointer to the rotatable parameter value in ArkUI_MotionPathOptions, indicating whether the component rotates along the path.
true: The component rotates along the path. false: The component does not rotate along the path.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_PickerIndicatorStyle_Create()

ArkUI_PickerIndicatorStyle* OH_ArkUI_PickerIndicatorStyle_Create(ArkUI_PickerIndicatorType type)

Description

Creates a style instance of the selected item indicator.

Since: 23

Parameters

NameDescription
ArkUI_PickerIndicatorType typeType of the selected item indicator.

Returns

TypeDescription
ArkUI_PickerIndicatorStyle*Pointer to the ArkUI_PickerIndicatorStyle instance. If a null pointer is returned, the creation fails. The possible cause is that the address space is full or the type is not supported.

OH_ArkUI_PickerIndicatorStyle_Dispose()

void OH_ArkUI_PickerIndicatorStyle_Dispose(ArkUI_PickerIndicatorStyle* style)

Description

Disposes of the style instance of the selected item indicator.

Since: 23

Parameters

NameDescription
ArkUI_PickerIndicatorStyle* stylePointer to the ArkUI_PickerIndicatorStyle instance to be disposed of.

OH_ArkUI_PickerIndicatorStyle_ConfigureBackground()

ArkUI_ErrorCode OH_ArkUI_PickerIndicatorStyle_ConfigureBackground(ArkUI_PickerIndicatorStyle* style, ArkUI_PickerIndicatorBackground* background)

Description

Sets the background style parameters. This API takes effect only when the type of the selected item indicator is ARKUI_PICKER_INDICATOR_BACKGROUND.

Since: 23

Parameters

NameDescription
ArkUI_PickerIndicatorStyle* stylePointer to the ArkUI_PickerIndicatorStyle instance.
ArkUI_PickerIndicatorBackground* backgroundPointer to the background.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_PickerIndicatorStyle_ConfigureDivider()

ArkUI_ErrorCode OH_ArkUI_PickerIndicatorStyle_ConfigureDivider(ArkUI_PickerIndicatorStyle* style, ArkUI_PickerIndicatorDivider* divider)

Description

Sets the divider style parameters. This API takes effect only when the type of the selected item indicator is ARKUI_PICKER_INDICATOR_DIVIDER.

Since: 23

Parameters

NameDescription
ArkUI_PickerIndicatorStyle* stylePointer to the ArkUI_PickerIndicatorStyle instance.
ArkUI_PickerIndicatorDivider* dividerPointer to the divider style.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

OH_ArkUI_FontWeightConfigs_Create()

OH_ArkUI_FontWeightConfigs* OH_ArkUI_FontWeightConfigs_Create()

Description

Creates a text font weight configuration object.

Since: 24

Returns

TypeDescription
OH_ArkUI_FontWeightConfigs*Pointer to the text font weight configuration object. If the creation fails, a null pointer is returned.

OH_ArkUI_FontWeightConfigs_Destroy()

void OH_ArkUI_FontWeightConfigs_Destroy(OH_ArkUI_FontWeightConfigs* option)

Description

Destroys the text font weight configuration object.

Since: 24

Parameters

NameDescription
OH_ArkUI_FontWeightConfigs* optionPointer to the text font weight configuration object to be destroyed.

OH_ArkUI_FontWeightConfigs_SetEnableVariableFontWeight()

void OH_ArkUI_FontWeightConfigs_SetEnableVariableFontWeight(OH_ArkUI_FontWeightConfigs* option, bool enable)

Description

Sets whether to enable variable font weight adjustment.

Since: 24

Parameters

NameDescription
OH_ArkUI_FontWeightConfigs* optionPointer to the text font weight configuration object to be modified.
bool enableWhether to enable variable font weight adjustment. true means to enable variable font weight adjustment. If the value of weight is any integer in the range of [100, 900], the value of weight is used. Otherwise, the default value 400 is used. false means the opposite. If the value of weight is an integer multiple of 100 in the range of [100, 900], the value of weight is used. Otherwise, the default value 400 is used. The default value is false.

OH_ArkUI_FontWeightConfigs_GetEnableVariableFontWeight()

bool OH_ArkUI_FontWeightConfigs_GetEnableVariableFontWeight(OH_ArkUI_FontWeightConfigs* option)

Description

Obtains whether variable font weight adjustment is enabled for the text font weight configuration object.

Since: 24

Parameters

NameDescription
OH_ArkUI_FontWeightConfigs* optionPointer to the text font weight configuration object.

Returns

TypeDescription
boolWhether variable font weight adjustment is enabled.
true means the variable font weight adjustment is enabled. If the value of weight is any integer in the range of [100, 900], the value of weight is used. Otherwise, the default value 400 is used.
false means the opposite. If the value of weight is an integer multiple of 100 in the range of [100, 900], the value of weight is used. Otherwise, the default value 400 is used.
The default value is false. If the value of weight is not within the range of [100, 900], the default value 400 is used.

OH_ArkUI_FontWeightConfigs_SetEnableDeviceFontWeightCategory()

void OH_ArkUI_FontWeightConfigs_SetEnableDeviceFontWeightCategory(OH_ArkUI_FontWeightConfigs* option, bool enable)

Description

Sets whether to automatically update the text font weight when the font weight level of the device changes.

Since: 24

Parameters

NameDescription
OH_ArkUI_FontWeightConfigs* optionPointer to the text font weight configuration object to be modified.
bool enableWhether to enable the text font weight to be updated along with the font weight level of the device. true indicates that the text font weight is automatically updated when the font weight level of the device changes. false indicates that the text font weight is not automatically updated when the font weight level of the device changes. The default value is true.

OH_ArkUI_FontWeightConfigs_GetEnableDeviceFontWeightCategory()

bool OH_ArkUI_FontWeightConfigs_GetEnableDeviceFontWeightCategory(OH_ArkUI_FontWeightConfigs* option)

Description

Obtains whether the text font weight is updated along with the font weight level of the device.

Since: 24

Parameters

NameDescription
OH_ArkUI_FontWeightConfigs* optionPointer to the text font weight configuration object.

Returns

TypeDescription
boolWhether the text font weight is updated along with the font weight level of the device.
true indicates that the text font weight is automatically updated when the font weight level of the device changes.
false indicates that the text font weight is not automatically updated when the font weight level of the device changes.

OH_ArkUI_FontConfigs_Create()

OH_ArkUI_FontConfigs* OH_ArkUI_FontConfigs_Create()

Description

Creates a text font configuration object.

Since: 24

Returns

TypeDescription
OH_ArkUI_FontConfigs*Pointer to the text font configuration object. If the creation fails, a null pointer is returned.

OH_ArkUI_FontConfigs_Destroy()

void OH_ArkUI_FontConfigs_Destroy(OH_ArkUI_FontConfigs* option)

Description

Destroys the text font configuration object.

Since: 24

Parameters

NameDescription
OH_ArkUI_FontConfigs* optionPointer to the text font configuration object to be destroyed.

OH_ArkUI_FontConfigs_SetFontWeightConfigs()

void OH_ArkUI_FontConfigs_SetFontWeightConfigs(OH_ArkUI_FontConfigs* option, OH_ArkUI_FontWeightConfigs* fontWeightConfigs)

Description

Sets the text font weight configurations for the text font configuration object.

Since: 24

Parameters

NameDescription
OH_ArkUI_FontConfigs* optionPointer to the text font configuration object to be modified.
OH_ArkUI_FontWeightConfigs* fontWeightConfigsPointer to the font weight configuration.

OH_ArkUI_FontConfigs_GetFontWeightConfigs()

OH_ArkUI_FontWeightConfigs* OH_ArkUI_FontConfigs_GetFontWeightConfigs(OH_ArkUI_FontConfigs* option)

Description

Obtains the text font weight configurations of the text font configuration object.

Since: 24

Parameters

NameDescription
OH_ArkUI_FontConfigs* optionPointer to the text font configuration object.

Returns

TypeDescription
OH_ArkUI_FontWeightConfigs*Text font width configurations.

OH_ArkUI_TextController_Create()

OH_ArkUI_TextController* OH_ArkUI_TextController_Create()

Description

Creates a text component controller object.

Since: 26.0.0

Returns

TypeDescription
OH_ArkUI_TextController*Pointer to the text component controller object. If the creation fails, a null pointer is returned.

OH_ArkUI_TextController_Destroy()

void OH_ArkUI_TextController_Destroy(OH_ArkUI_TextController* controller)

Description

Destroys the text component controller object.

Since: 26.0.0

Parameters

NameDescription
OH_ArkUI_TextController* controllerPointer to the text component controller object.

OH_ArkUI_TextController_SetStyledString()

ArkUI_ErrorCode OH_ArkUI_TextController_SetStyledString(OH_ArkUI_TextController* controller, ArkUI_StyledString_Descriptor* descriptor)

Description

Sets a styled string for the text component.

Since: 26.0.0

Parameters

NameDescription
OH_ArkUI_TextController* controllerPointer to the OH_ArkUI_TextController object.
ArkUI_StyledString_Descriptor* descriptorPointer to the ArkUI_StyledString_Descriptor object.

Returns

TypeDescription
ArkUI_ErrorCodeReturn result.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-apis-uicontext-contextmenucontroller

openharmony 鸿蒙 errorcode-canvas

openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent

openharmony 鸿蒙 errorcode-bindSheet

openharmony 鸿蒙 js-apis-arkui-uiExtension-sys

openharmony 鸿蒙 capi-arkui-accessibility-arkui-accessibilityeventinfo

openharmony 鸿蒙 capi-arkui-rendernodeutils

openharmony 鸿蒙 js-apis-arkui-node

openharmony 鸿蒙 capi-native-node-h

openharmony 鸿蒙 capi-arkui-nativemodule-arkui-listitemswipeactionitem

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/d1S6GdHh