目录

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: NativeTypeSample

Summary

[h2]Structs

Name typedef Keyword Description
ArkUI_ColorStop ArkUI_ColorStop Defines a color stop, which is used to configure the gradient effect of a component. Multiple gradient styles can be defined by combining the color array and position array.
ArkUI_NativeDialog - Defines a custom dialog box controller object for ArkUI on the native side.
ArkUI_NativeDialog* ArkUI_NativeDialogHandle Defines the handle to the custom dialog box controller of ArkUI on the native side.
ArkUI_GestureCollectInterceptInfo ArkUI_GestureCollectInterceptInfo Defines gesture collection interception information.
ArkUI_ListItemSwipeActionItem ArkUI_ListItemSwipeActionItem Defines the item configuration for ListItemSwipeActionOption.
ArkUI_ListItemSwipeActionOption ArkUI_ListItemSwipeActionOption Defines the configuration for ListItemSwipeActionOption.
ArkUI_CustomProperty ArkUI_CustomProperty Defines custom property information, which is used to represent the custom property of a component. You can use related APIs to add, remove, and obtain custom properties for ArkUI components, and obtain the string values of custom properties.
ArkUI_HostWindowInfo ArkUI_HostWindowInfo Defines host window information.
ArkUI_ActiveChildrenInfo ArkUI_ActiveChildrenInfo Defines active child node information, which is used to store information about the FrameNode child nodes whose internal active state is true. You can query the number of child nodes and obtain child nodes by subscript. The instance of this struct is generated by calling OH_ArkUI_NodeUtils_GetActiveChildrenInfo. After using the instance, you must call OH_ArkUI_ActiveChildrenInfo_Destroy to destroy it.
ArkUI_CrossLanguageOption ArkUI_CrossLanguageOption Defines a cross-language configuration option, which is used to configure the cross-language access capability of a target node, for example, whether cross-language attribute modification is allowed. Since API version 26.0.0, you can also configure cross-language operation status of a node tree.
ArkUI_AccessibilityState ArkUI_AccessibilityState Defines a component accessibility state.
ArkUI_AccessibilityValue ArkUI_AccessibilityValue Defines a component accessibility value.
ArkUI_SystemFontStyleEvent ArkUI_SystemFontStyleEvent Defines a system font style change event, which is used to pass the event information to the registered system font style change callback when the system font size or weight changes.
ArkUI_SelectionOptions ArkUI_SelectionOptions Defines the options for the selection operation in ArkUI. It is applicable to scenarios where selection interaction is required within an application, providing you with the capability to customize selection behavior.
ArkUI_ContentTransitionEffect ArkUI_ContentTransitionEffect Defines the content transition effect.
ArkUI_SelectedDragPreviewStyle ArkUI_SelectedDragPreviewStyle Defines the text drag preview style in the selected state. It is applicable to scenarios where the preview effect in selected state needs to be displayed during text dragging, improving user interaction experience.
OH_ArkUI_LinearGradientOptions OH_ArkUI_LinearGradientOptions Defines linear gradient options, which are used to describe the linear color gradient configuration of UI components. You can set the gradient direction, angle, and color to implement flexible linear gradient effects, improving the visual presentation capability of the UI. This is applicable to scenarios where a linear gradient style needs to be applied to components.
OH_ArkUI_RadialGradientOptions OH_ArkUI_RadialGradientOptions Defines radial gradient options, which are applicable to scenarios where a radial gradient effect needs to be implemented in UI components. This helps you enrich the visual hierarchy of the UI.

[h2]Enums

Name typedef Keyword Description
ArkUI_CopyOptions ArkUI_CopyOptions Enumerates the text copy and paste modes.
ArkUI_AccessibilityCheckedState ArkUI_AccessibilityCheckedState Enumerates the accessibility check box states.
ArkUI_AccessibilityActionType ArkUI_AccessibilityActionType Enumerates the accessibility action types.
ArkUI_BorderStyle ArkUI_BorderStyle Enumerates the border styles.
ArkUI_AccessibilityMode ArkUI_AccessibilityMode Enumerates the accessibility modes.
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_LengthMetricUnit ArkUI_LengthMetricUnit Enumerates the component units.
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 the ListItem component.
ArkUI_SafeAreaType ArkUI_SafeAreaType Enumerates the types of expanded safe areas.
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_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_MenuPolicy ArkUI_MenuPolicy Enumerates menu display policies.
ArkUI_RenderStrategy ArkUI_RenderStrategy Defines rendering strategies for drawing rounded corners.
OH_ArkUI_CrossLanguageOperatingStatus OH_ArkUI_CrossLanguageOperatingStatus Enumerates the node tree operation states of cross-language configuration options.
OH_ArkUI_NodeMountPolicy OH_ArkUI_NodeMountPolicy Enumerates the child node mounting policy types.
ArkUI_CrownSensitivity ArkUI_CrownSensitivity Enumerates crown sensitivity levels.

[h2]Functions

