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
| Name | typedef Keyword | Description |
|---|---|---|
| ArkUI_Node | ArkUI_Node | Defines an ArkUI native component object. |
| ArkUI_ContextCallback | ArkUI_ContextCallback | Defines event callback. |
| ArkUI_NumberValue | ArkUI_NumberValue | Provides the number types of ArkUI on the native side. |
| ARKUI_TextPickerRangeContent | ARKUI_TextPickerRangeContent | Defines the struct of the single-column text picker with image resources. |
| ARKUI_TextPickerCascadeRangeContent | ARKUI_TextPickerCascadeRangeContent | Defines the struct of the interconnected multi-column text picker. |
| ArkUI_ColorStop | ArkUI_ColorStop | Defines a gradient color stop. |
| ArkUI_Rect | ArkUI_Rect | Defines a mask area. |
| ArkUI_IntSize | ArkUI_IntSize | Describes the width and height of a component. |
| ArkUI_IntOffset | ArkUI_IntOffset | Describes the position of a component. |
| ArkUI_Margin | ArkUI_Margin | Describes the margins of a component. |
| ArkUI_TranslationOptions | ArkUI_TranslationOptions | Defines the translation options for component transition. |
| ArkUI_ScaleOptions | ArkUI_ScaleOptions | Defines the scaling options for component transition. |
| ArkUI_RotationOptions | ArkUI_RotationOptions | Defines the rotation options for component transition. |
| ArkUI_NativeDialog | ArkUI_NativeDialog | Defines a custom dialog box controller object for ArkUI on the native side. |
| ArkUI_LayoutConstraint | ArkUI_LayoutConstraint | Defines layout constraints for a component. |
| ArkUI_DrawContext | ArkUI_DrawContext | Defines the component drawing context. |
| ArkUI_Node* | ArkUI_NodeHandle | Defines the pointer to the ArkUI native component object. |
| ArkUI_NativeDialog* | ArkUI_NativeDialogHandle | Defines the handle to the custom dialog box controller of ArkUI on the native side. |
| ArkUI_GridItemSize | ArkUI_GridItemSize | Defines the return value structure for the onGetIrregularSizeByIndex callback in Grid layout options. |
| ArkUI_GridItemRect | ArkUI_GridItemRect | Defines the return value structure for the onGetRectByIndex callback in Grid layout options. |
| ArkUI_GridLayoutOptions | ArkUI_GridLayoutOptions | Defines the Grid layout options. |
| ArkUI_WaterFlowSectionOption | ArkUI_WaterFlowSectionOption | Defines the FlowItem section configuration. |
| ArkUI_ListItemSwipeActionItem | ArkUI_ListItemSwipeActionItem | Defines the item configuration for ListItemSwipeActionOption. |
| ArkUI_ListItemSwipeActionOption | ArkUI_ListItemSwipeActionOption | Defines the configuration for ListItemSwipeActionOption. |
| ArkUI_Context | ArkUI_Context | Defines a context object of the ArkUI native UI. |
| ArkUI_Context* | ArkUI_ContextHandle | Defines the handle to the ArkUI native UI context. |
| ArkUI_NodeContent* | ArkUI_NodeContentHandle | Defines the handle to the ArkUI NodeContent instance on the native side. |
| ArkUI_AlignmentRuleOption | ArkUI_AlignmentRuleOption | Defines the alignment rule in the relative container. |
| ArkUI_GuidelineOption | ArkUI_GuidelineOption | Defines the ID, direction, and position of a guideline. |
| ArkUI_BarrierOption | ArkUI_BarrierOption | Defines the ID, direction, and referenced component of a barrier. |
| ArkUI_ImageAnimatorFrameInfo | ArkUI_ImageAnimatorFrameInfo | Defines the image frame information. |
| ArkUI_ListChildrenMainSize | ArkUI_ListChildrenMainSize | Defines the ChildrenMainSize information of the List component. |
| ArkUI_ProgressLinearStyleOption | ArkUI_ProgressLinearStyleOption | Defines a struct for the linear progress indicator style. |
| ArkUI_CustomProperty | ArkUI_CustomProperty | Defines a struct for the custom property information. |
| ArkUI_HostWindowInfo | ArkUI_HostWindowInfo | Defines a struct for the host window information. |
| ArkUI_ActiveChildrenInfo | ArkUI_ActiveChildrenInfo | Defines a struct for active child node information. |
| ArkUI_CrossLanguageOption | ArkUI_CrossLanguageOption | Defines a cross-language configuration option. |
| AbilityBase_Want | AbilityBase_Want | Declares a Want object. |
| ArkUI_EmbeddedComponentOption | ArkUI_EmbeddedComponentOption | Defines the EmbeddedComponentOption parameter for EmbeddedComponent. |
| ArkUI_AccessibilityState | ArkUI_AccessibilityState | Defines a struct for the component accessibility state. |
| ArkUI_AccessibilityValue | ArkUI_AccessibilityValue | Defines a struct for the component accessibility value. |
| ArkUI_SystemFontStyleEvent | ArkUI_SystemFontStyleEvent | Defines a struct for the system font style event. |
| ArkUI_CustomSpanMeasureInfo | ArkUI_CustomSpanMeasureInfo | Defines a struct for the measurement information of a custom span. |
| ArkUI_CustomSpanMetrics | ArkUI_CustomSpanMetrics | Defines a struct for the measurement metrics of a custom span. |
| ArkUI_CustomSpanDrawInfo | ArkUI_CustomSpanDrawInfo | Defines a struct for the drawing information of a custom span. |
| ArkUI_SwiperIndicator | ArkUI_SwiperIndicator | Defines the style of the navigation indicator for the Swiper component. |
| ArkUI_SwiperDigitIndicator | ArkUI_SwiperDigitIndicator | Defines the style of the digit navigation indicator for the Swiper component. |
| ArkUI_SwiperArrowStyle | ArkUI_SwiperArrowStyle | Defines the navigation arrow style for the Swiper component. |
| ArkUI_StyledString_Descriptor | ArkUI_StyledString_Descriptor | Defines a struct for the styled string descriptor object supported by the text component. |
| ArkUI_SnapshotOptions | ArkUI_SnapshotOptions | Defines snapshot options. |
| ArkUI_TextPickerRangeContentArray | ArkUI_TextPickerRangeContentArray | Defines the data selection list for the text picker. |
| ArkUI_TextCascadePickerRangeContentArray | ArkUI_TextCascadePickerRangeContentArray | Defines the content array for a multi-column cascading data picker. |
| ArkUI_SelectionOptions | ArkUI_SelectionOptions | Defines options of the selection operation. |
| ArkUI_VisibleAreaEventOptions | ArkUI_VisibleAreaEventOptions | Defines the created instance of visible area change event parameters. |
| ArkUI_PositionEdges | ArkUI_PositionEdges | Provides position parameters relative to the boundaries of the container's content area. |
| ArkUI_PixelRoundPolicy | ArkUI_PixelRoundPolicy | Defines a struct for the component pixel rounding policy. |
| ArkUI_ContentTransitionEffect | ArkUI_ContentTransitionEffect | Defines the content transition effect. |
| ArkUI_ShowCounterConfig | ArkUI_ShowCounterConfig | Defines the text input character counter configuration. |
| ArkUI_TextContentBaseController | ArkUI_TextContentBaseController | Defines the basic controller for text. |
| ArkUI_TextMenuItem | ArkUI_TextMenuItem | Defines the text menu item structure. |
| ArkUI_TextMenuItemArray | ArkUI_TextMenuItemArray | Defines the text menu item array structure. |
| ArkUI_TextEditMenuOptions | ArkUI_TextEditMenuOptions | Defines the text menu extension structure. |
| ArkUI_TextSelectionMenuOptions | ArkUI_TextSelectionMenuOptions | Defines the custom text selection menu structure. |
| ArkUI_SelectedDragPreviewStyle | ArkUI_SelectedDragPreviewStyle | Defines the drag preview style of the selected text. |
| ArkUI_MotionPathOptions | ArkUI_MotionPathOptions | Defines the motion path option for path animation. |
| ArkUI_PickerIndicatorBackground | ArkUI_PickerIndicatorBackground | Defines the style parameter of the background-style indicator. |
| ArkUI_PickerIndicatorDivider | ArkUI_PickerIndicatorDivider | Defines the style parameter of the divider-style indicator. |
| ArkUI_PickerIndicatorStyle | ArkUI_PickerIndicatorStyle | Defines the style of the selected item indicator. |
| ArkUI_TextMarqueeOptions | ArkUI_TextMarqueeOptions | Defines marquee options for text. |
| ArkUI_Matrix4 | ArkUI_Matrix4 | Defines a fourth-order matrix object. |
| ArkUI_Matrix4RotationOptions | ArkUI_Matrix4RotationOptions | Defines a matrix rotation object. |
| ArkUI_Matrix4ScaleOptions | ArkUI_Matrix4ScaleOptions | Defines a matrix scaling object. |
| ArkUI_Matrix4TranslationOptions | ArkUI_Matrix4TranslationOptions | Defines a matrix translation object. |
| ArkUI_PointF | ArkUI_PointF | Defines a two-dimensional coordinate point struct, where the coordinates are stored as floating-point numbers. |
| OH_ArkUI_DecorationStyleOptions | OH_ArkUI_DecorationStyleOptions | Defines decoration style options. |
| OH_ArkUI_TextDataDetectorConfig | OH_ArkUI_TextDataDetectorConfig | Defines the configuration of text entity recognition. |
| OH_ArkUI_TextEditorSelectionMenuOptions | OH_ArkUI_TextEditorSelectionMenuOptions | Defines the text selection menu options of the text editor. |
| OH_ArkUI_TextEditorPlaceholderOptions | OH_ArkUI_TextEditorPlaceholderOptions | Defines the hint text options when no content is entered in the text editor. |
| OH_ArkUI_TextEditorStyledStringController | OH_ArkUI_TextEditorStyledStringController | Defines the styled string controller of the text editor. |
| OH_ArkUI_TextEditorParagraphStyle | OH_ArkUI_TextEditorParagraphStyle | Defines the paragraph style of the text editor. |
| OH_ArkUI_ShadowOptions | OH_ArkUI_ShadowOptions | Defines shadow options. |
| OH_ArkUI_TextEditorTextStyle | OH_ArkUI_TextEditorTextStyle | Defines the text style of the text editor. |
| OH_ArkUI_FontWeightConfigs | OH_ArkUI_FontWeightConfigs | Defines 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_FontConfigs | OH_ArkUI_FontConfigs | Defines 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_TextController | OH_ArkUI_TextController | Defines 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
| Name | typedef Keyword | Description |
|---|---|---|
| ArkUI_Alignment | ArkUI_Alignment | Enumerates the alignment modes. |
| ArkUI_ImageRepeat | ArkUI_ImageRepeat | Enumerates the image repeat patterns. |
| ArkUI_FontStyle | ArkUI_FontStyle | Enumerates the font styles. |
| ArkUI_FontWeight | ArkUI_FontWeight | Enumerates the font weights. |
| ArkUI_TextAlignment | ArkUI_TextAlignment | Enumerates text alignment modes. |
| ArkUI_TextVerticalAlignment | ArkUI_TextVerticalAlignment | Enumerates text vertical alignment styles. |
| ArkUI_EnterKeyType | ArkUI_EnterKeyType | Enumerates the types of the Enter key for a single-line text box. |
| ArkUI_TextInputType | ArkUI_TextInputType | Enumerates the input method type of a single-line text. |
| ArkUI_TextAreaType | ArkUI_TextAreaType | Enumerates the input method types of a multi-line text. |
| ArkUI_CancelButtonStyle | ArkUI_CancelButtonStyle | Enumerates the styles of the Cancel button. |
| ArkUI_XComponentType | ArkUI_XComponentType | Enumerates the types of the XComponent component. |
| ArkUI_ProgressType | ArkUI_ProgressType | Enumerates the styles of the progress indicator. |
| ArkUI_TextDecorationType | ArkUI_TextDecorationType | Enumerates the text decoration types. |
| ArkUI_TextDecorationStyle | ArkUI_TextDecorationStyle | Enumerates the text decoration styles. |
| ArkUI_TextCase | ArkUI_TextCase | Enumerates the text cases. |
| ArkUI_CopyOptions | ArkUI_CopyOptions | Enumerates the text copy and paste modes. |
| ArkUI_ShadowType | ArkUI_ShadowType | Enumerates shadow types. |
| ArkUI_DatePickerMode | ArkUI_DatePickerMode | Enumerates the column display modes of the date picker. |
| ArkUI_TextPickerRangeType | ArkUI_TextPickerRangeType | Enumerates the types of the text picker. |
| ArkUI_AccessibilityCheckedState | ArkUI_AccessibilityCheckedState | Enumerates the accessibility check box states. |
| ArkUI_AccessibilityActionType | ArkUI_AccessibilityActionType | Enumerates the accessibility action types. |
| ArkUI_EdgeEffect | ArkUI_EdgeEffect | Enumerates the effects used at the edges of the component when the boundary of the scrollable content is reached. |
| ArkUI_BarState | ArkUI_BarState | Enumerates the text control scrollbar states. |
| ArkUI_EffectEdge | ArkUI_EffectEdge | Enumerates the edges for which the effect takes effect when the boundary of the scrollable content is reached. |
| ArkUI_ScrollDirection | ArkUI_ScrollDirection | Enumerates the scrolling directions of the Scroll component. |
| ArkUI_ScrollSnapAlign | ArkUI_ScrollSnapAlign | Enumerates the alignment modes of list items when scrolling ends. |
| ArkUI_ScrollBarDisplayMode | ArkUI_ScrollBarDisplayMode | Enumerates the scrollbar display modes. |
| ArkUI_Axis | ArkUI_Axis | Enumerates the scroll directions. |
| ArkUI_StickyStyle | ArkUI_StickyStyle | Enumerates the modes for pinning the header to the top or the footer to the bottom. |
| ArkUI_ContentClipMode | ArkUI_ContentClipMode | Enumerates the content clipping modes of scrollable components. |
| ArkUI_WaterFlowLayoutMode | ArkUI_WaterFlowLayoutMode | Enumerates the layout modes of the WaterFlow component. |
| ArkUI_BorderStyle | ArkUI_BorderStyle | Enumerates the border styles. |
| ArkUI_HitTestMode | ArkUI_HitTestMode | Enumerates the hit test modes. |
| ArkUI_ShadowStyle | ArkUI_ShadowStyle | Enumerates shadow styles. |
| ArkUI_AnimationCurve | ArkUI_AnimationCurve | Enumerates the animation curves. |
| ArkUI_SwiperArrow | ArkUI_SwiperArrow | Enumerates arrow styles of the navigation indicator. |
| ArkUI_SwiperNestedScrollMode | ArkUI_SwiperNestedScrollMode | Enumerates the nested scrolling modes of the Swiper component and its parent container. |
| ArkUI_PageFlipMode | ArkUI_PageFlipMode | Enumerates the page flipping modes using the mouse wheel for the Swiper component. |
| ArkUI_SwiperAnimationMode | ArkUI_SwiperAnimationMode | Enumerates the animation modes for the Swiper component when jumping to the page with the specified index. |
| ArkUI_AccessibilityMode | ArkUI_AccessibilityMode | Enumerates the accessibility modes. |
| ArkUI_TextCopyOptions | ArkUI_TextCopyOptions | Enumerates copy options, which define whether copy and paste is allowed for text content. |
| ArkUI_TextHeightAdaptivePolicy | ArkUI_TextHeightAdaptivePolicy | Defines how the adaptive height is determined for the text. |
| ArkUI_ScrollNestedMode | ArkUI_ScrollNestedMode | Enumerates nested scrolling modes. |
| ArkUI_ScrollEdge | ArkUI_ScrollEdge | Enumerates the edges to which the component scrolls. |
| ArkUI_ScrollAlignment | ArkUI_ScrollAlignment | Defines how the list item to scroll to is aligned with the container. |
| ArkUI_ScrollState | ArkUI_ScrollState | Enumerates the scrolling states. |
| ArkUI_SliderBlockStyle | ArkUI_SliderBlockStyle | Enumerates the styles of the slider in the block direction. |
| ArkUI_SliderDirection | ArkUI_SliderDirection | Enumerates the scroll directions of the slider. |
| ArkUI_SliderStyle | ArkUI_SliderStyle | Enumerates the slider styles. |
| ArkUI_CheckboxShape | ArkUI_CheckboxShape | Enumerates the shapes of the check box. |
| ArkUI_AnimationPlayMode | ArkUI_AnimationPlayMode | Enumerates the animation playback modes. |
| ArkUI_ImageSize | ArkUI_ImageSize | Defines the image size. |
| ArkUI_AdaptiveColor | ArkUI_AdaptiveColor | Enumerates the adaptive color modes. |
| ArkUI_ColorMode | ArkUI_ColorMode | Enumerates the color modes. |
| ArkUI_SystemColorMode | ArkUI_SystemColorMode | Enumerates the system color modes. |
| ArkUI_BlurStyle | ArkUI_BlurStyle | Enumerates the blur styles. |
| ArkUI_BlurStyleActivePolicy | ArkUI_BlurStyleActivePolicy | Enumerates the activation policies for the background blur effect. |
| ArkUI_VerticalAlignment | ArkUI_VerticalAlignment | Enumerates the vertical alignment modes. |
| ArkUI_HorizontalAlignment | ArkUI_HorizontalAlignment | Enumerates the alignment mode in the horizontal direction. |
| ArkUI_TextOverflow | ArkUI_TextOverflow | Enumerates the display modes when the text is too long. |
| ArkUI_ImageSpanAlignment | ArkUI_ImageSpanAlignment | Enumerates the alignment mode of the image with the text. |
| ArkUI_ObjectFit | ArkUI_ObjectFit | Enumerates the image filling effects of the Image component. |
| ArkUI_ImageInterpolation | ArkUI_ImageInterpolation | Enumerates the image interpolation effects. |
| ArkUI_DynamicRangeMode | ArkUI_DynamicRangeMode | Enumerates the dynamic range modes (for example, SDR/HDR) for images, controlling the display range of image brightness and color gamut. |
| ArkUI_ImageRotateOrientation | ArkUI_ImageRotateOrientation | Enumerates image rotation directions. |
| ArkUI_BlendMode | ArkUI_BlendMode | Enumerates the blend modes. |
| ArkUI_Direction | ArkUI_Direction | Enumerates the modes in which components are laid out along the main axis of the container. |
| ArkUI_ItemAlignment | ArkUI_ItemAlignment | Enumerates the modes in which components are laid out along the cross axis of the container. |
| ArkUI_ColorStrategy | ArkUI_ColorStrategy | Enumerates foreground and shadow colors. |
| ArkUI_FlexAlignment | ArkUI_FlexAlignment | Enumerates the vertical alignment modes. |
| ArkUI_FlexDirection | ArkUI_FlexDirection | Enumerates the directions of the main axis in the flex container. |
| ArkUI_FlexWrap | ArkUI_FlexWrap | Defines whether the flex container has a single line or multiple lines. |
| ArkUI_Visibility | ArkUI_Visibility | Enumerates the visibility values. |
| ArkUI_CalendarAlignment | ArkUI_CalendarAlignment | Enumerates the alignment modes between the calendar picker and the entry component. |
| ArkUI_MaskType | ArkUI_MaskType | 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. |
| ArkUI_ClipType | ArkUI_ClipType | Enumerates the clipping region types. |
| ArkUI_ShapeType | ArkUI_ShapeType | Enumerates custom shape types. |
| ArkUI_LinearGradientDirection | ArkUI_LinearGradientDirection | Enumerates the gradient directions. |
| ArkUI_WordBreak | ArkUI_WordBreak | Enumerates the word break rules. |
| ArkUI_EllipsisMode | ArkUI_EllipsisMode | Enumerates the ellipsis positions. |
| ArkUI_ImageRenderMode | ArkUI_ImageRenderMode | Enumerates the image rendering modes. |
| ArkUI_TransitionEdge | ArkUI_TransitionEdge | Enumerates the slide-in and slide-out positions of the component from the screen edge during transition. |
| ArkUI_FinishCallbackType | ArkUI_FinishCallbackType | Enumerates the callback types for OH_ArkUI_AnimatorOption_RegisterOnFinishCallback in an animation. |
| ArkUI_ListItemAlignment | ArkUI_ListItemAlignment | Enumerates the alignment modes of items along the cross axis. |
| ArkUI_BlendApplyType | ArkUI_BlendApplyType | Defines how the specified blend mode is applied. |
| ArkUI_LengthMetricUnit | ArkUI_LengthMetricUnit | Enumerates the component units. |
| ArkUI_TextInputContentType | ArkUI_TextInputContentType | Enumerates the autofill types. |
| ArkUI_BarrierDirection | ArkUI_BarrierDirection | Enumerates the barrier directions. |
| ArkUI_RelativeLayoutChainStyle | ArkUI_RelativeLayoutChainStyle | Enumerates the chain styles. |
| ArkUI_TextInputStyle | ArkUI_TextInputStyle | Enumerates the text input styles. |
| ArkUI_KeyboardAppearance | ArkUI_KeyboardAppearance | Enumerates the appearance modes of the keyboard when the text box is focused. |
| ArkUI_TextDataDetectorType | ArkUI_TextDataDetectorType | Enumerates the entity types of text recognition. |
| ArkUI_ButtonType | ArkUI_ButtonType | Enumerates the button types. |
| ArkUI_RenderFit | ArkUI_RenderFit | Enumerates the sizing and positioning behaviors of animated content in its final state. |
| ArkUI_SwiperIndicatorType | ArkUI_SwiperIndicatorType | Enumerates the navigation indicator types of the Swiper component. |
| ArkUI_AnimationDirection | ArkUI_AnimationDirection | Enumerates the animation playback directions. |
| ArkUI_ListItemSwipeActionState | ArkUI_ListItemSwipeActionState | Enumerates the item states of swipeAction of the Listitem component. |
| ArkUI_ListItemSwipeEdgeEffect | ArkUI_ListItemSwipeEdgeEffect | Enumerates the item edge effects of swipeAction of the Listitem component. |
| ArkUI_ListItemSwipeActionDirection | ArkUI_ListItemSwipeActionDirection | Enumerates the swipe action menu display directions for ListItem components. |
| ArkUI_AnimationStatus | ArkUI_AnimationStatus | Enumerates the playback states of the frame-by-frame animation. |
| ArkUI_AnimationFillMode | ArkUI_AnimationFillMode | Enumerates the states before and after execution of the frame-by-frame animation. |
| ArkUI_ErrorCode | ArkUI_ErrorCode | Enumerates the error codes. |
| ArkUI_ScrollSource | ArkUI_ScrollSource | Enumerates scroll sources. |
| ArkUI_SafeAreaType | ArkUI_SafeAreaType | Enumerates the types of expanded safe areas. |
| ArkUI_SafeAreaEdge | ArkUI_SafeAreaEdge | Enumerates the edges for expanding the safe area. |
| ArkUI_FocusMove | ArkUI_FocusMove | Enumerates the focus movement directions. |
| ArkUI_ListItemGroupArea | ArkUI_ListItemGroupArea | Enumerates areas of the ListItemGroup component. |
| ArkUI_KeyboardAvoidMode | ArkUI_KeyboardAvoidMode | Enumerates the soft keyboard avoidance modes. |
| ArkUI_HoverModeAreaType | ArkUI_HoverModeAreaType | Enumerates the types of display areas for the hover mode. |
| ArkUI_ExpandMode | ArkUI_ExpandMode | Enumerates the expansion mode of child nodes. |
| ArkUI_NavDestinationState | ArkUI_NavDestinationState | Enumerates the NavDestination component states. |
| ArkUI_RouterPageState | ArkUI_RouterPageState | Enumerates the states of a page during routing. |
| ArkUI_UIState | ArkUI_UIState | Enumerates the UI states of a component, used for handling state-specific styles. |
| ArkUI_FocusWrapMode | ArkUI_FocusWrapMode | Enumerates the focus wrap mode of components. |
| ArkUI_ItemFillPolicy | ArkUI_ItemFillPolicy | Enumerates preset column layouts for different responsive breakpoints. |
| ArkUI_EdgeDirection | ArkUI_EdgeDirection | Enumerates rectangle edge directions. |
| ArkUI_CornerDirection | ArkUI_CornerDirection | Enumerates corner directions. |
| ArkUI_LayoutPolicy | ArkUI_LayoutPolicy | Enumerates layout policies. |
| ArkUI_PixelRoundCalcPolicy | ArkUI_PixelRoundCalcPolicy | Enumerates pixel rounding calculation policies. |
| ArkUI_GridItemStyle | ArkUI_GridItemStyle | Enumerates styles of grid items. |
| ArkUI_MenuPolicy | ArkUI_MenuPolicy | Enumerates menu display policies. |
| ArkUI_ResponseRegionSupportedTool | ArkUI_ResponseRegionSupportedTool | Enumerates the input tool types supported for response region configuration. |
| ArkUI_TextMenuItemId | ArkUI_TextMenuItemId | Enumerates the IDs of text menu items. |
| ArkUI_TextSpanType | ArkUI_TextSpanType | Enumerates the text recognition types of a custom text selection menu. |
| ArkUI_TextResponseType | ArkUI_TextResponseType | Enumerates the response types of a custom text selection menu. |
| ArkUI_HoverEffect | ArkUI_HoverEffect | Enumerates the hover effects when a component is hovered over. |
| ArkUI_FocusPriority | ArkUI_FocusPriority | Enumerates the priority levels for focus management within the application. These levels determine the sequence in which UI components receive focus during user interaction. |
| ArkUI_LayoutSafeAreaType | ArkUI_LayoutSafeAreaType | Enumerates the types of expanded safe areas. |
| ArkUI_LayoutSafeAreaEdge | ArkUI_LayoutSafeAreaEdge | Enumerates the edges for expanding the safe area. |
| ArkUI_LocalizedAlignment | ArkUI_LocalizedAlignment | Defines the alignment rules of child components in the Stack container. |
| ArkUI_RenderStrategy | ArkUI_RenderStrategy | Defines rendering strategies for drawing rounded corners. |
| ArkUI_MarqueeStartPolicy | ArkUI_MarqueeStartPolicy | Defines the start policy of a marquee. |
| ArkUI_MarqueeUpdatePolicy | ArkUI_MarqueeUpdatePolicy | Defines the update policy of a marquee. |
| ArkUI_PickerIndicatorType | ArkUI_PickerIndicatorType | Defines the indicator type of the selected item. |
| OH_ArkUI_HapticFeedbackMode | OH_ArkUI_HapticFeedbackMode | Enumerates vibration effect types. |
| OH_ArkUI_TextEditorSpanType | OH_ArkUI_TextEditorSpanType | Enumerates the span types of a custom text selection menu. |
| OH_ArkUI_TextEditorResponseType | OH_ArkUI_TextEditorResponseType | Enumerates the response types of a custom text selection menu. |
| OH_ArkUI_TextMenuType | OH_ArkUI_TextMenuType | Enumerates text menu types. |
| OH_ArkUI_LineBreakStrategy | OH_ArkUI_LineBreakStrategy | Enumerates line break policies. |
Functions
Enum Description
ArkUI_Alignment
enum ArkUI_Alignment
Description
Enumerates the alignment modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ALIGNMENT_TOP_START = 0 | Top start. This is the default value. |
| ARKUI_ALIGNMENT_TOP = 1 | Top center. |
| ARKUI_ALIGNMENT_TOP_END = 2 | Top end. |
| ARKUI_ALIGNMENT_START = 3 | Vertically centered start. |
| ARKUI_ALIGNMENT_CENTER = 4 | Horizontally and vertically centered. |
| ARKUI_ALIGNMENT_END = 5 | Vertically centered end. |
| ARKUI_ALIGNMENT_BOTTOM_START = 6 | Bottom start. |
| ARKUI_ALIGNMENT_BOTTOM = 7 | Horizontally centered on the bottom. |
| ARKUI_ALIGNMENT_BOTTOM_END = 8 | Bottom end. |
ArkUI_ImageRepeat
enum ArkUI_ImageRepeat
Description
Enumerates the image repeat patterns.
Since: 12
| Value | Description |
|---|---|
| ARKUI_IMAGE_REPEAT_NONE = 0 | The image is not repeatedly drawn. |
| ARKUI_IMAGE_REPEAT_X = 1 | The image is repeatedly drawn only along the x-axis. |
| ARKUI_IMAGE_REPEAT_Y = 2 | The image is repeatedly drawn only along the y-axis. |
| ARKUI_IMAGE_REPEAT_XY = 3 | The image is repeatedly drawn along both axes. |
ArkUI_FontStyle
enum ArkUI_FontStyle
Description
Enumerates the font styles.
Since: 12
| Value | Description |
|---|---|
| ARKUI_FONT_STYLE_NORMAL = 0 | Standard font style. |
| ARKUI_FONT_STYLE_ITALIC = 1 | Italic font style. |
ArkUI_FontWeight
enum ArkUI_FontWeight
Description
Enumerates the font weights.
Since: 12
| Value | Description |
|---|---|
| ARKUI_FONT_WEIGHT_W100 = 0 | 100 |
| ARKUI_FONT_WEIGHT_W200 = 1 | 200 |
| ARKUI_FONT_WEIGHT_W300 = 2 | 300 |
| ARKUI_FONT_WEIGHT_W400 = 3 | 400 |
| ARKUI_FONT_WEIGHT_W500 = 4 | 500 |
| ARKUI_FONT_WEIGHT_W600 = 5 | 600 |
| ARKUI_FONT_WEIGHT_W700 = 6 | 700 |
| ARKUI_FONT_WEIGHT_W800 = 7 | 800 |
| ARKUI_FONT_WEIGHT_W900 = 8 | 900 |
| ARKUI_FONT_WEIGHT_BOLD = 9 | The font weight is bold. |
| ARKUI_FONT_WEIGHT_NORMAL = 10 | The font weight is normal. |
| ARKUI_FONT_WEIGHT_BOLDER = 11 | The font weight is bolder. |
| ARKUI_FONT_WEIGHT_LIGHTER = 12 | The font weight is lighter. |
| ARKUI_FONT_WEIGHT_MEDIUM = 13 | The font weight is medium. |
| ARKUI_FONT_WEIGHT_REGULAR = 14 | The font weight is normal. |
ArkUI_TextAlignment
enum ArkUI_TextAlignment
Description
Enumerates text alignment modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXT_ALIGNMENT_START = 0 | Aligned with the start. |
| ARKUI_TEXT_ALIGNMENT_CENTER = 1 | Horizontally centered. |
| ARKUI_TEXT_ALIGNMENT_END = 2 | Aligned with the end. |
| ARKUI_TEXT_ALIGNMENT_JUSTIFY = 3 | Aligned with both margins. |
| ARKUI_TEXT_ALIGNMENT_LEFT_TO_RIGHT = 4 | Aligned from left to right. Since: 23 |
| ARKUI_TEXT_ALIGNMENT_RIGHT_TO_LEFT = 5 | Aligned from right to left. Since: 23 |
ArkUI_TextVerticalAlignment
enum ArkUI_TextVerticalAlignment
Description
Enumerates text vertical alignment styles.
Since: 20
| Value | Description |
|---|---|
| ARKUI_TEXT_VERTICAL_ALIGNMENT_BASELINE = 0 | Aligned to the baseline. |
| ARKUI_TEXT_VERTICAL_ALIGNMENT_BOTTOM = 1 | Bottom aligned. |
| ARKUI_TEXT_VERTICAL_ALIGNMENT_CENTER = 2 | The list item is centered along |
| ARKUI_TEXT_VERTICAL_ALIGNMENT_TOP = 3 | Top aligned. |
ArkUI_TextContentAlign
enum ArkUI_TextContentAlign
Description
Enumerates vertical alignment styles in the text content area.
Since: 21
| Value | Description |
|---|---|
| ARKUI_TEXT_CONTENT_ALIGN_TOP = 0 | Top aligned. |
| ARKUI_TEXT_CONTENT_ALIGN_CENTER = 1 | The list item is centered along |
| ARKUI_TEXT_CONTENT_ALIGN_BOTTOM = 2 | Bottom aligned. |
ArkUI_TextDirection
enum ArkUI_TextDirection
Description
Enumerates the text layout directions.
Since: 23
| Value | Description |
|---|---|
| ARKUI_TEXT_DIRECTION_LTR = 0 | From left to right. |
| ARKUI_TEXT_DIRECTION_RTL = 1 | From right to left. |
| ARKUI_TEXT_DIRECTION_DEFAULT = 2 | Follow the component layout. |
| ARKUI_TEXT_DIRECTION_AUTO = 3 | Follow 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
| Value | Description |
|---|---|
| ARKUI_ENTER_KEY_TYPE_GO = 2 | The Enter key is labeled "Go." |
| ARKUI_ENTER_KEY_TYPE_SEARCH = 3 | The Enter key is labeled "Search." |
| ARKUI_ENTER_KEY_TYPE_SEND = 4 | The Enter key is labeled "Send." |
| ARKUI_ENTER_KEY_TYPE_NEXT = 5 | The Enter key is labeled "Next." |
| ARKUI_ENTER_KEY_TYPE_DONE = 6 | The Enter key is labeled "Done." |
| ARKUI_ENTER_KEY_TYPE_PREVIOUS = 7 | The Enter key is labeled "Previous." |
| ARKUI_ENTER_KEY_TYPE_NEW_LINE = 8 | The Enter key is labeled "Return." |
ArkUI_TextInputType
enum ArkUI_TextInputType
Description
Enumerates the input method type of a single-line text.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXTINPUT_TYPE_NORMAL = 0 | Normal input mode. |
| ARKUI_TEXTINPUT_TYPE_NUMBER = 2 | Number input mode. |
| ARKUI_TEXTINPUT_TYPE_PHONE_NUMBER = 3 | Phone number input mode. |
| ARKUI_TEXTINPUT_TYPE_EMAIL = 5 | Email address input mode. |
| ARKUI_TEXTINPUT_TYPE_PASSWORD = 7 | Password input mode. |
| ARKUI_TEXTINPUT_TYPE_NUMBER_PASSWORD = 8 | Numeric password input mode. |
| ARKUI_TEXTINPUT_TYPE_SCREEN_LOCK_PASSWORD = 9 | Lock screen password input mode. |
| ARKUI_TEXTINPUT_TYPE_USER_NAME = 10 | Username input mode. |
| ARKUI_TEXTINPUT_TYPE_NEW_PASSWORD = 11 | New password input mode. |
| ARKUI_TEXTINPUT_TYPE_NUMBER_DECIMAL = 12 | Number input mode with a decimal point. |
| ARKUI_TEXTINPUT_TYPE_ONE_TIME_CODE = 14 | Verification code input mode. Since: 20 |
ArkUI_TextAreaType
enum ArkUI_TextAreaType
Description
Enumerates the input method types of a multi-line text.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXTAREA_TYPE_NORMAL = 0 | Normal input mode. |
| ARKUI_TEXTAREA_TYPE_NUMBER = 2 | Number input mode. |
| ARKUI_TEXTAREA_TYPE_PHONE_NUMBER = 3 | Phone number input mode. |
| ARKUI_TEXTAREA_TYPE_EMAIL = 5 | Email address input mode. |
| ARKUI_TEXTAREA_TYPE_ONE_TIME_CODE = 14 | Verification code input mode. Since: 20 |
ArkUI_CancelButtonStyle
enum ArkUI_CancelButtonStyle
Description
Enumerates the styles of the Cancel button.
Since: 12
| Value | Description |
|---|---|
| ARKUI_CANCELBUTTON_STYLE_CONSTANT = 0 | The Cancel button is always displayed. |
| ARKUI_CANCELBUTTON_STYLE_INVISIBLE = 1 | The Cancel button is always hidden. |
| ARKUI_CANCELBUTTON_STYLE_INPUT = 2 | The Cancel button is displayed when there is text input. |
ArkUI_XComponentType
enum ArkUI_XComponentType
Description
Enumerates the types of the XComponent component.
Since: 12
| Value | Description |
|---|---|
| ARKUI_XCOMPONENT_TYPE_SURFACE = 0 | The custom content of EGL/OpenGL ES and media data is displayed individually on the screen. |
| ARKUI_XCOMPONENT_TYPE_TEXTURE = 2 | The 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
| Value | Description |
|---|---|
| ARKUI_PROGRESS_TYPE_LINEAR = 0 | Linear type. |
| ARKUI_PROGRESS_TYPE_RING = 1 | Ring style without scale marks. |
| ARKUI_PROGRESS_TYPE_ECLIPSE = 2 | Eclipse style. |
| ARKUI_PROGRESS_TYPE_SCALE_RING = 3 | Ring style with scale marks. |
| ARKUI_PROGRESS_TYPE_CAPSULE = 4 | Capsule style. |
ArkUI_TextDecorationType
enum ArkUI_TextDecorationType
Description
Enumerates the text decoration types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXT_DECORATION_TYPE_NONE = 0 | No text decoration. |
| ARKUI_TEXT_DECORATION_TYPE_UNDERLINE = 1 | Line under the text. |
| ARKUI_TEXT_DECORATION_TYPE_OVERLINE = 2 | Line over the text. |
| ARKUI_TEXT_DECORATION_TYPE_LINE_THROUGH = 3 | Line through the text. |
ArkUI_TextDecorationStyle
enum ArkUI_TextDecorationStyle
Description
Enumerates the text decoration styles.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXT_DECORATION_STYLE_SOLID = 0 | Single solid line. |
| ARKUI_TEXT_DECORATION_STYLE_DOUBLE = 1 | Double solid line. |
| ARKUI_TEXT_DECORATION_STYLE_DOTTED = 2 | Dotted line. |
| ARKUI_TEXT_DECORATION_STYLE_DASHED = 3 | Dashed style. |
| ARKUI_TEXT_DECORATION_STYLE_WAVY = 4 | Wavy line. |
ArkUI_TextCase
enum ArkUI_TextCase
Description
Enumerates the text cases.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXT_CASE_NORMAL = 0 | The original case of the text is retained. |
| ARKUI_TEXT_CASE_LOWER = 1 | All letters in the text are in lowercase. |
| ARKUI_TEXT_CASE_UPPER = 2 | All letters in the text are in uppercase. |
ArkUI_CopyOptions
enum ArkUI_CopyOptions
Description
Enumerates the text copy and paste modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_COPY_OPTIONS_NONE = 0 | Copy is not allowed. |
| ARKUI_COPY_OPTIONS_IN_APP = 1 | Intra-application copy is allowed. |
| ARKUI_COPY_OPTIONS_LOCAL_DEVICE = 2 | Intra-device copy is allowed. |
| ARKUI_COPY_OPTIONS_CROSS_DEVICE = 3 | Cross-device copy is allowed. |
ArkUI_ShadowType
enum ArkUI_ShadowType
Description
Enumerates shadow types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SHADOW_TYPE_COLOR = 0 | Color shadow. |
| ARKUI_SHADOW_TYPE_BLUR = 1 | Blur shadow. |
ArkUI_DatePickerMode
enum ArkUI_DatePickerMode
Description
Enumerates the column display modes of the date picker.
Since: 18
| Value | Description |
|---|---|
| ARKUI_DATEPICKER_MODE_DATE = 0 | Default value. The date displays three columns: year, month, and day. |
| ARKUI_DATEPICKER_YEAR_AND_MONTH = 1 | The date displays two columns: year and month. |
| ARKUI_DATEPICKER_MONTH_AND_DAY = 2 | The date displays two columns: month and day. |
ArkUI_TextPickerRangeType
enum ArkUI_TextPickerRangeType
Description
Enumerates the types of the text picker.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXTPICKER_RANGETYPE_SINGLE = 0 | Single-column text picker. |
| ARKUI_TEXTPICKER_RANGETYPE_MULTI = 1 | Multi-column text picker. |
| ARKUI_TEXTPICKER_RANGETYPE_RANGE_CONTENT = 2 | Single-column text picker with image resources. |
| ARKUI_TEXTPICKER_RANGETYPE_CASCADE_RANGE_CONTENT = 3 | Interconnected multi-column text picker. |
ArkUI_AccessibilityCheckedState
enum ArkUI_AccessibilityCheckedState
Description
Enumerates the accessibility check box states.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ACCESSIBILITY_UNCHECKED = 0 | The check box is not selected. |
| ARKUI_ACCESSIBILITY_CHECKED = 1 | The check box is selected. |
ArkUI_AccessibilityActionType
enum ArkUI_AccessibilityActionType
Description
Enumerates the accessibility action types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ACCESSIBILITY_ACTION_CLICK = 1 << 0 | Tapping |
| ARKUI_ACCESSIBILITY_ACTION_LONG_CLICK = 1 << 1 | Long press |
| ARKUI_ACCESSIBILITY_ACTION_CUT = 1 << 2 | Cut. |
| ARKUI_ACCESSIBILITY_ACTION_COPY = 1 << 3 | Copy. |
| ARKUI_ACCESSIBILITY_ACTION_PASTE = 1 << 4 | Paste. |
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
| Value | Description |
|---|---|
| ARKUI_EDGE_EFFECT_SPRING = 0 | Spring 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 = 1 | Fade effect. When at one of the edges, the component produces a fade effect. |
| ARKUI_EDGE_EFFECT_NONE = 2 | No effect when the component is at one of the edges. |
ArkUI_BarState
enum ArkUI_BarState
Description
Enumerates the text control scrollbar states.
Since: 22
| Value | Description |
|---|---|
| ARKUI_BAR_STATE_OFF = 0 | Not displayed. |
| ARKUI_BAR_STATE_AUTO = 1 | Displayed on demand (The scrollbar is displayed when being touched and disappears 2 seconds later.) |
| ARKUI_BAR_STATE_ON = 2 | Always 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
| Value | Description |
|---|---|
| ARKUI_EFFECT_EDGE_START = 1 | Start edge. |
| ARKUI_EFFECT_EDGE_END = 2 | End edge. |
ArkUI_ScrollDirection
enum ArkUI_ScrollDirection
Description
Enumerates the scrolling directions of the Scroll component.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SCROLL_DIRECTION_VERTICAL = 0 | Vertical scrolling only. |
| ARKUI_SCROLL_DIRECTION_HORIZONTAL = 1 | Horizontal scrolling only. |
| ARKUI_SCROLL_DIRECTION_NONE = 3 | Scrolling disabled. |
| ARKUI_SCROLL_DIRECTION_FREE = 4 | Free scrolling in both directions. Since: 20 |
ArkUI_ScrollSnapAlign
enum ArkUI_ScrollSnapAlign
Description
Enumerates the alignment modes of list items when scrolling ends.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SCROLL_SNAP_ALIGN_NONE = 0 | No alignment mode. |
| ARKUI_SCROLL_SNAP_ALIGN_START = 1 | The first item in the view is aligned at the start of the list. |
| ARKUI_SCROLL_SNAP_ALIGN_CENTER = 2 | The middle items in the view are aligned in the center of the list. |
| ARKUI_SCROLL_SNAP_ALIGN_END = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_SCROLL_BAR_DISPLAY_MODE_OFF = 0 | Not displayed. |
| ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO = 1 | Displayed when the screen is touched and hidden after 2s. |
| ARKUI_SCROLL_BAR_DISPLAY_MODE_ON = 2 | Always displayed. |
ArkUI_Axis
enum ArkUI_Axis
Description
Enumerates scroll directions and List component arrangement directions.
Since: 12
| Value | Description |
|---|---|
| ARKUI_AXIS_VERTICAL = 0 | Vertical scrolling only. This is the default value. |
| ARKUI_AXIS_HORIZONTAL = 1 | Horizontal 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
| Value | Description |
|---|---|
| ARKUI_STICKY_STYLE_NONE = 0 | header and footer of ListItemGroup are not pinned to the top and bottom, respectively. |
| ARKUI_STICKY_STYLE_HEADER = 1 | header of ListItemGroup is pinned to the top, and footer is not pinned to the bottom. |
| ARKUI_STICKY_STYLE_FOOTER = 2 | header of ListItemGroup is not pinned to the top, and footer is pinned to the bottom. |
| ARKUI_STICKY_STYLE_BOTH = 3 | header 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
| Value | Description |
|---|---|
| ARKUI_CONTENT_CLIP_MODE_CONTENT_ONLY = 0 | Clip to the content area only. |
| ARKUI_CONTENT_CLIP_MODE_BOUNDARY = 1 | Clip to the component's boundary area. |
| ARKUI_CONTENT_CLIP_MODE_SAFE_AREA = 2 | Clip 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
| Value | Description |
|---|---|
| ARKUI_WATER_FLOW_LAYOUT_MODE_ALWAYS_TOP_DOWN = 0 | Layout 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 = 1 | Sliding 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
| Value | Description |
|---|---|
| ARKUI_BORDER_STYLE_SOLID = 0 | Solid border. This is the default value. |
| ARKUI_BORDER_STYLE_DASHED = 1 | Dashed border. |
| ARKUI_BORDER_STYLE_DOTTED = 2 | Dotted border. |
ArkUI_HitTestMode
enum ArkUI_HitTestMode
Description
Enumerates the hit test modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_HIT_TEST_MODE_DEFAULT = 0 | Both 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 = 1 | The 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 = 2 | Both 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 = 3 | The 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 = 4 | The 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 = 5 | The 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
| Value | Description |
|---|---|
| ARKUI_SHADOW_STYLE_OUTER_DEFAULT_XS = 0 | Mini shadow.![]() |
| ARKUI_SHADOW_STYLE_OUTER_DEFAULT_SM = 1 | Small shadow.![]() |
| ARKUI_SHADOW_STYLE_OUTER_DEFAULT_MD = 2 | Medium shadow.![]() |
| ARKUI_SHADOW_STYLE_OUTER_DEFAULT_LG = 3 | Large shadow.![]() |
| ARKUI_SHADOW_STYLE_OUTER_FLOATING_SM = 4 | Floating small shadow.![]() |
| ARKUI_SHADOW_STYLE_OUTER_FLOATING_MD = 5 | Floating medium shadow.![]() |
ArkUI_AnimationCurve
enum ArkUI_AnimationCurve
Description
Enumerates the animation curves.
Since: 12
| Value | Description |
|---|---|
| ARKUI_CURVE_LINEAR = 0 | The animation speed keeps unchanged. |
| ARKUI_CURVE_EASE = 1 | The animation starts slowly, accelerates, and then slows down towards the end. |
| ARKUI_CURVE_EASE_IN = 2 | The animation starts at a low speed and then picks up speed until the end. |
| ARKUI_CURVE_EASE_OUT = 3 | The animation ends at a low speed. |
| ARKUI_CURVE_EASE_IN_OUT = 4 | The animation starts and ends at a low speed, providing a smooth and natural transition. |
| ARKUI_CURVE_FAST_OUT_SLOW_IN = 5 | The animation uses the standard curve |
| ARKUI_CURVE_LINEAR_OUT_SLOW_IN = 6 | The animation uses the deceleration curve. |
| ARKUI_CURVE_FAST_OUT_LINEAR_IN = 7 | The animation uses the acceleration curve. |
| ARKUI_CURVE_EXTREME_DECELERATION = 8 | The animation uses the extreme deceleration curve. |
| ARKUI_CURVE_SHARP = 9 | The animation uses the sharp curve. |
| ARKUI_CURVE_RHYTHM = 10 | The animation uses the rhythm curve. |
| ARKUI_CURVE_SMOOTH = 11 | The animation uses the smooth curve. |
| ARKUI_CURVE_FRICTION = 12 | The animation uses the friction curve |
ArkUI_SwiperArrow
enum ArkUI_SwiperArrow
Description
Enumerates arrow styles of the navigation indicator.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SWIPER_ARROW_HIDE = 0 | The arrow is not displayed for the navigation indicator. |
| ARKUI_SWIPER_ARROW_SHOW = 1 | The arrow is displayed for the navigation indicator. |
| ARKUI_SWIPER_ARROW_SHOW_ON_HOVER = 2 | The 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
| Value | Description |
|---|---|
| ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY = 0 | The 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 = 1 | The 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
| Value | Description |
|---|---|
| ARKUI_PAGE_FLIP_MODE_CONTINUOUS = 0 | Continuous page flipping mode where multiple pages are turned continuously when the user scrolls the mouse wheel without interruption. |
| ARKUI_PAGE_FLIP_MODE_SINGLE = 1 | The 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
| Value | Description |
|---|---|
| ARKUI_SWIPER_NO_ANIMATION = 0 | No animation is displayed for redirecting to a target page. |
| ARKUI_SWIPER_DEFAULT_ANIMATION = 1 | An animation is displayed for redirecting to a target page. |
| ARKUI_SWIPER_FAST_ANIMATION = 2 | First 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
| Value | Description |
|---|---|
| ARKUI_ACCESSIBILITY_MODE_AUTO = 0 | The mode is automatically set to enabled or disabled based on the component. |
| ARKUI_ACCESSIBILITY_MODE_ENABLED = 1 | The component can be identified by the accessibility service. |
| ARKUI_ACCESSIBILITY_MODE_DISABLED = 2 | The component cannot be identified by the accessibility service. |
| ARKUI_ACCESSIBILITY_MODE_DISABLED_FOR_DESCENDANTS = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_TEXT_COPY_OPTIONS_NONE = 0 | Copy is not allowed. |
| ARKUI_TEXT_COPY_OPTIONS_IN_APP = 1 | Intra-application copy is allowed. |
| ARKUI_TEXT_COPY_OPTIONS_LOCAL_DEVICE = 2 | Intra-device copy is allowed. |
| ARKUI_TEXT_COPY_OPTIONS_CROSS_DEVICE = 3 | Cross-device copy is allowed. |
ArkUI_TextHeightAdaptivePolicy
enum ArkUI_TextHeightAdaptivePolicy
Description
Defines how the adaptive height is determined for the text.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MAX_LINES_FIRST = 0 | Prioritize the maxLines settings. |
| ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_MIN_FONT_SIZE_FIRST = 1 | Prioritize the minFontSize settings. |
| ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_LAYOUT_CONSTRAINT_FIRST = 2 | Prioritize the layout constraint settings in terms of height. |
ArkUI_ScrollNestedMode
enum ArkUI_ScrollNestedMode
Description
Enumerates nested scrolling modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SCROLL_NESTED_MODE_SELF_ONLY = 0 | The 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 = 1 | The 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 = 2 | The 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 = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_SCROLL_EDGE_TOP = 0 | Top edge in the vertical direction. |
| ARKUI_SCROLL_EDGE_BOTTOM = 1 | Bottom edge in the vertical direction. |
| ARKUI_SCROLL_EDGE_START = 2 | Start position in the horizontal direction. |
| ARKUI_SCROLL_EDGE_END = 3 | End 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
| Value | Description |
|---|---|
| ARKUI_SCROLL_ALIGNMENT_START = 0 | The start edge of the list item is flush with the start edge of the container. |
| ARKUI_SCROLL_ALIGNMENT_CENTER = 1 | The list item is centered along the main axis of the container. |
| ARKUI_SCROLL_ALIGNMENT_END = 2 | The end edge of the list item is flush with the end edge of the container. |
| ARKUI_SCROLL_ALIGNMENT_AUTO = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_SCROLL_STATE_IDLE = 0 | Idle. 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 = 1 | Scrolling. The container enters this state when the user drags the container to scroll. |
| ARKUI_SCROLL_STATE_FLING = 2 | Inertial 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
| Value | Description |
|---|---|
| ARKUI_SLIDER_BLOCK_STYLE_DEFAULT = 0 | Round slider. |
| ARKUI_SLIDER_BLOCK_STYLE_IMAGE = 1 | Slider with an image background. |
| ARKUI_SLIDER_BLOCK_STYLE_SHAPE = 2 | Slider in a custom shape. |
ArkUI_SliderDirection
enum ArkUI_SliderDirection
Description
Enumerates the scroll directions of the slider.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SLIDER_DIRECTION_VERTICAL = 0 | Vertical direction. |
| ARKUI_SLIDER_DIRECTION_HORIZONTAL = 1 | Horizontal direction. |
ArkUI_SliderStyle
enum ArkUI_SliderStyle
Description
Enumerates the slider styles.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SLIDER_STYLE_OUT_SET = 0 | The slider is on the slider rail. |
| ARKUI_SLIDER_STYLE_IN_SET = 1 | The slider is in the slider rail. |
| ARKUI_SLIDER_STYLE_NONE = 2 | There is no thumb. |
ArkUI_CheckboxShape
enum ArkUI_CheckboxShape
Description
Enumerates the shapes of the check box.
Since: 12
| Value | Description |
|---|---|
| ArkUI_CHECKBOX_SHAPE_CIRCLE = 0 | Circle. |
| ArkUI_CHECKBOX_SHAPE_ROUNDED_SQUARE = 1 | Rounded square. |
ArkUI_AnimationPlayMode
enum ArkUI_AnimationPlayMode
Description
Enumerates the animation playback modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ANIMATION_PLAY_MODE_NORMAL = 0 | The animation is played forwards. |
| ARKUI_ANIMATION_PLAY_MODE_REVERSE = 1 | The animation is played backwards. |
| ARKUI_ANIMATION_PLAY_MODE_ALTERNATE = 2 | The 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 = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_IMAGE_SIZE_AUTO = 0 | The original image aspect ratio is retained. |
| ARKUI_IMAGE_SIZE_COVER = 1 | The 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 = 2 | The 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
| Value | Description |
|---|---|
| ARKUI_ADAPTIVE_COLOR_DEFAULT = 0 | Adaptive color mode is not used. |
| ARKUI_ADAPTIVE_COLOR_AVERAGE = 1 | Adaptive color mode is used. |
ArkUI_ColorMode
enum ArkUI_ColorMode
Description
Enumerates the color modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_COLOR_MODE_SYSTEM = 0 | Following the system color mode. |
| ARKUI_COLOR_MODE_LIGHT = 1 | Light color mode. |
| ARKUI_COLOR_MODE_DARK = 2 | Dark color mode. |
ArkUI_SystemColorMode
enum ArkUI_SystemColorMode
Description
Enumerates the system color modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SYSTEM_COLOR_MODE_LIGHT = 0 | Light mode. |
| ARKUI_SYSTEM_COLOR_MODE_DARK = 1 | Dark mode. |
ArkUI_BlurStyle
enum ArkUI_BlurStyle
Description
Enumerates the blur styles.
Since: 12
| Value | Description |
|---|---|
| ARKUI_BLUR_STYLE_THIN = 0 | Thin material.![]() |
| ARKUI_BLUR_STYLE_REGULAR = 1 | Regular material.![]() |
| ARKUI_BLUR_STYLE_THICK = 2 | Thick material.![]() |
| ARKUI_BLUR_STYLE_BACKGROUND_THIN = 3 | Material that creates the minimum depth of field effect.![]() |
| ARKUI_BLUR_STYLE_BACKGROUND_REGULAR = 4 | Material that creates a medium shallow depth of field effect.![]() |
| ARKUI_BLUR_STYLE_BACKGROUND_THICK = 5 | Material that creates a high shallow depth of field effect.![]() |
| ARKUI_BLUR_STYLE_BACKGROUND_ULTRA_THICK = 6 | Material that creates the maximum depth of field effect.![]() |
| ARKUI_BLUR_STYLE_NONE = 7 | No blur.![]() |
| ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THIN = 8 | Component ultra-thin material.![]() |
| ARKUI_BLUR_STYLE_COMPONENT_THIN = 9 | Component thin material.![]() |
| ARKUI_BLUR_STYLE_COMPONENT_REGULAR = 10 | Component regular material.![]() |
| ARKUI_BLUR_STYLE_COMPONENT_THICK = 11 | Component thick material.![]() |
| ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THICK = 12 | Component ultra-thick material.![]() |
ArkUI_BlurStyleActivePolicy
enum ArkUI_BlurStyleActivePolicy
Description
Enumerates the activation policies for the background blur effect.
Since: 19
| Value | Description |
|---|---|
| ARKUI_BLUR_STYLE_ACTIVE_POLICY_FOLLOWS_WINDOW_ACTIVE_STATE = 0 | The 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 = 1 | The blur effect is always active. |
| ARKUI_BLUR_STYLE_ACTIVE_POLICY_ALWAYS_INACTIVE = 2 | The blur effect is always inactive. |
ArkUI_VerticalAlignment
enum ArkUI_VerticalAlignment
Description
Enumerates the vertical alignment modes.
Since: 12
| Value | Description |
|---|---|
| ARKUI_VERTICAL_ALIGNMENT_TOP = 0 | Top aligned. |
| ARKUI_VERTICAL_ALIGNMENT_CENTER = 1 | Aligned with the center. This is the default alignment mode. |
| ARKUI_VERTICAL_ALIGNMENT_BOTTOM = 2 | Bottom aligned. |
ArkUI_HorizontalAlignment
enum ArkUI_HorizontalAlignment
Description
Enumerates the alignment mode in the horizontal direction.
Since: 12
| Value | Description |
|---|---|
| ARKUI_HORIZONTAL_ALIGNMENT_START = 0 | Aligned with the start edge in the same direction as the language in use. |
| ARKUI_HORIZONTAL_ALIGNMENT_CENTER = 1 | Aligned with the center. This is the default alignment mode. |
| ARKUI_HORIZONTAL_ALIGNMENT_END = 2 | Aligned 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
| Value | Description |
|---|---|
| ARKUI_TEXT_OVERFLOW_NONE = 0 | Extra-long text is not clipped. |
| ARKUI_TEXT_OVERFLOW_CLIP = 1 | Extra-long text is clipped. |
| ARKUI_TEXT_OVERFLOW_ELLIPSIS = 2 | An ellipsis (...) is used to represent text overflow. |
| ARKUI_TEXT_OVERFLOW_MARQUEE = 3 | Text continuously scrolls when text overflow occurs. |
ArkUI_ImageSpanAlignment
enum ArkUI_ImageSpanAlignment
Description
Enumerates the alignment mode of the image with the text.
Since: 12
| Value | Description |
|---|---|
| ARKUI_IMAGE_SPAN_ALIGNMENT_BASELINE = 0 | The image is bottom aligned with the text baseline. |
| ARKUI_IMAGE_SPAN_ALIGNMENT_BOTTOM | The image is bottom aligned with the text. |
| ARKUI_IMAGE_SPAN_ALIGNMENT_CENTER | The image is centered aligned with the text. |
| ARKUI_IMAGE_SPAN_ALIGNMENT_TOP | The image is top aligned with the text. |
| ARKUI_IMAGE_SPAN_ALIGNMENT_FOLLOW_PARAGRAPH | The 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
| Value | Description |
|---|---|
| ARKUI_OBJECT_FIT_CONTAIN = 0 | The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries. |
| ARKUI_OBJECT_FIT_COVER = 1 | The 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 = 2 | The image is scaled automatically to fit the display area. |
| ARKUI_OBJECT_FIT_FILL = 3 | The image is scaled to fill the display area, and its aspect ratio is not retained. |
| ARKUI_OBJECT_FIT_SCALE_DOWN = 4 | The image is displayed with its aspect ratio retained, in a size smaller than or equal to the original size. |
| ARKUI_OBJECT_FIT_NONE = 5 | The original size is retained. |
| ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP_START = 6 | Not resized, the image is aligned with the start edge of the top of the container. |
| ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP = 7 | Not resized, the image is horizontally centered at the top of the container. |
| ARKUI_OBJECT_FIT_NONE_AND_ALIGN_TOP_END = 8 | Not resized, the image is aligned with the end edge at the top of the container. |
| ARKUI_OBJECT_FIT_NONE_AND_ALIGN_START = 9 | Not resized, the image is vertically centered on the start edge of the container. |
| ARKUI_OBJECT_FIT_NONE_AND_ALIGN_CENTER = 10 | Not resized, the image is horizontally and vertically centered in the container. |
| ARKUI_OBJECT_FIT_NONE_AND_ALIGN_END = 11 | Not resized, the image is vertically centered on the end edge of the container. |
| ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM_START = 12 | Not resized, the image is aligned with the start edge at the bottom of the container. |
| ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM = 13 | Not resized, the image is horizontally centered at the bottom of the container. |
| ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM_END = 14 | Not resized, the image is aligned with the end edge at the bottom of the container. |
| ARKUI_OBJECT_FIT_NONE_MATRIX = 15 | The 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
| Value | Description |
|---|---|
| ARKUI_IMAGE_INTERPOLATION_NONE = 0 | No image interpolation. |
| ARKUI_IMAGE_INTERPOLATION_LOW = 1 | Low quality interpolation. |
| ARKUI_IMAGE_INTERPOLATION_MEDIUM = 2 | Medium quality interpolation. |
| ARKUI_IMAGE_INTERPOLATION_HIGH = 3 | High 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
| Value | Description |
|---|---|
| ARKUI_DYNAMIC_RANGE_MODE_HIGH = 0 | High 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_CONSTRAINT | Constrained 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_STANDARD | Standard 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
| Value | Description |
|---|---|
| ARKUI_ORIENTATION_AUTO = 0 | Use 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_UP | Display original pixel data without transformation. |
| ARKUI_ORIENTATION_RIGHT | Display the image after rotating it 90 degrees clockwise. |
| ARKUI_ORIENTATION_DOWN | Display the image after rotating it 180 degrees clockwise. |
| ARKUI_ORIENTATION_LEFT | Display the image after rotating it 270 degrees clockwise. |
| ARKUI_ORIENTATION_UP_MIRRORED | Display the image after flipping it horizontally. |
| ARKUI_ORIENTATION_RIGHT_MIRRORED | Display the image after flipping it horizontally and then rotating it 90 degrees clockwise. |
| ARKUI_ORIENTATION_DOWN_MIRRORED | Display the image after flipping it vertically. |
| ARKUI_ORIENTATION_LEFT_MIRRORED | Display 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
| Value | Description |
|---|---|
| ARKUI_BLEND_MODE_NONE = 0 | The top image is superimposed on the bottom image without any blending. |
| ARKUI_BLEND_MODE_CLEAR = 1 | The target pixels covered by the source pixels are erased by being turned to completely transparent. |
| ARKUI_BLEND_MODE_SRC = 2 | r = s: Only the source pixels are displayed. |
| ARKUI_BLEND_MODE_DST = 3 | r = d: Only the target pixels are displayed. |
| ARKUI_BLEND_MODE_SRC_OVER = 4 | r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels. |
| ARKUI_BLEND_MODE_DST_OVER = 5 | r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels. |
| ARKUI_BLEND_MODE_SRC_IN = 6 | r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed. |
| ARKUI_BLEND_MODE_DST_IN = 7 | r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed. |
| ARKUI_BLEND_MODE_SRC_OUT = 8 | r = 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 = 9 | r = 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 = 10 | r = 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 = 11 | r = 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 = 12 | r = 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 = 13 | r = min(s + d, 1): New pixels resulting from adding the source pixels to the target pixels are displayed. |
| ARKUI_BLEND_MODE_MODULATE = 14 | r = s * d: New pixels resulting from multiplying the source pixels with the target pixels are displayed. |
| ARKUI_BLEND_MODE_SCREEN = 15 | r = 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 = 16 | The MULTIPLY or SCREEN mode is used based on the target pixels. |
| ARKUI_BLEND_MODE_DARKEN = 17 | rc = s + d - max(s * da, d * sa), ra = kSrcOver: When two colors overlap, whichever is darker is used. |
| ARKUI_BLEND_MODE_LIGHTEN = 18 | rc = s + d - min(s * da, d * sa), ra = kSrcOver: The darker of the pixels (source and target) is used. |
| ARKUI_BLEND_MODE_COLOR_DODGE = 19 | The colors of the target pixels are lightened to reflect the source pixels. |
| ARKUI_BLEND_MODE_COLOR_BURN = 20 | The colors of the target pixels are darkened to reflect the source pixels. |
| ARKUI_BLEND_MODE_HARD_LIGHT = 21 | The MULTIPLY or SCREEN mode is used, depending on the source pixels. |
| ARKUI_BLEND_MODE_SOFT_LIGHT = 22 | The LIGHTEN or DARKEN mode is used, depending on the source pixels. |
| ARKUI_BLEND_MODE_DIFFERENCE = 23 | rc = 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 = 24 | rc = s + d - two(s * d), ra = kSrcOver: The final pixel is similar to DIFFERENCE, but with less contrast. |
| ARKUI_BLEND_MODE_MULTIPLY = 25 | r = 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 = 26 | The resultant image is created with the luminance and saturation of the source image and the hue of the target image. |
| ARKUI_BLEND_MODE_SATURATION = 27 | The resultant image is created with the luminance and hue of the target image and the saturation of the source image. |
| ARKUI_BLEND_MODE_COLOR = 28 | The resultant image is created with the saturation and hue of the source image and the luminance of the target image. |
| ARKUI_BLEND_MODE_LUMINOSITY = 29 | The 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
| Value | Description |
|---|---|
| ARKUI_DIRECTION_LTR = 0 | Components are arranged from left to right. This is the default value. |
| ARKUI_DIRECTION_RTL = 1 | Components are arranged from right to left. |
| ARKUI_DIRECTION_AUTO = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_ITEM_ALIGNMENT_AUTO = 0 | The default configuration in the Flex container is used. This is the default value. |
| ARKUI_ITEM_ALIGNMENT_START = 1 | The items in the flex container are aligned with the cross-start edge. |
| ARKUI_ITEM_ALIGNMENT_CENTER = 2 | The items in the flex container are centered along the cross axis. |
| ARKUI_ITEM_ALIGNMENT_END = 3 | The items in the flex container are aligned with the cross-end edge. |
| ARKUI_ITEM_ALIGNMENT_STRETCH = 4 | The items in the flex container are stretched and padded along the cross axis. |
| ARKUI_ITEM_ALIGNMENT_BASELINE = 5 | The 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
| Value | Description |
|---|---|
| ARKUI_COLOR_STRATEGY_INVERT = 0 | The foreground colors are the inverse of the component background colors. |
| ARKUI_COLOR_STRATEGY_AVERAGE = 1 | The shadow colors of the component are the average color obtained from the component background shadow area. |
| ARKUI_COLOR_STRATEGY_PRIMARY = 2 | The 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
| Value | Description |
|---|---|
| ARKUI_FLEX_ALIGNMENT_START = 1 | The child components are aligned with the start edge of the main axis. This is the default value. |
| ARKUI_FLEX_ALIGNMENT_CENTER = 2 | The child components are aligned in the center of the main axis. |
| ARKUI_FLEX_ALIGNMENT_END = 3 | The child components are aligned with the end edge of the main axis. |
| ARKUI_FLEX_ALIGNMENT_SPACE_BETWEEN = 6 | The 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 = 7 | The 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 = 8 | The 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
| Value | Description |
|---|---|
| ARKUI_FLEX_DIRECTION_ROW = 0 | The 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 = 1 | The child components are arranged in the same direction as the main axis runs down the columns. |
| ARKUI_FLEX_DIRECTION_ROW_REVERSE = 2 | The child components are arranged opposite to the ROW direction. |
| ARKUI_FLEX_DIRECTION_COLUMN_REVERSE = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_FLEX_WRAP_NO_WRAP = 0 | The 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 = 1 | The child components in the flex container are arranged in multiple lines, and they may overflow. |
| ARKUI_FLEX_WRAP_WRAP_REVERSE = 2 | The 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
| Value | Description |
|---|---|
| ARKUI_VISIBILITY_VISIBLE = 0 | The component is visible. |
| ARKUI_VISIBILITY_HIDDEN = 1 | The component is hidden, and a placeholder is used for it in the layout. |
| ARKUI_VISIBILITY_NONE = 2 | The 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
| Value | Description |
|---|---|
| ARKUI_CALENDAR_ALIGNMENT_START = 0 | Left aligned. |
| ARKUI_CALENDAR_ALIGNMENT_CENTER = 1 | Center aligned. |
| ARKUI_CALENDAR_ALIGNMENT_END = 2 | Right 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
| Value | Description |
|---|---|
| ARKUI_MASK_TYPE_RECTANGLE = 0 | Rectangle. |
| ARKUI_MASK_TYPE_CIRCLE = 1 | Circle. |
| ARKUI_MASK_TYPE_ELLIPSE = 2 | Ellipse. |
| ARKUI_MASK_TYPE_PATH = 3 | Path. |
| ARKUI_MASK_TYPE_PROGRESS = 4 | Progress indicator. |
ArkUI_ClipType
enum ArkUI_ClipType
Description
Enumerates the clipping region types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_CLIP_TYPE_RECTANGLE = 0 | Rectangle. |
| ARKUI_CLIP_TYPE_CIRCLE = 1 | Circle. |
| ARKUI_CLIP_TYPE_ELLIPSE = 2 | Ellipse. |
| ARKUI_CLIP_TYPE_PATH = 3 | Path. |
ArkUI_ShapeType
enum ArkUI_ShapeType
Description
Enumerates custom shape types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SHAPE_TYPE_RECTANGLE = 0 | Rectangle. |
| ARKUI_SHAPE_TYPE_CIRCLE = 1 | Circle. |
| ARKUI_SHAPE_TYPE_ELLIPSE = 2 | Ellipse. |
| ARKUI_SHAPE_TYPE_PATH = 3 | Path. |
ArkUI_LinearGradientDirection
enum ArkUI_LinearGradientDirection
Description
Enumerates the gradient directions.
Since: 12
| Value | Description |
|---|---|
| ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT = 0 | From right to left. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_TOP = 1 | From bottom to top. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT = 2 | From left to right. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_BOTTOM = 3 | From top to bottom. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_TOP = 4 | From lower right to upper left. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_LEFT_BOTTOM = 5 | From upper right to lower left. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_TOP = 6 | From lower left to upper right. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_RIGHT_BOTTOM = 7 | From upper left to lower right. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_NONE = 8 | No gradient. |
| ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM = 9 | Custom direction. |
ArkUI_WordBreak
enum ArkUI_WordBreak
Description
Enumerates the word break rules.
Since: 12
| Value | Description |
|---|---|
| ARKUI_WORD_BREAK_NORMAL = 0 | Word 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_ALL | Word breaks can occur between any two characters for non-CJK text. CJK text behavior is the same as for NORMAL. |
| ARKUI_WORD_BREAK_BREAK_WORD | This 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_HYPHENATION | Line 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
| Value | Description |
|---|---|
| ARKUI_ELLIPSIS_MODE_START = 0 | An ellipsis is used at the start of the line of text. This applies to single-line text scenarios. |
| ARKUI_ELLIPSIS_MODE_CENTER = 1 | An ellipsis is used at the center of the line of text. This applies to single-line text scenarios. |
| ARKUI_ELLIPSIS_MODE_END = 2 | An 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 = 3 | An 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 = 4 | An 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
| Value | Description |
|---|---|
| ARKUI_IMAGE_RENDER_MODE_ORIGINAL = 0 | Render image pixels as they are in the original source image. |
| ARKUI_IMAGE_RENDER_MODE_TEMPLATE = 1 | Render 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
| Value | Description |
|---|---|
| ARKUI_TRANSITION_EDGE_TOP = 0 | The component slides in and out from the top edge of the screen during transition. |
| ARKUI_TRANSITION_EDGE_BOTTOM = 1 | The component slides in and out from the bottom edge of the screen during transition. |
| ARKUI_TRANSITION_EDGE_START = 2 | The component slides in and out from the left edge of the screen during transition. |
| ARKUI_TRANSITION_EDGE_END = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_FINISH_CALLBACK_REMOVED = 0 | The callback is invoked when the entire animation is removed once it has finished. |
| ARKUI_FINISH_CALLBACK_LOGICALLY = 1 | The 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
| Value | Description |
|---|---|
| ARKUI_LIST_ITEM_ALIGNMENT_START = 0 | The list items are packed toward the start edge of the List component along the cross axis. |
| ARKUI_LIST_ITEM_ALIGNMENT_CENTER = 1 | The list items are centered in the List component along the cross axis. |
| ARKUI_LIST_ITEM_ALIGNMENT_END = 2 | The 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
| Value | Description |
|---|---|
| BLEND_APPLY_TYPE_FAST = 0 | The content of the view is blended in sequence on the target image. |
| BLEND_APPLY_TYPE_OFFSCREEN = 1 | The 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
| Value | Description |
|---|---|
| ARKUI_LENGTH_METRIC_UNIT_DEFAULT = -1 | Default, which is fp for fonts and vp for non-fonts. |
| ARKUI_LENGTH_METRIC_UNIT_PX = 0 | px. |
| ARKUI_LENGTH_METRIC_UNIT_VP = 1 | vp. |
| ARKUI_LENGTH_METRIC_UNIT_FP = 2 | fp. |
ArkUI_TextInputContentType
enum ArkUI_TextInputContentType
Description
Enumerates the autofill types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXTINPUT_CONTENT_TYPE_USER_NAME = 0 | Username. Password Vault, when enabled, can automatically save and fill in usernames. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_PASSWORD | Password. Password Vault, when enabled, can automatically save and fill in passwords. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_NEW_PASSWORD | New password. Password Vault, when enabled, can automatically generate a new password. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_STREET_ADDRESS | Full street address. The scenario-based autofill feature, when enabled, can automatically save and fill in full street addresses. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_HOUSE_NUMBER | House number. The scenario-based autofill feature, when enabled, can automatically save and fill in house numbers. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_DISTRICT_ADDRESS | District and county. The scenario-based autofill feature, when enabled, can automatically save and fill in districts and counties. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_CITY_ADDRESS | City. The scenario-based autofill feature, when enabled, can automatically save and fill in cities. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_PROVINCE_ADDRESS | Province. The scenario-based autofill feature, when enabled, can automatically save and fill in provinces. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_COUNTRY_ADDRESS | Country. The scenario-based autofill feature, when enabled, can automatically save and fill in countries. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FULL_NAME | Full name. The scenario-based autofill feature, when enabled, can automatically save and fill in full names. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_LAST_NAME | Last name. The scenario-based autofill feature, when enabled, can automatically save and fill in last names. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FIRST_NAME | First name. The scenario-based autofill feature, when enabled, can automatically save and fill in first names. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_NUMBER | Phone number. The scenario-based autofill feature, when enabled, can automatically save and fill in phone numbers. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_COUNTRY_CODE | Country code. The scenario-based autofill feature, when enabled, can automatically save and fill in country codes. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_PHONE_NUMBER | Phone 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_ADDRESS | Email address. The scenario-based autofill feature, when enabled, can automatically save and fill in email addresses. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_BANK_CARD_NUMBER | Bank card number. The scenario-based autofill feature, when enabled, can automatically save and fill in bank card numbers. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_ID_CARD_NUMBER | ID card number. The scenario-based autofill feature, when enabled, can automatically save and fill in ID card numbers. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_NICKNAME | Nickname. The scenario-based autofill feature, when enabled, can automatically save and fill in nicknames. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_DETAIL_INFO_WITHOUT_STREET | Address 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_ADDRESS | Standard address. The scenario-based autofill feature, when enabled, can automatically save and fill in standard addresses. |
| ARKUI_TEXTINPUT_CONTENT_TYPE_PASSPORT_NUMBER | Passport number. The scenario-based autofill feature, when enabled, can automatically save and fill in passport numbers. Since: 18 |
| ARKUI_TEXTINPUT_CONTENT_TYPE_VALIDITY | Passport 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_AT | Passport 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_ORGANIZATION | Invoice title. The scenario-based autofill feature, when enabled, can automatically save and fill in invoice titles. Since: 18 |
| ARKUI_TEXTINPUT_CONTENT_TYPE_TAX_ID | Tax 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_STATE | Location. The scenario-based autofill feature, when enabled, can automatically save and fill in locations. Since: 18 |
| ARKUI_TEXTINPUT_CONTENT_TYPE_FLIGHT_NUMBER | Flight number. Currently not supported for automatic saving and auto-filling. Since: 18 |
| ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_NUMBER | Driver's license number. Currently not supported for automatic saving and auto-filling. Since: 18 |
| ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_FILE_NUMBER | Driver's license file number. Currently not supported for automatic saving and auto-filling. Since: 18 |
| ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_PLATE | License 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_NUMBER | Vehicle registration engine number. Currently not supported for automatic saving and auto-filling. Since: 18 |
| ARKUI_TEXTINPUT_CONTENT_TYPE_LICENSE_CHASSIS_NUMBER | Chassis number. Currently not supported for automatic saving and auto-filling. Since: 18 |
ArkUI_BarrierDirection
enum ArkUI_BarrierDirection
Description
Enumerates the barrier directions.
Since: 12
| Value | Description |
|---|---|
| ARKUI_BARRIER_DIRECTION_START = 0 | The barrier is on the left side of all the referenced components specified by referencedId. This is the default value. |
| ARKUI_BARRIER_DIRECTION_END = 1 | The barrier is on the right side of all the referenced components specified by referencedId. |
| ARKUI_BARRIER_DIRECTION_TOP = 2 | The barrier is at the top of all the referenced components specified by referencedId. |
| ARKUI_BARRIER_DIRECTION_BOTTOM = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD = 0 | Child components are evenly distributed among constraint anchors. This is the default value. |
| ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD_INSIDE = 1 | All child components except the first and last ones are evenly distributed among constraint anchors. |
| ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_PACKED = 2 | There is no gap between child components in the chain. |
ArkUI_TextInputStyle
enum ArkUI_TextInputStyle
Description
Enumerates the text input styles.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXTINPUT_STYLE_DEFAULT = 0 | Default 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_INLINE | Inline 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
| Value | Description |
|---|---|
| ARKUI_KEYBOARD_APPEARANCE_NONE_IMMERSIVE = 0 | Default appearance mode, not using the immersive style. |
| ARKUI_KEYBOARD_APPEARANCE_IMMERSIVE = 1 | Immersive style, following the system color mode. |
| ARKUI_KEYBOARD_APPEARANCE_LIGHT_IMMERSIVE = 2 | Immersive style in light mode. |
| ARKUI_KEYBOARD_APPEARANCE_DARK_IMMERSIVE = 3 | Immersive style in dark mode. |
ArkUI_TextDataDetectorType
enum ArkUI_TextDataDetectorType
Description
Enumerates the entity types of text recognition.
Since: 12
| Value | Description |
|---|---|
| ARKUI_TEXT_DATA_DETECTOR_TYPE_PHONE_NUMBER = 0 | Phone number. |
| ARKUI_TEXT_DATA_DETECTOR_TYPE_URL | URL. |
| ARKUI_TEXT_DATA_DETECTOR_TYPE_EMAIL | Email address. |
| ARKUI_TEXT_DATA_DETECTOR_TYPE_ADDRESS | Address. |
ArkUI_ButtonType
enum ArkUI_ButtonType
Description
Enumerates the button types.
Since: 12
| Value | Description |
|---|---|
| ARKUI_BUTTON_TYPE_NORMAL = 0 | Normal button (without rounded corners by default). |
| ARKUI_BUTTON_TYPE_CAPSULE = 1 | Capsule-type button (the round corner is half of the height by default). |
| ARKUI_BUTTON_TYPE_CIRCLE = 2 | Circle button. |
| ARKUI_BUTTON_ROUNDED_RECTANGLE = 8 | Rounded 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
| Value | Description |
|---|---|
| ARKUI_RENDER_FIT_CENTER = 0 | The component's content stays at the final size and always aligned with the center of the component. |
| ARKUI_RENDER_FIT_TOP = 1 | The component's content stays at the final size and always aligned with the top center of the component. |
| ARKUI_RENDER_FIT_BOTTOM = 2 | The component's content stays at the final size and always aligned with the bottom center of the component. |
| ARKUI_RENDER_FIT_LEFT = 3 | The component's content stays at the final size and always aligned with the left of the component. |
| ARKUI_RENDER_FIT_RIGHT = 4 | The component's content stays at the final size and always aligned with the right of the component. |
| ARKUI_RENDER_FIT_TOP_LEFT = 5 | The component's content stays at the final size and always aligned with the upper left corner of the component. |
| ARKUI_RENDER_FIT_TOP_RIGHT = 6 | The component's content stays at the final size and always aligned with the upper right corner of the component. |
| ARKUI_RENDER_FIT_BOTTOM_LEFT = 7 | The component's content stays at the final size and always aligned with the lower left corner of the component. |
| ARKUI_RENDER_FIT_BOTTOM_RIGHT = 8 | The component's content stays at the final size and always aligned with the lower right corner of the component. |
| ARKUI_RENDER_FIT_RESIZE_FILL = 9 | The 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 = 10 | While 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 = 11 | While 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 = 12 | While 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 = 13 | While 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 = 14 | While 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 = 15 | While 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
| Value | Description |
|---|---|
| ARKUI_SWIPER_INDICATOR_TYPE_DOT = 0 | Dot type. |
| ARKUI_SWIPER_INDICATOR_TYPE_DIGIT = 1 | Digit type. |
ArkUI_AnimationDirection
enum ArkUI_AnimationDirection
Description
Enumerates the animation playback directions.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ANIMATION_DIRECTION_NORMAL = 0 | The animation plays in forward loop mode. |
| ARKUI_ANIMATION_DIRECTION_REVERSE = 1 | The animation plays in reverse loop mode. |
| ARKUI_ANIMATION_DIRECTION_ALTERNATE = 2 | The 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 = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_COLLAPSED = 0 | Collapsed 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 = 1 | Expanded 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 = 2 | In-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
| Value | Description |
|---|---|
| ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_SPRING = 0 | When 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 = 1 | The 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
| Value | Description |
|---|---|
| ARKUI_LIST_ITEM_SWIPE_ACTION_DIRECTION_START = 0 | For vertical lists: left side in LTR mode, right side in RTL mode. For horizontal lists: top side. |
| ARKUI_LIST_ITEM_SWIPE_ACTION_DIRECTION_END = 1 | For 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
| Value | Description |
|---|---|
| ARKUI_ANIMATION_STATUS_INITIAL = 0 | The animation is in the initial state. |
| ARKUI_ANIMATION_STATUS_RUNNING = 1 | The animation is being played. |
| ARKUI_ANIMATION_STATUS_PAUSED = 2 | The animation is paused. |
| ARKUI_ANIMATION_STATUS_STOPPED = 3 | The animation is stopped. |
ArkUI_AnimationFillMode
enum ArkUI_AnimationFillMode
Description
Enumerates the states before and after execution of the frame-by-frame animation.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ANIMATION_FILL_MODE_NONE = 0 | Before 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 = 1 | The target component retains the state set by the last keyframe encountered during execution of the animation. |
| ARKUI_ANIMATION_FILL_MODE_BACKWARDS = 2 | The 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 = 3 | The 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
| Value | Description |
|---|---|
| ARKUI_ERROR_CODE_NO_ERROR = 0 | No error. |
| ARKUI_ERROR_CODE_PARAM_INVALID = 401 | Parameter error. |
| ARKUI_ERROR_CODE_CAPI_INIT_ERROR = 500 | API initialization error. Since: 18 |
| ARKUI_ERROR_CODE_INTERNAL_ERROR = 100001 | Internal error, such as failure due to internal environment issues or operation failure caused by internal execution errors. Since: 15 |
| ARKUI_ERROR_CODE_PARAM_ERROR = 100023 | Parameter error. For details about the error code, see 100023 Parameter Error. Since: 21 |
| ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID = 103501 | The XComponent is in an invalid or unsupported state. For details, see XComponent Error Codes. Since: 19 |
| ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED = 106102 | The component does not support specific attributes or events. For details, see Interaction Event Error Codes. |
| ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE = 106103 | The 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 = 106104 | The 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 = 106105 | The adapter already exists. For details about the error code, see 106105 Adapter Already Exists. |
| ARKUI_ERROR_CODE_CHILD_NODE_EXIST = 106106 | Failed 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 = 106107 | The 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 = 106108 | The 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 = 106109 | The 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 = 106110 | This event type is not supported. For details about the error code, see 106110 Unsupported Event Type. Since: 21 |
| ARKUI_ERROR_CODE_NODE_INDEX_INVALID = 106200 | Invalid index. For details about the error code, see 106200 Invalid Index Value. |
| ARKUI_ERROR_CODE_GET_INFO_FAILED = 106201 | Failed 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 = 106202 | The 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 = 106203 | The 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 = 106204 | Operations 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 = 106205 | The 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 = 106206 | The 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 = 106207 | The 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 = 106208 | The 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 = 106209 | The 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 = 106210 | The 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 = 106401 | The current node is not a custom node. For details, see Render Node Error Codes. Since: 20 |
| ARKUI_ERROR_CODE_CHILD_EXISTED = 106402 | The current node already has child nodes. For details, see Render Node Error Codes. Since: 20 |
| ARKUI_ERROR_CODE_RENDER_PARENT_EXISTED = 106403 | The current render node has a parent component. For details, see Render Node Error Codes. Since: 20 |
| ARKUI_ERROR_CODE_RENDER_CHILD_NOT_EXIST = 106404 | Corresponding render child node not found. For details, see Render Node Error Codes. Since: 20 |
| ARKUI_ERROR_CODE_PARAM_OUT_OF_RANGE = 106405 | The parameter value is out of range. For details, see Render Node Error Codes. Since: 20 |
| ARKUI_ERROR_CODE_RENDER_IS_FROM_FRAME_NODE = 106406 | The 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 = 106407 | The 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 = 106408 | The 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 = 150001 | The 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 = 150002 | An 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 = 150003 | The 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 = 160002 | Snapshot timed out. For details, see Snapshot Error Codes. Since: 15 |
| ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_MODE_NOT_SUPPORTED = 160003 | The 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 = 160004 | The 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 = 180001 | The component is not a scrollable container. For details, see Interaction Event Error Codes. |
| ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH = 180002 | The buffer is not large enough. For details, see Interaction Event Error Codes. |
| ARKUI_ERROR_CODE_NOT_CLONED_POINTER_EVENT = 180003 | The event is not a cloned event. For details, see Interaction Event Error Codes. Since: 15 |
| ARKUI_ERROR_CODE_POST_CLONED_COMPONENT_STATUS_ABNORMAL = 180004 | The 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 = 180005 | No component hit to respond to the event. For details, see Interaction Event Error Codes. Since: 15 |
| ARKUI_ERROR_INPUT_EVENT_TYPE_NOT_SUPPORTED = 180006 | Input event type not supported. Since: 20 |
| ARKUI_ERROR_CODE_INVALID_STYLED_STRING = 180101 | Invalid styled string. For details, see Styled String Error Codes. Since: 14 |
| ARKUI_ERROR_CODE_UI_CONTEXT_INVALID = 190001 | Invalid UIContext object. For details, see UI Context Error Codes. Since: 18 |
| ARKUI_ERROR_CODE_CALLBACK_INVALID = 190002 | Invalid callback function. For details, see UI Context Error Codes. Since: 18 |
| ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED = 180102 | The gesture recognizer type is not supported. For details, see Interaction Event Error Codes. Since: 18 |
| ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED = 190004 | The 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
| Value | Description |
|---|---|
| ARKUI_SCROLL_SOURCE_DRAG = 0 | Finger dragging. |
| ARKUI_SCROLL_SOURCE_FLING = 1 | Inertia scrolling after finger dragging. |
| ARKUI_SCROLL_SOURCE_EDGE_EFFECT = 2 | EdgeEffect.Spring for boundary crossing. |
| ARKUI_SCROLL_SOURCE_OTHER_USER_INPUT = 3 | User input other than dragging, such as mouse wheel and keyboard events. |
| ARKUI_SCROLL_SOURCE_SCROLL_BAR = 4 | Scrollbar dragging. |
| ARKUI_SCROLL_SOURCE_SCROLL_BAR_FLING = 5 | Inertial scrolling after scrollbar dragging. |
| ARKUI_SCROLL_SOURCE_SCROLLER = 6 | Scrolling by the scroll controller (without animation). |
| ARKUI_SCROLL_SOURCE_ANIMATION = 7 | Scrolling by the scroll controller (with animation). |
ArkUI_SafeAreaType
enum ArkUI_SafeAreaType
Description
Enumerates the types of expanded safe areas.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SAFE_AREA_TYPE_SYSTEM = 1 | Default non-safe area of the system, including the status bar and navigation bar. This is the default value. |
| ARKUI_SAFE_AREA_TYPE_CUTOUT = 1 << 1 | Non-safe area of the device, for example, the notch area. |
| ARKUI_SAFE_AREA_TYPE_KEYBOARD = 1 << 2 | Soft keyboard area. |
ArkUI_SafeAreaEdge
enum ArkUI_SafeAreaEdge
Description
Enumerates the edges for expanding the safe area.
Since: 12
| Value | Description |
|---|---|
| ARKUI_SAFE_AREA_EDGE_TOP = 1 | Top edge. This is the default value. |
| ARKUI_SAFE_AREA_EDGE_BOTTOM = 1 << 1 | Bottom edge. |
| ARKUI_SAFE_AREA_EDGE_START = 1 << 2 | Start edge. |
| ARKUI_SAFE_AREA_EDGE_END = 1 << 3 | End edge. |
ArkUI_FocusMove
enum ArkUI_FocusMove
Description
Enumerates the focus movement directions.
Since: 18
| Value | Description |
|---|---|
| ARKUI_FOCUS_MOVE_FORWARD = 0 | Move focus forward. |
| ARKUI_FOCUS_MOVE_BACKWARD = 1 | Move focus backward. |
| ARKUI_FOCUS_MOVE_UP = 2 | Move focus up. |
| ARKUI_FOCUS_MOVE_DOWN = 3 | Move focus down. |
| ARKUI_FOCUS_MOVE_LEFT = 4 | Move focus left. |
| ARKUI_FOCUS_MOVE_RIGHT = 5 | Move 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
| Value | Description |
|---|---|
| ARKUI_LIST_ITEM_GROUP_AREA_OUTSIDE = 0 | Outside the area of the ListItemGroup component. |
| ARKUI_LIST_ITEM_SWIPE_AREA_NONE = 1 | Area without the header, footer, and ListItem in the ListItemGroup component. |
| ARKUI_LIST_ITEM_SWIPE_AREA_ITEM = 2 | List item area of the ListItemGroup component. |
| ARKUI_LIST_ITEM_SWIPE_AREA_HEADER = 3 | Header area of the ListItemGroup component. |
| ARKUI_LIST_ITEM_SWIPE_AREA_FOOTER = 4 | Footer area of the ListItemGroup component. |
ArkUI_KeyboardAvoidMode
enum ArkUI_KeyboardAvoidMode
Description
Enumerates the soft keyboard avoidance modes.
Since: 15
| Value | Description |
|---|---|
| ARKUI_KEYBOARD_AVOID_MODE_DEFAULT = 0 | Automatically avoids the soft keyboard and compresses the height when reaching the maximum limit. |
| ARKUI_KEYBOARD_AVOID_MODE_NONE = 1 | The 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
| Value | Description |
|---|---|
| ARKUI_HOVER_MODE_AREA_TYPE_TOP = 0 | Upper half screen. |
| ARKUI_HOVER_MODE_AREA_TYPE_BOTTOM = 1 | Lower half screen. |
ArkUI_ExpandMode
enum ArkUI_ExpandMode
Description
Enumerates the expansion mode of child nodes.
Since: 15
| Value | Description |
|---|---|
| ARKUI_NOT_EXPAND = 0 | Child nodes are not expanded. |
| ARKUI_EXPAND = 1 | Child nodes are expanded immediately upon rendering. |
| ARKUI_LAZY_EXPAND = 2 | Lazy 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
| Value | Description |
|---|---|
| ARKUI_NAV_DESTINATION_STATE_ON_SHOW = 0 | The NavDestination component is displayed. |
| ARKUI_NAV_DESTINATION_STATE_ON_HIDE = 1 | The NavDestination component is hidden. |
| ARKUI_NAV_DESTINATION_STATE_ON_APPEAR = 2 | The NavDestination component is mounted to the component tree. |
| ARKUI_NAV_DESTINATION_STATE_ON_DISAPPEAR = 3 | The NavDestination component is unmounted from the component tree. |
| ARKUI_NAV_DESTINATION_STATE_ON_WILL_SHOW = 4 | The NavDestination is about to be displayed. |
| ARKUI_NAV_DESTINATION_STATE_ON_WILL_HIDE = 5 | The NavDestination is about to be hidden. |
| ARKUI_NAV_DESTINATION_STATE_ON_WILL_APPEAR = 6 | The NavDestination is about to be mounted to the component tree. |
| ARKUI_NAV_DESTINATION_STATE_ON_WILL_DISAPPEAR = 7 | The NavDestination component is about to be unmounted from the component tree. |
| ARKUI_NAV_DESTINATION_STATE_ON_BACK_PRESS = 100 | The back button is pressed for the NavDestination component. |
ArkUI_RouterPageState
enum ArkUI_RouterPageState
Description
Enumerates the states of Router Page.
Since: 12
| Value | Description |
|---|---|
| ARKUI_ROUTER_PAGE_STATE_ABOUT_TO_APPEAR = 0 | The page is about to be displayed. |
| ARKUI_ROUTER_PAGE_STATE_ABOUT_TO_DISAPPEAR = 1 | The page is about to be destroyed. |
| ARKUI_ROUTER_PAGE_STATE_ON_SHOW = 2 | The page is displayed. |
| ARKUI_ROUTER_PAGE_STATE_ON_HIDE = 3 | The page is hidden. |
| ARKUI_ROUTER_PAGE_STATE_ON_BACK_PRESS = 4 | The 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
| Value | Description |
|---|---|
| UI_STATE_NORMAL = 0 | Normal state. |
| UI_STATE_PRESSED = 1 << 0 | Pressed state. |
| UI_STATE_FOCUSED = 1 << 1 | Focused state. |
| UI_STATE_DISABLED = 1 << 2 | Disabled state. |
| UI_STATE_SELECTED = 1 << 3 | Selected 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
| Value | Description |
|---|---|
| ARKUI_FOCUS_WRAP_MODE_DEFAULT = 0 | Default mode, where focus does not wrap when arrow keys are used. |
| ARKUI_FOCUS_WRAP_WITH_ARROW = 1 | Auto 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
| Value | Description |
|---|---|
| ARKUI_ITEMFILLPOLICY_NONE = -1 | No responsive breakpoint policy is set. |
| ARKUI_ITEMFILLPOLICY_DEFAULT = 0 | List 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 = 1 | 1 column (SM or smaller), 2 columns (MD), 3 columns (LG or larger). |
| ARKUI_ITEMFILLPOLICY_SM2MD3LG5 = 2 | 2 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
| Value | Description |
|---|---|
| ARKUI_SCROLL_SNAP_ANIMATION_NORMAL = 0 | Normal scroll snap animation speed. |
| ARKUI_SCROLL_SNAP_ANIMATION_SLOW = 1 | Slow scroll snap animation speed. |
ArkUI_EdgeDirection
enum ArkUI_EdgeDirection
Description
Enumerates rectangle edge directions.
Since: 20
| Value | Description |
|---|---|
| ARKUI_EDGE_DIRECTION_ALL = 0 | All four edges. |
| ARKUI_EDGE_DIRECTION_LEFT = 1 << 0 | Left edge. |
| ARKUI_EDGE_DIRECTION_RIGHT = 1 << 1 | Right edge. |
| ARKUI_EDGE_DIRECTION_TOP = 1 << 2 | Top edge. |
| ARKUI_EDGE_DIRECTION_BOTTOM = 1 << 3 | Bottom edge. |
ArkUI_CornerDirection
enum ArkUI_CornerDirection
Description
Enumerates corner directions.
Since: 20
| Value | Description |
|---|---|
| ARKUI_CORNER_DIRECTION_ALL = 0 | All four corners. |
| ARKUI_CORNER_DIRECTION_TOP_LEFT = 1 << 0 | Upper left corner. |
| ARKUI_CORNER_DIRECTION_TOP_RIGHT = 1 << 1 | Upper right corner. |
| ARKUI_CORNER_DIRECTION_BOTTOM_LEFT = 1 << 2 | Lower left corner. |
| ARKUI_CORNER_DIRECTION_BOTTOM_RIGHT = 1 << 3 | Lower right corner. |
ArkUI_LayoutPolicy
enum ArkUI_LayoutPolicy
Description
Enumerates layout policies.
Since: 21
| Value | Description |
|---|---|
| ARKUI_LAYOUTPOLICY_MATCHPARENT = 0 | The component size matches parent container dimensions. |
| ARKUI_LAYOUTPOLICY_WRAPCONTENT = 1 | The component size wraps its content, constrained by parent container bounds. |
| ARKUI_LAYOUTPOLICY_FIXATIDEALSIZE = 2 | The component size wraps its content, unconstrained by parent container bounds. |
ArkUI_PixelRoundCalcPolicy
enum ArkUI_PixelRoundCalcPolicy
Description
Enumerates pixel rounding calculation policies.
Since: 21
| Value | Description |
|---|---|
| ARKUI_PIXELROUNDCALCPOLICY_NOFORCEROUND = 0 | No forced rounding calculation. |
| ARKUI_PIXELROUNDCALCPOLICY_FORCECEIL = 1 | Round-up calculation. |
| ARKUI_PIXELROUNDCALCPOLICY_FORCEFLOOR = 2 | Round-down calculation. |
ArkUI_GridItemAlignment
enum ArkUI_GridItemAlignment
Description
Enumerates the alignment modes of the GridItem component.
Since: 22
| Value | Description |
|---|---|
| GRID_ITEM_ALIGNMENT_DEFAULT = 0 | Use the default alignment mode of the grid. |
| GRID_ITEM_ALIGNMENT_STRETCH = 1 | Use 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
| Value | Description |
|---|---|
| GRID_ITEM_STYLE_NONE = 0 | No style. |
| GRID_ITEM_STYLE_PLAIN = 1 | Hover or press style. |
ArkUI_HoverEffect
enum ArkUI_HoverEffect
Description
Enumerates the hover effects when a component is hovered over.
Since: 23
| Value | Description |
|---|---|
| ARKUI_HOVER_EFFECT_AUTO = 0 | Default effect. |
| ARKUI_HOVER_EFFECT_SCALE | Zoom effect. |
| ARKUI_HOVER_EFFECT_HIGHLIGHT | Highlight effect. |
| ARKUI_HOVER_EFFECT_NONE | No 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
| Value | Description |
|---|---|
| ARKUI_FOCUS_PRIORITY_AUTO = 0 | Default priority. |
| ARKUI_FOCUS_PRIORITY_PRIOR = 2000 | Priority that indicates the component is prioritized in the container. |
| ARKUI_FOCUS_PRIORITY_PREVIOUS = 3000 | Priority of a previously focused node in the container. |
ArkUI_MenuPolicy
enum ArkUI_MenuPolicy
Description
Enumerates menu display policies.
Since: 23
| Value | Description |
|---|---|
| ARKUI_MENU_POLICY_DEFAULT = 0 | Whether the menu is displayed depends on the underlying default logic. |
| ARKUI_MENU_POLICY_HIDE = 1 | The menu is not popped up. |
| ARKUI_MENU_POLICY_SHOW = 2 | The menu is popped up. |
ArkUI_ResponseRegionSupportedTool
enum ArkUI_ResponseRegionSupportedTool
Description
Enumerates the input tool types supported for response region configuration.
Since: 23
| Value | Description |
|---|---|
| ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_ALL = 0 | All. |
| ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_FINGER = 1 | Finger. |
| ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_PEN = 2 | Stylus. |
| ARKUI_RESPONSE_REGIN_SUPPORTED_TOOL_MOUSE = 3 | Mouse. |
ArkUI_TextMenuItemId
enum ArkUI_TextMenuItemId
Description
Enumerates the IDs of text menu items.
Since: 22
| Value | Description |
|---|---|
| ARKUI_TEXT_MENU_ITEM_ID_CUT = 0 | Clip. |
| ARKUI_TEXT_MENU_ITEM_ID_COPY = 1 | Copy. |
| ARKUI_TEXT_MENU_ITEM_ID_PASTE = 2 | Paste. |
| ARKUI_TEXT_MENU_ITEM_ID_SELECT_ALL = 3 | Select all. |
| ARKUI_TEXT_MENU_ITEM_ID_COLLABORATION_SERVICE = 4 | Collaboration service. For example, cross-device interaction, including cross-device camera access. |
| ARKUI_TEXT_MENU_ITEM_ID_CAMERA_INPUT = 5 | Camera input. |
| ARKUI_TEXT_MENU_ITEM_ID_AI_WRITER = 6 | AI-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 = 7 | Translate. The translation service is provided for the selected text. |
| ARKUI_TEXT_MENU_ITEM_ID_SEARCH = 8 | Search. This menu item launches a browser to search for the selected text. |
| ARKUI_TEXT_MENU_ITEM_ID_SHARE = 9 | Share. This menu item launches a window for sharing the selected text. |
| ARKUI_TEXT_MENU_ITEM_ID_URL = 10 | Open 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 = 11 | New Email. This menu item provides the redirection service for the selected email address, launching the email application. |
| ARKUI_TEXT_MENU_ITEM_ID_PHONE_NUMBER = 12 | Call. This menu item provides the redirection service for the selected phone number, launching the phone dialer page. |
| ARKUI_TEXT_MENU_ITEM_ID_ADDRESS = 13 | Navigate. This menu item provides the redirection service for the selected address, launching the map application. |
| ARKUI_TEXT_MENU_ITEM_ID_DATA_TIME = 14 | New 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 = 15 | Ask AI. This menu item provides the AI query capability for the selected text. |
| ARKUI_TEXT_MENU_ITEM_ID_AUTO_FILL = 16 | Autofill. For example, the account and password can be automatically filled. Since: 24 |
| ARKUI_TEXT_MENU_ITEM_ID_PASSWORD_VAULT = 17 | Password vault. Since: 24 |
| ARKUI_TEXT_MENU_ITEM_ID_APP_RESERVED_BEGIN = 10000 | Start 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 = 20000 | End 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
| Value | Description |
|---|---|
| ARKUI_TEXT_SPAN_TYPE_TEXT = 0 | Text. |
| ARKUI_TEXT_SPAN_TYPE_IMAGE = 1 | Image. |
| ARKUI_TEXT_SPAN_TYPE_MIXED = 2 | Mixed text and image. |
| ARKUI_TEXT_SPAN_TYPE_DEFAULT = 3 | If 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
| Value | Description |
|---|---|
| ARKUI_TEXT_RESPONSE_TYPE_RIGHT_CLICK = 0 | The menu is displayed when the component is right-clicked. |
| ARKUI_TEXT_RESPONSE_TYPE_LONG_PRESS = 1 | The menu is displayed when the component is long-pressed. |
| ARKUI_TEXT_RESPONSE_TYPE_SELECT = 2 | The menu is displayed when the component is selected. |
| ARKUI_TEXT_RESPONSE_TYPE_DEFAULT = 3 | If 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
| Value | Description |
|---|---|
| ARKUI_MARQUEESTARTPOLICY_DEFAULT = 0 | The marquee scrolls continuously by default. |
| ARKUI_MARQUEESTARTPOLICY_ONFOCUS = 1 | The 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
| Value | Description |
|---|---|
| ARKUI_MARQUEEUPDATEPOLICY_DEFAULT = 0 | After the marquee attributes are updated, the marquee scrolls from the start position. |
| ARKUI_MARQUEEUPDATEPOLICY_PRESERVEPOSITION = 1 | After 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
| Value | Description |
|---|---|
| ARKUI_LAYOUT_SAFE_AREA_TYPE_SYSTEM = 1 | Default 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
| Value | Description |
|---|---|
| ARKUI_LAYOUT_SAFE_AREA_EDGE_TOP = 1 | Top edge. |
| ARKUI_LAYOUT_SAFE_AREA_EDGE_BOTTOM = 1 << 1 | Bottom edge. |
| ARKUI_LAYOUT_SAFE_AREA_EDGE_START = 1 << 2 | Start edge. |
| ARKUI_LAYOUT_SAFE_AREA_EDGE_END = 1 << 3 | End edge. |
| ARKUI_LAYOUT_SAFE_AREA_EDGE_VERTICAL = ARKUI_LAYOUT_SAFE_AREA_EDGE_TOP |ARKUI_LAYOUT_SAFE_AREA_EDGE_BOTTOM = 3 | Vertical edge. |
| ARKUI_LAYOUT_SAFE_AREA_EDGE_HORIZONTAL = ARKUI_LAYOUT_SAFE_AREA_EDGE_START |ARKUI_LAYOUT_SAFE_AREA_EDGE_END = 12 | Horizontal edge. |
| ARKUI_LAYOUT_SAFE_AREA_EDGE_ALL = ARKUI_LAYOUT_SAFE_AREA_EDGE_VERTICAL |ARKUI_LAYOUT_SAFE_AREA_EDGE_HORIZONTAL = 15 | All edges. |
ArkUI_LocalizedAlignment
enum ArkUI_LocalizedAlignment
Description
Defines the alignment rules of child components in a Stack container.
Since: 23
| Value | Description |
|---|---|
| ARKUI_LOCALIZED_ALIGNMENT_TOP_START = 0 | Top start. |
| ARKUI_LOCALIZED_ALIGNMENT_TOP = 1 | Top center. |
| ARKUI_LOCALIZED_ALIGNMENT_TOP_END = 2 | Top end. |
| ARKUI_LOCALIZED_ALIGNMENT_START = 3 | Vertically centered start. |
| ARKUI_LOCALIZED_ALIGNMENT_CENTER = 4 | Horizontally and vertically centered. |
| ARKUI_LOCALIZED_ALIGNMENT_END = 5 | Vertically centered end. |
| ARKUI_LOCALIZED_ALIGNMENT_BOTTOM_START = 6 | Bottom start. |
| ARKUI_LOCALIZED_ALIGNMENT_BOTTOM = 7 | Horizontally centered on the bottom. |
| ARKUI_LOCALIZED_ALIGNMENT_BOTTOM_END = 8 | Bottom end. |
ArkUI_RenderStrategy
enum ArkUI_RenderStrategy
Description
Enumerates strategies for drawing rounded corners.
Since: 23
| Value | Description |
|---|---|
| ARKUI_RENDERSTRATEGY_FAST = 0 | Online drawing mode. |
| ARKUI_RENDERSTRATEGY_OFFSCREEN = 1 | Off-screen drawing mode. |
ArkUI_PickerIndicatorType
enum ArkUI_PickerIndicatorType
Description
Defines the indicator type of the selected item.
Since: 23
| Value | Description |
|---|---|
| ARKUI_PICKER_INDICATOR_BACKGROUND = 0 | Background. |
| ARKUI_PICKER_INDICATOR_DIVIDER = 1 | Divider. |
OH_ArkUI_HapticFeedbackMode
enum OH_ArkUI_HapticFeedbackMode
Description
Enumerates vibration effect types.
Since: 24
| Value | Description |
|---|---|
| OH_ARKUI_HAPTIC_FEEDBACK_MODE_DISABLED = 0 | No vibration. |
| OH_ARKUI_HAPTIC_FEEDBACK_MODE_ENABLED = 1 | Vibration. |
| OH_ARKUI_HAPTIC_FEEDBACK_MODE_AUTO = 2 | System vibration. |
OH_ArkUI_TextEditorSpanType
enum OH_ArkUI_TextEditorSpanType
Description
Enumerates the span types of a custom text selection menu.
Since: 24
| Value | Description |
|---|---|
| OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_TEXT = 0 | Text span. |
| OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_IMAGE = 1 | Image span. |
| OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_MIXED = 2 | Mixed span. |
| OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_BUILDER = 3 | Custom layout span. |
| OH_ARKUI_TEXT_EDITOR_SPAN_TYPE_DEFAULT = 4 | Default span. |
OH_ArkUI_TextEditorResponseType
enum OH_ArkUI_TextEditorResponseType
Description
Enumerates the response types of a custom text selection menu.
Since: 24
| Value | Description |
|---|---|
| OH_ARKUI_TEXT_EDITOR_RESPONSE_TYPE_RIGHT_CLICK = 0 | The menu is displayed when the component is right-clicked. |
| OH_ARKUI_TEXT_EDITOR_RESPONSE_TYPE_LONG_PRESS = 1 | The menu is displayed when the component is long-pressed. |
| OH_ARKUI_TEXT_EDITOR_RESPONSE_TYPE_SELECT = 2 | The menu is displayed when the component is selected. |
| OH_ARKUI_TEXT_EDITOR_RESPONSE_TYPE_DEFAULT = 3 | Default response type. |
OH_ArkUI_TextMenuType
enum OH_ArkUI_TextMenuType
Description
Enumerates text menu types.
Since: 24
| Value | Description |
|---|---|
| OH_ARKUI_TEXT_EDITOR_SELECTION_MENU = 0 | Text selection menu. |
| OH_ARKUI_TEXT_EDITOR_PREVIEW_MENU = 1 | Preview menu. |
OH_ArkUI_LineBreakStrategy
enum OH_ArkUI_LineBreakStrategy
Description
Enumerates line break policies.
Since: 24
| Value | Description |
|---|---|
| OH_ARKUI_LINE_BREAK_STRATEGY_GREEDY = 0 | Greedy 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 = 1 | High-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 = 2 | Balance 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| const ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| const ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
Returns
| Type | Description |
|---|---|
| int32_t | Maximum 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
| Name | Description |
|---|---|
| const ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
Returns
| Type | Description |
|---|---|
| int32_t | Minimum 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
| Name | Description |
|---|---|
| const ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
Returns
| Type | Description |
|---|---|
| int32_t | Maximum 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
| Name | Description |
|---|---|
| const ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
Returns
| Type | Description |
|---|---|
| int32_t | Minimum 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
| Name | Description |
|---|---|
| const ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
Returns
| Type | Description |
|---|---|
| int32_t | Width 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
| Name | Description |
|---|---|
| const ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
Returns
| Type | Description |
|---|---|
| int32_t | Height 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
| Name | Description |
|---|---|
| ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
| int32_t value | Maximum 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
| Name | Description |
|---|---|
| ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
| int32_t value | Minimum 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
| Name | Description |
|---|---|
| ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
| int32_t value | Maximum 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
| Name | Description |
|---|---|
| ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
| int32_t value | Minimum 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
| Name | Description |
|---|---|
| ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
| int32_t value | Width 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
| Name | Description |
|---|---|
| ArkUI_LayoutConstraint* Constraint | Pointer to the layout constraint. |
| int32_t value | Height 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
| Name | Description |
|---|---|
| ArkUI_DrawContext* context | Pointer to the drawing context. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_DrawContext* context | Pointer to the drawing context. |
Returns
| Type | Description |
|---|---|
| ArkUI_IntSize | Size of the drawing area. |
OH_ArkUI_WaterFlowSectionOption_Create()
ArkUI_WaterFlowSectionOption* OH_ArkUI_WaterFlowSectionOption_Create()
Description
Creates the FlowItem section configuration.
Since: 12
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to a water flow section configuration. |
| int32_t size | Size 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to a water flow section configuration. |
Returns
| Type | Description |
|---|---|
| int32_t | Size 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to the FlowItem section configuration. |
| int32_t index | Index of the target water flow section. |
| int32_t itemCount | Number 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to the FlowItem section configuration. |
| int32_t index | Index of the target water flow section. |
Returns
| Type | Description |
|---|---|
| int32_t | Number 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to a water flow section configuration. |
| int32_t index | Index of the target water flow section. |
| int32_t crossCount | Number 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to a water flow section configuration. |
| int32_t index | Index of the target water flow section. |
Returns
| Type | Description |
|---|---|
| int32_t | Number 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to a water flow section configuration. |
| int32_t index | Index of the target water flow section. |
| float columnGap | Gap 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to a water flow section configuration. |
| int32_t index | Index of the target water flow section. |
Returns
| Type | Description |
|---|---|
| float | Gap 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to a water flow section configuration. |
| int32_t index | Index of the FlowItem section configuration array. |
| float rowGap | Gap 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to the FlowItem section configuration. |
| int32_t index | Index of the target water flow section. |
Returns
| Type | Description |
|---|---|
| float | Gap 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to the FlowItem section configuration. |
| int32_t index | Index of the target water flow section. |
| float marginTop | Top margin of FlowItem. |
| float marginRight | Right margin of FlowItem. |
| float marginBottom | Bottom margin of FlowItem. |
| float marginLeft | Left 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to the FlowItem section configuration. |
| int32_t index | Index of the target water flow section. |
Returns
| Type | Description |
|---|---|
| ArkUI_Margin | Margins. 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to the FlowItem section configuration. |
| int32_t index | Index of the target water flow section. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_WaterFlowSectionOption* option | Pointer to the FlowItem section configuration. |
| int32_t index | Index of the target water flow section. |
| void* userData | Pointer to user-defined data, which will be passed back to the user in the callback. |
| callback | Callback 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
| Name | Description |
|---|---|
| int32_t size | Number of guidelines. The value range is [0, +∞). |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_GuidelineOption* guideline | Pointer 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
| Name | Description |
|---|---|
| ArkUI_GuidelineOption* guideline | Pointer to a guideline configuration. |
| const char* value | Pointer to the ID, which must be unique and cannot be the same as the name of any component in the container. |
| int32_t index | Index 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
| Name | Description |
|---|---|
| ArkUI_GuidelineOption* guideline | Pointer to a guideline configuration. |
| ArkUI_Axis value | Direction. |
| int32_t index | Index 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
| Name | Description |
|---|---|
| ArkUI_GuidelineOption* guideline | Pointer to a guideline configuration. |
| float value | Distance between a guideline and the left or top edge of the container, in vp. |
| int32_t index | Index 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
| Name | Description |
|---|---|
| ArkUI_GuidelineOption* guideline | Pointer to a guideline configuration. |
| float value | Distance between a guideline and the right or bottom edge of the container, in vp. |
| int32_t index | Index 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
| Name | Description |
|---|---|
| ArkUI_GuidelineOption* guideline | Pointer to a guideline configuration. |
| int32_t index | Index of the guideline. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_GuidelineOption* guideline | Pointer to a guideline configuration. |
| int32_t index | Index of the guideline. |
Returns
| Type | Description |
|---|---|
| ArkUI_Axis | Direction. |
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
| Name | Description |
|---|---|
| ArkUI_GuidelineOption* guideline | Pointer to a guideline configuration. |
| int32_t index | Index of the guideline. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| ArkUI_GuidelineOption* guideline | Pointer to a guideline configuration. |
| int32_t index | Index of the guideline. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| int32_t size | Number of barriers. The value range is [0, +∞). |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_BarrierOption* barrierStyle | Pointer 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
| Name | Description |
|---|---|
| ArkUI_BarrierOption* barrierStyle | Pointer to the barrier configuration. |
| const char* value | Pointer to the ID, which must be unique and cannot be the same as the name of any component in the container. |
| int32_t index | Index 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
| Name | Description |
|---|---|
| ArkUI_BarrierOption* barrierStyle | Pointer to the barrier configuration. |
| ArkUI_BarrierDirection value | Direction. |
| int32_t index | Index 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
| Name | Description |
|---|---|
| ArkUI_BarrierOption* barrierStyle | Pointer to the barrier configuration. |
| const char* value | Pointer to the referenced component IDs. |
| int32_t index | Index 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
| Name | Description |
|---|---|
| ArkUI_BarrierOption* barrierStyle | Pointer to the barrier configuration. |
| int32_t index | Index of the barrier. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_BarrierOption* barrierStyle | Pointer to the barrier configuration. |
| int32_t index | Index of the barrier. |
Returns
| Type | Description |
|---|---|
| ArkUI_BarrierDirection | Direction 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
| Name | Description |
|---|---|
| ArkUI_BarrierOption* barrierStyle | Pointer to the barrier configuration. |
| int32_t index | Index of the barrier. |
| int32_t referencedIndex | Index of the referenced component ID. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_BarrierOption* barrierStyle | Pointer to the barrier configuration. |
| int32_t index | Index of the barrier. |
Returns
| Type | Description |
|---|---|
| int32_t | Number 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
| const char* id | Pointer to the ID of the component that functions as the anchor point. |
| ArkUI_HorizontalAlignment alignment | Alignment 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
| const char* id | Pointer to the ID of the component that functions as the anchor point. |
| ArkUI_HorizontalAlignment alignment | Alignment 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
| const char* id | Pointer to the ID of the component that functions as the anchor point. |
| ArkUI_HorizontalAlignment alignment | Alignment 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
| const char* id | Pointer to the ID of the component that functions as the anchor point. |
| ArkUI_VerticalAlignment alignment | Alignment 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
| const char* id | Pointer to the ID of the component that functions as the anchor point. |
| ArkUI_VerticalAlignment alignment | Alignment 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
| const char* id | Pointer to the ID of the component that functions as the anchor point. |
| ArkUI_VerticalAlignment alignment | Alignment 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
| float horizontal | Bias 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
| float vertical | Bias 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| ArkUI_HorizontalAlignment | Alignment 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| ArkUI_HorizontalAlignment | Right 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| ArkUI_HorizontalAlignment | Horizontal 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| ArkUI_VerticalAlignment | Top 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| ArkUI_VerticalAlignment | Bottom 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| ArkUI_VerticalAlignment | Vertical 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| float | Bias 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
| Name | Description |
|---|---|
| ArkUI_AlignmentRuleOption* option | Pointer to an alignment rule configuration. |
Returns
| Type | Description |
|---|---|
| float | Bias 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicatorType type | Type of the navigation indicator. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| float value | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| float value | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| float value | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| float value | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| int32_t ignoreSize | Whether 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| int32_t | Whether 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| float value | Width 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Width 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| float value | Height 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Height 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| float value | Width 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Width 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| float value | Height 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Height 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| int32_t mask | Whether 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| int32_t | The 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| uint32_t color | Color, 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| uint32_t | Color, 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| uint32_t selectedColor | Color, 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| uint32_t | Color, 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| int32_t maxDisplayCount | Maximum number of navigation points. Value range: [6, 9]. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| int32_t | Maximum 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
| float value | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
| float value | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
| float value | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
| float value | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Distance 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
| uint32_t color | Color, 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| uint32_t | Color, 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
| uint32_t selectedColor | Color, 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| uint32_t | Color, 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
| float size | Font 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Font 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
| float size | Font 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Font 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator *indicator | Pointer to the digit-style navigation indicator. |
| ArkUI_FontWeight fontWeight | Font 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| ArkUI_FontWeight | Font 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator *indicator | Pointer to the digit-style navigation indicator. |
| ArkUI_FontWeight selectedFontWeight | Font 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the digit-style navigation indicator. |
Returns
| Type | Description |
|---|---|
| ArkUI_FontWeight | Font 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
| int32_t showBackground | Whether 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
Returns
| Type | Description |
|---|---|
| int32_t | Whether 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
| int32_t showSidebarMiddle | Position 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
Returns
| Type | Description |
|---|---|
| int32_t | Position 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
| float backgroundSize | Background 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
Returns
| Type | Description |
|---|---|
| float | Background 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
| uint32_t backgroundColor | Background 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
Returns
| Type | Description |
|---|---|
| uint32_t | Background 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
| float arrowSize | Size 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
Returns
| Type | Description |
|---|---|
| float | Size 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
| uint32_t arrowColor | Color 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
| Name | Description |
|---|---|
| ArkUI_SwiperArrowStyle* arrowStyle | Pointer to the arrow object. |
Returns
| Type | Description |
|---|---|
| uint32_t | Color 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
| float space | Spacing 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
| Name | Description |
|---|---|
| ArkUI_SwiperIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| float | Spacing 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the navigation indicator. |
| int32_t ignoreSize | Whether 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
| Name | Description |
|---|---|
| ArkUI_SwiperDigitIndicator* indicator | Pointer to the navigation indicator. |
Returns
| Type | Description |
|---|---|
| int32_t | The 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| ArkUI_NodeHandle node | Layout 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| float distance | Swipe 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
Returns
| Type | Description |
|---|---|
| float | Swipe 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| void* userData | Pointer to the user-defined data. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| void* userData | Pointer to the user-defined data. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| void* userData | Pointer to the user-defined data. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionItem* item | Pointer to the ListItemSwipeActionItem instance. |
| void* userData | Pointer to the user-defined data. |
| callback | Callback 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionOption* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionOption* option | Pointer to the ListItemSwipeActionItem instance. |
| ArkUI_ListItemSwipeActionItem* item | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionOption* option | Pointer to the ListItemSwipeActionItem instance. |
| ArkUI_ListItemSwipeActionItem* item | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionOption* option | Pointer to the ListItemSwipeActionItem instance. |
| ArkUI_ListItemSwipeEdgeEffect edgeEffect | Effect 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionOption* option | Pointer to the ListItemSwipeActionItem instance. |
Returns
| Type | Description |
|---|---|
| int32_t | Effect 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionOption* option | Pointer to the ListItemSwipeActionItem instance. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_ListItemSwipeActionOption* option | Pointer to the ListItemSwipeActionItem instance. |
| void* userData | Pointer to the user-defined data. |
| callback | Callback 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
| Name | Description |
|---|---|
| ArkUI_NodeHandle node | ListItem node object. |
| ArkUI_ListItemSwipeActionDirection direction | Swipe action menu display direction for the ListItem component. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_NodeHandle node | ListItem node object. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityState* state | Pointer 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityState* state | Pointer to the created accessibility state object. |
| int32_t isDisabled | Whether 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityState* state | Pointer to the created accessibility state object. |
Returns
| Type | Description |
|---|---|
| int32_t | Whether 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityState* state | Pointer to the created accessibility state object. |
| int32_t isSelected | Whether 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityState* state | Pointer to the created accessibility state object. |
Returns
| Type | Description |
|---|---|
| int32_t | Whether 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityState* state | Pointer to the created accessibility state object. |
| int32_t checkedState | Check 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityState* state | Pointer to the created accessibility state object. |
Returns
| Type | Description |
|---|---|
| int32_t | Check 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the created AccessibilityValue instance. |
| int32_t min | Minimum 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the created AccessibilityValue instance. |
Returns
| Type | Description |
|---|---|
| int32_t | Minimum 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the created AccessibilityValue instance. |
| int32_t max | Maximum 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the created AccessibilityValue instance. |
Returns
| Type | Description |
|---|---|
| int32_t | Maximum 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the created AccessibilityValue instance. |
| int32_t current | Current 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the created AccessibilityValue instance. |
Returns
| Type | Description |
|---|---|
| int32_t | Current 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the accessibility information object of the range-based component for which you want to set the minimum value. |
| int32_t rangeMin | Minimum 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the accessibility information object of the range-based component for which you want to obtain the minimum value. |
Returns
| Type | Description |
|---|---|
| int32_t | Minimum 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the accessibility information object of the range-based component for which you want to set the maximum value. |
| int32_t rangeMax | Maximum 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the accessibility information object of the range-based component for which you want to obtain the minimum value. |
Returns
| Type | Description |
|---|---|
| int32_t | Maximum 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the accessibility information object of the range-based component for which you want to set the current value. |
| int32_t rangeCurrent | Current 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the accessibility information object of the range-based component for which you want to obtain the current value. |
Returns
| Type | Description |
|---|---|
| int32_t | Current 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the created AccessibilityValue instance. |
| const char* text | Pointer 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
| Name | Description |
|---|---|
| ArkUI_AccessibilityValue* value | Pointer to the created AccessibilityValue instance. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| char* src | Pointer to the image path, which can be a relative or absolute path in the application sandbox. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_DrawableDescriptor* drawable | Pointer to the ArkUI_DrawableDescriptor object created using a PixelMap. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
| int32_t width | Image width, in px. |
OH_ArkUI_ImageAnimatorFrameInfo_GetWidth()
int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetWidth(ArkUI_ImageAnimatorFrameInfo* imageInfo)
Description
Obtains the image width.
Since: 12
Parameters
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
Returns
| Type | Description |
|---|---|
| int32_t | Image 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
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
| int32_t height | Image height, in px. |
OH_ArkUI_ImageAnimatorFrameInfo_GetHeight()
int32_t OH_ArkUI_ImageAnimatorFrameInfo_GetHeight(ArkUI_ImageAnimatorFrameInfo* imageInfo)
Description
Obtains the image height.
Since: 12
Parameters
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
Returns
| Type | Description |
|---|---|
| int32_t | Image 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
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
| int32_t top | Vertical 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
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
Returns
| Type | Description |
|---|---|
| int32_t | Vertical 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
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
| int32_t left | Horizontal 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
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
Returns
| Type | Description |
|---|---|
| int32_t | Horizontal 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
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
| int32_t duration | Playback 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
| Name | Description |
|---|---|
| ArkUI_ImageAnimatorFrameInfo* imageInfo | Pointer to the image frame information object. |
Returns
| Type | Description |
|---|---|
| int32_t | Playback 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_ListChildrenMainSize* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ListChildrenMainSize* option | Pointer to the ListChildrenMainSize instance. |
| float defaultMainSize | Default size of the list item along the main axis, in vp. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_ListChildrenMainSize* option | Pointer to the ListChildrenMainSize instance. |
Returns
| Type | Description |
|---|---|
| float | Default 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
| Name | Description |
|---|---|
| ArkUI_ListChildrenMainSize* option | Pointer to the ListChildrenMainSize instance. |
| int32_t totalSize | Capacity 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
| Name | Description |
|---|---|
| ArkUI_ListChildrenMainSize* option | Pointer to the ListChildrenMainSize instance. |
| int32_t index | Start index. |
| int32_t deleteCount | Number of elements to be deleted from the start position. |
| int32_t addCount | Number of elements to be added from the start position. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_ListChildrenMainSize* option | Pointer to the ListChildrenMainSize instance. |
| int32_t index | Array index of the target element. |
| float mainSize | Size of the main axis, in vp. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_ListChildrenMainSize* option | Pointer to the ListChildrenMainSize instance. |
| int32_t index | Array index of the target element. |
Returns
| Type | Description |
|---|---|
| float | Value 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_CustomSpanMeasureInfo* info | Pointer 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
| Name | Description |
|---|---|
| ArkUI_CustomSpanMeasureInfo* info | Pointer to the measurement information of a custom span. |
Returns
| Type | Description |
|---|---|
| float | Font 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_CustomSpanMetrics* metrics | Pointer 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
| Name | Description |
|---|---|
| ArkUI_CustomSpanMetrics* metrics | Pointer to the CustomSpanMetrics instance. |
| float width | Width, in vp. The default value is 0.0f. The negative value has the same effect as the default value. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_CustomSpanMetrics* metrics | Pointer to the CustomSpanMetrics instance. |
| float height | Height, in vp. The default value is 0.0f. The negative value has the same effect as the default value. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_CustomSpanDrawInfo* info | Pointer 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
| Name | Description |
|---|---|
| ArkUI_CustomSpanDrawInfo* info | Pointer to the drawing information of a custom span. |
Returns
| Type | Description |
|---|---|
| float | X-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
| Name | Description |
|---|---|
| ArkUI_CustomSpanDrawInfo* info | Pointer to the drawing information of a custom span. |
Returns
| Type | Description |
|---|---|
| float | Top 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
| Name | Description |
|---|---|
| ArkUI_CustomSpanDrawInfo* info | Pointer to the drawing information of a custom span. |
Returns
| Type | Description |
|---|---|
| float | Bottom 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
| Name | Description |
|---|---|
| ArkUI_CustomSpanDrawInfo* info | Pointer to the drawing information of a custom span. |
Returns
| Type | Description |
|---|---|
| float | Baseline 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
| Name | Description |
|---|---|
| ArkUI_CustomProperty* handle | Pointer 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
| Name | Description |
|---|---|
| ArkUI_CustomProperty* handle | Pointer to the custom property object. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_HostWindowInfo* info | Pointer to the HostWindowInfo object. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_HostWindowInfo* info | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ActiveChildrenInfo* handle | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ActiveChildrenInfo* handle | Pointer to the ArkUI_ActiveChildrenInfo instance from which the information is to be obtained. |
| int32_t index | Index of the target child node. |
Returns
| Type | Description |
|---|---|
| ArkUI_NodeHandle | Handle 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
| Name | Description |
|---|---|
| ArkUI_ActiveChildrenInfo* handle | Pointer to the ArkUI_ActiveChildrenInfo instance from which the information is to be obtained. |
Returns
| Type | Description |
|---|---|
| int32_t | Number 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_ProgressLinearStyleOption* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ProgressLinearStyleOption* option | Pointer to a ProgressLinearStyleOption instance. |
| bool enabled | Whether 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
| Name | Description |
|---|---|
| ArkUI_ProgressLinearStyleOption* option | Pointer to a ProgressLinearStyleOption instance. |
| bool enabled | Whether 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
| Name | Description |
|---|---|
| ArkUI_ProgressLinearStyleOption* option | Pointer to a ProgressLinearStyleOption instance. |
| float strokeWidth | Stroke 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
| Name | Description |
|---|---|
| ArkUI_ProgressLinearStyleOption* option | Pointer to a ProgressLinearStyleOption instance. |
| float strokeRadius | Corner 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
| Name | Description |
|---|---|
| ArkUI_ProgressLinearStyleOption* option | Pointer to a ProgressLinearStyleOption instance. |
Returns
| Type | Description |
|---|---|
| bool | Whether 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
| Name | Description |
|---|---|
| ArkUI_ProgressLinearStyleOption* option | Pointer to a ProgressLinearStyleOption instance. |
Returns
| Type | Description |
|---|---|
| bool | Whether 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
| Name | Description |
|---|---|
| ArkUI_ProgressLinearStyleOption* option | Pointer to a ProgressLinearStyleOption instance. |
Returns
| Type | Description |
|---|---|
| float | Stroke 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
| Name | Description |
|---|---|
| ArkUI_ProgressLinearStyleOption* option | Pointer to a ProgressLinearStyleOption instance. |
Returns
| Type | Description |
|---|---|
| float | Corner 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_SnapshotOptions* snapshotOptions | Pointer 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
| Name | Description |
|---|---|
| ArkUI_SnapshotOptions* snapshotOptions | Pointer to the screenshot option. |
| float scale | Scale factor. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_SnapshotOptions* snapshotOptions | Pointer to the screenshot option. |
| int32_t colorSpace | Color 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 isAuto | Whether 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
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_SnapshotOptions* snapshotOptions | Pointer to the screenshot option. |
| int32_t dynamicRangeMode | Dynamic 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 isAuto | Whether 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
| Type | Description |
|---|---|
| int32_t | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_CrossLanguageOption* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_CrossLanguageOption* option | Pointer to the cross-language configuration option instance. |
| bool enabled | Whether 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
| Name | Description |
|---|---|
| ArkUI_CrossLanguageOption* option | Pointer to the cross-language configuration option instance. |
Returns
| Type | Description |
|---|---|
| bool | Whether 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_VisibleAreaEventOptions* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_VisibleAreaEventOptions* option | Pointer to the instance of visible area change event parameters. |
| float* value | Pointer 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 size | Size of the array of threshold ratios. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_VisibleAreaEventOptions *option | Pointer to the instance of visible area change event parameters. |
| int32_t value | Expected update interval, in ms. Default value: 1000. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_VisibleAreaEventOptions* option | Pointer to the instance of visible area change event parameters. |
| bool measureFromViewport | Visible 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
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_VisibleAreaEventOptions* option | Pointer to the instance of visible area change event parameters. |
| float* value | Pointer to the array of threshold ratios. |
| int32_t* size | Pointer to the size of the array of threshold ratios. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_VisibleAreaEventOptions* option | Pointer to the instance of visible area change event parameters. |
Returns
| Type | Description |
|---|---|
| int32_t | Expected 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
| Name | Description |
|---|---|
| ArkUI_VisibleAreaEventOptions* option | Pointer to the instance of visible area change event parameters. |
Returns
| Type | Description |
|---|---|
| bool | Visible 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
| Name | Description |
|---|---|
| int32_t length | Length of the TextPickerRangeContent array. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_TextPickerRangeContentArray* handle | Pointer to the TextPickerRangeContent array. |
| char* icon | Pointer to the icon path. |
| int32_t index | Array 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
| Name | Description |
|---|---|
| ArkUI_TextPickerRangeContentArray* handle | Pointer to the TextPickerRangeContent array. |
| char* text | Pointer to the text content. |
| int32_t index | Position 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
| Name | Description |
|---|---|
| ArkUI_TextPickerRangeContentArray* handle | Pointer 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
| Name | Description |
|---|---|
| int32_t length | Length of the TextPickerRangeContent array. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_TextCascadePickerRangeContentArray* handle | Pointer to the TextCascadePickerRangeContentHandle instance. |
| char* text | Pointer to the text content. |
| int32_t index | Position 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
| Name | Description |
|---|---|
| ArkUI_TextCascadePickerRangeContentArray* handle | Pointer to the TextCascadePickerRangeContentHandle instance. |
| ArkUI_TextCascadePickerRangeContentArray* child | Pointer to the child node array. |
| int32_t index | Position 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
| Name | Description |
|---|---|
| ArkUI_TextCascadePickerRangeContentArray* handle | Pointer to the TextCascadePickerRangeContentHandle instance. |
OH_ArkUI_EmbeddedComponentOption_Create()
ArkUI_EmbeddedComponentOption* OH_ArkUI_EmbeddedComponentOption_Create()
Description
Creates an EmbeddedComponent option object.
Since: 20
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_EmbeddedComponentOption* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_EmbeddedComponentOption* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_EmbeddedComponentOption* option | Pointer 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer to the PositionEdges object. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer to the PositionEdges object. |
| float value | Value 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer to the PositionEdges object. |
| float* value | Pointer to the value of the PositionEdges object in the corresponding direction, in vp. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer to the PositionEdges object. |
| float value | Value 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer to the PositionEdges object. |
| float* value | Pointer to the value of the PositionEdges object in the corresponding direction, in vp. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer to the PositionEdges object. |
| float value | Value 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer to the PositionEdges object. |
| float* value | Pointer to the value of the PositionEdges object in the corresponding direction, in vp. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer to the PositionEdges object. |
| float value | Value 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
| Name | Description |
|---|---|
| ArkUI_PositionEdges* edges | Pointer to the PositionEdges object. |
| float* value | Pointer to the value of the PositionEdges object in the corresponding direction, in vp. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_PixelRoundPolicy* policy | Pointer 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
| Name | Description |
|---|---|
| ArkUI_PixelRoundPolicy* policy | Pointer to the PixelRoundPolicy object. |
| ArkUI_PixelRoundCalcPolicy value | Specific 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
| Name | Description |
|---|---|
| ArkUI_PixelRoundPolicy* policy | Pointer to the PixelRoundPolicy object. |
| ArkUI_PixelRoundCalcPolicy* value | Pointer to the specific pixel rounding policy. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_PixelRoundPolicy* policy | Pointer to the PixelRoundPolicy object. |
| ArkUI_PixelRoundCalcPolicy value | Specific 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
| Name | Description |
|---|---|
| ArkUI_PixelRoundPolicy* policy | Pointer to the PixelRoundPolicy object. |
| ArkUI_PixelRoundCalcPolicy* value | Pointer to the specific pixel rounding policy. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_PixelRoundPolicy* policy | Pointer to the PixelRoundPolicy object. |
| ArkUI_PixelRoundCalcPolicy value | Specific 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
| Name | Description |
|---|---|
| ArkUI_PixelRoundPolicy* policy | Pointer to the PixelRoundPolicy object. |
| ArkUI_PixelRoundCalcPolicy* value | Pointer to the specific pixel rounding policy. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_PixelRoundPolicy* policy | Pointer to the PixelRoundPolicy object. |
| ArkUI_PixelRoundCalcPolicy value | Specific 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
| Name | Description |
|---|---|
| ArkUI_PixelRoundPolicy* policy | Pointer to the PixelRoundPolicy object. |
| ArkUI_PixelRoundCalcPolicy* value | Pointer to the specific pixel rounding policy. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| int32_t type | Transition animation type. 0: No transition animation. 1: Fade-in and fade-out transition animation. |
Returns
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_GridLayoutOptions* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_GridLayoutOptions* option | Pointer to the Grid layout option. |
| uint32_t* irregularIndexes | Pointer to the GridItem index array. |
| int32_t size | Size of the GridItem index array. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_GridLayoutOptions* option | Pointer to the Grid layout option. |
| uint32_t* irregularIndexes | Pointer to the GridItem index array. |
| int32_t size | Size of the GridItem index array. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_GridLayoutOptions* option | Pointer to the Grid layout option. |
| void* userData | Pointer 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
| Name | Description |
|---|---|
| ArkUI_GridLayoutOptions* option | Pointer to the Grid layout option. |
| void* userData | Pointer 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_ShowCounterConfig* config | Pointer 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
| Name | Description |
|---|---|
| ArkUI_ShowCounterConfig* config | Pointer to the text input counter configuration object. |
| uint32_t color | Counter 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
| Name | Description |
|---|---|
| ArkUI_ShowCounterConfig* config | Pointer to the text input counter configuration object. |
| uint32_t color | Counter 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
| Name | Description |
|---|---|
| ArkUI_ShowCounterConfig* config | Pointer to the text input counter configuration object. |
Returns
| Type | Description |
|---|---|
| uint32_t | Counter 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
| Name | Description |
|---|---|
| ArkUI_ShowCounterConfig* config | Pointer to the text input counter configuration object. |
Returns
| Type | Description |
|---|---|
| uint32_t | Counter 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_SelectionOptions* options | Pointer 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
| Name | Description |
|---|---|
| ArkUI_SelectionOptions* options | Pointer to the selection option. |
| ArkUI_MenuPolicy menuPolicy | Menu 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
| Name | Description |
|---|---|
| ArkUI_SelectionOptions* options | Pointer to the selection option. |
Returns
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_TextContentBaseController* controller | Pointer 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
| Name | Description |
|---|---|
| ArkUI_TextContentBaseController* controller | Pointer 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
| Name | Description |
|---|---|
| ArkUI_TextContentBaseController* controller | Pointer 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 start | Start 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 end | End 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItem* textMenuItem | Pointer 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object. |
| const char* content | Pointer to the title of a text menu item. The default value is an empty string. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| const ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object. |
| char* buffer | Pointer to the buffer. You can create it and allocate memory to store the title information of the text menu item. |
| int32_t bufferSize | Buffer size. |
| int32_t* writeLength | If 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object. |
| const char* icon | Pointer to the icon path of the text menu item. The default value is an empty string. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| const ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object. |
| char* buffer | Pointer to the buffer. You can create it and allocate memory to store the icon path of the text menu item. |
| int32_t bufferSize | Buffer size. |
| int32_t* writeLength | If 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object. |
| const char* labelInfo | Pointer to the shortcut hint of a text menu item. The default value is an empty string. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| const ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object. |
| char* buffer | Pointer to the buffer. You can create it and allocate memory to store the shortcut hint of the text menu item. |
| int32_t bufferSize | Buffer size. |
| int32_t* writeLength | If 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object. |
| int32_t id | ID of a text menu item. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| const ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object. |
| int32_t* id | Pointer to the ID of a text menu item. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItemArray* items | Pointer to the ArkUI_TextMenuItemArray object. |
| int32_t* size | Pointer to the size of the text menu item array. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItemArray* items | Pointer to the ArkUI_TextMenuItemArray object. |
| int32_t index | Index position. |
| ArkUI_TextMenuItem** item | Double pointer to the ArkUI_TextMenuItem object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItemArray* items | Pointer to the ArkUI_TextMenuItemArray object. |
| ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object. |
| int32_t index | Index position of the text menu item to be inserted. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItemArray* items | Pointer to the ArkUI_TextMenuItemArray object. |
| int32_t index | Index of the text menu item to be deleted. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItemArray* items | Pointer to the ArkUI_TextMenuItemArray object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Type | Description |
|---|---|
| ArkUI_TextEditMenuOptions* editMenuOptions | Pointer 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
| Name | Description |
|---|---|
| ArkUI_TextEditMenuOptions* editMenuOptions | Pointer 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItemArray* items | Pointer 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* userData | Pointer 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
| Name | Description |
|---|---|
| ArkUI_TextMenuItemArray* items | Pointer 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* userData | Pointer 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
| Name | Description |
|---|---|
| const ArkUI_TextMenuItem* item | Pointer to the ArkUI_TextMenuItem object, indicating the clicked text menu item. |
| int32_t start | Start index of the selected text. |
| int32_t end | End index of the selected text. |
| void* userData | Pointer to the user-defined data. |
Returns
| Type | Description |
|---|---|
| bool | Whether 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
| Name | Description |
|---|---|
| ArkUI_TextEditMenuOptions* editMenuOptions | Pointer to the ArkUI_TextEditMenuOptions object. |
| void* userData | Pointer to the user-defined data. |
| ArkUI_TextCreateMenuCallback cb | Callback for creating text menus. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextEditMenuOptions* editMenuOptions | Pointer to the ArkUI_TextEditMenuOptions object. |
| void* userData | Pointer to the user-defined data. |
| ArkUI_TextPrepareMenuCallback cb | Callback for preparing text menus. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextEditMenuOptions* editMenuOptions | Pointer to the ArkUI_TextEditMenuOptions object. |
| void* userData | Pointer to the user-defined data. |
| ArkUI_TextMenuItemClickCallback cb | Callback for text menu item clicks. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_TextSelectionMenuOptions* selectionMenuOptions | Pointer 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
| Name | Description |
|---|---|
| ArkUI_TextSelectionMenuOptions* selectionMenuOptions | Pointer to the ArkUI_TextSelectionMenuOptions object. |
| ArkUI_TextSpanType textSpanType | Recognition type of a custom text selection menu. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextSelectionMenuOptions* selectionMenuOptions | Pointer to the ArkUI_TextSelectionMenuOptions object. |
| ArkUI_TextSpanType* spanType | Pointer to the recognition type of a custom text selection menu. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextSelectionMenuOptions* selectionMenuOptions | Pointer to the ArkUI_TextSelectionMenuOptions object. |
| ArkUI_NodeHandle node | Content node of the custom text selection menu. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextSelectionMenuOptions* selectionMenuOptions | Pointer to the ArkUI_TextSelectionMenuOptions object. |
| ArkUI_NodeHandle* node | Pointer to the content node of the custom text selection menu. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextSelectionMenuOptions* selectionMenuOptions | Pointer to the ArkUI_TextSelectionMenuOptions object. |
| ArkUI_TextResponseType responseType | Response type of the custom text selection menu. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextSelectionMenuOptions* selectionMenuOptions | Pointer to the ArkUI_TextSelectionMenuOptions object. |
| ArkUI_TextResponseType* responseType | Pointer to the response type of the custom text selection menu. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextSelectionMenuOptions* selectionMenuOptions | Pointer to the ArkUI_TextSelectionMenuOptions object. |
| void* userData | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_TextSelectionMenuOptions* selectionMenuOptions | Pointer to the ArkUI_TextSelectionMenuOptions object. |
| void* userData | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
| bool start | Whether 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
Returns
| Type | Description |
|---|---|
| bool | Whether 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
| float step | Step. 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
Returns
| Type | Description |
|---|---|
| float | Step. 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
| float spacing | Spacing 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
Returns
| Type | Description |
|---|---|
| float | Spacing 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
| int32_t loop | Number 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
Returns
| Type | Description |
|---|---|
| int32_t | Number 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
| bool fromStart | Scrolling 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
Returns
| Type | Description |
|---|---|
| bool | Scrolling 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
| int32_t delay | Delay 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
Returns
| Type | Description |
|---|---|
| int32_t | Delay 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
| bool fadeout | Whether 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
Returns
| Type | Description |
|---|---|
| bool | Whether 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
| ArkUI_MarqueeStartPolicy startPolicy | Startup 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
Returns
| Type | Description |
|---|---|
| ArkUI_MarqueeStartPolicy | Startup 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
| ArkUI_MarqueeUpdatePolicy updatePolicy | Update 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
| Name | Description |
|---|---|
| ArkUI_TextMarqueeOptions* option | Pointer to the text marquee option. |
Returns
| Type | Description |
|---|---|
| ArkUI_MarqueeUpdatePolicy | Update policy. |
OH_ArkUI_SelectedDragPreviewStyle_Create()
ArkUI_SelectedDragPreviewStyle* OH_ArkUI_SelectedDragPreviewStyle_Create();
Description
Creates a preview style shown when dragging selected text.
Since: 23
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_SelectedDragPreviewStyle* config | Pointer 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
| Name | Description |
|---|---|
| ArkUI_SelectedDragPreviewStyle* config | Pointer to the ArkUI_SelectedDragPreviewStyle object. |
| uint32_t color | Background 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
| Name | Description |
|---|---|
| ArkUI_SelectedDragPreviewStyle* config | Pointer to the ArkUI_SelectedDragPreviewStyle object. |
Returns
| Type | Description |
|---|---|
| uint32_t color | Background 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_DecorationStyleOptions* options | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
| ArkUI_TextDecorationType type | Decoration type (ArkUI_TextDecorationType). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
| ArkUI_TextDecorationType* type | Pointer to the decoration type (ArkUI_TextDecorationType). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
| uint32_t color | Color of the decorative line, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
| uint32_t* color | Pointer to the color of the decorative line, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
| ArkUI_TextDecorationStyle style | Style of the decorative line (ArkUI_TextDecorationStyle). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
| ArkUI_TextDecorationStyle* style | Pointer to the style of the decorative line (ArkUI_TextDecorationStyle). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
| float thicknessScale | Scale factor of the decorative line thickness. The value range is [0, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
| float* thicknessScale | Pointer to the scale factor of the decorative line thickness. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer to the OH_ArkUI_TextDataDetectorConfig object. |
| const ArkUI_TextDataDetectorType* types | Pointer to the types of the text entity recognition configuration. The value is an enumerated value of ArkUI_TextDataDetectorType. |
| int32_t length | Type quantity. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer to the OH_ArkUI_TextDataDetectorConfig object. |
| ArkUI_TextDataDetectorType* buffer | Pointer to the buffer of the type array. |
| int32_t bufferSize | Maximum number of types that can be written to the buffer reserved for the types. |
| int32_t* writeLength | Pointer to the number of types that are actually written to the buffer. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer to the OH_ArkUI_TextDataDetectorConfig object. |
| void* userData | Pointer to the user data. |
| void (*callback)(const char* result | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer to the OH_ArkUI_TextDataDetectorConfig object. |
| uint32_t color | Color of the recognized content, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer to the OH_ArkUI_TextDataDetectorConfig object. |
| uint32_t* color | Pointer to the color of the recognized content, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer to the OH_ArkUI_TextDataDetectorConfig object. |
| OH_ArkUI_DecorationStyleOptions* decoration | Pointer to the decoration style of the recognized content. The value is an enumerated value of OH_ArkUI_DecorationStyleOptions. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer to the OH_ArkUI_TextDataDetectorConfig object. |
| OH_ArkUI_DecorationStyleOptions* decoration | Pointer to the decoration style of the recognized content. The value is an enumerated value of OH_ArkUI_DecorationStyleOptions. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer to the OH_ArkUI_TextDataDetectorConfig object. |
| bool enablePreviewMenu | Whether 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextDataDetectorConfig* config | Pointer to the OH_ArkUI_TextDataDetectorConfig object. |
| bool* enablePreviewMenu | Whether 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| const char* value | Pointer to the placeholder text. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| char* buffer | Pointer to the buffer for storing the placeholder text in the memory. You need to allocate the memory. |
| int32_t bufferSize | Maximum number of characters that can be written to the buffer. |
| int32_t* writeLength | Pointer to the number of characters that are actually written to the buffer. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| float fontSize | Font size, in fp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| float* fontSize | Pointer to the font size, in fp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| uint32_t fontWeight | Font weight. The value is an integer multiple of 100 within the [100, 900] range, for example, 100 or 900. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| uint32_t* fontWeight | Pointer to the font weight. The value is an integer multiple of 100 within the [100, 900] range, for example, 100 or 900. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| const char* fontFamily | Pointer to the font family, containing the font names to be set. Different font names are separated by commas (,). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| char* buffer | Pointer to the buffer for storing the font family in the memory. You need to allocate the memory. |
| int32_t bufferSize | Maximum number of characters that can be written to the buffer. |
| int32_t* writeLength | Pointer to the number of characters that are actually written to the buffer. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| ArkUI_FontStyle fontStyle | Font style. The value is an enumerated value of ArkUI_FontStyle. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| ArkUI_FontStyle* fontStyle | Pointer to the font style. The value is an enumerated value of ArkUI_FontStyle. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| uint32_t fontColor | Font color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorPlaceholderOptions* options | Pointer to the OH_ArkUI_TextEditorPlaceholderOptions object. |
| uint32_t* fontColor | Pointer to the font color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| int32_t caretOffset | Caret offset. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| int32_t* caretOffset | Pointer to the caret offset. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| uint32_t start | Start position of the selected area. |
| uint32_t end | End position of the selected area. |
| ArkUI_MenuPolicy menuPolicy | Policy for displaying the menu in the selected area. The value is an enumerated value of ArkUI_MenuPolicy. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| bool* isEditing | Whether 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| uint32_t* offset | Pointer to the preview text offset. |
| char* buffer | Pointer to the buffer for storing the preview text in the memory. You need to allocate the memory. |
| int32_t bufferSize | Maximum number of characters that can be written to the buffer. |
| int32_t* writeLength | Pointer to the number of characters that are actually written to the buffer. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| ArkUI_Rect* rect | Pointer to the caret-selected rectangle information. The value is an enumerated value of ArkUI_Rect. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| ArkUI_TextAlignment align | Text alignment mode. The value is an enumerated value of ArkUI_TextAlignment. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| ArkUI_TextAlignment* align | Pointer to the text alignment mode. The value is an enumerated value of ArkUI_TextAlignment. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| struct OH_PixelmapNative* pixelmap | Pointer to the PixelMap for paragraph indentation. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| struct OH_PixelmapNative** pixelmap | Double pointer to the PixelMap for paragraph indentation. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| uint32_t width | Width for paragraph indentation, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| uint32_t* width | Pointer to the width for paragraph indentation, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| uint32_t height | Height for paragraph indentation, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| uint32_t* height | Pointer to the height for paragraph indentation, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| ArkUI_WordBreak wordBreak | Word breaking mode. The value is an enumerated value of ArkUI_WordBreak. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| ArkUI_WordBreak* wordBreak | Pointer to the word breaking mode. The value is an enumerated value of ArkUI_WordBreak. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| OH_ArkUI_LineBreakStrategy lineBreakStrategy | Line breaking strategy. The value is an enumerated value of OH_ArkUI_LineBreakStrategy. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| OH_ArkUI_LineBreakStrategy* lineBreakStrategy | Pointer to the line breaking strategy. The value is an enumerated value of OH_ArkUI_LineBreakStrategy. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| uint32_t paragraphSpacing | Paragraph spacing, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| uint32_t* paragraphSpacing | Pointer to the paragraph spacing, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| ArkUI_TextVerticalAlignment verticalAlignment | Text vertical alignment mode. The value is an enumerated value of ArkUI_TextVerticalAlignment. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| ArkUI_TextVerticalAlignment* verticalAlignment | Text vertical alignment mode. The value is an enumerated value of ArkUI_TextVerticalAlignment. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| ArkUI_TextDirection textDirection | Text direction. The value is an enumerated value of ArkUI_TextDirection. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the OH_ArkUI_TextEditorParagraphStyle object. |
| ArkUI_TextDirection* textDirection | Pointer to the text direction. The value is an enumerated value of ArkUI_TextDirection. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| OH_ArkUI_TextEditorParagraphStyle* style | Pointer to the typing paragraph style. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float radius | Blur radius of the shadow, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float* radius | Pointer to the blur radius of the shadow, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| ArkUI_ShadowType type | Shadow type (ArkUI_ShadowType). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| ArkUI_ShadowType* type | Shadow type (ArkUI_ShadowType). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| uint32_t color | Shadow color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| uint32_t* color | Pointer to the shadow color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float offsetX | Shadow offset on the x-axis, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float* offsetX | Pointer to the shadow offset on the x-axis, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float offsetY | Shadow offset on the y-axis, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| float* offsetY | Pointer to the shadow offset on the y-axis, in vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| bool isFill | Whether 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_ShadowOptions* options | Pointer to the OH_ArkUI_ShadowOptions object. |
| bool* isFill | Whether a component is filled with a shadow. true means that a component is filled with a shadow, and false means the opposite. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| uint32_t color | Font color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| uint32_t* color | Pointer to the font color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| float size | Font size, in fp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| float* size | Pointer to the font size, in fp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| ArkUI_FontStyle fontStyle | Font style. The value is an enumerated value of ArkUI_FontStyle. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| ArkUI_FontStyle* fontStyle | Pointer to the font style. The value is an enumerated value of ArkUI_FontStyle. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| uint32_t fontWeight | Font weight. The value is an integer multiple of 100 within the [100, 900] range, for example, 100 or 900. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| uint32_t* fontWeight | Pointer to the font weight. The value is an integer multiple of 100 within the [100, 900] range, for example, 100 or 900. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| const char* fontFamily | Pointer to the font family, containing the font names to be set. Different font names are separated by commas (,). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| char* buffer | Pointer to the buffer for storing the font family in the memory. You need to allocate the memory. |
| int32_t bufferSize | Maximum number of characters that can be written to the buffer. |
| int32_t* writeLength | Pointer to the number of characters that are actually written to the buffer. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| OH_ArkUI_DecorationStyleOptions* options | Pointer to the OH_ArkUI_DecorationStyleOptions object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| const OH_ArkUI_ShadowOptions** options | Double pointer to the text shadow options. |
| int32_t length | Length of the text shadow options. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| OH_ArkUI_ShadowOptions** shadowOptions | Double pointer to the text shadow options. |
| uint32_t shadowOptionsSize | Size of the shadow option buffer. |
| uint32_t* writeLength | Pointer to the number of actual text shadow options in the text style. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| int32_t lineHeight | Line height. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| int32_t* lineHeight | Pointer to the line height. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| int32_t letterSpacing | Letter spacing. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| int32_t* letterSpacing | Pointer to the letter spacing. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| const char* fontFeature | Pointer to the font features, containing font features to be set. Multiple features are separated by commas (,). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| char* buffer | Pointer to the buffer for storing the font features in the memory. You need to allocate the memory. |
| int32_t bufferSize | Maximum number of characters that can be written to the buffer. |
| int32_t* writeLength | Pointer to the number of characters that are actually written to the buffer. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| bool halfLeading | Whether to enable half leading. true means to enable, and false means the opposite. The default value is false. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| bool* halfLeading | Whether half leading is enabled. true means half leading is enabled, and false means the opposite. The default value is false. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| uint32_t color | Text background color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| uint32_t* color | Pointer to the text background color, in 0xARGB format. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| float topLeft | Radius of the rounded corner in the upper left corner of the text background. The unit is vp. |
| float topRight | Radius of the rounded corner in the upper right corner of the text background. The unit is vp. |
| float bottomLeft | Radius of the rounded corner in the lower left corner of the text background. The unit is vp. |
| float bottomRight | Radius of the rounded corner in the lower right corner of the text background. The unit is vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the text style of the TextEditor component. |
| float* topLeft | Pointer to the radius of the rounded corner in the upper left corner of the text background. The unit is vp. |
| float* topRight | Pointer to the radius of the rounded corner in the upper right corner of the text background. The unit is vp. |
| float* bottomLeft | Pointer to the radius of the rounded corner in the lower left corner of the text background. The unit is vp. |
| float* bottomRight | Pointer to the radius of the rounded corner in the lower right corner of the text background. The unit is vp. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the typing style. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| OH_ArkUI_TextEditorTextStyle* style | Pointer to the typing style. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| OH_ArkUI_TextEditorSpanType textEditorSpanType | Span type. The value is an enumerated value of OH_ArkUI_TextEditorSpanType. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| OH_ArkUI_TextEditorSpanType* textEditorSpanType | Pointer to the span type. The value is an enumerated value of OH_ArkUI_TextEditorSpanType. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| ArkUI_NodeHandle node | Content node. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| ArkUI_NodeHandle* node | Pointer to the content node. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| OH_ArkUI_TextEditorResponseType responseType | Response type. The value is an enumerated value of OH_ArkUI_TextEditorResponseType. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| OH_ArkUI_TextEditorResponseType* responseType | Pointer to the response type. The value is an enumerated value of OH_ArkUI_TextEditorResponseType. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| OH_ArkUI_TextMenuType menuType | Menu type. The value is an enumerated value of OH_ArkUI_TextMenuType. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| OH_ArkUI_TextMenuType* menuType | Pointer to the menu type. The value is an enumerated value of OH_ArkUI_TextMenuType. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| void* userData | Pointer to the user data. |
| void (*callback)(int32_t start | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| void* userData | Pointer to the user data. |
| void (*callback)(int32_t start | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| void* userData | Pointer to the user data. |
| void (*callback)(int32_t start | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| void* userData | Pointer to the user data. |
| void (*callback)(void* callbackUserData) | Pointer to the callback when the menu disappears. callbackUserData indicates the user data. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| OH_ArkUI_HapticFeedbackMode mode | Haptic feedback mode. The value is an enumerated value of OH_ArkUI_HapticFeedbackMode. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorSelectionMenuOptions* options | Pointer to the OH_ArkUI_TextEditorSelectionMenuOptions object. |
| OH_ArkUI_HapticFeedbackMode* mode | Pointer to the haptic feedback mode. The value is an enumerated value of OH_ArkUI_HapticFeedbackMode. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| uint32_t* start | Pointer to the start position of the selected area. |
| uint32_t* end | Pointer to the end position of the selected area. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| const ArkUI_StyledString_Descriptor* descriptor | Pointer to the ArkUI_StyledString_Descriptor object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| ArkUI_StyledString_Descriptor* descriptor | Pointer to the ArkUI_StyledString_Descriptor object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const OH_ArkUI_TextEditorStyledStringController* controller | Pointer to the OH_ArkUI_TextEditorStyledStringController object. |
| const ArkUI_StyledString_Descriptor* descriptor | Pointer to the ArkUI_StyledString_Descriptor object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer 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
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float scaleX | Scaling factor in the x direction. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* scaleX | Pointer to the scaling factor in the x direction. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float scaleY | Scaling factor in the y direction. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* scaleY | Pointer to the scaling factor in the y direction. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float scaleZ | Scaling factor in the z direction. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* scaleZ | Pointer to the scaling factor in the z direction. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float centerX | X-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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* centerX | Pointer to the X-coordinate of the transformation center point. The unit is px. The default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| const float centerY | Y-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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4ScaleOptions* options | Pointer to the scaling parameter object for matrix operations. |
| float* centerY | Pointer to the Y-coordinate of the transformation center point. The unit is px. The default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer 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
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float x | Value of the direction vector in the x direction. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* x | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float y | Value of the direction vector in the y direction. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* y | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float z | Value of the direction vector in the z direction. The value range is (-∞, +∞). |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* z | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float angle | Value of the rotation angle. The value range is (-∞, +∞). The unit is degree. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* angle | Pointer to the value of the rotation angle. The unit is degree. If the angle has never been set, the default value is 0. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float centerX | X-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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* centerX | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| const float centerY | Y-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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4RotationOptions* options | Pointer to the rotation parameter object for matrix operations. |
| float* centerY | Pointer 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_Matrix4TranslationOptions* options | Pointer 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
| Name | Description |
|---|---|
| ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| const float x | Translation 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| float* x | Pointer to the translation value on the x-axis. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| const float y | Translation 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| float* y | Pointer to the translation value on the y-axis. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| const float z | Translation 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
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4TranslationOptions* options | Pointer to the translation parameter object for matrix operations. |
| float* z | Pointer to the translation value on the z-axis. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| const float* elements | Pointer 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4* matrix | Pointer to the original fourth-order matrix object. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object for which inverse matrix transformation is to be performed. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4* oriMatrix | Pointer to the original fourth-order matrix object. |
| const ArkUI_Matrix4* anotherMatrix | Pointer to another matrix object to be merged. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object to be translated. |
| const ArkUI_Matrix4TranslationOptions* translate | Pointer to the translation object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object to be scaled. |
| const ArkUI_Matrix4ScaleOptions* scale | Pointer to the scaling object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object to be rotated. |
| const ArkUI_Matrix4RotationOptions* rotate | Pointer to the rotation object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object to be skewed. |
| const float skewX | Skew coefficient in the x direction. |
| const float skewY | Skew coefficient in the y direction. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object. |
| const ArkUI_PointF* oriPoint | Pointer to the original coordinate point. |
| ArkUI_PointF* result | Pointer to the result point. The value cannot be null. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object, which is used to store the result matrix. |
| const ArkUI_PointF* src | Pointer to the coordinate point array of the original polygon. The array length must be at least the value of pointCount. |
| const ArkUI_PointF* dst | Pointer to the coordinate point array of the mapped polygon. The array length must be at least the value of pointCount. |
| const uint32_t pointCount | Number of polygon points. The value must be 0, 1, 2, 3, or 4. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Name | Description |
|---|---|
| const ArkUI_Matrix4* matrix | Pointer to the fourth-order matrix object. |
| float* result | Pointer to the array of 16 floating-point numbers. The value cannot be null. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Result 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer 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
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| const char* svgPath | Pointer 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
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| const ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| char* svgPathBuffer | Pointer to the buffer for storing the motion path string. |
| const int32_t bufferSize | Size of the buffer that the svgPathBuffer parameter points to. |
| int32_t* writeLength | Pointer 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
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| const float from | Start 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
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| const ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| float* from | Pointer to the start progress in ArkUI_MotionPathOptions. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| const float to | End 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
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| const ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| float* to | Pointer to the end progress in ArkUI_MotionPathOptions. |
Returns
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| const bool rotatable | Whether 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
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| const ArkUI_MotionPathOptions* options | Pointer to ArkUI_MotionPathOptions. |
| bool* rotatable | Pointer 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
| Type | Description |
|---|---|
| int32_t | Result 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
| Name | Description |
|---|---|
| ArkUI_PickerIndicatorType type | Type of the selected item indicator. |
Returns
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| ArkUI_PickerIndicatorStyle* style | Pointer 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
| Name | Description |
|---|---|
| ArkUI_PickerIndicatorStyle* style | Pointer to the ArkUI_PickerIndicatorStyle instance. |
| ArkUI_PickerIndicatorBackground* background | Pointer to the background. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Name | Description |
|---|---|
| ArkUI_PickerIndicatorStyle* style | Pointer to the ArkUI_PickerIndicatorStyle instance. |
| ArkUI_PickerIndicatorDivider* divider | Pointer to the divider style. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_FontWeightConfigs* option | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_FontWeightConfigs* option | Pointer to the text font weight configuration object to be modified. |
| bool enable | Whether 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
| Name | Description |
|---|---|
| OH_ArkUI_FontWeightConfigs* option | Pointer to the text font weight configuration object. |
Returns
| Type | Description |
|---|---|
| bool | Whether 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
| Name | Description |
|---|---|
| OH_ArkUI_FontWeightConfigs* option | Pointer to the text font weight configuration object to be modified. |
| bool enable | Whether 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
| Name | Description |
|---|---|
| OH_ArkUI_FontWeightConfigs* option | Pointer to the text font weight configuration object. |
Returns
| Type | Description |
|---|---|
| bool | Whether 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_FontConfigs* option | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_FontConfigs* option | Pointer to the text font configuration object to be modified. |
| OH_ArkUI_FontWeightConfigs* fontWeightConfigs | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_FontConfigs* option | Pointer to the text font configuration object. |
Returns
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| OH_ArkUI_TextController* controller | Pointer 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
| Name | Description |
|---|---|
| OH_ArkUI_TextController* controller | Pointer to the OH_ArkUI_TextController object. |
| ArkUI_StyledString_Descriptor* descriptor | Pointer to the ArkUI_StyledString_Descriptor object. |
Returns
| Type | Description |
|---|---|
| ArkUI_ErrorCode | Return 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


















