diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 4ba7d5ff2e6596fadb7c6f2926d4351394ae2c3b..07b185adc19fedf06c4ed63557e246c288876dfc 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4337,6 +4337,29 @@ typedef enum { * itself. Optional. The value 1 means to enable the scroll effect, and 0 means the opposite. \n * */ + /** + * @brief Defines the effect used at the edges of the component when the boundary of the scrollable content is + * reached. 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].i32: effect used at the edges of the component when the boundary of the scrollable content is reached. + * The parameter type is {@link ArkUI_EdgeEffect}. The default value is ARKUI_EDGE_EFFECT_NONE.\n + * .value[1]?.i32: whether to enable the scroll effect when the component content size is smaller than the component + * itself. Optional. The value 1 means to enable the scroll effect, and 0 means the opposite. + * The default value is 1.\n + * .value[2]?.i32: direction in which the effect takes effect. The parameter type is {@link ArkUI_EffectEdge}. + * The default value is ARKUI_EFFECT_EDGE_START | ARKUI_EFFECT_EDGE_END. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: edge for which the effect takes effect when the boundary of the scrollable content is reached. + * The parameter type is {@link ArkUI_EffectEdge}. \n + * .value[1].i32: whether to enable the scroll effect when the component content size is smaller than the component + * itself. The value 1 means to enable the scroll effect, and 0 means the opposite.\n + * .value[2].i32: edge for which the effect takes effect when the boundary of the scrollable content is reached. + * The parameter type is {@link ArkUI_EffectEdge}. \n + * + * @since 16 + */ NODE_SCROLL_EDGE_EFFECT, /** * @brief Defines whether to support scroll gestures. When this attribute is set to false, scrolling by diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index f484a35382dfeb78bf9e1359396865047769170e..8c489862571f413f5f6269598b4b1b2d8b1a55c1 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -572,6 +572,18 @@ typedef enum { ARKUI_EDGE_EFFECT_NONE, } ArkUI_EdgeEffect; +/** + * @brief Enumerates the edges for which the effect takes effect when the boundary of the scrollable content is reached. + * + * @since 16 + */ +typedef enum { + /** Start edge. */ + ARKUI_EFFECT_EDGE_START = 1, + /** End edge. */ + ARKUI_EFFECT_EDGE_END = 2, +} ArkUI_EffectEdge; + /** * @brief Enumerates the scroll directions for the component. *