Name typedef Keyword Description
ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Create() - Creates layout constraints.
ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Copy(const ArkUI_LayoutConstraint* Constraint) - Performs a deep copy of a layout constraint.
void* OH_ArkUI_LayoutConstraint_Dispose(ArkUI_LayoutConstraint* Constraint) - Disposes of a layout constraint pointer.
int32_t OH_ArkUI_LayoutConstraint_GetMaxWidth(const ArkUI_LayoutConstraint* Constraint) - Obtains the maximum width using a layout constraint, in px.
int32_t OH_ArkUI_LayoutConstraint_GetMinWidth(const ArkUI_LayoutConstraint* Constraint) - Obtains the minimum width using a layout constraint, in px.
int32_t OH_ArkUI_LayoutConstraint_GetMaxHeight(const ArkUI_LayoutConstraint* Constraint) - Obtains the maximum height using a layout constraint, in px.
int32_t OH_ArkUI_LayoutConstraint_GetMinHeight(const ArkUI_LayoutConstraint* Constraint) - Obtains the minimum height using a layout constraint, in px.
int32_t OH_ArkUI_LayoutConstraint_GetPercentReferenceWidth(const ArkUI_LayoutConstraint* Constraint) - Obtains the width percentage reference using a layout constraint.
int32_t OH_ArkUI_LayoutConstraint_GetPercentReferenceHeight(const ArkUI_LayoutConstraint* Constraint) - Obtains the height percentage reference using a layout constraint.
void OH_ArkUI_LayoutConstraint_SetMaxWidth(ArkUI_LayoutConstraint* Constraint, int32_t value) - Sets the maximum width.
void OH_ArkUI_LayoutConstraint_SetMinWidth(ArkUI_LayoutConstraint* Constraint, int32_t value) - Sets the minimum width.
void OH_ArkUI_LayoutConstraint_SetMaxHeight(ArkUI_LayoutConstraint* Constraint, int32_t value) - Sets the maximum height.
void OH_ArkUI_LayoutConstraint_SetMinHeight(ArkUI_LayoutConstraint* Constraint, int32_t value) - Sets the minimum height.
void OH_ArkUI_LayoutConstraint_SetPercentReferenceWidth(ArkUI_LayoutConstraint* Constraint, int32_t value) - Sets the width percentage reference.
void OH_ArkUI_LayoutConstraint_SetPercentReferenceHeight(ArkUI_LayoutConstraint* Constraint, int32_t value) - Sets the height percentage reference.
void* OH_ArkUI_DrawContext_GetCanvas(ArkUI_DrawContext* context) - Obtains the pointer to a canvas for drawing, which can be converted into the OH_Drawing_Canvas in the Drawing module.
ArkUI_IntSize OH_ArkUI_DrawContext_GetSize(ArkUI_DrawContext* context) - Obtains the size of a drawing area.
void OH_ArkUI_SwiperDigitIndicator_SetFontWeight(ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight fontWeight) - Sets the font weight of the digit-style navigation indicator for the Swiper component.
ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetFontWeight(ArkUI_SwiperDigitIndicator* indicator) - Obtains the font weight of the digit-style navigation indicator of the Swiper component.
void OH_ArkUI_SwiperDigitIndicator_SetSelectedFontWeight(ArkUI_SwiperDigitIndicator *indicator, ArkUI_FontWeight selectedFontWeight) - Sets the font weight of the selected digit-style navigation indicator for the Swiper component.
ArkUI_FontWeight OH_ArkUI_SwiperDigitIndicator_GetSelectedFontWeight(ArkUI_SwiperDigitIndicator* indicator) - Obtains the font weight of the selected digit-style navigation indicator of the Swiper component.
ArkUI_ListItemSwipeActionItem* OH_ArkUI_ListItemSwipeActionItem_Create() - Creates a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionItem_Dispose(ArkUI_ListItemSwipeActionItem* item) - Disposes of a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionItem_SetContent(ArkUI_ListItemSwipeActionItem* item, ArkUI_NodeHandle node) - Sets the layout content for a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item, float distance) - Sets the swipe distance threshold for deleting the list item.
float OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item) - Obtains the swipe distance threshold for deleting the list item.
void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)()) - Sets the callback invoked each time the list item enters the delete area.
void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData (ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(void* userData)) - Sets the callback invoked each time the list item enters the delete area. User-defined data will be passed to the callback event.
void OH_ArkUI_ListItemSwipeActionItem_SetOnAction(ArkUI_ListItemSwipeActionItem* item, void (*callback)()) - Sets the callback invoked when the list item is deleted while in the delete area.
void OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData(ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(void* userData)) - Sets the callback invoked when the list item is deleted while in the delete area. User-defined data will be passed to the callback event.
void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)()) - Sets the callback invoked each time the list item exits the delete area.
void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData (ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(void* userData)) - Sets the callback invoked each time the list item exits the delete area. User-defined data will be passed to the callback event.
void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange (ArkUI_ListItemSwipeActionItem* item,void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState)) - Sets the callback invoked when the swipe state of the list item changes.
void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData (ArkUI_ListItemSwipeActionItem* item,void* userData, void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState, void* userData)) - Sets the callback invoked when the swipe state of the list item changes. User-defined data will be passed to the callback event.
ArkUI_ListItemSwipeActionOption* OH_ArkUI_ListItemSwipeActionOption_Create() - Creates a ListItemSwipeActionOption instance.
void OH_ArkUI_ListItemSwipeActionOption_Dispose(ArkUI_ListItemSwipeActionOption* option) - Disposes of a ListItemSwipeActionOption instance.
void OH_ArkUI_ListItemSwipeActionOption_SetStart(ArkUI_ListItemSwipeActionOption* option, ArkUI_ListItemSwipeActionItem* item) - Sets the layout content for the left edge (for a vertical layout) or top edge (for a horizontal layout) of a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionOption_SetEnd(ArkUI_ListItemSwipeActionOption* option, ArkUI_ListItemSwipeActionItem* item) - Sets the layout content for the right edge (for a vertical layout) or bottom edge (for a horizontal layout) of a ListItemSwipeActionItem instance.
void OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect(ArkUI_ListItemSwipeActionOption* option, ArkUI_ListItemSwipeEdgeEffect edgeEffect) - Sets the effect used when the scroll boundary is reached.
int32_t OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect(ArkUI_ListItemSwipeActionOption* option) - Obtains the effect used when the scroll boundary is reached.
void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange(ArkUI_ListItemSwipeActionOption* option, void (*callback)(float offset)) - Sets the callback invoked when the scroll offset changes.
void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData (ArkUI_ListItemSwipeActionOption* option, void* userData, void (*callback)(float offset, void* userData)) - Sets the callback invoked when the scroll offset changes. User-defined data will be passed to the callback event.
int32_t OH_ArkUI_ListItemSwipeAction_Expand(ArkUI_NodeHandle node, ArkUI_ListItemSwipeActionDirection direction) - Expands the swipe action menu for the specified list item.
int32_t OH_ArkUI_ListItemSwipeAction_Collapse(ArkUI_NodeHandle node) - Collapses the swipe action menu for the specified list item.
ArkUI_AccessibilityState* OH_ArkUI_AccessibilityState_Create(void) - Creates an accessibility state.
void OH_ArkUI_AccessibilityState_Dispose(ArkUI_AccessibilityState* state) - Disposes of the pointer to an accessibility state.
void OH_ArkUI_AccessibilityState_SetDisabled(ArkUI_AccessibilityState* state, int32_t isDisabled) - Sets whether an accessibility state is disabled.
int32_t OH_ArkUI_AccessibilityState_IsDisabled(ArkUI_AccessibilityState* state) - Obtains whether an accessibility state is disabled.
void OH_ArkUI_AccessibilityState_SetSelected(ArkUI_AccessibilityState* state, int32_t isSelected) - Sets whether an accessibility state is selected.
int32_t OH_ArkUI_AccessibilityState_IsSelected(ArkUI_AccessibilityState* state) - Obtains whether an accessibility state is selected.
void OH_ArkUI_AccessibilityState_SetCheckedState(ArkUI_AccessibilityState* state, int32_t checkedState) - Sets the check box state of an accessibility state.
int32_t OH_ArkUI_AccessibilityState_GetCheckedState(ArkUI_AccessibilityState* state) - Obtains the check box state of an accessibility state.
ArkUI_AccessibilityValue* OH_ArkUI_AccessibilityValue_Create(void) - Creates an AccessibilityValue instance.
void OH_ArkUI_AccessibilityValue_Dispose(ArkUI_AccessibilityValue* value) - Disposes of the pointer to an AccessibilityValue instance.
void OH_ArkUI_AccessibilityValue_SetMin(ArkUI_AccessibilityValue* value, int32_t min) - Sets the minimum accessibility value.
int32_t OH_ArkUI_AccessibilityValue_GetMin(ArkUI_AccessibilityValue* value) - Obtains the minimum accessibility value.
void OH_ArkUI_AccessibilityValue_SetMax(ArkUI_AccessibilityValue* value, int32_t max) - Sets the maximum accessibility value.
int32_t OH_ArkUI_AccessibilityValue_GetMax(ArkUI_AccessibilityValue* value) - Obtains the maximum accessibility value.
void OH_ArkUI_AccessibilityValue_SetCurrent(ArkUI_AccessibilityValue* value, int32_t current) - Sets the current accessibility value.
int32_t OH_ArkUI_AccessibilityValue_GetCurrent(ArkUI_AccessibilityValue* value) - Obtains the current accessibility value.
void OH_ArkUI_AccessibilityValue_SetRangeMin(ArkUI_AccessibilityValue* value, int32_t rangeMin) - Sets the minimum value for accessibility information of the range-based component.
int32_t OH_ArkUI_AccessibilityValue_GetRangeMin(ArkUI_AccessibilityValue* value) - Obtains the minimum value for accessibility information of the range-based component.
void OH_ArkUI_AccessibilityValue_SetRangeMax(ArkUI_AccessibilityValue* value, int32_t rangeMax) - Sets the maximum value for accessibility information of the range-based component.
int32_t OH_ArkUI_AccessibilityValue_GetRangeMax(ArkUI_AccessibilityValue* value) - Obtains the maximum value for accessibility information of the range-based component.
void OH_ArkUI_AccessibilityValue_SetRangeCurrent(ArkUI_AccessibilityValue* value, int32_t rangeCurrent) - Sets the current value for accessibility information of the range-based component.
int32_t OH_ArkUI_AccessibilityValue_GetRangeCurrent(ArkUI_AccessibilityValue* value) - Obtains the current value for accessibility information of the range-based component.
void OH_ArkUI_AccessibilityValue_SetText(ArkUI_AccessibilityValue* value, const char* text) - Sets the text description of an AccessibilityValue instance.
const char* OH_ArkUI_AccessibilityValue_GetText(ArkUI_AccessibilityValue* value) - Obtains the text description of an AccessibilityValue instance.
void OH_ArkUI_CustomProperty_Destroy(ArkUI_CustomProperty* handle) - Destroys a CustomProperty instance.
const char* OH_ArkUI_CustomProperty_GetStringValue(ArkUI_CustomProperty* handle) - Obtains the value of a custom property.
const char* OH_ArkUI_HostWindowInfo_GetName(ArkUI_HostWindowInfo* info) - Obtains the window name from a HostWindowInfo object.
void OH_ArkUI_HostWindowInfo_Destroy(ArkUI_HostWindowInfo* info) - Destroys a HostWindowInfo object.
void OH_ArkUI_ActiveChildrenInfo_Destroy(ArkUI_ActiveChildrenInfo* handle) - Destroys an ArkUI_ActiveChildrenInfo instance and releases the resources allocated when obtaining active child node information.
ArkUI_NodeHandle OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex(ArkUI_ActiveChildrenInfo* handle, int32_t index) - Obtains the child node whose subscript is index in ArkUI_ActiveChildrenInfo. This API is applicable to traversing active child nodes by subscript.
int32_t OH_ArkUI_ActiveChildrenInfo_GetCount(ArkUI_ActiveChildrenInfo* handle) - Obtains the number of child nodes in ArkUI_ActiveChildrenInfo. This API is applicable to determining the number of active child nodes before traversal.
ArkUI_CrossLanguageOption* OH_ArkUI_CrossLanguageOption_Create(void) - Creates an instance of the cross-language configuration option.
void OH_ArkUI_CrossLanguageOption_Destroy(ArkUI_CrossLanguageOption* option) - Destroys an instance of the cross-language configuration option.
void OH_ArkUI_CrossLanguageOption_SetAttributeSettingStatus(ArkUI_CrossLanguageOption* option, bool enabled) - Sets whether cross-language attribute setting is allowed in the configuration option.
bool OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus(ArkUI_CrossLanguageOption* option) - Checks whether cross-language attribute setting is allowed in the configuration option.
void OH_ArkUI_CrossLanguageOption_SetTreeOperatingStatus(ArkUI_CrossLanguageOption* option, OH_ArkUI_CrossLanguageOperatingStatus status) - Sets the node tree operation state of a cross-language configuration option.
OH_ArkUI_CrossLanguageOperatingStatus OH_ArkUI_CrossLanguageOption_GetTreeOperatingStatus(ArkUI_CrossLanguageOption* option) - Obtains the node tree operation state of a cross-language configuration option.
ArkUI_ContentTransitionEffect* OH_ArkUI_ContentTransitionEffect_Create(int32_t type) - Creates a ContentTransitionEffect attribute object.
ArkUI_SelectionOptions* OH_ArkUI_SelectionOptions_Create() - Creates a selection option.
void OH_ArkUI_SelectionOptions_Dispose(ArkUI_SelectionOptions* options) - Releases a selection option object.
void OH_ArkUI_SelectionOptions_SetMenuPolicy(ArkUI_SelectionOptions* options, ArkUI_MenuPolicy menuPolicy) - Sets the menu pop-up policy for selection options.
ArkUI_MenuPolicy OH_ArkUI_SelectionOptions_GetMenuPolicy(ArkUI_SelectionOptions* options) - Obtains the menu pop-up policy for selection options.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetContent(ArkUI_TextMenuItem* item, const char* content) - Sets the title of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetContent(const ArkUI_TextMenuItem* item, char* buffer, int32_t bufferSize, int32_t* writeLength) - Obtains the title of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetIcon(ArkUI_TextMenuItem* item, const char* icon) - Sets the icon path of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetIcon(const ArkUI_TextMenuItem* item, char* buffer, int32_t bufferSize, int32_t* writeLength) - Obtains the icon path of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetLabelInfo(ArkUI_TextMenuItem* item, const char* labelInfo) - Sets the shortcut hint for a text menu item, for example, the shortcut hint for the Copy menu item can be set to Ctrl+C.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetLabelInfo(const ArkUI_TextMenuItem* item, char* buffer, int32_t bufferSize, int32_t* writeLength) - Obtains the shortcut hint for a text menu item, for example, the shortcut hint for the Copy menu item is typically Ctrl+C.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_SetId(ArkUI_TextMenuItem* item, int32_t id) - Sets the ID of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItem_GetId(const ArkUI_TextMenuItem* item, int32_t* id) - Obtains the ID of a text menu item.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_GetSize(ArkUI_TextMenuItemArray* items, int32_t* size) - Obtains the size of the text menu item array.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_GetItem(ArkUI_TextMenuItemArray* items, int32_t index, ArkUI_TextMenuItem** item) - Obtains the text menu item at a specified index from the text menu item array.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_Insert(ArkUI_TextMenuItemArray* items, ArkUI_TextMenuItem* item, int32_t index) - Inserts a text menu item at a specified index into the text menu item array.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_Erase(ArkUI_TextMenuItemArray* items, int32_t index) - Deletes the text menu item at a specified index from the text menu item array.
ArkUI_ErrorCode OH_ArkUI_TextMenuItemArray_Clear(ArkUI_TextMenuItemArray* items) - Clears all text menu items in the text menu item array.
ArkUI_ErrorCode OH_ArkUI_TextEditMenuOptions_RegisterOnCreateMenuCallback(ArkUI_TextEditMenuOptions* editMenuOptions, void* userData, ArkUI_TextCreateMenuCallback cb) - Registers the callback for creating text menus.
ArkUI_ErrorCode OH_ArkUI_TextEditMenuOptions_RegisterOnPrepareMenuCallback(ArkUI_TextEditMenuOptions* editMenuOptions, void* userData, ArkUI_TextPrepareMenuCallback cb) - Registers the callback for preparing text menus.
ArkUI_ErrorCode OH_ArkUI_TextEditMenuOptions_RegisterOnMenuItemClickCallback(ArkUI_TextEditMenuOptions* editMenuOptions, void* userData, ArkUI_TextMenuItemClickCallback cb) - Registers the callback for text menu item clicks.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetSpanType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextSpanType textSpanType) - Sets the text recognition type of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetSpanType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextSpanType* spanType) - Obtains the text recognition type of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetContentNode(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_NodeHandle node) - Sets the content node of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetContentNode(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_NodeHandle* node) - Obtains the content node of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetResponseType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextResponseType responseType) - Sets the response type of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetResponseType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextResponseType* responseType) - Obtains the response type of a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuShowCallback(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, void* userData, void (*callback)(int32_t start, int32_t end, void* userData)) - Registers the callback for the event of showing a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_RegisterOnMenuHideCallback(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, void* userData, void (*callback)(int32_t start, int32_t end, void* userData)) - Registers the callback for the event of hiding a custom text selection menu.
ArkUI_ErrorCode OH_ArkUI_PickerIndicatorStyle_ConfigureBackground(ArkUI_PickerIndicatorStyle* style, ArkUI_PickerIndicatorBackground* background) - Sets the background style. This API takes effect only when the type of the selected item indicator is ARKUI_PICKER_INDICATOR_BACKGROUND.
ArkUI_ErrorCode OH_ArkUI_PickerIndicatorStyle_ConfigureDivider(ArkUI_PickerIndicatorStyle* style, ArkUI_PickerIndicatorDivider* divider) - Sets the divider style. This API takes effect only when the type of the selected item indicator is ARKUI_PICKER_INDICATOR_DIVIDER.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetTextDecorationType(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationType type) - Sets the decoration type of the decorative line style.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetTextDecorationType(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationType* type) - Obtains the decoration type of the decorative line style.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetColor(OH_ArkUI_DecorationStyleOptions* options, uint32_t color) - Sets the color of the decorative line.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetColor(OH_ArkUI_DecorationStyleOptions* options, uint32_t* color) - Obtains the color of the decorative line.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetTextDecorationStyle(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationStyle style) - Sets the style of the decorative line.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetTextDecorationStyle(OH_ArkUI_DecorationStyleOptions* options, ArkUI_TextDecorationStyle* style) - Obtains the style of the decorative line.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_SetThicknessScale(OH_ArkUI_DecorationStyleOptions* options, float thicknessScale) - Sets the scale factor of the decorative line thickness.
ArkUI_ErrorCode OH_ArkUI_DecorationStyleOptions_GetThicknessScale(OH_ArkUI_DecorationStyleOptions* options, float* thicknessScale) - Obtains the scale factor of the decorative line thickness.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetTypes(OH_ArkUI_TextDataDetectorConfig* config, const ArkUI_TextDataDetectorType* types, int32_t length) - Sets the types of the text entity recognition configuration.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetTypes(OH_ArkUI_TextDataDetectorConfig* config, ArkUI_TextDataDetectorType* buffer, int32_t bufferSize, int32_t* writeLength) - Obtains the types of the text entity recognition configuration.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_RegisterOnDetectResultUpdateCallback(OH_ArkUI_TextDataDetectorConfig* config, void* userData, void (*callback)(const char* result, int32_t length, void* userData)) - Sets the callback for text entity recognition result updates.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetColor(OH_ArkUI_TextDataDetectorConfig* config, uint32_t color) - Sets the color of the recognized content.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetColor(OH_ArkUI_TextDataDetectorConfig* config, uint32_t* color) - Obtains the color of the recognized content.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetDecorationStyleOptions(OH_ArkUI_TextDataDetectorConfig* config, OH_ArkUI_DecorationStyleOptions* decoration) - Sets the decoration style of the recognized content.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetDecorationStyleOptions(OH_ArkUI_TextDataDetectorConfig* config, OH_ArkUI_DecorationStyleOptions* decoration) - Obtains the decoration style of the recognized content.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_SetEnablePreviewMenu(OH_ArkUI_TextDataDetectorConfig* config, bool enablePreviewMenu) - Sets whether to display the preview menu when the recognized content is long-pressed.
ArkUI_ErrorCode OH_ArkUI_TextDataDetectorConfig_GetEnablePreviewMenu(OH_ArkUI_TextDataDetectorConfig* config, bool* enablePreviewMenu) - Obtains whether the preview menu is displayed when the recognized content is long-pressed.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetValue(OH_ArkUI_TextEditorPlaceholderOptions* options, const char* value) - Sets the text for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetValue(OH_ArkUI_TextEditorPlaceholderOptions* options, char* buffer, int32_t bufferSize, int32_t* writeLength) - Obtains the text for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontSize(OH_ArkUI_TextEditorPlaceholderOptions* options, float fontSize) - Sets the font size for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontSize(OH_ArkUI_TextEditorPlaceholderOptions* options, float* fontSize) - Obtains the font size for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontWeight(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t fontWeight) - Sets the font weight for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontWeight(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t* fontWeight) - Obtains the font weight for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontFamily(OH_ArkUI_TextEditorPlaceholderOptions* options, const char* fontFamily) - Sets the font family for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontFamily(OH_ArkUI_TextEditorPlaceholderOptions* options, char* buffer, int32_t bufferSize, int32_t* writeLength) - Obtains the font family for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontStyle(OH_ArkUI_TextEditorPlaceholderOptions* options, ArkUI_FontStyle fontStyle) - Sets the font style for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontStyle(OH_ArkUI_TextEditorPlaceholderOptions* options, ArkUI_FontStyle* fontStyle) - Obtains the font style for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_SetFontColor(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t fontColor) - Sets the font color for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorPlaceholderOptions_GetFontColor(OH_ArkUI_TextEditorPlaceholderOptions* options, uint32_t* fontColor) - Obtains the font color for the placeholder text options used when there is no input.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetCaretOffset(OH_ArkUI_TextEditorStyledStringController* controller, int32_t caretOffset) - Sets the caret offset using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetCaretOffset(OH_ArkUI_TextEditorStyledStringController* controller, int32_t* caretOffset) - Obtains the caret offset using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetSelection(OH_ArkUI_TextEditorStyledStringController* controller, uint32_t start, uint32_t end, ArkUI_MenuPolicy menuPolicy) - Sets the selected area using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_IsEditing(OH_ArkUI_TextEditorStyledStringController* controller, bool* isEditing) - Obtains the editing status of the text editor using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_StopEditing(OH_ArkUI_TextEditorStyledStringController* controller) - Exits the editing status of the text editor using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetPreviewText(OH_ArkUI_TextEditorStyledStringController* controller, uint32_t* offset, char* buffer, int32_t bufferSize, int32_t* writeLength) - Obtains the preview text using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetCaretRect(OH_ArkUI_TextEditorStyledStringController* controller, ArkUI_Rect* rect) - Obtains the caret-selected rectangle using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_DeleteBackward(OH_ArkUI_TextEditorStyledStringController* controller) - Deletes characters using the styled string controller. If no content is selected, one character before the current caret position is deleted. If content is selected, the selected content is deleted.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetTextAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextAlignment align) - Sets the text alignment mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetTextAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextAlignment* align) - Obtains the text alignment mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginPixelMap(OH_ArkUI_TextEditorParagraphStyle* style, struct OH_PixelmapNative* pixelmap) - Sets the PixelMap for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginPixelMap(OH_ArkUI_TextEditorParagraphStyle* style, struct OH_PixelmapNative** pixelmap) - Obtains the PixelMap for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginWidth(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t width) - Sets the width for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginWidth(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t* width) - Obtains the width for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLeadingMarginHeight(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t height) - Sets the height for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLeadingMarginHeight(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t* height) - Obtains the height for paragraph indentation in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetWordBreak(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_WordBreak wordBreak) - Sets the word breaking mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetWordBreak(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_WordBreak* wordBreak) - Obtains the word breaking mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetLineBreakStrategy(OH_ArkUI_TextEditorParagraphStyle* style, OH_ArkUI_LineBreakStrategy lineBreakStrategy) - Sets the line breaking strategy in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetLineBreakStrategy(OH_ArkUI_TextEditorParagraphStyle* style, OH_ArkUI_LineBreakStrategy* lineBreakStrategy) - Obtains the line breaking strategy in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetParagraphSpacing(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t paragraphSpacing) - Sets the paragraph spacing in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetParagraphSpacing(OH_ArkUI_TextEditorParagraphStyle* style, uint32_t* paragraphSpacing) - Obtains the paragraph spacing in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetTextVerticalAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextVerticalAlignment verticalAlignment) - Sets the text vertical alignment mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetTextVerticalAlign(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextVerticalAlignment* verticalAlignment) - Obtains the text vertical alignment mode in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_SetTextDirection(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextDirection textDirection) - Sets the text direction in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorParagraphStyle_GetTextDirection(OH_ArkUI_TextEditorParagraphStyle* style, ArkUI_TextDirection* textDirection) - Obtains the text direction in the paragraph style.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetTypingParagraphStyle(OH_ArkUI_TextEditorStyledStringController* controller, OH_ArkUI_TextEditorParagraphStyle* style) - Sets the typing paragraph style using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t color) - Sets the font color of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t* color) - Obtains the font color of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontSize(OH_ArkUI_TextEditorTextStyle* style, float size) - Sets the font size of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontSize(OH_ArkUI_TextEditorTextStyle* style, float* size) - Obtains the font size of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontStyle(OH_ArkUI_TextEditorTextStyle* style, ArkUI_FontStyle fontStyle) - Sets the font style of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontStyle(OH_ArkUI_TextEditorTextStyle* style, ArkUI_FontStyle* fontStyle) - Obtains the font style of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontWeight(OH_ArkUI_TextEditorTextStyle* style, uint32_t fontWeight) - Sets the font weight of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontWeight(OH_ArkUI_TextEditorTextStyle* style, uint32_t* fontWeight) - Obtains the font weight of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontFamily(OH_ArkUI_TextEditorTextStyle* style, const char* fontFamily) - Sets the font family of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontFamily(OH_ArkUI_TextEditorTextStyle* style, char* buffer, int32_t bufferSize, int32_t* writeLength) - Obtains the font family of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetDecoration(OH_ArkUI_TextEditorTextStyle* style, OH_ArkUI_DecorationStyleOptions* options) - Sets the text decoration options of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetDecoration(OH_ArkUI_TextEditorTextStyle* style, OH_ArkUI_DecorationStyleOptions* options) - Obtains the text decoration options of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetTextShadows(OH_ArkUI_TextEditorTextStyle* style, const OH_ArkUI_ShadowOptions** options, int32_t length) - Sets the text shadow options of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetTextShadows(OH_ArkUI_TextEditorTextStyle* style, OH_ArkUI_ShadowOptions** shadowOptions, uint32_t shadowOptionsSize, uint32_t* writeLength) - Obtains the text shadow options of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetLineHeight(OH_ArkUI_TextEditorTextStyle* style, int32_t lineHeight) - Sets the line height of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetLineHeight(OH_ArkUI_TextEditorTextStyle* style, int32_t* lineHeight) - Obtains the line height of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetLetterSpacing(OH_ArkUI_TextEditorTextStyle* style, int32_t letterSpacing) - Sets the letter spacing of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetLetterSpacing(OH_ArkUI_TextEditorTextStyle* style, int32_t* letterSpacing) - Obtains the letter spacing of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetFontFeature(OH_ArkUI_TextEditorTextStyle* style, const char* fontFeature) - Sets the font feature of the text style, such as monospaced digits.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetFontFeature(OH_ArkUI_TextEditorTextStyle* style, char* buffer, int32_t bufferSize, int32_t* writeLength) - Obtains the font feature of the text style, such as monospaced digits.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetHalfLeading(OH_ArkUI_TextEditorTextStyle* style, bool halfLeading) - Sets whether to evenly distribute the line spacing to the top and bottom of each line in the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetHalfLeading(OH_ArkUI_TextEditorTextStyle* style, bool* halfLeading) - Obtains whether the line spacing is evenly distributed to the top and bottom of each line in the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetTextBackgroundColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t color) - Sets the text background color of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetTextBackgroundColor(OH_ArkUI_TextEditorTextStyle* style, uint32_t* color) - Obtains the text background color of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_SetTextBackgroundRadius(OH_ArkUI_TextEditorTextStyle* style, float topLeft, float topRight, float bottomLeft, float bottomRight) - Sets the radius of the rounded corner of the text background of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorTextStyle_GetTextBackgroundRadius(OH_ArkUI_TextEditorTextStyle* style, float* topLeft, float* topRight, float* bottomLeft, float* bottomRight) - Obtains the radius of the rounded corner of the text background of the text style.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetTypingStyle(OH_ArkUI_TextEditorStyledStringController* controller, OH_ArkUI_TextEditorTextStyle* style) - Sets the typing style using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetTypingStyle(OH_ArkUI_TextEditorStyledStringController* controller, OH_ArkUI_TextEditorTextStyle* style) - Obtains the typing style using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetSpanType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorSpanType textEditorSpanType) - Sets the span type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetSpanType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorSpanType* textEditorSpanType) - Obtains the span type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetContentNode(OH_ArkUI_TextEditorSelectionMenuOptions* options, ArkUI_NodeHandle node) - Sets the content node of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetContentNode(OH_ArkUI_TextEditorSelectionMenuOptions* options, ArkUI_NodeHandle* node) - Obtains the content node of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetResponseType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorResponseType responseType) - Sets the response type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetResponseType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextEditorResponseType* responseType) - Obtains the response type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetMenuType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextMenuType menuType) - Sets the type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetMenuType(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_TextMenuType* menuType) - Obtains the type of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuShowCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(int32_t start, int32_t end, void* callbackUserData)) - Sets the callback triggered when the text selection menu is displayed.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuHideCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(int32_t start, int32_t end, void* callbackUserData)) - Sets the callback triggered when the text selection menu is hidden.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuAppearCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(int32_t start, int32_t end, void* callbackUserData)) - Sets the callback triggered when the text selection menu appears.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_RegisterOnMenuDisappearCallback(OH_ArkUI_TextEditorSelectionMenuOptions* options, void* userData, void (*callback)(void* callbackUserData)) - Sets the callback triggered when the text selection menu disappears.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_SetHapticFeedbackMode(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_HapticFeedbackMode mode) - Sets the haptic feedback mode of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorSelectionMenuOptions_GetHapticFeedbackMode(OH_ArkUI_TextEditorSelectionMenuOptions* options, OH_ArkUI_HapticFeedbackMode* mode) - Obtains the haptic feedback mode of the text selection menu in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_CloseSelectionMenu(OH_ArkUI_TextEditorStyledStringController* controller) - Closes the text selection menu of the styled string controller in the text editor.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetSelection(const OH_ArkUI_TextEditorStyledStringController* controller, uint32_t* start, uint32_t* end) - Obtains the selected area using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetStyledString(const OH_ArkUI_TextEditorStyledStringController* controller, const ArkUI_StyledString_Descriptor* descriptor) - Sets the styled string displayed using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_GetStyledString(const OH_ArkUI_TextEditorStyledStringController* controller, ArkUI_StyledString_Descriptor* descriptor) - Obtains the styled string displayed using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_SetStyledPlaceholder(const OH_ArkUI_TextEditorStyledStringController* controller, const ArkUI_StyledString_Descriptor* descriptor) - Sets the placeholder text in the styled string style using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_ScrollToVisible(const OH_ArkUI_TextEditorStyledStringController* controller, int32_t start, int32_t end) - Scrolls the content within the range from the specified start index to the end index to the visible area using the styled string controller.
ArkUI_ErrorCode OH_ArkUI_TextController_SetStyledString(OH_ArkUI_TextController* controller, ArkUI_StyledString_Descriptor* descriptor) - Sets a styled string for the text component.
OH_ArkUI_LinearGradientOptions* OH_ArkUI_LinearGradientOptions_Create() - Creates an object for linear gradient effect options.
void OH_ArkUI_LinearGradientOptions_Destroy(OH_ArkUI_LinearGradientOptions* options) - Destroys the object for linear gradient effect options.
ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_SetAngle(OH_ArkUI_LinearGradientOptions* options, float angle) - Sets the angle in linear gradient effect options.
ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_GetAngle(const OH_ArkUI_LinearGradientOptions* options, float* angle) - Obtains the angle in linear gradient effect options.
ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_SetDirection(OH_ArkUI_LinearGradientOptions* options, ArkUI_LinearGradientDirection direction) - Sets the direction in linear gradient effect options.
ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_GetDirection(const OH_ArkUI_LinearGradientOptions* options, ArkUI_LinearGradientDirection* direction) - Obtains the direction in linear gradient effect options.
ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_SetRepeating(OH_ArkUI_LinearGradientOptions* options, bool repeating) - Sets whether the color is repeated in linear gradient effect options.
ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_GetRepeating(const OH_ArkUI_LinearGradientOptions* options, bool* repeating) - Obtains whether the color is repeated in linear gradient effect options.
ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_SetColorStop(OH_ArkUI_LinearGradientOptions* options, const uint32_t* colors, const float* stops, int32_t colorsAndStopsSize) - Sets the color stop in linear gradient effect options.
ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_GetColorStop(const OH_ArkUI_LinearGradientOptions* options, uint32_t* colors, float* stops, int32_t colorsAndStopsSize, int32_t* writeLength) - Obtains the color stop in linear gradient effect options.
OH_ArkUI_RadialGradientOptions* OH_ArkUI_RadialGradientOptions_Create() - Creates an object for radial gradient effect options.
void OH_ArkUI_RadialGradientOptions_Destroy(OH_ArkUI_RadialGradientOptions* options) - Destroys the object for radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetCenterX(OH_ArkUI_RadialGradientOptions* options, float centerX) - Sets the X coordinate of the center point in radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetCenterX(const OH_ArkUI_RadialGradientOptions* options, float* centerX) - Obtains the X coordinate of the center point in radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetCenterY(OH_ArkUI_RadialGradientOptions* options, float centerY) - Sets the Y coordinate of the center point in radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetCenterY(const OH_ArkUI_RadialGradientOptions* options, float* centerY) - Obtains the Y coordinate of the center point in radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetRadius(OH_ArkUI_RadialGradientOptions* options, float radius) - Sets the radius in radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetRadius(const OH_ArkUI_RadialGradientOptions* options, float* radius) - Obtains the radius in radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetRepeating(OH_ArkUI_RadialGradientOptions* options, bool repeating) - Sets whether the color is repeated in radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetRepeating(const OH_ArkUI_RadialGradientOptions* options, bool* repeating) - Obtains whether the color is repeated in radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetColorStop(OH_ArkUI_RadialGradientOptions* options, const uint32_t* colors, const float* stops, int32_t colorsAndStopsSize) - Sets the color stop in radial gradient effect options.
ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetColorStop(const OH_ArkUI_RadialGradientOptions* options, uint32_t* colors, float* stops, int32_t colorsAndStopsSize, int32_t* writeLength) - Obtains the color stop in radial gradient effect options.
ArkUI_SelectedDragPreviewStyle* OH_ArkUI_SelectedDragPreviewStyle_Create() - Creates a preview style shown when dragging selected text.
void OH_ArkUI_SelectedDragPreviewStyle_Dispose(ArkUI_SelectedDragPreviewStyle* config) - Disposes of the preview style shown when dragging selected text.
void OH_ArkUI_SelectedDragPreviewStyle_SetColor(ArkUI_SelectedDragPreviewStyle* config, uint32_t color) - Sets the background color of the preview style shown when dragging selected text.
uint32_t OH_ArkUI_SelectedDragPreviewStyle_GetColor(ArkUI_SelectedDragPreviewStyle* config) - Obtains the background color of the preview style shown when dragging selected text.

