diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 92151c9688b4db549109df8d8eab39b7abe98b23..ee579bfd73806afb9aa580bb5eb53824797b70bb 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5496,8 +5496,62 @@ typedef enum { NODE_SCROLL_BAR_MARGIN = 1002022, /** - * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and - * obtained as required through APIs. + * @brief Sets the maximum zoom scale for scrollable content. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: maximum zoom scale to set. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: current maximum zoom scale. \n + * + * @since 20 + */ + NODE_SCROLL_MAX_ZOOM_SCALE = 1002023, + + /** + * @brief Sets the minimum zoom scale for scrollable content. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: minimum zoom scale to set. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: current minimum zoom scale. \n + * + * @since 20 + */ + NODE_SCROLL_MIN_ZOOM_SCALE = 1002024, + + /** + * @brief Sets the zoom scale for scrollable content. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: zoom scale to set. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: current zoom scale. \n + * + * @since 20 + */ + NODE_SCROLL_ZOOM_SCALE = 1002025, + + /** + * @brief Sets whether to enable the zoom bounce effect when the scaling exceeds the limits. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to enable the zoom bounce effect when the scaling exceeds the limits. + * The value 1 means to enable the effect, and 0 means the opposite. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to enable the zoom bounce effect when the scaling exceeds the limits. + * The value 1 means to enable the effect, and 0 means the opposite. \n + * + * @since 20 + */ + NODE_SCROLL_ENABLE_BOUNCES_ZOOM = 1002026, + + /** + * @brief Sets the direction in which the list items are arranged. + * 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: direction in which the list items are arranged. The parameter type is {@link ArkUI_Axis}. @@ -8030,6 +8084,51 @@ typedef enum { * {@Link ArkUI_NodeComponentEvent} contains no parameters. \n */ NODE_SCROLL_EVENT_ON_REACH_END, + /** + * @brief Defines the callback for when the user is about to release the drag on the scrollable container component. + * + * This event is triggered when the user is about to release the drag on the scrollable container component. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains two parameters: \n + * ArkUI_NodeComponentEvent.data[0].f32: speed at which the user releases the drag, in vp. \n + * ArkUI_NodeComponentEvent.data[1].f32: estimated stop position of the scroll. \n + * @return No return value, or a number to set the actual stop position of the scroll. + * + * @since 20 + */ + NODE_SCROLL_EVENT_ON_WILL_STOP_DRAGGING, + /** + * @brief Defines the callback for the Scroll component's zoom event, + * triggered at the end of each frame during zooming. \n + * 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: current zoom scale. \n + * + * @since 20 + */ + NODE_SCROLL_EVENT_ON_DID_ZOOM, + /** + * @brief Defines the callback for the Scroll component's zoom start event, + * triggered when zooming begins. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object + * is {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} does not contain parameters. \n + * + * @since 20 + */ + NODE_SCROLL_EVENT_ON_ZOOM_START, + /** + * @brief Defines the callback for the Scroll component's zoom end event, + * triggered when zooming ends. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object + * is {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} does not contain parameters. \n + * + * @since 20 + */ + NODE_SCROLL_EVENT_ON_ZOOM_STOP, /** * @brief Defines the enumerated values of the event triggered, \n * when a subcomponent of ARKUI_NODE_LIST is moved into or out of the list display area. \n diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 5552ea45b2752fcb13cecc43c117880cd883d648..b5e885e428dfa7e2430e4f0932f43c88852ca3ca 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -711,6 +711,12 @@ typedef enum { ARKUI_SCROLL_DIRECTION_HORIZONTAL, /** Scrolling is not allowed. */ ARKUI_SCROLL_DIRECTION_NONE = 3, + /** + * Free scrolling in both directions. + * + * @since 20 + */ + ARKUI_SCROLL_DIRECTION_FREE = 4, } ArkUI_ScrollDirection; /**