diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index e880238e0011ec4f2d59c2b1648313421234daab..b5f15e435f2c5b382402e1300d178d30e5db48c8 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -615,6 +615,10 @@ "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_SetMargin" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_WaterFlowSectionOption_GetSize" + }, { "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_GetItemCount" @@ -635,6 +639,10 @@ "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_GetMargin" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex" + }, { "first_introduced": "12", "name": "OH_ArkUI_AnimateOption_Create" @@ -1058,5 +1066,97 @@ { "first_introduced": "12", "name": "OH_ArkUI_GetDrawableDescriptorFromResourceNapiValue" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_StyledString_Create" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_StyledString_Destroy" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_StyledString_PushTextStyle" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_StyledString_AddText" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_StyledString_PopTextStyle" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_StyledString_CreateTypography" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_StyledString_AddPlaceholder" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionItem_Create" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionItem_Dispose" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionItem_SetContent" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnAction" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionOption_Create" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionOption_Dispose" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionOption_SetStart" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionOption_SetEnd" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 2e089f3e4f4450068d8e54293efeabd2cc7c6fe9..d7f2bdf1dc2236f350af3bc63762a7ed57cceddc 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1603,6 +1603,19 @@ typedef enum { */ NODE_LAYOUT_RECT, + /** + * @brief Whether the current component supports click-to-focus capability, + * which can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: The parameter type is 1 or 0. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: The parameter type is 1 or 0. + * + */ + NODE_FOCUS_ON_TOUCH, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * @@ -1952,6 +1965,18 @@ typedef enum { */ NODE_TEXT_SELECTED_BACKGROUND_COLOR, + /** + * @brief The text component uses a formatted string object to set text content properties, + * and supports property setting, property reset, and property acquisition interfaces. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .object indicates ArkUI_StyledString formatted string data. The parameter type is {@link ArkUI_StyledString}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object indicates ArkUI_StyledString formatted string data. The parameter type is {@link ArkUI_StyledString}. \n + */ + NODE_TEXT_CONTENT_WITH_STYLED_STRING, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * @@ -1985,6 +2010,18 @@ typedef enum { * */ NODE_SPAN_TEXT_BACKGROUND_STYLE, + /** + * @brief Defines the text baseline offset attribute + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: baseline offset, in fp.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: baseline offset, in fp. \n + * + */ + NODE_SPAN_BASELINE_OFFSET, /** * @brief Defines the image source of the image span. * This attribute can be set, reset, and obtained as required through APIs. @@ -2013,6 +2050,20 @@ typedef enum { * */ NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT, + /** + * @brief Defines the placeholder image source. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: placeholder image source. \n + * .object: The parameter type is {@link ArkUI_DrawableDescriptor}. Either .string or .object must be set.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: placeholder image source. \n + * .object: The parameter type is {@link ArkUI_DrawableDescriptor}.\n + * + */ + NODE_IMAGE_SPAN_ALT, /** * @brief Defines the image source of the component. * This attribute can be set, reset, and obtained as required through APIs. @@ -2094,9 +2145,11 @@ typedef enum { * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .string: placeholder image source. \n + * .object: The parameter type is {@link ArkUI_DrawableDescriptor}. Either .string or .object must be set.\n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: placeholder image source. \n + * .object: The parameter type is {@link ArkUI_DrawableDescriptor}.\n * */ NODE_IMAGE_ALT, @@ -4444,6 +4497,19 @@ typedef enum { */ NODE_SWIPER_SWIPE_TO_INDEX, + /** + * @brief: Set the delineation component of the ListItem, supporting property settings, property resets, and + * property acquisition interfaces. + * + * Attribute setting method parameter {@link ArkUI_AttributeItem} format: \n + * .object: Construct using the {@link ArkUI_ListitemSwipeActionOption} object. \n + * \n + * The return value of the attribute acquisition method {@link ArkUI_AttributeItem} format: \n + * .object: Construct using the {@link ArkUI_ListitemSwipeActionOption} object. \n + * + */ + NODE_LIST_ITEM_SWIPE_ACTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST_ITEM, + /** * @brief Defines the header of the list item group. * This attribute can be set, reset, and obtained as required through APIs. @@ -5438,6 +5504,32 @@ typedef enum { */ NODE_SWIPER_EVENT_ON_GESTURE_SWIPE, + /** + * @brief Define the ARKUI_NODE_SWIPER to listen for Swiper page slide events. + * Instruction: \n + * 1. If the {@link ArkUI_SwiperDisplayModeType} attribute is set to \n + * ARKUI_SWIPER_DISPLAY_MODE_AUTO_LINEAR, the interface does not take effect. \n + * 2, circular scenario, set prevMargin and nextMargin attributes, \n + * so that Swiper front and back end display the same page, the interface does not take effect. \n + * 3. During page sliding, the ContentDidScrollCallback callback is \n + * triggered frame-by-frame for all pages in the window. \n + * For example, when there are two pages in the window with subscripts 0 and 1, \n + * callbacks with index values 0 and 1 are triggered twice per frame. \n + * 4, set the swipeByGroup parameter of the displayCount property to \n + * true if at least one page in the same group is in the window, \n + * A callback is triggered for all pages in the group. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains four parameters:\n + * ArkUI_NodeComponentEvent.data[0].i32 : indicates the index of the Swiper component, \n + * which is consistent with the index change in the onChange event. \n + * ArkUI_NodeComponentEvent.data[1].i32 : The index of a page in the window. \n + * ArkUI_NodeComponentEvent.data[2].f32 : The proportion of page movement relative to \n + * the start position of the Swiper spindle (selectedIndex corresponds to the start position of the page). \n + * ArkUI_NodeComponentEvent.data[3].f32 : The length of the page in the axis direction. \n + */ + NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL, + /** * @brief Defines the event triggered when the ARKUI_NODE_SCROLL component scrolls. * @@ -5637,6 +5729,16 @@ typedef enum { */ NODE_REFRESH_ON_REFRESH, + /** + * @brief Defines the event that is triggered when the ARKUI_NODE_REFRESH drop-down distance changes. + * + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains one parameter:\n + * ArkUI_NodeComponentEvent.data[0].f32: Pull-down distance. \n + */ + NODE_REFRESH_ON_OFFSET_CHANGE, + /** * @brief Defines the event triggered when the ARKUI_NODE_SCROLL component is about to scroll. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 71a268f5efec8b46bebb91d323d7629739860823..381ea6d4280211c954d86ef6c83858becfcce258 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -98,6 +98,20 @@ typedef struct ArkUI_NativeDialog* ArkUI_NativeDialogHandle; */ typedef struct ArkUI_WaterFlowSectionOption ArkUI_WaterFlowSectionOption; +/** + * @brief Define the configuration information of the Item within the ListitemSwipeActionOption method. + * + * @since 12 + */ +typedef struct ArkUI_ListItemSwipeActionItem ArkUI_ListItemSwipeActionItem; + +/** + * @brief Define the configuration information for the ListitemSwipeActionOption method. + * + * @since 12 + */ +typedef struct ArkUI_ListItemSwipeActionOption ArkUI_ListItemSwipeActionOption; + /** * @brief Defines the ArkUI native context object. * @@ -862,6 +876,8 @@ typedef enum { ARKUI_SLIDER_STYLE_OUT_SET = 0, /** The slider is in the slider track. */ ARKUI_SLIDER_STYLE_IN_SET, + /** No slider. */ + ARKUI_SLIDER_STYLE_NONE, } ArkUI_SliderStyle; /** @@ -1770,6 +1786,34 @@ typedef enum { ARKUI_SWIPER_INDICATOR_TYPE_DIGIT, } ArkUI_SwiperIndicatorType; +/** + * @brief Define the pattern of element arrangement in the main axis direction of the Swiper component. + * + * @since 12 + */ +typedef enum { + /** In the folded state, when the ListItem slides in the opposite direction to the main axis, + * the operation item is hidden.*/ + ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_COLLAPSED = 0, + /** In the folded state, when the ListItem slides in the opposite direction to the spindle, + * the operation item is displayed.*/ + ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_EXPANDED, + /** Long distance state, the state of deleting a ListItem after it enters the long distance deletion area.*/ + ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_ACTIONING, +} ArkUI_ListItemSwipeActionState; + +/** + * @brief Define the explicit and implicit mode of the SwipeAction method for the Listitem component. + * + * @since 12 + */ +typedef enum { + /** The ListItem can continue to be scratched after the distance exceeds the size of the scratched component.*/ + ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_SPRING = 0, + /** The sliding distance of the ListItem cannot exceed the size of the scratched component.*/ + ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_NONE, +} ArkUI_ListItemSwipeEdgeEffect; + /** * @brief Creates a size constraint. * @@ -1946,6 +1990,16 @@ void OH_ArkUI_WaterFlowSectionOption_Dispose(ArkUI_WaterFlowSectionOption* optio */ void OH_ArkUI_WaterFlowSectionOption_SetSize(ArkUI_WaterFlowSectionOption* option, int32_t size); +/** +* @brief Gets the FlowItem grouping configuration information array length. +* +* @param option FlowItem Indicates the packet configuration. +* @return Array size. If -1 is returned, the return fails. +* The possible cause of the failure is that the option parameter is abnormal, such as a null pointer. +* @since 12 +*/ +int32_t OH_ArkUI_WaterFlowSectionOption_GetSize(ArkUI_WaterFlowSectionOption* option); + /** * @brief Sets the number of items in a water flow section. * @@ -1967,6 +2021,18 @@ void OH_ArkUI_WaterFlowSectionOption_SetItemCount(ArkUI_WaterFlowSectionOption* */ int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index); +/** +* @brief The FlowItem grouping configuration information getsthe spindle size of +* the specified Item based on flowItemIndex. +* +* @param option Indicates the pointer to a water flow section configuration. +* @param index Indicates the index of the target water flow section. +* @param callback Gets the spindle size of the specified Item based on index. +* @since 12 +*/ +void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex(ArkUI_WaterFlowSectionOption* option, + int32_t index, float(*callback)(int32_t itemIndex)); + /** * @brief Sets the number of columns (in a vertical layout) or rows (in a horizontal layout) of a water flow. * @@ -2692,6 +2758,160 @@ float OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(ArkUI_AlignmentRuleOption* * @since 12 */ float OH_ArkUI_AlignmentRuleOption_GetBiasVertical(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Create a configuration item for the ListitemSwipeActionItem interface settings. + * + * @return List Item SwipeActionItem configuration item instance. If the object returns a null pointer, + * it indicates creation failure, and the reason for the failure may be that the address space is full. + * @since 12 +*/ +ArkUI_ListItemSwipeActionItem* OH_ArkUI_ListItemSwipeActionItem_Create(); + +/** +* @brief Destroy the ListitemSwipeActionItem instance. +* +* @param option List Item SwipeActionItem instance to be destroyed. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionItem_Dispose(ArkUI_ListItemSwipeActionItem* item); + +/** +* @brief Set the layout content of ListItem SwipeActionItem. +* +* @param option List Item SwipeActionItem instance. +* @param builder Layout information. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionItem_SetContent(ArkUI_ListItemSwipeActionItem* item, ArkUI_NodeHandle node); + +/** +* @brief Set the threshold for long-distance sliding deletion distance of components. +* +* @param option List Item SwipeActionItem instance. +* @param distance Component long-distance sliding deletion distance threshold. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item, float distance); + +/** +* @brief Obtain the threshold for long-distance sliding deletion distance of components. +* +* @param option List Item SwipeActionItem instance. +* @return Component long-distance sliding deletion distance threshold. If -1.0f is returned, the return fails. +* The possible cause of the failure is that the item parameter is abnormal, such as a null pointer. +* @since 12 +*/ +float OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item); + +/** +* @brief Set the event to be called when a sliding entry enters the deletion area. +* +* @param option List Item SwipeActionItem instance. +* @param callback Callback Events. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)()); + +/** +* @brief Set the event to be called when a component enters the long-range deletion area and deletes a ListItem. +* +* @param option List Item SwipeActionItem instance. +* @param callback Callback Events. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionItem_SetOnAction(ArkUI_ListItemSwipeActionItem* item, void (*callback)()); + +/** +* @brief Set the event to be called when a sliding entry exits the deletion area. +* +* @param option List Item SwipeActionItem instance. +* @param callback Callback Events. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)()); + +/** +* @brief Set the event triggered when the sliding state of a list item changes. +* +* @param option List Item SwipeActionItem instance. +* @param callback Callback Events. +* swipeActionState The changed state. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange(ArkUI_ListItemSwipeActionItem* item, + void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState)); + +/** + * @brief Create a configuration item for the ListitemSwipeActionOption interface settings. + * + * @return List Item SwipeActionOption configuration item instance.If the object returns a null pointer, + * it indicates a creation failure, and the reason for the failure may be that the address space is full. + * @since 12 +*/ +ArkUI_ListItemSwipeActionOption* OH_ArkUI_ListItemSwipeActionOption_Create(); + +/** +* @brief Destroy the ListitemSwipeActionOption instance. +* +* @param option List Item SwipeActionOption instance to be destroyed. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionOption_Dispose(ArkUI_ListItemSwipeActionOption* option); + +/** +* @brief Set the layout content on the left (vertical layout) or top (horizontal layout) +* of the ListItem SwipeActionItem. +* +* @param option List Item SwipeActionItem instance. +* @param builder Layout information. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionOption_SetStart(ArkUI_ListItemSwipeActionOption* option, + ArkUI_ListItemSwipeActionItem* item); + +/** +* @brief Set the layout content on the right (vertical layout) or bottom (horizontal layout) +* of the ListItem SwipeActionItem. +* +* @param option List Item SwipeActionItem instance. +* @param builder Layout information. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionOption_SetEnd(ArkUI_ListItemSwipeActionOption* option, + ArkUI_ListItemSwipeActionItem* item); + +/** +* @brief Set the sliding effect. +* +* @param option List Item SwipeActionItem instance. +* @param edgeEffect Sliding effect. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect(ArkUI_ListItemSwipeActionOption* option, + ArkUI_ListItemSwipeEdgeEffect edgeEffect); + +/** +* @brief Get the sliding effect. +* +* @param option List Item SwipeActionItem instance. +* @return Sliding effect. The default return value is 0. If -1 is returned, the return fails. +* The possible cause of the failure is that the option parameter is abnormal, such as a null pointer. +* @since 12 +*/ +int32_t OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect(ArkUI_ListItemSwipeActionOption* option); + +/** +* @brief The event called when the sliding operation offset changes. +* +* @param option List Item SwipeActionItem instance. +* @param callback Callback Events. +* offset Slide offset. +* @since 12 +*/ +void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange(ArkUI_ListItemSwipeActionOption* option, + void (*callback)(float offset)); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/styled_string.h b/arkui/ace_engine/native/styled_string.h new file mode 100644 index 0000000000000000000000000000000000000000..f67994505bbc684e13a60a4a7c4a72e17297a8d8 --- /dev/null +++ b/arkui/ace_engine/native/styled_string.h @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup ArkUI_NativeModule + * @{ + * + * @brief Provides ArkUI UI capabilities on the Native side, such as UI component creation and destruction, + * tree node operation, property setting, event monitoring, and so on. + * + * @since 12 + */ + +/** + * @file styled_string.h + * + * @brief Provides ArkUI with property string capabilities on the Native side. + * + * @library libace_ndk.z.so + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 12 + */ + +#ifndef ARKUI_NATIVE_STYLED_STRING_H +#define ARKUI_NATIVE_STYLED_STRING_H + +#include "native_drawing/drawing_text_declaration.h" +#include "native_drawing/drawing_text_typography.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Defines formatted string data objects supported by the text component. + * + * @since 12 + */ +typedef struct ArkUI_StyledString ArkUI_StyledString; + +/** + * @brief Creates a pointer to the ArkUI_StyledString object. + * + * @param style A pointer to OH_Drawing_TypographyStyle, obtained by {@link OH_Drawing_CreateTypographyStyle}. + * @param collection A pointer to OH_Drawing_FontCollection, obtained by {@link OH_Drawing_CreateFontCollection}. + * @return Creates a pointer to the ArkUI_StyledString object. If the object returns a null pointer, + * the creation failed, either because the address space was full, + * or because the style, collection parameter was an exception such as a null pointer. + * @since 12 + */ +ArkUI_StyledString* OH_ArkUI_StyledString_Create( + OH_Drawing_TypographyStyle* style, OH_Drawing_FontCollection* collection); + +/** + * @brief Free the memory occupied by the ArkUI_StyledString object. + * + * @param handle A pointer to the ArkUI_StyledString object. + * @since 12 + */ +void OH_ArkUI_StyledString_Destroy(ArkUI_StyledString* handle); + +/** + * @brief Sets the new layout style to the top of the current format string style stack. + * + * @param handle A pointer to the ArkUI_StyledString object. + * @param style A pointer to the OH_Drawing_TextStyle object. + * @since 12 + */ +void OH_ArkUI_StyledString_PushTextStyle(ArkUI_StyledString* handle, OH_Drawing_TextStyle* style); + +/** + * @brief Sets the corresponding text content based on the current format string style. + * + * @param handle A pointer to the ArkUI_StyledString object. + * @param content A pointer to the text content. + * @since 12 + */ +void OH_ArkUI_StyledString_AddText(ArkUI_StyledString* handle, const char* content); + +/** + * @brief Removes the top style from the stack in the current format string object. + * + * @param handle A pointer to the ArkUI_StyledString object. + * @since 12 + */ +void OH_ArkUI_StyledString_PopTextStyle(ArkUI_StyledString* handle); + +/** + * @brief Creates a pointer to an OH_Drawing_Typography object based on a format string object + * for advanced text estimation and typography. + * + * @param handle A pointer to the ArkUI_StyledString object. + * @return A pointer to the OH_Drawing_Typography object. If the object returns a null pointer, + * the creation fails because the handle parameter is abnormal, such as a null pointer. + * @since 12 + */ +OH_Drawing_Typography* OH_ArkUI_StyledString_CreateTypography(ArkUI_StyledString* handle); + +/** + * @brief Set the placeholder. + * + * @param handle A pointer to the ArkUI_StyledString object. + * @param placeholder A pointer to the OH_Drawing_PlaceholderSpan object. + * @since 12 + */ +void OH_ArkUI_StyledString_AddPlaceholder(ArkUI_StyledString* handle, OH_Drawing_PlaceholderSpan* placeholder); + +#ifdef __cplusplus +}; +#endif + +#endif // ARKUI_NATIVE_STYLED_STRING_H +/** @} */