Enum Description

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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 The unit is px.
ARKUI_LENGTH_METRIC_UNIT_VP = 1 The unit is vp.
ARKUI_LENGTH_METRIC_UNIT_FP = 2 The unit is fp.

[h2]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.

[h2]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.

[h2]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.

[h2]ArkUI_CrownSensitivity

enum ArkUI_CrownSensitivity

Description

Enumerates crown sensitivity levels.

Since: 26.0.0

Value Description
ARKUI_CROWN_SENSITIVITY_LOW = 0 Low sensitivity.
ARKUI_CROWN_SENSITIVITY_MEDIUM = 1 Medium sensitivity.
ARKUI_CROWN_SENSITIVITY_HIGH = 2 High sensitivity.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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).

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]OH_ArkUI_CrossLanguageOperatingStatus

enum OH_ArkUI_CrossLanguageOperatingStatus

Description

Enumerates the node tree operation states of cross-language configuration options.

Since: 26.0.0

Value Description
OH_ARKUI_TREE_OPERATING_STATUS_UNDEFINED = 0 Undefined, which is the initial value of the node tree operation state. Nodes in this state do not support cross-language node tree operations.
OH_ARKUI_TREE_OPERATING_STATUS_ENABLE = 1 Enabled, which indicates that when the configuration option is applied to a node, the node tree operation state of the node will be enabled.
OH_ARKUI_TREE_OPERATING_STATUS_DISABLE = 2 Disabled, which indicates that when the configuration option is applied to a node, the node tree operation state of the node will be disabled.

