From 29dc17c5ad14136163cecd4dafcfb9b6a3540e39 Mon Sep 17 00:00:00 2001 From: kangshihui Date: Mon, 29 Apr 2024 20:06:49 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90NDK=E3=80=91Button=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E7=BB=84=E4=BB=B6type=E5=B1=9E=E6=80=A7=E6=96=B0=E5=A2=9ECAPI;?= =?UTF-8?q?Slider=E6=BB=91=E5=9D=97=E7=BB=84=E4=BB=B6trackThickness?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=96=B0=E5=A2=9ECAPI;=20Signed-off-by:kangs?= =?UTF-8?q?hihui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I970e388e84adf7e46ec7d1efa43eafc7c9804f1d --- arkui/ace_engine/native/native_node.h | 29 +++++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 14 +++++++++++++ 2 files changed, 43 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 033cbf568..889c225d1 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2250,6 +2250,20 @@ typedef enum { */ NODE_BUTTON_LABEL = MAX_NODE_SCOPE_NUM * ARKUI_NODE_BUTTON, + /** + * @brief Sets the button type. 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: button type. The parameter type is {@link ArkUI_ButtonType}. + * The default value is ARKUI_BUTTON_TYPE_CAPSULE. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: button type. The parameter type is {@link ArkUI_ButtonType}. + * The default value is ARKUI_BUTTON_TYPE_CAPSULE. \n + * + */ + NODE_BUTTON_TYPE, + /** * @brief Defines the current value of the progress indicator. * This attribute can be set, reset, and obtained as required through APIs. @@ -3067,6 +3081,21 @@ typedef enum { */ NODE_SLIDER_STYLE, + /** + * @brief Sets the track thickness of the slider. + * 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: track thickness of the slider, in vp. The default value is 4.0 vp when NODE_SLIDER_STYLE + * is set to ARKUI_SLIDER_STYLE_OUT_SET and 20.0 vp when NODE_SLIDER_STYLE is set to + * ARKUI_SLIDER_STYLE_IN_SET. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: track thickness of the slider, in vp. \n + * + */ + NODE_SLIDER_TRACK_THICKNESS, + /** * @brief Defines the alignment mode of the child components in the container. This attribute can be set, reset, * and obtained as required through APIs. diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index f9038b369..c14095054 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1446,6 +1446,20 @@ typedef enum { ARKUI_LENGTH_METRIC_UNIT_FP } ArkUI_LengthMetricUnit; +/** + * @brief Enumerates the button types. + * + * @since 12 + */ +typedef enum { + /** Normal button (without rounded corners by default). */ + ARKUI_BUTTON_TYPE_NORMAL = 0, + /** Capsule-type button (the round corner is half of the height by default). */ + ARKUI_BUTTON_TYPE_CAPSULE, + /** Circle button. */ + ARKUI_BUTTON_TYPE_CIRCLE, +} ArkUI_ButtonType; + /** * @brief Creates a size constraint. * -- Gitee