Provides styled string APIs of ArkUI on the native side.
Library: libace_ndk.z.so
File to include: <arkui/styled_string.h>
System capability: SystemCapability.ArkUI.ArkUI.Full
Since: 12
Related module: ArkUI_NativeModule
| Name | Description |
|---|---|
| typedef struct ArkUI_StyledString ArkUI_StyledString | Defines a styled string object supported by the text component. |
| Name | Description |
|---|---|
| ArkUI_StyledString * OH_ArkUI_StyledString_Create (OH_Drawing_TypographyStyle *style, OH_Drawing_FontCollection *collection) | Creates an ArkUI_StyledString object. |
| void OH_ArkUI_StyledString_Destroy (ArkUI_StyledString *handle) | Destroys an ArkUI_StyledString object and reclaims the memory occupied by the object. |
| void OH_ArkUI_StyledString_PushTextStyle (ArkUI_StyledString *handle, OH_Drawing_TextStyle *style) | Pushes a text style to the top of the style stack of a styled string. |
| void OH_ArkUI_StyledString_AddText (ArkUI_StyledString *handle, const char *content) | Adds text for a styled string. |
| void OH_ArkUI_StyledString_PopTextStyle (ArkUI_StyledString *handle) | Pops the style at the top of the style stack of a styled string. |
| OH_Drawing_Typography * OH_ArkUI_StyledString_CreateTypography (ArkUI_StyledString *handle) | Creates an OH_Drawing_Typography object based on an ArkUI_StyledString object. |
| void OH_ArkUI_StyledString_AddPlaceholder (ArkUI_StyledString *handle, OH_Drawing_PlaceholderSpan *placeholder) | Adds a placeholder. |