[h2]OH_ArkUI_NodeMountPolicy

enum OH_ArkUI_NodeMountPolicy

Description

Enumerates the child node mounting policy types.

Since: 26.0.0

Value Description
OH_ARKUI_NODE_MOUNT_POLICY_SINGLE_IF_RENDER_NODE = 0 If a RenderNode needs to be mounted as a child node, this RenderNode must be the only child node.
OH_ARKUI_NODE_MOUNT_POLICY_MIXED = 1 Multiple typeNodes and RenderNodes can be mounted at the same time.

Function Description

[h2]OH_ArkUI_LayoutConstraint_Create()

ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Create()

Description

Creates layout constraints. After the created layout constraint pointer is used, call OH_ArkUI_LayoutConstraint_Dispose to release it. If the pointer is not released, memory leakage may occur.

Since: 12

Returns

Type Description
ArkUI_LayoutConstraint* Pointer to the created layout constraint.

[h2]OH_ArkUI_LayoutConstraint_Copy()

ArkUI_LayoutConstraint* OH_ArkUI_LayoutConstraint_Copy(const ArkUI_LayoutConstraint* Constraint)

Description

Performs a deep copy of a layout constraint. The new layout constraint pointer returned by the deep copy is independent of the original pointer. You need to call OH_ArkUI_LayoutConstraint_Dispose to release them separately after use.

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.

