From 36fcbc501c101b1c1b0cc0759f6cfa32c7f20342 Mon Sep 17 00:00:00 2001 From: zhangjinyu101 Date: Mon, 21 Oct 2024 21:02:30 +0800 Subject: [PATCH] =?UTF-8?q?SDK-C=E6=94=AF=E6=8C=81EdgeEffectOptions?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E6=96=B0=E5=A2=9E=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangjinyu101 --- arkui/ace_engine/native/native_node.h | 23 +++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 12 ++++++++++++ 2 files changed, 35 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 4ba7d5ff2..07b185adc 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 f484a3538..8c4898625 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. * -- Gitee