From dfbac95cc6de9330b9e3e312144becc6990766e3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-H8KLN8I\\lisitao" Date: Sat, 4 May 2024 16:53:02 +0800 Subject: [PATCH 1/3] [NDK] RelativeContainer API Signed-off-by:lisitaolisitao3@huawei.com Signed-off-by: DESKTOP-H8KLN8I\lisitao --- arkui/ace_engine/native/libace.ndk.json | 40 +++++++++++ arkui/ace_engine/native/native_type.h | 93 +++++++++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index da165688c..0e05cae3e 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -835,6 +835,10 @@ "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_SetEnd" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_SetCenterHorizontal" + }, { "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_SetTop" @@ -843,6 +847,10 @@ "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_SetBottom" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_SetCenterVertical" + }, { "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal" @@ -855,18 +863,50 @@ "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_GetStartId" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_GetStartAlignment" + }, { "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_GetEndId" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_GetEndAlignment" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_GetCenterIdHorizontal" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_GetCenterAlignmentHorizontal" + }, { "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_GetTopId" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_GetTopAlignment" + }, { "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_GetBottomId" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_GetBottomAligment" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_GetCenterIdVertical" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignRuleOption_GetCenterAlignmentVertical" + }, { "first_introduced": "12", "name": "OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal" diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index f90443442..cd7c279e6 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2505,6 +2505,16 @@ void OH_ArkUI_AlignmentRuleOption_SetStart( void OH_ArkUI_AlignmentRuleOption_SetEnd( ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment); +/** +* @brief Set the parameters for horizontal center alignment. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @param id The id value of the anchor component. +* @param value Alignment relative to anchor component +* @since 12 +*/ +void OH_ArkUI_AlignRuleOption_SetCenterHorizontal( + ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment); /** * @brief Set the parameters for top alignment. @@ -2528,6 +2538,17 @@ void OH_ArkUI_AlignmentRuleOption_SetTop(ArkUI_AlignmentRuleOption* option, cons void OH_ArkUI_AlignmentRuleOption_SetBottom( ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment); +/** +* @brief Set the parameters for vertical center alignment. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @param id The id value of the anchor component. +* @param value Alignment relative to the anchor component. +* @since 12 +*/ +void OH_ArkUI_AlignRuleOption_SetCenterVertical( + ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment); + /** * @brief Sets the horizontal offset parameter of the component under the anchor point constraint. * @@ -2555,6 +2576,15 @@ void OH_ArkUI_AlignmentRuleOption_SetBiasVertical(ArkUI_AlignmentRuleOption* opt */ const char* OH_ArkUI_AlignmentRuleOption_GetStartId(ArkUI_AlignmentRuleOption* option); +/** +* @brief Gets the alignment of the left-aligned parameter. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @return The alignment of the parameters. +* @since 12 +*/ +ArkUI_HorizontalAlignment OH_ArkUI_AlignRuleOption_GetStartAlignment(ArkUI_AlignmentRuleOption* option); + /** * @brief Get the end alignment parameter. * @@ -2564,6 +2594,33 @@ const char* OH_ArkUI_AlignmentRuleOption_GetStartId(ArkUI_AlignmentRuleOption* o */ const char* OH_ArkUI_AlignmentRuleOption_GetEndId(ArkUI_AlignmentRuleOption* option); +/** +* @brief Get the right alignment parameter. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @return The alignment of the right-aligned parameter. +* @since 12 +*/ +ArkUI_HorizontalAlignment OH_ArkUI_AlignRuleOption_GetEndAlignment(ArkUI_AlignmentRuleOption* option); + +/** +* @brief Gets the parameters of horizontal center alignment. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @return The id of the parameter of horizontal center alignment. +* @since 12 +*/ +const char* OH_ArkUI_AlignRuleOption_GetCenterIdHorizontal(ArkUI_AlignmentRuleOption* option); + +/** +* @brief Gets the parameters of horizontal center alignment. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @return The alignment of the horizontally centered alignment parameter. +* @since 12 +*/ +ArkUI_HorizontalAlignment OH_ArkUI_AlignRuleOption_GetCenterAlignmentHorizontal(ArkUI_AlignmentRuleOption* option); + /** * @brief Get the top-aligned parameters. * @@ -2573,6 +2630,15 @@ const char* OH_ArkUI_AlignmentRuleOption_GetEndId(ArkUI_AlignmentRuleOption* opt */ const char* OH_ArkUI_AlignmentRuleOption_GetTopId(ArkUI_AlignmentRuleOption* option); +/** +* @brief Get the top-aligned parameters. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @return The alignment of the top-aligned parameter. +* @since 12 +*/ +ArkUI_VerticalAlignment OH_ArkUI_AlignRuleOption_GetTopAlignment(ArkUI_AlignmentRuleOption* option); + /** * @brief Get the bottom alignment parameters. * @@ -2582,6 +2648,33 @@ const char* OH_ArkUI_AlignmentRuleOption_GetTopId(ArkUI_AlignmentRuleOption* opt */ const char* OH_ArkUI_AlignmentRuleOption_GetBottomId(ArkUI_AlignmentRuleOption* option); +/** +* @brief Get the bottom alignment parameters. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @return The alignment of the bottom-aligned parameter. +* @since 12 +*/ +ArkUI_VerticalAlignment OH_ArkUI_AlignRuleOption_GetBottomAligment(ArkUI_AlignmentRuleOption* option); + +/** +* @brief Gets the parameters of vertical center alignment. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @return The id of the vertical center alignment parameter. +* @since 12 +*/ +const char* OH_ArkUI_AlignRuleOption_GetCenterIdVertical(ArkUI_AlignmentRuleOption* option); + +/** +* @brief Gets the parameters of vertical center alignment. +* +* @param option Alignment rule information of subcomponents in the relative container. +* @return The alignment of the vertical center alignment parameter. +* @since 12 +*/ +ArkUI_VerticalAlignment OH_ArkUI_AlignRuleOption_GetCenterAlignmentVertical(ArkUI_AlignmentRuleOption* option); + /** * @brief Get the bias value in the horizontal direction. * -- Gitee From 7eae838dbe51d2ed69203d063024d27e4c44edbe Mon Sep 17 00:00:00 2001 From: "DESKTOP-H8KLN8I\\lisitao" Date: Sat, 4 May 2024 17:09:56 +0800 Subject: [PATCH 2/3] [NDK] RelativeContainer API Signed-off-by:lisitaolisitao3@huawei.com Signed-off-by: DESKTOP-H8KLN8I\lisitao --- arkui/ace_engine/native/libace.ndk.json | 20 ++++++++++---------- arkui/ace_engine/native/native_type.h | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 0e05cae3e..4b090d4ba 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -837,7 +837,7 @@ }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_SetCenterHorizontal" + "name": "OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal" }, { "first_introduced": "12", @@ -849,7 +849,7 @@ }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_SetCenterVertical" + "name": "OH_ArkUI_AlignmentRuleOption_SetCenterVertical" }, { "first_introduced": "12", @@ -865,7 +865,7 @@ }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_GetStartAlignment" + "name": "OH_ArkUI_AlignmentRuleOption_GetStartAlignment" }, { "first_introduced": "12", @@ -873,15 +873,15 @@ }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_GetEndAlignment" + "name": "OH_ArkUI_AlignmentRuleOption_GetEndAlignment" }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_GetCenterIdHorizontal" + "name": "OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal" }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_GetCenterAlignmentHorizontal" + "name": "OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal" }, { "first_introduced": "12", @@ -889,7 +889,7 @@ }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_GetTopAlignment" + "name": "OH_ArkUI_AlignmentRuleOption_GetTopAlignment" }, { "first_introduced": "12", @@ -897,15 +897,15 @@ }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_GetBottomAligment" + "name": "OH_ArkUI_AlignmentRuleOption_GetBottomAligment" }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_GetCenterIdVertical" + "name": "OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical" }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignRuleOption_GetCenterAlignmentVertical" + "name": "OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical" }, { "first_introduced": "12", diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index cd7c279e6..d9689f2e8 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2513,7 +2513,7 @@ void OH_ArkUI_AlignmentRuleOption_SetEnd( * @param value Alignment relative to anchor component * @since 12 */ -void OH_ArkUI_AlignRuleOption_SetCenterHorizontal( +void OH_ArkUI_AlignmentRuleOption_SetCenterHorizontal( ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment); /** @@ -2546,7 +2546,7 @@ void OH_ArkUI_AlignmentRuleOption_SetBottom( * @param value Alignment relative to the anchor component. * @since 12 */ -void OH_ArkUI_AlignRuleOption_SetCenterVertical( +void OH_ArkUI_AlignmentRuleOption_SetCenterVertical( ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment); /** @@ -2583,7 +2583,7 @@ const char* OH_ArkUI_AlignmentRuleOption_GetStartId(ArkUI_AlignmentRuleOption* o * @return The alignment of the parameters. * @since 12 */ -ArkUI_HorizontalAlignment OH_ArkUI_AlignRuleOption_GetStartAlignment(ArkUI_AlignmentRuleOption* option); +ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetStartAlignment(ArkUI_AlignmentRuleOption* option); /** * @brief Get the end alignment parameter. @@ -2601,7 +2601,7 @@ const char* OH_ArkUI_AlignmentRuleOption_GetEndId(ArkUI_AlignmentRuleOption* opt * @return The alignment of the right-aligned parameter. * @since 12 */ -ArkUI_HorizontalAlignment OH_ArkUI_AlignRuleOption_GetEndAlignment(ArkUI_AlignmentRuleOption* option); +ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetEndAlignment(ArkUI_AlignmentRuleOption* option); /** * @brief Gets the parameters of horizontal center alignment. @@ -2610,7 +2610,7 @@ ArkUI_HorizontalAlignment OH_ArkUI_AlignRuleOption_GetEndAlignment(ArkUI_Alignme * @return The id of the parameter of horizontal center alignment. * @since 12 */ -const char* OH_ArkUI_AlignRuleOption_GetCenterIdHorizontal(ArkUI_AlignmentRuleOption* option); +const char* OH_ArkUI_AlignmentRuleOption_GetCenterIdHorizontal(ArkUI_AlignmentRuleOption* option); /** * @brief Gets the parameters of horizontal center alignment. @@ -2619,7 +2619,7 @@ const char* OH_ArkUI_AlignRuleOption_GetCenterIdHorizontal(ArkUI_AlignmentRuleOp * @return The alignment of the horizontally centered alignment parameter. * @since 12 */ -ArkUI_HorizontalAlignment OH_ArkUI_AlignRuleOption_GetCenterAlignmentHorizontal(ArkUI_AlignmentRuleOption* option); +ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentHorizontal(ArkUI_AlignmentRuleOption* option); /** * @brief Get the top-aligned parameters. @@ -2637,7 +2637,7 @@ const char* OH_ArkUI_AlignmentRuleOption_GetTopId(ArkUI_AlignmentRuleOption* opt * @return The alignment of the top-aligned parameter. * @since 12 */ -ArkUI_VerticalAlignment OH_ArkUI_AlignRuleOption_GetTopAlignment(ArkUI_AlignmentRuleOption* option); +ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetTopAlignment(ArkUI_AlignmentRuleOption* option); /** * @brief Get the bottom alignment parameters. @@ -2655,7 +2655,7 @@ const char* OH_ArkUI_AlignmentRuleOption_GetBottomId(ArkUI_AlignmentRuleOption* * @return The alignment of the bottom-aligned parameter. * @since 12 */ -ArkUI_VerticalAlignment OH_ArkUI_AlignRuleOption_GetBottomAligment(ArkUI_AlignmentRuleOption* option); +ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetBottomAligment(ArkUI_AlignmentRuleOption* option); /** * @brief Gets the parameters of vertical center alignment. @@ -2664,7 +2664,7 @@ ArkUI_VerticalAlignment OH_ArkUI_AlignRuleOption_GetBottomAligment(ArkUI_Alignme * @return The id of the vertical center alignment parameter. * @since 12 */ -const char* OH_ArkUI_AlignRuleOption_GetCenterIdVertical(ArkUI_AlignmentRuleOption* option); +const char* OH_ArkUI_AlignmentRuleOption_GetCenterIdVertical(ArkUI_AlignmentRuleOption* option); /** * @brief Gets the parameters of vertical center alignment. @@ -2673,7 +2673,7 @@ const char* OH_ArkUI_AlignRuleOption_GetCenterIdVertical(ArkUI_AlignmentRuleOpti * @return The alignment of the vertical center alignment parameter. * @since 12 */ -ArkUI_VerticalAlignment OH_ArkUI_AlignRuleOption_GetCenterAlignmentVertical(ArkUI_AlignmentRuleOption* option); +ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetCenterAlignmentVertical(ArkUI_AlignmentRuleOption* option); /** * @brief Get the bias value in the horizontal direction. -- Gitee From a3848ea7bbea9f543cb2cbf377bbe5bef147f069 Mon Sep 17 00:00:00 2001 From: "DESKTOP-H8KLN8I\\lisitao" Date: Sat, 4 May 2024 17:24:16 +0800 Subject: [PATCH 3/3] [NDK] RelativeContainer API Signed-off-by:lisitaolisitao3@huawei.com Signed-off-by: DESKTOP-H8KLN8I\lisitao --- arkui/ace_engine/native/libace.ndk.json | 2 +- arkui/ace_engine/native/native_type.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 4b090d4ba..3a1597712 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -897,7 +897,7 @@ }, { "first_introduced": "12", - "name": "OH_ArkUI_AlignmentRuleOption_GetBottomAligment" + "name": "OH_ArkUI_AlignmentRuleOption_GetBottomAlignment" }, { "first_introduced": "12", diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index d9689f2e8..71a268f5e 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2577,7 +2577,7 @@ void OH_ArkUI_AlignmentRuleOption_SetBiasVertical(ArkUI_AlignmentRuleOption* opt const char* OH_ArkUI_AlignmentRuleOption_GetStartId(ArkUI_AlignmentRuleOption* option); /** -* @brief Gets the alignment of the left-aligned parameter. +* @brief Gets the alignment of the start-aligned parameter. * * @param option Alignment rule information of subcomponents in the relative container. * @return The alignment of the parameters. @@ -2595,10 +2595,10 @@ ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetStartAlignment(ArkUI_A const char* OH_ArkUI_AlignmentRuleOption_GetEndId(ArkUI_AlignmentRuleOption* option); /** -* @brief Get the right alignment parameter. +* @brief Get the end alignment parameter. * * @param option Alignment rule information of subcomponents in the relative container. -* @return The alignment of the right-aligned parameter. +* @return The alignment of the end-aligned parameter. * @since 12 */ ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetEndAlignment(ArkUI_AlignmentRuleOption* option); @@ -2655,7 +2655,7 @@ const char* OH_ArkUI_AlignmentRuleOption_GetBottomId(ArkUI_AlignmentRuleOption* * @return The alignment of the bottom-aligned parameter. * @since 12 */ -ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetBottomAligment(ArkUI_AlignmentRuleOption* option); +ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetBottomAlignment(ArkUI_AlignmentRuleOption* option); /** * @brief Gets the parameters of vertical center alignment. -- Gitee