[h2]OH_ArkUI_LayoutConstraint_Dispose()

void* OH_ArkUI_LayoutConstraint_Dispose(ArkUI_LayoutConstraint* Constraint)

Description

Disposes of a layout constraint pointer. This API must be used together with OH_ArkUI_LayoutConstraint_Create or OH_ArkUI_LayoutConstraint_Copy. Each layout constraint pointer can be destroyed only once. After being destroyed, the pointer should not be used anymore.

Since: 12

Parameters

Name Description
ArkUI_LayoutConstraint* Constraint Pointer to the layout constraint.

Returns

Type Description
void* Null pointer.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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, +∞).

[h2]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, +∞).

[h2]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, +∞).

[h2]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, +∞).

[h2]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, +∞).

[h2]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, +∞).

[h2]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.

[h2]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.

[h2]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. The value is an enumerated value of ArkUI_FontWeight.

[h2]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. The value is an enumerated value of ArkUI_FontWeight.

[h2]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. The value is an enumerated value of ArkUI_FontWeight.

[h2]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. The value is an enumerated value of ArkUI_FontWeight.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.
void (*callback)() Pointer to the callback event.

[h2]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.
void (*callback)(void* userData) Pointer to the callback event.

[h2]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.
void (*callback)() Pointer to the callback event.

