From 7069a0d4627c944dc1f05b2de33bb00e3ecbc8c7 Mon Sep 17 00:00:00 2001 From: liyi0309 Date: Tue, 21 May 2024 08:55:09 +0800 Subject: [PATCH] add C-API add percent attribute Signed-off-by: liyi0309 --- arkui/ace_engine/native/native_node.h | 37 ++++++++++++++++++++++++ arkui/ace_engine/native/ui_input_event.h | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 5df060447dd..2ad44f7e988 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1617,6 +1617,43 @@ typedef enum { */ NODE_FOCUS_ON_TOUCH, + /** + * @brief Defines the border width attribute, which can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * 1: .value[0].f32: width of the four borders, in percentage. \n + * 2: .value[0].f32: width of the top border, in percentage. \n + * .value[1].f32: width of the right border, in percentage. \n + * .value[2].f32: width of the bottom border, in percentage. \n + * .value[3].f32: width of the right border, in percentage. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: width of the top border, in percentage. \n + * .value[1].f32: width of the right border, in percentage. \n + * .value[2].f32: width of the bottom border, in percentage. \n + * .value[3].f32: width of the right border, in percentage. \n + * + */ + NODE_BORDER_WIDTH_PERCENT = 85, + /** + * @brief Defines the border corner radius attribute, which can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * 1: .value[0].f32: radius of the four corners, in percentage. \n + * 2: .value[0].f32: radius of the upper left corner, in percentage. \n + * .value[1].f32: radius of the upper right corner, in percentage. \n + * .value[2].f32: radius of the lower left corner, in percentage. \n + * .value[3].f32: radius of the lower right corner, in percentage. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: radius of the upper left corner, in percentage. \n + * .value[1].f32: radius of the upper right corner, in percentage. \n + * .value[2].f32: radius of the lower left corner, in percentage. \n + * .value[3].f32: radius of the lower right corner, in percentage. \n + * + */ + NODE_BORDER_RADIUS_PERCENT = 86, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 05890e33e26..3f9e3f88db9 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -672,7 +672,7 @@ int32_t OH_ArkUI_PointerEvent_SetInterceptHitTestMode(const ArkUI_UIInputEvent* * * @param event Represents a pointer to the current UI input event. * @return Return to the mouse button type, where 1 is the left button, 2 is the right button, - * 4 is the middle button, 8 is the back button, and 16 is the forward button. + * 3 is the middle button, 4 is the back button, and 5 is the forward button. * @since 12 */ int32_t OH_ArkUI_MouseEvent_GetMouseButton(const ArkUI_UIInputEvent* event); -- Gitee