[h2]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.
void (*callback)(void* userData) Pointer to the callback event.

[h2]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.
void (*callback)() Pointer to the callback event.

[h2]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.
void (*callback)(void* userData) Pointer to the callback event.

[h2]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.
void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState) Pointer to the callback event. The parameter passed is swipeActionState, which indicates the swipe state of the list item.

[h2]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.

[h2]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.

[h2]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.

[h2]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 ListItemSwipeActionOption instance.
ArkUI_ListItemSwipeActionItem* item Pointer to the layout information.

[h2]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 ListItemSwipeActionOption instance.
ArkUI_ListItemSwipeActionItem* item Pointer to the layout information.

[h2]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 ListItemSwipeActionOption instance.
ArkUI_ListItemSwipeEdgeEffect edgeEffect Effect used when the boundary of the scrolling area is reached.

[h2]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 ListItemSwipeActionOption 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.

[h2]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 ListItemSwipeActionOption instance.
callback Callback event. offset: scroll offset, in vp.

[h2]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 ListItemSwipeActionOption instance.
void* userData Pointer to the user-defined data.
callback Callback event. offset: scroll offset, in vp.

[h2]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_INVALID if a parameter error occurs.

Returns ARKUI_ERROR_CODE_PARAM_ERROR if the passed 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.

  • 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.

[h2]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_INVALID if a parameter error occurs.

Returns ARKUI_ERROR_CODE_PARAM_ERROR if the passed 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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]OH_ArkUI_ActiveChildrenInfo_Destroy()

void OH_ArkUI_ActiveChildrenInfo_Destroy(ArkUI_ActiveChildrenInfo* handle)

Description

Destroys the ArkUI_ActiveChildrenInfo instance and releases the resources allocated when obtaining information about active child nodes.

Since: 14

Parameters

Name Description
ArkUI_ActiveChildrenInfo* handle Pointer to the ArkUI_ActiveChildrenInfo instance to be destroyed.

[h2]OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex()

ArkUI_NodeHandle OH_ArkUI_ActiveChildrenInfo_GetNodeByIndex(ArkUI_ActiveChildrenInfo* handle, int32_t index)

Description

Obtains the child node whose subscript is index in the ArkUI_ActiveChildrenInfo struct. This API is applicable to traversing active child nodes by subscript.

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.

[h2]OH_ArkUI_ActiveChildrenInfo_GetCount()

int32_t OH_ArkUI_ActiveChildrenInfo_GetCount(ArkUI_ActiveChildrenInfo* handle)

Description

Obtains the number of child nodes in the ArkUI_ActiveChildrenInfo struct. This API is applicable to determining the number of child nodes before traversing active child nodes.

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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]OH_ArkUI_CrossLanguageOption_SetTreeOperatingStatus()

void OH_ArkUI_CrossLanguageOption_SetTreeOperatingStatus(ArkUI_CrossLanguageOption* option, OH_ArkUI_CrossLanguageOperatingStatus status)

Description

Sets the node tree operation state of a cross-language configuration option.

Since: 26.0.0

Parameters

Name Description
ArkUI_CrossLanguageOption* option Pointer to the cross-language configuration option instance.
OH_ArkUI_CrossLanguageOperatingStatus status Node tree operation state to be set. Default value: OH_ARKUI_TREE_OPERATING_STATUS_UNDEFINED.

[h2]OH_ArkUI_CrossLanguageOption_GetTreeOperatingStatus()

OH_ArkUI_CrossLanguageOperatingStatus OH_ArkUI_CrossLanguageOption_GetTreeOperatingStatus(ArkUI_CrossLanguageOption* option)

Description

Obtains the node tree operation state of a cross-language configuration option.

Since: 26.0.0

Parameters

Name Description
ArkUI_CrossLanguageOption* option Pointer to the cross-language configuration option instance.

Returns

Type Description
OH_ArkUI_CrossLanguageOperatingStatus Node tree operation state of a cross-language configuration option.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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

Pointer to the length of the data actually written to the buffer if ARKUI_ERROR_CODE_NO_ERROR is returned.

Pointer to the minimum length required for writing the entire string to the buffer if ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR 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.

[h2]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.

[h2]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

Pointer to the length of the data actually written to the buffer if ARKUI_ERROR_CODE_NO_ERROR is returned.

Pointer to the minimum length required for writing the entire string to the buffer if ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR 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.

[h2]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.

[h2]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

Pointer to the length of the data actually written to the buffer if ARKUI_ERROR_CODE_NO_ERROR is returned.

Pointer to the minimum length required for writing the entire string to the buffer if ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR 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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]OH_ArkUI_TextSelectionMenuOptions_SetSpanType()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_SetSpanType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextSpanType textSpanType)

Description

Sets the text 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.

[h2]OH_ArkUI_TextSelectionMenuOptions_GetSpanType()

ArkUI_ErrorCode OH_ArkUI_TextSelectionMenuOptions_GetSpanType(ArkUI_TextSelectionMenuOptions* selectionMenuOptions, ArkUI_TextSpanType* spanType)

Description

Obtains the text 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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]OH_ArkUI_SelectedDragPreviewStyle_Dispose()

void OH_ArkUI_SelectedDragPreviewStyle_Dispose(ArkUI_SelectedDragPreviewStyle* config)

Description

Disposes of the preview style shown when dragging selected text.

Since: 23

Parameters

Name Description
ArkUI_SelectedDragPreviewStyle* config Pointer to the ArkUI_SelectedDragPreviewStyle object.

[h2]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.

[h2]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 Background color of the preview style shown when dragging selected text, in RGBA format.

[h2]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, specified using 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.

[h2]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, specified using 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.

[h2]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.

[h2]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.

[h2]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 Decorative line style, specified using 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.

[h2]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 decorative line style, specified using 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.

[h2]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.

[h2]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.

[h2]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 Type 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.

[h2]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.

[h2]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, int32_t length, void* userData) 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.

[h2]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.

[h2]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.

[h2]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.

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.

[h2]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.

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.

[h2]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.

[h2]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 Pointer to the enablePreviewMenu parameter indicating 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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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 enumerated value of ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_W400.

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.

[h2]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 enumerated value of ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_W400.

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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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 Pointer to the isEditing parameter indicating 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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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 Pointer to the 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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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 enumerated value of ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_W400.

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.

[h2]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 enumerated value of ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_W400.

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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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

Pointer to the halfLeading parameter indicating 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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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, int32_t end, void* callbackUserData) 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.

[h2]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, int32_t end, void* callbackUserData) 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.

[h2]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, int32_t end, void* callbackUserData) 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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]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.

[h2]OH_ArkUI_TextEditorStyledStringController_ScrollToVisible()

ArkUI_ErrorCode OH_ArkUI_TextEditorStyledStringController_ScrollToVisible(const OH_ArkUI_TextEditorStyledStringController* controller, int32_t start, int32_t end)

Description

Scrolls the content within the range from the specified start index to the end index to the visible area using the styled string controller.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_TextEditorStyledStringController* controller Pointer to the OH_ArkUI_TextEditorStyledStringController object.
int32_t start

Start 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 content in the TextEditor component]. If the start index is less than 0, 0 is used. If the start index is greater than the total length, the total length is used.

int32_t end

End 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 content in the TextEditor component]. If the end index is less than 0, 0 is used. If the end index is greater than the total length, the total length is used.

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.

[h2]OH_ArkUI_PickerIndicatorStyle_ConfigureBackground()

ArkUI_ErrorCode OH_ArkUI_PickerIndicatorStyle_ConfigureBackground(ArkUI_PickerIndicatorStyle* style, ArkUI_PickerIndicatorBackground* background)

Description

Sets the background style. 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.

[h2]OH_ArkUI_PickerIndicatorStyle_ConfigureDivider()

ArkUI_ErrorCode OH_ArkUI_PickerIndicatorStyle_ConfigureDivider(ArkUI_PickerIndicatorStyle* style, ArkUI_PickerIndicatorDivider* divider)

Description

Sets the divider style. 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.

[h2]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.

[h2]OH_ArkUI_LinearGradientOptions_Create()

OH_ArkUI_LinearGradientOptions* OH_ArkUI_LinearGradientOptions_Create()

Description

Creates an object for linear gradient effect options.

Since: 26.0.0

Returns

Type Description
OH_ArkUI_LinearGradientOptions* Pointer to the OH_ArkUI_LinearGradientOptions* object.

[h2]OH_ArkUI_LinearGradientOptions_Destroy()

void OH_ArkUI_LinearGradientOptions_Destroy(OH_ArkUI_LinearGradientOptions* options)

Description

Destroys the object for linear gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_LinearGradientOptions* options Pointer to the OH_ArkUI_LinearGradientOptions object.

[h2]OH_ArkUI_LinearGradientOptions_SetAngle()

ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_SetAngle(OH_ArkUI_LinearGradientOptions* options, float angle)

Description

Sets the angle in linear gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_LinearGradientOptions* options Pointer to the OH_ArkUI_LinearGradientOptions object.
float angle Angle in linear gradient effect 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.

[h2]OH_ArkUI_LinearGradientOptions_GetAngle()

ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_GetAngle(const OH_ArkUI_LinearGradientOptions* options, float* angle)

Description

Obtains the angle in linear gradient effect options.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_LinearGradientOptions* options Pointer to the OH_ArkUI_LinearGradientOptions object.
float* angle Pointer to the angle in linear gradient effect 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.

[h2]OH_ArkUI_LinearGradientOptions_SetDirection()

ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_SetDirection(OH_ArkUI_LinearGradientOptions* options, ArkUI_LinearGradientDirection direction)

Description

Sets the direction in linear gradient effect options.

When OH_ArkUI_LinearGradientOptions_SetAngle is called to set the angle, the direction setting does not take effect.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_LinearGradientOptions* options Pointer to the OH_ArkUI_LinearGradientOptions object.
ArkUI_LinearGradientDirection direction Direction in linear gradient effect 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.

[h2]OH_ArkUI_LinearGradientOptions_GetDirection()

ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_GetDirection(const OH_ArkUI_LinearGradientOptions* options, ArkUI_LinearGradientDirection* direction)

Description

Obtains the direction in linear gradient effect options.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_LinearGradientOptions* options Pointer to the OH_ArkUI_LinearGradientOptions object.
ArkUI_LinearGradientDirection* direction Pointer to the direction in linear gradient effect 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.

[h2]OH_ArkUI_LinearGradientOptions_SetRepeating()

ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_SetRepeating(OH_ArkUI_LinearGradientOptions* options, bool repeating)

Description

Sets whether the color is repeated in linear gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_LinearGradientOptions* options Pointer to the OH_ArkUI_LinearGradientOptions object.
bool repeating Whether the color is repeated in linear gradient options. The value false indicates that the color is not repeated, and the value true indicates that the color is repeated. 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.

[h2]OH_ArkUI_LinearGradientOptions_GetRepeating()

ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_GetRepeating(const OH_ArkUI_LinearGradientOptions* options, bool* repeating)

Description

Obtains whether the color is repeated in linear gradient effect options.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_LinearGradientOptions* options Pointer to the OH_ArkUI_LinearGradientOptions object.
bool* repeating Pointer to the repeating parameter indicating whether the color is repeated in linear gradient effect 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.

[h2]OH_ArkUI_LinearGradientOptions_SetColorStop()

ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_SetColorStop(OH_ArkUI_LinearGradientOptions* options, const uint32_t* colors, const float* stops, int32_t colorsAndStopsSize)

Description

Sets the color stop in linear gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_LinearGradientOptions* options Pointer to the OH_ArkUI_LinearGradientOptions object.
const uint32_t* colors Pointer to the color array.
const float* stops Pointer to the color stop array.
int32_t colorsAndStopsSize Number of elements in the color and color stop arrays. The number of elements in the color array must be the same as that in the color stop array.

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.

[h2]OH_ArkUI_LinearGradientOptions_GetColorStop()

ArkUI_ErrorCode OH_ArkUI_LinearGradientOptions_GetColorStop(const OH_ArkUI_LinearGradientOptions* options, uint32_t* colors, float* stops, int32_t colorsAndStopsSize, int32_t* writeLength)

Description

Obtains the color stop in linear gradient effect options.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_LinearGradientOptions* options Pointer to the OH_ArkUI_LinearGradientOptions object.
uint32_t* colors Pointer to the color array.
float* stops Pointer to the color stop array.
int32_t colorsAndStopsSize Number of elements in the color and color stop arrays. The number of elements in the color array must be the same as that in the color stop array.
int32_t* writeLength Pointer to the number of colors and color stops that are actually written.

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.

[h2]OH_ArkUI_RadialGradientOptions_Create()

OH_ArkUI_RadialGradientOptions* OH_ArkUI_RadialGradientOptions_Create()

Description

Creates an object for radial gradient effect options.

Since: 26.0.0

Returns

Type Description
OH_ArkUI_RadialGradientOptions* Pointer to the OH_ArkUI_RadialGradientOptions object.

[h2]OH_ArkUI_RadialGradientOptions_Destroy()

void OH_ArkUI_RadialGradientOptions_Destroy(OH_ArkUI_RadialGradientOptions* options)

Description

Destroys the object for radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.

[h2]OH_ArkUI_RadialGradientOptions_SetCenterX()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetCenterX(OH_ArkUI_RadialGradientOptions* options, float centerX)

Description

Sets the X coordinate of the center point in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
float centerX X coordinate of the center point in radial gradient effect 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.

[h2]OH_ArkUI_RadialGradientOptions_GetCenterX()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetCenterX(const OH_ArkUI_RadialGradientOptions* options, float* centerX)

Description

Obtains the X coordinate of the center point in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
float* centerX Pointer to the X coordinate of the center point in radial gradient effect 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.

[h2]OH_ArkUI_RadialGradientOptions_SetCenterY()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetCenterY(OH_ArkUI_RadialGradientOptions* options, float centerY)

Description

Sets the Y coordinate of the center point in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
float centerY Y coordinate of the center point in radial gradient effect 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.

[h2]OH_ArkUI_RadialGradientOptions_GetCenterY()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetCenterY(const OH_ArkUI_RadialGradientOptions* options, float* centerY)

Description

Obtains the Y coordinate of the center point in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
float* centerY Pointer to the Y coordinate of the center point in radial gradient effect 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.

[h2]OH_ArkUI_RadialGradientOptions_SetRadius()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetRadius(OH_ArkUI_RadialGradientOptions* options, float radius)

Description

Sets the radius in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
float radius Radius in radial gradient effect 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.

[h2]OH_ArkUI_RadialGradientOptions_GetRadius()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetRadius(const OH_ArkUI_RadialGradientOptions* options, float* radius)

Description

Obtains the radius in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
float* radius Pointer to the radius in radial gradient effect 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.

[h2]OH_ArkUI_RadialGradientOptions_SetRepeating()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetRepeating(OH_ArkUI_RadialGradientOptions* options, bool repeating)

Description

Sets whether the color is repeated in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
bool repeating Whether the color is repeated in radial gradient options. The value false indicates that the color is not repeated, and the value true indicates that the color is repeated. 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.

[h2]OH_ArkUI_RadialGradientOptions_GetRepeating()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetRepeating(const OH_ArkUI_RadialGradientOptions* options, bool* repeating)

Description

Obtains whether the color is repeated in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
bool* repeating Pointer to the repeating parameter indicating whether the color is repeated in radial gradient effect 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.

[h2]OH_ArkUI_RadialGradientOptions_SetColorStop()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_SetColorStop(OH_ArkUI_RadialGradientOptions* options, const uint32_t* colors, const float* stops, int32_t colorsAndStopsSize)

Description

Sets the color stop in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
const uint32_t* colors Pointer to the color array.
const float* stops Pointer to the color stop array.
int32_t colorsAndStopsSize Number of elements in the color and color stop arrays. The number of elements in the color array must be the same as that in the color stop array.

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.

[h2]OH_ArkUI_RadialGradientOptions_GetColorStop()

ArkUI_ErrorCode OH_ArkUI_RadialGradientOptions_GetColorStop(const OH_ArkUI_RadialGradientOptions* options, uint32_t* colors, float* stops, int32_t colorsAndStopsSize, int32_t* writeLength)

Description

Obtains the color stop in radial gradient effect options.

Since: 26.0.0

Parameters

Name Description
const OH_ArkUI_RadialGradientOptions* options Pointer to the OH_ArkUI_RadialGradientOptions object.
uint32_t* colors Pointer to the buffer of the color array.
float* stops Pointer to the color stop array.
int32_t colorsAndStopsSize Number of elements in the color and color stop arrays. The number of elements in the color array must be the same as that in the color stop array.
int32_t* writeLength Pointer to the number of color stops that are actually written.

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.