From 27dd3b45b7cf65f12eb10f1876221a7e9f83e3cb Mon Sep 17 00:00:00 2001 From: liuyanzhi Date: Tue, 8 Jul 2025 10:13:08 +0800 Subject: [PATCH 01/95] fix animate Signed-off-by: liuyanzhi --- arkui/ace_engine/native/native_animate.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_animate.h b/arkui/ace_engine/native/native_animate.h index efd745d5d15..30a7fe07c7c 100644 --- a/arkui/ace_engine/native/native_animate.h +++ b/arkui/ace_engine/native/native_animate.h @@ -187,7 +187,7 @@ typedef struct { /** * @brief Disposes of an animator object. * - * @param animator Indicates the target animator object. + * @param animatorHandle Indicates the target animator object. */ void (*disposeAnimator)(ArkUI_AnimatorHandle animatorHandle); } ArkUI_NativeAnimateAPI_1; @@ -203,6 +203,7 @@ ArkUI_AnimateOption* OH_ArkUI_AnimateOption_Create(); /** * @brief Disposes of an animation configuration. * +* @param option Indicates the pointer to an animation configuration. * @since 12 */ void OH_ArkUI_AnimateOption_Dispose(ArkUI_AnimateOption* option); @@ -534,6 +535,7 @@ ArkUI_AnimatorOption* OH_ArkUI_AnimatorOption_Create(int32_t keyframeSize); /** * @brief Disposes of an animator parameter object. * + * @param option Indicates the target animator parameter object. * @since 12 */ void OH_ArkUI_AnimatorOption_Dispose(ArkUI_AnimatorOption* option); -- Gitee From 72d34046f6f94412611c3744a0ed139c2db4f239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Tue, 12 Aug 2025 11:14:19 +0800 Subject: [PATCH 02/95] =?UTF-8?q?=E6=8F=90=E4=BE=9B=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E4=BF=A1=E6=81=AF=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 57 +++++++++++++++++++++++++++ arkui/window_manager/oh_window_comm.h | 26 ++++++++++++ 2 files changed, 83 insertions(+) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 347d1000275..9be20b74b03 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -289,6 +289,63 @@ void OH_WindowManager_ReleaseAllWindowLayoutInfoList(WindowManager_Rect* windowL int32_t OH_WindowManager_InjectTouchEvent( int32_t windowId, Input_TouchEvent* touchEvent, int32_t windowX, int32_t windowY); +/** + * @brief Get all main window information, including screen id, window id and window label. + * + * @param infoList main window info list. + * @param mainWindowInfoSize size of info list. + * @return Returns the status code of the execution. + * {@link WS_OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. + * @since 21 + */ +WindowManager_ErrorCode OH_NativeWindowManager_GetAllMainWindowInfo( + WindowManager_MainWindowInfo** infoList, size_t* mainWindowInfoSize); + +/** + * @brief Release all main window information. + * + * @param infoList Pointer to the main window info list. + * @param mainWindowInfoSize size of info list. + * @return Returns the status code of the execution. + * {@link WS_OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. + * @since 21 + */ +WindowManager_ErrorCode OH_NativeWindowManager_ReleaseAllMainWindowInfo( + WindowManager_MainWindowInfo* infoList); + +/** + * @brief Get callback interface for capturing a screenshot of a specified window. + * + * @param snapshotPixelMapList list of windows' snapshot + * @param snapshotListSize size of snapshotPixelMapList + * @return Returns the status code of the execution. + * {@link WS_OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. + * @since 21 + */ +typedef void (*OH_NativeWindowManager_MainWindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, + size_t snapshotListSize) + +/** + * @brief Release all main window information. + * + * @param snapshotPixelMapList list of windows' snapshot. + * @return Returns the status code of the execution. + * {@link WS_OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. + * @since 21 + */ +WindowManager_ErrorCode OH_NativeWindowManager_ReleaseMainWindowSnapshot( + const OH_PixelmapNative* snapshotPixelMapList); + #ifdef __cplusplus } #endif diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index 152c9a31827..5f20b710afa 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -229,6 +229,32 @@ typedef struct { WindowManager_Rect bottomRect; } WindowManager_AvoidArea; +/** + * @brief Main window info + * + * @since 21 + */ +typedef struct { + /** Display id of the window. */ + int64_t displayId; + /** Window id. */ + int32_t windowId;; + /** Showing state of the window. */ + bool showing; + /** Label of the window. */ + const char* label; +} WindowManager_MainWindowInfo; + +/** + * @brief Window snapshot config info + * + * @since 21 + */ +typedef struct { + /** Use cached windows' snapshot. */ + bool useCache; +} WindowManager_WindowSnapshotConfig; + #ifdef __cplusplus } #endif -- Gitee From e0722b0110d106091a3d6a53ec0c47c36368a009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Tue, 12 Aug 2025 15:35:40 +0800 Subject: [PATCH 03/95] =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9812-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 43 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 9be20b74b03..ecc7d54201d 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -290,10 +290,10 @@ int32_t OH_WindowManager_InjectTouchEvent( int32_t windowId, Input_TouchEvent* touchEvent, int32_t windowX, int32_t windowY); /** - * @brief Get all main window information, including screen id, window id and window label. + * @brief Get all main window info on device. * - * @param infoList main window info list. - * @param mainWindowInfoSize size of info list. + * @param infoList Indicates the pointer to a main window info list. + * @param mainWindowInfoSize The size of main window info list. * @return Returns the status code of the execution. * {@link WS_OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. @@ -305,46 +305,47 @@ WindowManager_ErrorCode OH_NativeWindowManager_GetAllMainWindowInfo( WindowManager_MainWindowInfo** infoList, size_t* mainWindowInfoSize); /** - * @brief Release all main window information. + * @brief Release all main window info list. * * @param infoList Pointer to the main window info list. - * @param mainWindowInfoSize size of info list. + * @since 21 + */ +void OH_NativeWindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInfo* infoList); + +/** + * @brief Get snapshot of the window with the specified id. + * + * @param windowIdList Main window id list for getting snapshot. + * @param windowIdListSize Size of main window id list. + * @param config Configuration for getting snapshot. + * @param callback Snapshot callback object. * @return Returns the status code of the execution. * {@link WS_OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 21 */ -WindowManager_ErrorCode OH_NativeWindowManager_ReleaseAllMainWindowInfo( - WindowManager_MainWindowInfo* infoList); +WindowManager_ErrorCode OH_NativeWindowManager_GetMainWindowSnapshot(int32_t* windowIdList, size_t windowIdListSize, + WindowManager_WindowSnapshotConfig config, OH_NativeWindowManager_WindowSnapshotCallback callback); /** - * @brief Get callback interface for capturing a screenshot of a specified window. + * @brief Callback interface for getting main windows' snapshot. * * @param snapshotPixelMapList list of windows' snapshot * @param snapshotListSize size of snapshotPixelMapList - * @return Returns the status code of the execution. - * {@link WS_OK} the function call is successful. - * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. - * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. - * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 21 */ typedef void (*OH_NativeWindowManager_MainWindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, size_t snapshotListSize) /** - * @brief Release all main window information. + * @brief Release main window snapshot list. * - * @param snapshotPixelMapList list of windows' snapshot. - * @return Returns the status code of the execution. - * {@link WS_OK} the function call is successful. - * {@link WINDOW_MANAGER_ERRORCODE_NO_PERMISSION} permission verification failed. - * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. + * @param snapshotPixelMapList Indicates the pointer of a windows' snapshot list. * @since 21 */ -WindowManager_ErrorCode OH_NativeWindowManager_ReleaseMainWindowSnapshot( - const OH_PixelmapNative* snapshotPixelMapList); +void OH_NativeWindowManager_ReleaseMainWindowSnapshot(const OH_PixelmapNative* snapshotPixelMapList); #ifdef __cplusplus } -- Gitee From 1ecba91e11e74fbb62adb8c8c12b131623876d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Tue, 12 Aug 2025 16:10:23 +0800 Subject: [PATCH 04/95] =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9812-2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index ecc7d54201d..aae1a6bfb89 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -292,6 +292,7 @@ int32_t OH_WindowManager_InjectTouchEvent( /** * @brief Get all main window info on device. * + * @permission {ohos.permission.CUSTOM_SCREEN_CAPTURE} * @param infoList Indicates the pointer to a main window info list. * @param mainWindowInfoSize The size of main window info list. * @return Returns the status code of the execution. @@ -315,6 +316,7 @@ void OH_NativeWindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInf /** * @brief Get snapshot of the window with the specified id. * + * @permission {ohos.permission.CUSTOM_SCREEN_CAPTURE} * @param windowIdList Main window id list for getting snapshot. * @param windowIdListSize Size of main window id list. * @param config Configuration for getting snapshot. -- Gitee From 864163d1bfa89235064fe56f76ad32897f636850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Tue, 12 Aug 2025 16:27:45 +0800 Subject: [PATCH 05/95] =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9812-3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index aae1a6bfb89..b01e9ba1071 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -292,7 +292,7 @@ int32_t OH_WindowManager_InjectTouchEvent( /** * @brief Get all main window info on device. * - * @permission {ohos.permission.CUSTOM_SCREEN_CAPTURE} + * @permission {@code ohos.permission.CUSTOM_SCREEN_CAPTURE} * @param infoList Indicates the pointer to a main window info list. * @param mainWindowInfoSize The size of main window info list. * @return Returns the status code of the execution. @@ -316,7 +316,7 @@ void OH_NativeWindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInf /** * @brief Get snapshot of the window with the specified id. * - * @permission {ohos.permission.CUSTOM_SCREEN_CAPTURE} + * @permission {@code ohos.permission.CUSTOM_SCREEN_CAPTURE} * @param windowIdList Main window id list for getting snapshot. * @param windowIdListSize Size of main window id list. * @param config Configuration for getting snapshot. -- Gitee From 1352bbcc393321a111a737d428c2e6fc13c39553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Tue, 12 Aug 2025 16:30:11 +0800 Subject: [PATCH 06/95] =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9812-4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index b01e9ba1071..6ecadcbfaec 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -314,7 +314,7 @@ WindowManager_ErrorCode OH_NativeWindowManager_GetAllMainWindowInfo( void OH_NativeWindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInfo* infoList); /** - * @brief Get snapshot of the window with the specified id. + * @brief Get snapshot of the specified windows. * * @permission {@code ohos.permission.CUSTOM_SCREEN_CAPTURE} * @param windowIdList Main window id list for getting snapshot. -- Gitee From 6a22e9283d807aa9ba0c1a9aeed6db578cb50854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Tue, 12 Aug 2025 17:10:37 +0800 Subject: [PATCH 07/95] =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9812-5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 6ecadcbfaec..059fafc41bb 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -334,8 +334,8 @@ WindowManager_ErrorCode OH_NativeWindowManager_GetMainWindowSnapshot(int32_t* wi /** * @brief Callback interface for getting main windows' snapshot. * - * @param snapshotPixelMapList list of windows' snapshot - * @param snapshotListSize size of snapshotPixelMapList + * @param snapshotPixelMapList List of windows' snapshot + * @param snapshotListSize Size of snapshotPixelMapList * @since 21 */ typedef void (*OH_NativeWindowManager_MainWindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, -- Gitee From 5481cf937b8b80728fc60312df18da78630e558a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Tue, 12 Aug 2025 17:43:14 +0800 Subject: [PATCH 08/95] =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9812-6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 059fafc41bb..e75ecd3d1dd 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -313,6 +313,16 @@ WindowManager_ErrorCode OH_NativeWindowManager_GetAllMainWindowInfo( */ void OH_NativeWindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInfo* infoList); +/** + * @brief Callback interface for getting main windows' snapshot. + * + * @param snapshotPixelMapList List of windows' snapshot + * @param snapshotListSize Size of snapshotPixelMapList + * @since 21 + */ +typedef void (*OH_NativeWindowManager_WindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, + size_t snapshotListSize); + /** * @brief Get snapshot of the specified windows. * @@ -331,16 +341,6 @@ void OH_NativeWindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInf WindowManager_ErrorCode OH_NativeWindowManager_GetMainWindowSnapshot(int32_t* windowIdList, size_t windowIdListSize, WindowManager_WindowSnapshotConfig config, OH_NativeWindowManager_WindowSnapshotCallback callback); -/** - * @brief Callback interface for getting main windows' snapshot. - * - * @param snapshotPixelMapList List of windows' snapshot - * @param snapshotListSize Size of snapshotPixelMapList - * @since 21 - */ -typedef void (*OH_NativeWindowManager_MainWindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, - size_t snapshotListSize) - /** * @brief Release main window snapshot list. * -- Gitee From e5368946c25cd0463877a2a7e9c0961bec40b61d Mon Sep 17 00:00:00 2001 From: ki_ja Date: Tue, 12 Aug 2025 13:48:38 +0000 Subject: [PATCH 09/95] update arkui/window_manager/oh_window.h. Signed-off-by: ki_ja --- arkui/window_manager/oh_window.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index e75ecd3d1dd..6184119734c 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -302,7 +302,7 @@ int32_t OH_WindowManager_InjectTouchEvent( * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 21 */ -WindowManager_ErrorCode OH_NativeWindowManager_GetAllMainWindowInfo( +int32_t OH_WindowManager_GetAllMainWindowInfo( WindowManager_MainWindowInfo** infoList, size_t* mainWindowInfoSize); /** @@ -311,7 +311,7 @@ WindowManager_ErrorCode OH_NativeWindowManager_GetAllMainWindowInfo( * @param infoList Pointer to the main window info list. * @since 21 */ -void OH_NativeWindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInfo* infoList); +void OH_WindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInfo* infoList); /** * @brief Callback interface for getting main windows' snapshot. @@ -320,7 +320,7 @@ void OH_NativeWindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInf * @param snapshotListSize Size of snapshotPixelMapList * @since 21 */ -typedef void (*OH_NativeWindowManager_WindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, +typedef void (*OH_WindowManager_WindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, size_t snapshotListSize); /** @@ -338,8 +338,8 @@ typedef void (*OH_NativeWindowManager_WindowSnapshotCallback)(const OH_PixelmapN * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. * @since 21 */ -WindowManager_ErrorCode OH_NativeWindowManager_GetMainWindowSnapshot(int32_t* windowIdList, size_t windowIdListSize, - WindowManager_WindowSnapshotConfig config, OH_NativeWindowManager_WindowSnapshotCallback callback); +int32_t OH_WindowManager_GetMainWindowSnapshot(int32_t* windowIdList, size_t windowIdListSize, + WindowManager_WindowSnapshotConfig config, OH_WindowManager_WindowSnapshotCallback callback); /** * @brief Release main window snapshot list. @@ -347,7 +347,7 @@ WindowManager_ErrorCode OH_NativeWindowManager_GetMainWindowSnapshot(int32_t* wi * @param snapshotPixelMapList Indicates the pointer of a windows' snapshot list. * @since 21 */ -void OH_NativeWindowManager_ReleaseMainWindowSnapshot(const OH_PixelmapNative* snapshotPixelMapList); +void OH_WindowManager_ReleaseMainWindowSnapshot(const OH_PixelmapNative* snapshotPixelMapList); #ifdef __cplusplus } -- Gitee From 3b004e38fb6e124225bf6e790826451ab5c02409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Wed, 13 Aug 2025 08:40:05 +0800 Subject: [PATCH 10/95] =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9813-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window_comm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index 5f20b710afa..46be3abab20 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -236,7 +236,7 @@ typedef struct { */ typedef struct { /** Display id of the window. */ - int64_t displayId; + uint64_t displayId; /** Window id. */ int32_t windowId;; /** Showing state of the window. */ -- Gitee From a944212d44a4cd1b716f46a35149bfc1d83c5c78 Mon Sep 17 00:00:00 2001 From: yuhaoqiang Date: Thu, 14 Aug 2025 11:43:53 +0800 Subject: [PATCH 11/95] =?UTF-8?q?hidebug=E6=96=B0=E5=A2=9E=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3OH=5FHiDebug=5FGetGraphicsMemorySummary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I418faeaad02eaefecf92c304c5c08c55c0cfd390 Signed-off-by: yuhaoqiang --- hiviewdfx/hidebug/include/hidebug/hidebug.h | 15 +++++++++++++++ .../hidebug/include/hidebug/hidebug_type.h | 17 +++++++++++++++++ hiviewdfx/hidebug/libhidebug.ndk.json | 4 ++++ 3 files changed, 36 insertions(+) diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug.h b/hiviewdfx/hidebug/include/hidebug/hidebug.h index 287cf4433ec..05e4f24d1cd 100644 --- a/hiviewdfx/hidebug/include/hidebug/hidebug.h +++ b/hiviewdfx/hidebug/include/hidebug/hidebug.h @@ -246,6 +246,21 @@ HiDebug_Backtrace_Object OH_HiDebug_CreateBacktraceObject(void); */ void OH_HiDebug_DestroyBacktraceObject(HiDebug_Backtrace_Object object); +/** + * @brief Create the graphics memory summary of application. + * + * @param interval If the cache of graphics memory is older than interval (unit: second), than the latest + * graphics memory data will be obtained. The interval value range is 2 seconds to + * 3600 seconds, If interval is an invalid value, the default value is 300 seconds. + * @param summary Indicates value of graphics memory summary, in kibibytes. + * @return Result code + * {@link HIDEBUG_SUCCESS} Get graphics memory success. + * {@link HIDEBUG_INVALID_ARGUMENT} Invalid argument, value is null. + * {@link HIDEBUG_TRACE_ABNORMAL} Failed to get the application memory due to a remote exception. + * @since 21 + */ +HiDebug_ErrorCode OH_HiDebug_GetGraphicsMemorySummary(uint32_t interval, GraphicsMemorySummary *summary); + #ifdef __cplusplus } #endif // __cplusplus diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug_type.h b/hiviewdfx/hidebug/include/hidebug/hidebug_type.h index 9ff70423aea..018e5e9c5e0 100644 --- a/hiviewdfx/hidebug/include/hidebug/hidebug_type.h +++ b/hiviewdfx/hidebug/include/hidebug/hidebug_type.h @@ -313,6 +313,23 @@ typedef struct HiDebug_StackFrame { */ typedef struct HiDebug_Backtrace_Object__* HiDebug_Backtrace_Object; +/** + * @brief Defines the graphics memory summary structure type. + * + * @since 21 + */ +typedef struct GraphicsMemorySummary { + /** + * GL memory + */ + uint32_t gl; + + /** + * graph memory + */ + uint32_t graph; +} GraphicsMemorySummary; + #ifdef __cplusplus } #endif // __cplusplus diff --git a/hiviewdfx/hidebug/libhidebug.ndk.json b/hiviewdfx/hidebug/libhidebug.ndk.json index ec903bef43d..ac892112691 100644 --- a/hiviewdfx/hidebug/libhidebug.ndk.json +++ b/hiviewdfx/hidebug/libhidebug.ndk.json @@ -43,6 +43,10 @@ "first_introduced": "14", "name": "OH_HiDebug_GetGraphicsMemory" }, + { + "first_introduced": "21", + "name": "OH_HiDebug_GetGraphicsMemorySummary" + }, { "first_introduced": "20", "name": "OH_HiDebug_SetMallocDispatchTable" -- Gitee From 2f6423d75c99776c923286685e8de892b465156c Mon Sep 17 00:00:00 2001 From: wanghao1717 Date: Fri, 15 Aug 2025 16:10:23 +0800 Subject: [PATCH 12/95] fix bug Signed-off-by: wanghao1717 --- multimodalinput/kits/c/input/oh_input_manager.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 7ff7bb15115..32432532486 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -1389,7 +1389,7 @@ Input_Result OH_Input_GetAxisEventSourceType(const Input_AxisEvent* axisEvent, I * * @param axisEvent Axis event object. For details, see {@Link Input_AxisEvent}. * @param windowId The windowId for the axis event. - * @return OH_Input_SetAxisEventDisplayY function result code. + * @return OH_Input_SetAxisEventWindowId function result code. * {@link INPUT_SUCCESS} Sets the Y coordinate of the axis event success.\n * {@link INPUT_PARAMETER_ERROR} The axisEvent is NULL.\n * @syscap SystemCapability.MultimodalInput.Input.Core @@ -1402,7 +1402,7 @@ Input_Result OH_Input_SetAxisEventWindowId(Input_AxisEvent* axisEvent, int32_t w * * @param axisEvent Axis event object. For details, see {@Link Input_AxisEvent}. * @param windowId The windowId for the axis event. - * @return OH_Input_GetAxisEventDisplayY function result code. + * @return OH_Input_GetAxisEventWindowId function result code. * {@link INPUT_SUCCESS} Obtains the Y coordinate of the axis event success.\n * {@link INPUT_PARAMETER_ERROR} The axisEvent is NULL or the displayY is NULL.\n * @syscap SystemCapability.MultimodalInput.Input.Core @@ -1415,7 +1415,7 @@ Input_Result OH_Input_GetAxisEventWindowId(const Input_AxisEvent* axisEvent, int * * @param axisEvent Axis event object. For details, see {@Link Input_AxisEvent}. * @param displayId The displayId for the axis event. - * @return OH_Input_SetAxisEventDisplayY function result code. + * @return OH_Input_SetAxisEventDisplayId function result code. * {@link INPUT_SUCCESS} Sets the Y coordinate of the axis event success.\n * {@link INPUT_PARAMETER_ERROR} The axisEvent is NULL.\n * @syscap SystemCapability.MultimodalInput.Input.Core @@ -1428,7 +1428,7 @@ Input_Result OH_Input_SetAxisEventDisplayId(Input_AxisEvent* axisEvent, int32_t * * @param axisEvent Axis event object. For details, see {@Link Input_AxisEvent}. * @param displayId The displayId for the axis event. - * @return OH_Input_GetAxisEventDisplayY function result code. + * @return OH_Input_GetAxisEventDisplayId function result code. * {@link INPUT_SUCCESS} Obtains the Y coordinate of the axis event success.\n * {@link INPUT_PARAMETER_ERROR} The axisEvent is NULL or the displayY is NULL.\n * @syscap SystemCapability.MultimodalInput.Input.Core @@ -1775,7 +1775,7 @@ void OH_Input_SetFinalKey(Input_Hotkey *hotkey, int32_t finalKey); * * @param hotkey Hotkey key object. * @param finalKeyCode Returns the key value of the decorated key. - * @return OH_Input_GetfinalKey status code, specifically, + * @return OH_Input_GetFinalKey status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the finalKeyCode is NULL;\n * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n @@ -1840,7 +1840,7 @@ void OH_Input_SetRepeat(Input_Hotkey* hotkey, bool isRepeat); * * @param hotkey Shortcut key object. * @param isRepeat Whether a key event is repeated. - * @return OH_Input_GetIsRepeat status code, specifically, + * @return OH_Input_GetRepeat status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} otherwise;\n * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n @@ -2061,7 +2061,7 @@ Input_Result OH_Input_UnregisterDeviceListener(Input_DeviceListener* listener); /** * @brief Unregisters the listener for all device hot swap events. * - * @return OH_Input_UnregisterDeviceListener status code, specifically, + * @return OH_Input_UnregisterDeviceListeners status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_SERVICE_EXCEPTION} if the service is abnormal. * @syscap SystemCapability.MultimodalInput.Input.Core -- Gitee From 538364d43a9c54161439e52cfeac35157d79d9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E5=9B=BD=E5=86=9B?= Date: Mon, 18 Aug 2025 09:28:31 +0800 Subject: [PATCH 13/95] add ABILITY_RUNTIME_ERROR_CODE_GET_APPLICATION_INFO_FAILED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 任国军 --- AbilityKit/ability_runtime/ability_runtime_common.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AbilityKit/ability_runtime/ability_runtime_common.h b/AbilityKit/ability_runtime/ability_runtime_common.h index 704d6c80fb9..7c2e98d4a63 100644 --- a/AbilityKit/ability_runtime/ability_runtime_common.h +++ b/AbilityKit/ability_runtime/ability_runtime_common.h @@ -138,6 +138,11 @@ typedef enum { * @since 17 */ ABILITY_RUNTIME_ERROR_CODE_APP_INSTANCE_KEY_NOT_SUPPORTED = 16000079, + /** + * @error Failed to obtain the target application information. + * @since 21 + */ + ABILITY_RUNTIME_ERROR_CODE_GET_APPLICATION_INFO_FAILED = 16000081, } AbilityRuntime_ErrorCode; #ifdef __cplusplus -- Gitee From a5830e21bdde5d2960a95967979e35f2870ff6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Mon, 18 Aug 2025 15:10:52 +0800 Subject: [PATCH 14/95] =?UTF-8?q?descritpion:UIAbility=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0&?= =?UTF-8?q?=E6=9C=80=E8=BF=91=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0ndk?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- .../ability_runtime/application_context.h | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 00c5d579d45..d8adee954a1 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -307,6 +307,40 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbilityWithStartOptions(Ab */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetVersionCode(int64_t* versionCode); +/** + * @brief Obtain the launch parameter of starting UIAbility. + * + * @param buffer A pointer to a buffer that receives the launch parameter of starting UIAbility. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 20 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLaunchParameter( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** + * @brief Obtain the latest parameter of starting UIAbility. + * + * @param buffer A pointer to a buffer that receives the latest parameter of starting UIAbility. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 20 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLatestParameter( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + #ifdef __cplusplus } // extern "C" #endif -- Gitee From 4febe8cdd4d3e4e2e4e848591b99712211268f8d Mon Sep 17 00:00:00 2001 From: ZhaoJinghui Date: Tue, 12 Aug 2025 19:44:29 +0800 Subject: [PATCH 15/95] add errcode desc Signed-off-by: ZhaoJinghui Change-Id: Id50022da6a812a08f9763ecf3ebcd525659253aa --- distributeddatamgr/relational_store/include/data_asset.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/distributeddatamgr/relational_store/include/data_asset.h b/distributeddatamgr/relational_store/include/data_asset.h index f791cbc9e81..85c4fbdf6ba 100644 --- a/distributeddatamgr/relational_store/include/data_asset.h +++ b/distributeddatamgr/relational_store/include/data_asset.h @@ -326,7 +326,9 @@ Data_Asset *OH_Data_Asset_CreateOne(void); * * @param asset Represents a pointer to an {@link Data_Asset} instance. * @return Returns the status code of the execution. Successful execution returns RDB_OK, - * while failure returns a specific error code. Specific error codes can be referenced {@link OH_Rdb_ErrCode}. + * while failure returns a specific error code. + * {@link RDB_OK} - success. + * Specific error codes can be referenced {@link OH_Rdb_ErrCode}. * @see Data_Asset, OH_Rdb_ErrCode. * @since 11 */ @@ -349,7 +351,9 @@ Data_Asset **OH_Data_Asset_CreateMultiple(uint32_t count); * @param assets Represents a pointer to an {@link Data_Asset} instance. * @param count Represents the count of {@link Data_Asset} to destroy. * @return Returns the status code of the execution. Successful execution returns RDB_OK, - * while failure returns a specific error code. Specific error codes can be referenced {@link OH_Rdb_ErrCode}. + * while failure returns a specific error code. + * {@link RDB_OK} - success. + * Specific error codes can be referenced {@link OH_Rdb_ErrCode}. * @see Data_Asset, OH_Rdb_ErrCode. * @since 11 */ -- Gitee From 2765dfa5ebe2ebf399b12cb1ae169a6aa46def44 Mon Sep 17 00:00:00 2001 From: wangjunman1 Date: Mon, 18 Aug 2025 20:00:41 +0800 Subject: [PATCH 16/95] add commit for NODE_XCOMPONENT_TYPE&NODE_XCOMPONENT_SURFACE_SIZE Signed-off-by: wangjunman1 --- arkui/ace_engine/native/native_node.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index ce5b57eb466..40163d1c377 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4088,25 +4088,19 @@ typedef enum { */ NODE_XCOMPONENT_ID = MAX_NODE_SCOPE_NUM * ARKUI_NODE_XCOMPONENT, /** - * @brief Defines the type of the component. - * This attribute can be set, reset, and obtained as required through APIs. + * @brief Specifies the type of the XComponent component. This attribute is read-only. \n + * The type of the XComponent component must be explicitly set during creation using {@link ARKUI_NODE_XCOMPONENT} or {@link ARKUI_NODE_XCOMPONENT_TEXTURE}, and cannot be modified afterward. \n + * Attempting to change the type through {@link setAttribute} will cause rendering exceptions. * - * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0].i32: type {@link ArkUI_XComponentType}. The default value is ARKUI_XCOMPONENT_TYPE_SURFACE. \n - * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].i32: type {@link ArkUI_XComponentType}. \n * */ NODE_XCOMPONENT_TYPE, /** - * @brief Defines the width and height of the component. - * This attribute can be set and obtained as required through APIs. + * @brief Specifies the size of the XComponent component. This attribute is read-only. \n + * Attempting to modify the size through {@link setAttribute} will have no effect. * - * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0].u32: width, in px. \n - * .value[1].u32: height, in px. \n - * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].u32: width, in px. \n * .value[1].u32: height, in px. \n -- Gitee From 9bca3fa8230e417de676099b57e8b870fccf7f6d Mon Sep 17 00:00:00 2001 From: wujinhui Date: Tue, 19 Aug 2025 16:20:00 +0800 Subject: [PATCH 17/95] =?UTF-8?q?=E5=9B=9E=E9=80=80api=2021=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wujinhui --- arkui/ace_engine/native/libace.ndk.json | 4 ---- arkui/ace_engine/native/native_node.h | 15 --------------- 2 files changed, 19 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 4a896d6404f..3c739a283d0 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1559,10 +1559,6 @@ "first_introduced": "18", "name": "OH_ArkUI_NodeUtils_MoveTo" }, - { - "first_introduced": "21", - "name": "OH_ArkUI_NativeModule_InvalidateAttributes" - }, { "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_SetCrossLanguageOption" diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index ce5b57eb466..50ede589c7f 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9893,21 +9893,6 @@ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeH */ int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target_parent, int32_t index); -/** - * @brief Triggers node updates in the current frame. - * When node attributes are modified after the current frame's build phase (i.e., after - * the unified processing of dirty nodes), the node updates will be deferred to the next - * frame. This function forces immediate node updates within the current frame to - * ensure rendering effects are applied synchronously. - * - * @param node ArkUI_NodeHandle pointer. - * @return Error code. - * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. - * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. - * @since 21 - */ -int32_t OH_ArkUI_NativeModule_InvalidateAttributes(ArkUI_NodeHandle node); - /** * @brief Set the cross-language option of the target node handle. * -- Gitee From fdd70a803fb5a0f183290171aeb3fc07bc183e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E5=BE=AE?= Date: Tue, 19 Aug 2025 19:14:47 +0800 Subject: [PATCH 18/95] =?UTF-8?q?[sdk]=20=20VIDEO=5FLOW=5FLATENCY=E5=8F=AA?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=A7=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wang-ziweix --- multimedia/av_codec/native_avcapability.h | 2 +- multimedia/av_codec/native_avcodec_base.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/av_codec/native_avcapability.h b/multimedia/av_codec/native_avcapability.h index 1d0af06b2b4..3c8649510a6 100644 --- a/multimedia/av_codec/native_avcapability.h +++ b/multimedia/av_codec/native_avcapability.h @@ -84,7 +84,7 @@ typedef enum OH_AVCapabilityFeature { VIDEO_ENCODER_TEMPORAL_SCALABILITY = 0, /** Feature for codec supports long-term reference. It is only used in video encoder. */ VIDEO_ENCODER_LONG_TERM_REFERENCE = 1, - /** Feature for codec supports low latency. It is used in video encoder and video decoder. */ + /** Feature for codec supports low latency. It is only used in video decoder. */ VIDEO_LOW_LATENCY = 2, /** Feature for codec supports B-frame encoding. It is only used in video encoder. * @since 20 diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 7745ac2101f..0042b76b4a2 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -944,8 +944,8 @@ extern const char *OH_MD_KEY_VIDEO_PIC_WIDTH; extern const char *OH_MD_KEY_VIDEO_PIC_HEIGHT; /** * @brief Key to enable the low latency mode, value type is int32_t (0 or 1):1 is enabled, 0 otherwise. - * If enabled, the video encoder or video decoder doesn't hold input and output data more than required by - * the codec standards. This is an optional key that applies only to video encoder or video decoder. + * If enabled, the video decoder doesn't hold input and output data more than required by + * the codec standards. This is an optional key that applies only to video decoder. * It is used in configure. * * @syscap SystemCapability.Multimedia.Media.CodecBase -- Gitee From 4ac872da0fee76572a1ddc11b814c9276fc06935 Mon Sep 17 00:00:00 2001 From: cheerful_ricky Date: Wed, 20 Aug 2025 14:32:13 +0800 Subject: [PATCH 19/95] fix history comments Signed-off-by: cheerful_ricky --- BasicServicesKit/commonevent/oh_commonevent.h | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/BasicServicesKit/commonevent/oh_commonevent.h b/BasicServicesKit/commonevent/oh_commonevent.h index d3f16a959a7..a5cca763b88 100644 --- a/BasicServicesKit/commonevent/oh_commonevent.h +++ b/BasicServicesKit/commonevent/oh_commonevent.h @@ -227,19 +227,19 @@ CommonEvent_ErrCode OH_CommonEvent_UnSubscribe(const CommonEvent_Subscriber* sub const char* OH_CommonEvent_GetEventFromRcvData(const CommonEvent_RcvData* rcvData); /** - * @brief Get event result code from callback data. + * @brief Get event code from callback data. * * @param rcvData Indicates the callback data. - * @return Returns the event of result code, default is 0. + * @return Returns the event of code, default is 0. * @since 12 */ int32_t OH_CommonEvent_GetCodeFromRcvData(const CommonEvent_RcvData* rcvData); /** - * @brief Get event result data from callback data. + * @brief Get event data from callback data. * * @param rcvData Indicates the callback data. - * @return Returns the event of result data, default is null. + * @return Returns the event of data, default is null. * @since 12 */ const char* OH_CommonEvent_GetDataStrFromRcvData(const CommonEvent_RcvData* rcvData); @@ -628,7 +628,7 @@ CommonEvent_ErrCode OH_CommonEvent_SetDoubleArrayToParameters(CommonEvent_Parame const double* value, size_t num); /** - * @brief Publish a standard commen event. + * @brief Publish a commen event. * * @param event Indicates the name of the common event. * @return Returns the error code. @@ -704,39 +704,39 @@ bool OH_CommonEvent_AbortCommonEvent(CommonEvent_Subscriber* subscriber); bool OH_CommonEvent_ClearAbortCommonEvent(CommonEvent_Subscriber* subscriber); /** - * @brief Get result code from an ordered event by a subscriber. + * @brief Get code from an ordered event by a subscriber. * * @param subscriber Indicates the subscriber. - * @return Returns the result code, default is 0. + * @return Returns the code, default is 0. * @since 18 */ int32_t OH_CommonEvent_GetCodeFromSubscriber(const CommonEvent_Subscriber* subscriber); /** - * @brief Set result code to an ordered event by a subscriber. + * @brief Set code to an ordered event by a subscriber. * * @param subscriber Indicates the subscriber. - * @param code Indicates the result code. + * @param code Indicates the code. * @return Returns the result of operation, true means succeeded. * @since 18 */ bool OH_CommonEvent_SetCodeToSubscriber(CommonEvent_Subscriber* subscriber, int32_t code); /** - * @brief Get result data from an ordered event by a subscriber. + * @brief Get data from an ordered event by a subscriber. * * @param subscriber Indicates the subscriber. - * @return Returns the result data, default is null. + * @return Returns the data, default is null. * @since 18 */ const char* OH_CommonEvent_GetDataFromSubscriber(const CommonEvent_Subscriber* subscriber); /** - * @brief Set result data to an ordered event by a subscriber. + * @brief Set data to an ordered event by a subscriber. * * @param subscriber Indicates the subscriber. - * @param data Indicates the result data. - * @param length Indicates the length of result data. + * @param data Indicates the data. + * @param length Indicates the length of data. * @return Returns the result of operation, true means succeeded. * @since 18 */ -- Gitee From 376f1dd4538d5c12916cee89a1660488f7d26a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Mon, 18 Aug 2025 15:10:52 +0800 Subject: [PATCH 20/95] =?UTF-8?q?descritpion:UIAbility=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0&?= =?UTF-8?q?=E6=9C=80=E8=BF=91=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0ndk?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- .../ability_runtime/application_context.h | 34 +++++++++++++++++++ .../libability_runtime.ndk.json | 8 +++++ 2 files changed, 42 insertions(+) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 00c5d579d45..d8adee954a1 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -307,6 +307,40 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbilityWithStartOptions(Ab */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetVersionCode(int64_t* versionCode); +/** + * @brief Obtain the launch parameter of starting UIAbility. + * + * @param buffer A pointer to a buffer that receives the launch parameter of starting UIAbility. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 20 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLaunchParameter( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** + * @brief Obtain the latest parameter of starting UIAbility. + * + * @param buffer A pointer to a buffer that receives the latest parameter of starting UIAbility. + * @param bufferSize The length of the buffer. + * @param writeLength The string length actually written to the buffer, + * when returning {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR}. + * @return The error code. + * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, + * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. + * @since 20 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLatestParameter( + char* buffer, const int32_t bufferSize, int32_t* writeLength); + #ifdef __cplusplus } // extern "C" #endif diff --git a/AbilityKit/ability_runtime/libability_runtime.ndk.json b/AbilityKit/ability_runtime/libability_runtime.ndk.json index f7939128e40..5874cdc39af 100644 --- a/AbilityKit/ability_runtime/libability_runtime.ndk.json +++ b/AbilityKit/ability_runtime/libability_runtime.ndk.json @@ -178,6 +178,14 @@ { "first_introduced": "20", "name": "OH_AbilityRuntime_ApplicationContextGetResourceDir" + }, + { + "first_introduced": "20", + "name": "OH_AbilityRuntime_ApplicationContextGetLaunchParameter" + }, + { + "first_introduced": "20", + "name": "OH_AbilityRuntime_ApplicationContextGetLatestParameter" }, { "first_introduced": "21", -- Gitee From 2995f4cf2f17eb1d8ff5d54885feb2e717f73116 Mon Sep 17 00:00:00 2001 From: wuliangdong Date: Thu, 21 Aug 2025 16:11:09 +0800 Subject: [PATCH 21/95] Intercept and ReDispatch KeyEvent To Support Secure Password Input. Signed-off-by: wuliangdong Change-Id: I6c5d2ce45b3e2cf0c7c2efdd56d39190c6efe4f9 --- multimodalinput/kits/c/input/oh_input_manager.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 32432532486..eb4fc5764e6 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -640,6 +640,9 @@ void OH_Input_SetKeyEventDisplayId(struct Input_KeyEvent* keyEvent, int32_t disp */ int32_t OH_Input_GetKeyEventDisplayId(const struct Input_KeyEvent* keyEvent); + + + /** * @brief Inject mouse event. * since API 20, it is recommended to use OH_Input_RequestInjection -- Gitee From 14695c1b94da1c31ec9c0464dd6ac0b5bfdee817 Mon Sep 17 00:00:00 2001 From: xushunjie Date: Thu, 21 Aug 2025 15:27:52 +0800 Subject: [PATCH 22/95] add arkui objectFit enum for imageMatrix Signed-off-by: xushunjie --- arkui/ace_engine/native/native_type.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 7cef398b2d6..03b814fd3b4 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -1356,6 +1356,12 @@ typedef enum { ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM, /** Not resized, the image is aligned with the end edge at the bottom of the container. */ ARKUI_OBJECT_FIT_NONE_AND_ALIGN_BOTTOM_END, + /** + * Not resized, and is used in conjunction with NODE_IMAGE_IMAGE_MATRIX. + * + * @since 21 + */ + ARKUI_OBJECT_FIT_NONE_MATRIX, } ArkUI_ObjectFit; /** -- Gitee From c9021ff5633862ce967b4ee262a890b87f7a98a7 Mon Sep 17 00:00:00 2001 From: zzz701 Date: Mon, 18 Aug 2025 16:55:59 +0800 Subject: [PATCH 23/95] =?UTF-8?q?NDK=E6=89=93=E5=8C=85=E8=A3=81=E5=89=AA1.?= =?UTF-8?q?2=E6=8E=A5=E5=8F=A3=20Signed-off-by:=20zzz701=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-tools/clean_ndk_ani.py | 124 +++++++++++++++++++++++++++++++ build-tools/clean_ndk_ani.pydeps | 10 +++ 2 files changed, 134 insertions(+) create mode 100755 build-tools/clean_ndk_ani.py create mode 100644 build-tools/clean_ndk_ani.pydeps diff --git a/build-tools/clean_ndk_ani.py b/build-tools/clean_ndk_ani.py new file mode 100755 index 00000000000..9249bc83fce --- /dev/null +++ b/build-tools/clean_ndk_ani.py @@ -0,0 +1,124 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +import re +import argparse +import shutil +import json +from typing import List + +# ani header file list +_ANI_HEADER_LISTS = [ +] + +# Precompiled regular expression +_HEADER_PATTERN = re.compile( + r'^\s*#\s*include\s+["<](.*/)?({})[">]'.format( + '|'.join(map(re.escape, _ANI_HEADER_LISTS)) + ) +) + + +def process_header_file(file_path): + """processing single header file""" + modified = False + try: + with open(file_path, 'r+', encoding='utf-8') as f: + content = f.read() + # Use a regular expression to process all rows at once + new_content = [] + for line in content.splitlines(): + if not _HEADER_PATTERN.match(line): + new_content.append(line) + else: + modified = True + + if modified: + f.seek(0) + f.write('\n'.join(new_content)) + f.truncate() + except Exception as e: + print(f"process file {file_path} failed: {str(e)}") + return modified + + +def clean_ndk_ani_headers(ndk_header_path): + if not _ANI_HEADER_LISTS: + print("Warning: ani header file list") + return + + # all files to be processed + file_paths = [] + for root, _, files in os.walk(ndk_header_path): + for file in files: + if not file.endswith('.h'): + continue + + file_path = os.path.join(root, file) + if file in _ANI_HEADER_LISTS: + try: + os.remove(file_path) + print(f"Deleted ani header file: {file_path}") + except OSError as e: + print(f"Error deleting {file_path}: {str(e)}") + else: + file_paths.append(file_path) + + # Bulk processing file include + for file_path in file_paths: + process_header_file(file_path) + + +def clean_json__systemCapability_headers(capability_header_path): + try: + with open(capability_header_path, 'r') as f: + systemCapabilitys = json.load(f) + except Exception as e: + print(f"Error reading JSON file: {str(e)}") + return + + # Traverse all levels of items + for _systemCapability in systemCapabilitys: + # filtering ani header file + systemCapabilitys[_systemCapability] = [item for item in systemCapabilitys[_systemCapability] + if os.path.basename(item) not in _ANI_HEADER_LISTS] + + # Saving the modified JSON + try: + with open(capability_header_path, 'w') as f: + json.dump(systemCapabilitys, f, indent=2) + print("JSON file updated successfully") + except Exception as e: + print(f"Error saving JSON file: {str(e)}") + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--ndk-header-path', help='ndk header path', required=True) + parser.add_argument('--system-capability-header-config', required=True) + args = parser.parse_args() + + if not os.path.isdir(args.ndk_header_path): + print(f"Error:path {args.ndk_header_path} is not exist!") + return + + clean_ndk_ani_headers(args.ndk_header_path) + clean_json__systemCapability_headers(args.system_capability_header_config) + print("Ani Header file cleanup complete!") + + +if __name__ == '__main__': + main() diff --git a/build-tools/clean_ndk_ani.pydeps b/build-tools/clean_ndk_ani.pydeps new file mode 100644 index 00000000000..9ec5fde3fcc --- /dev/null +++ b/build-tools/clean_ndk_ani.pydeps @@ -0,0 +1,10 @@ +# Generated by running: +# build/print_python_deps.py --root build/ohos/ndk --output interface/sdk_c/build-tools/clean_ndk_ani.pydeps interface/sdk_c/build-tools/clean_ndk_ani.py +../../../build/gn_helpers.py +../../../build/scripts/__init__.py +../../../build/scripts/interface_mgr.py +../../../build/scripts/util/__init__.py +../../../build/scripts/util/build_utils.py +../../../build/scripts/util/md5_check.py +../../../build/scripts/util/pycache.py +clean_ndk_ani.py -- Gitee From 74106ca69393c7f492b4d7765ac7bf2b8ade6484 Mon Sep 17 00:00:00 2001 From: fangzhiyuan Date: Thu, 21 Aug 2025 21:06:52 +0800 Subject: [PATCH 24/95] =?UTF-8?q?=E6=8F=90=E4=BA=A4common=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fangzhiyuan --- arkui/ace_engine/native/libace.ndk.json | 8 +++++ arkui/ace_engine/native/native_node.h | 40 +++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 5 ++++ 3 files changed, 53 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 3c739a283d0..d75a5bc6bfe 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -4062,5 +4062,13 @@ { "first_introduced": "20", "name": "OH_ArkUI_PostUITaskAndWait" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_NativeModule_RegisterCommonEvent" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_NativeModule_UnregisterCommonEvent" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index afeb5f72620..788f8045470 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7316,6 +7316,16 @@ typedef enum { */ NODE_ON_HOVER_MOVE = 29, + /** + * @brief Defines the size change event. + * + * The event will be triggered when the component size changes. + * When the event callback occurs, the {@link ArkUI_NodeEvent} object can be obtained from the + * {@link ArkUI_UIInputEvent} object. \n + * @since 21 + */ + NODE_ON_SIZE_CHANGE = 30, + /** * @brief Triggers onDetectResultUpdate callback * when the text is set to TextDataDetectorConfig and recognized successfully. @@ -10138,6 +10148,36 @@ int32_t OH_ArkUI_PostUITask(ArkUI_ContextHandle context, void* taskData, void (* * @since 20 */ int32_t OH_ArkUI_PostUITaskAndWait(ArkUI_ContextHandle context, void* taskData, void (*task)(void* taskData)); + +/** + * @brief Register common event callback of target node. + * + * @param node The ArkUI-NodeHandle pointer. + * @param eventType Indicates the type of event to set. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the event callback function. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid. + * Returns {@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} Function parameter eventType is not supported. + * @since 21 + */ +int32_t OH_ArkUI_NativeModule_RegisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType, + void* userData, void (*callback)(ArkUI_NodeEvent* event)); + +/** + * @brief Unregister common event callback of target node. + * + * @param node The ArkUI-NodeHandle pointer. + * @param eventType Indicates the type of event to set. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid. + * Returns {@link ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE} Function parameter eventType is not supported. + * @since 21 + */ +int32_t OH_ArkUI_NativeModule_UnregisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 03b814fd3b4..f7b72cc37d0 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2301,6 +2301,11 @@ typedef enum { ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID = 106108, /** The component event does not support return values. */ ARKUI_ERROR_CODE_NODE_EVENT_NO_RETURN = 106109, + /** + * @error The event type is not supported by the node. + * @since 21 + */ + ARKUI_ERROR_CODE_NODE_UNSUPPORTED_EVENT_TYPE = 106110, /** The index value is invalid. */ ARKUI_ERROR_CODE_NODE_INDEX_INVALID = 106200, /** Failed to query route navigation information. */ -- Gitee From 73b99e035e0cd9cf4aa72b00e71966b53646855b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E5=87=AF?= Date: Sat, 23 Aug 2025 19:25:51 +0800 Subject: [PATCH 25/95] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E8=B5=B7=E6=8B=96=E8=BF=94=E5=9B=9E=E5=80=BC=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘永凯 --- arkui/ace_engine/native/drag_and_drop.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arkui/ace_engine/native/drag_and_drop.h b/arkui/ace_engine/native/drag_and_drop.h index 15f4de62140..b484cafe18b 100644 --- a/arkui/ace_engine/native/drag_and_drop.h +++ b/arkui/ace_engine/native/drag_and_drop.h @@ -499,7 +499,6 @@ ArkUI_ErrorCode OH_ArkUI_DragEvent_GetDisplayId(ArkUI_DragEvent *event, int32_t * @return Returns the result code. * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. - * Returns {@link ARKUI_ERROR_CODE_DRAG_DATA_SYNC_FAILED} if the data sync is not allowed or failed. * @since 15 */ int32_t OH_ArkUI_DragEvent_StartDataLoading( -- Gitee From 0965b9b5a0545d131682103f12728eac8f7e5f9e Mon Sep 17 00:00:00 2001 From: huqinglong Date: Mon, 25 Aug 2025 10:23:29 +0800 Subject: [PATCH 26/95] =?UTF-8?q?ndk=E5=A2=9E=E5=8A=A0=E9=9F=B3=E9=87=8F?= =?UTF-8?q?=E5=A2=9E=E7=9B=8A=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huqinglong --- multimedia/player_framework/avplayer.h | 23 +++++++++++++++++++ .../avplayer/libavplayer.ndk.json | 4 ++++ 2 files changed, 27 insertions(+) diff --git a/multimedia/player_framework/avplayer.h b/multimedia/player_framework/avplayer.h index 1261bdd3b10..9f89bc00c2a 100644 --- a/multimedia/player_framework/avplayer.h +++ b/multimedia/player_framework/avplayer.h @@ -621,6 +621,29 @@ OH_AVErrCode OH_AVPlayer_SetOnErrorCallback(OH_AVPlayer *player, OH_AVPlayerOnEr */ OH_AVErrCode OH_AVPlayer_SetVolumeMode(OH_AVPlayer *player, OH_AudioStream_VolumeMode volumeMode); +/** + * @brief Sets the loudness gain of current media. The default gain is 0.0 dB. + * This API can be called only when the AVPlayer is in the prepared, playing, paused completed or stopped state. + * The default loudness gain is 0.0dB. The stream usage of the player must be + * {@link OH_AudioStream_Usage#AUDIOSTREAM_USAGE_MUSIC}, {@link OH_AudioStream_Usage#AUDIOSTREAM_USAGE_MOVIE} + * or {@link OH_AudioStream_Usage#AUDIOSTREAM_USAGE_AUDIOBOOK}. + * The latency mode of the audio renderer must be {@link OH_AudioStream_LatencyMode#AUDIOSTREAM_LATENCY_MODE_NORMAL}. + * If AudioRenderer is played through the high-resolution pipe, this operation is not supported. + * + * @param player Pointer to an OH_AVPlayer instance. + * @param loudnessGain Loudness gain to set which changes from -90.0 to 24.0, expressing in dB. + * @return Function result code: + * {@link AV_ERR_OK} If the execution is successful. + * {@link AV_ERR_INVALID_VAL}:The value of player is a null pointer or + * the value of loudnessGain is invalid. + * {@link AV_ERR_INVALID_STATE}: The function is called in an incorrect state. or the stream usage of + * audioRendererInfo is not one of {@link StreamUsage#STREAM_USAGE_MUSIC}, + * {@link StreamUsage#STREAM_USAGE_MOVIE} or {@link StreamUsage#STREAM_USAGE_AUDIOBOOK}. + * {@link AV_ERR_SERVICE_DIED}: System errors such as media service breakdown. + * @since 21 + */ +OH_AVErrCode OH_AVPlayer_SetLoudnessGain(OH_AVPlayer *player, float loudnessGain); + #ifdef __cplusplus } #endif diff --git a/multimedia/player_framework/avplayer/libavplayer.ndk.json b/multimedia/player_framework/avplayer/libavplayer.ndk.json index 7f6d8b5bb7e..787c34354f8 100644 --- a/multimedia/player_framework/avplayer/libavplayer.ndk.json +++ b/multimedia/player_framework/avplayer/libavplayer.ndk.json @@ -146,5 +146,9 @@ { "first_introduced": "20", "name": "OH_AVPlayer_SetPlaybackRate" + }, + { + "first_introduced": "21", + "name": "OH_AVPlayer_SetLoudnessGain" } ] \ No newline at end of file -- Gitee From 46995c0e70dc542c82c06be94b3c6499d74e4913 Mon Sep 17 00:00:00 2001 From: Linkxu Date: Mon, 25 Aug 2025 02:45:02 +0000 Subject: [PATCH 27/95] sdkc Signed-off-by: Linkxu --- arkui/ace_engine/native/native_node.h | 65 +++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 788f8045470..f0179d9266d 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4997,6 +4997,71 @@ typedef enum { */ NODE_SLIDER_SUFFIX, + /** + * @brief Defines the color 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 + * .object: array of color stops, each of which consists of a color and its stop position. + * The parameter type is {@link ArkUI_ColorStop}. Invalid colors are automatically skipped. \n \n + * colors: colors of the color stops. \n + * stops: stop positions of the color stops. \n + * size: number of colors. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object: array of color stops, each of which consists of a color and its stop position. + * The parameter type is {@link ArkUI_ColorStop}. Invalid colors are automatically skipped. \n \n + * colors: colors of the color stops. \n + * stops: stop positions of the color stops. \n + * size: number of colors. \n + * + * @since 21 + */ + NODE_SLIDER_BLOCK_LINEAR_GRADIENT_COLOR, + + /** + * @brief Defines the background color 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 + * .object: array of color stops, each of which consists of a color and its stop position. + * The parameter type is {@link ArkUI_ColorStop}. Invalid colors are automatically skipped. \n \n + * colors: colors of the color stops. \n + * stops: stop positions of the color stops. \n + * size: number of colors. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object: array of color stops, each of which consists of a color and its stop position. + * The parameter type is {@link ArkUI_ColorStop}. Invalid colors are automatically skipped. \n \n + * colors: colors of the color stops. \n + * stops: stop positions of the color stops. \n + * size: number of colors. \n + * + * @since 21 + */ + NODE_SLIDER_TRACK_LINEAR_GRADIENT_COLOR, + + /** + * @brief Defines the color of the selected part of the slider track. This attribute can be set, reset, and obtained + * as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .object: array of color stops, each of which consists of a color and its stop position. + * The parameter type is {@link ArkUI_ColorStop}. Invalid colors are automatically skipped. \n \n + * colors: colors of the color stops. \n + * stops: stop positions of the color stops. \n + * size: number of colors. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object: array of color stops, each of which consists of a color and its stop position. + * The parameter type is {@link ArkUI_ColorStop}. Invalid colors are automatically skipped. \n \n + * colors: colors of the color stops. \n + * stops: stop positions of the color stops. \n + * size: number of colors. \n + * + * @since 21 + */ + NODE_SLIDER_SELECTED_LINEAR_GRADIENT_COLOR, + /** * @brief Set the selection status of an option button. Attribute setting, * attribute resetting, and attribute obtaining are supported. -- Gitee From be1ae9e38cf88d0896b21d17bf4f73bf18886cc8 Mon Sep 17 00:00:00 2001 From: w30076694 Date: Mon, 25 Aug 2025 15:08:40 +0800 Subject: [PATCH 28/95] =?UTF-8?q?=E9=80=BB=E8=BE=91=E7=9B=B8=E6=9C=BANDK?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: w30076694 --- multimedia/camera_framework/camera.ndk.json | 12 +++++++ multimedia/camera_framework/camera_input.h | 35 +++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index ff95d61ee10..4c4d03826d2 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -23,6 +23,18 @@ "first_introduced": "11", "name": "OH_CameraInput_Release" }, + { + "first_introduced": "21", + "name": "OH_CameraInput_IsPhysicalCameraOrientationVariable" + }, + { + "first_introduced": "21", + "name": "OH_CameraInput_GetPhysicalCameraOrientation" + }, + { + "first_introduced": "21", + "name": "OH_CameraInput_UsePhysicalCameraOrientation" + }, { "first_introduced": "11", "name": "OH_CameraManager_RegisterCallback" diff --git a/multimedia/camera_framework/camera_input.h b/multimedia/camera_framework/camera_input.h index a91452d9d46..72a974c9a69 100644 --- a/multimedia/camera_framework/camera_input.h +++ b/multimedia/camera_framework/camera_input.h @@ -171,6 +171,41 @@ Camera_ErrorCode OH_CameraInput_Close(Camera_Input* cameraInput); */ Camera_ErrorCode OH_CameraInput_Release(Camera_Input* cameraInput); +/** + * @brief Query whether physical camera orientation is variable under different fold status. + * + * @param {CameraInput} cameraInput the {@link Camera_Input} instance. + * @param {bool} isVariable the result of whether physical camera orientation is variable. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 21 + */ +Camera_ErrorCode OH_CameraInput_IsPhysicalCameraOrientationVariable(Camera_Input* cameraInput, bool* isVariable); + +/** + * @brief Get physical camera orientation under current fold status. + * + * @param cameraInput the {@link Camera_Input} instance. + * @param orientation the physical camera orientation of current fold status. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 21 + */ +Camera_ErrorCode OH_CameraInput_GetPhysicalCameraOrientation(Camera_Input* cameraInput, uint32_t* orientation); + +/** + * @brief Choose whether to use the physical camera orientation. + * + * @param cameraInput the {@link Camera_Input} instance. + * @param isUsed the flag of whether to use physical camera orientation. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 21 + */ +Camera_ErrorCode OH_CameraInput_UsePhysicalCameraOrientation(Camera_Input* cameraInput, bool isUsed); + #ifdef __cplusplus } #endif -- Gitee From 2881baac82c6a2ec6ee7273d9fb33bc51be3a63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Mon, 25 Aug 2025 09:41:02 +0000 Subject: [PATCH 29/95] update AbilityKit/ability_runtime/application_context.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- AbilityKit/ability_runtime/application_context.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index d8adee954a1..11f2c26c3af 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -319,7 +319,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetVersionCode(int6 * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 20 + * @since 21 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLaunchParameter( char* buffer, const int32_t bufferSize, int32_t* writeLength); @@ -336,7 +336,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLaunchParameter( * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. - * @since 20 + * @since 21 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLatestParameter( char* buffer, const int32_t bufferSize, int32_t* writeLength); -- Gitee From ebab64868e900d72f4d6e82130839320adfeebfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Mon, 25 Aug 2025 09:42:04 +0000 Subject: [PATCH 30/95] update AbilityKit/ability_runtime/libability_runtime.ndk.json. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- AbilityKit/ability_runtime/libability_runtime.ndk.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AbilityKit/ability_runtime/libability_runtime.ndk.json b/AbilityKit/ability_runtime/libability_runtime.ndk.json index 5874cdc39af..7be5ba100fe 100644 --- a/AbilityKit/ability_runtime/libability_runtime.ndk.json +++ b/AbilityKit/ability_runtime/libability_runtime.ndk.json @@ -180,11 +180,11 @@ "name": "OH_AbilityRuntime_ApplicationContextGetResourceDir" }, { - "first_introduced": "20", + "first_introduced": "21", "name": "OH_AbilityRuntime_ApplicationContextGetLaunchParameter" }, { - "first_introduced": "20", + "first_introduced": "21", "name": "OH_AbilityRuntime_ApplicationContextGetLatestParameter" }, { -- Gitee From 0ed91990a09318af8694b83db2e57078797ab9af Mon Sep 17 00:00:00 2001 From: lizeqiang Date: Tue, 12 Aug 2025 14:37:32 +0800 Subject: [PATCH 31/95] dual core code sync Signed-off-by: lizeqiang --- .../interfaces/native/libohweb.ndk.json | 12 ++++ .../native/native_interface_arkweb.h | 66 +++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/web/webview/interfaces/native/libohweb.ndk.json b/web/webview/interfaces/native/libohweb.ndk.json index c86a02925aa..8119ca252b9 100644 --- a/web/webview/interfaces/native/libohweb.ndk.json +++ b/web/webview/interfaces/native/libohweb.ndk.json @@ -366,5 +366,17 @@ { "first_introduced": "20", "name": "OH_ArkWebResourceHandler_DidFailWithErrorV2" + }, + { + "first_introduced": "20", + "name": "OH_NativeArkWeb_SetActiveWebEngineVersion" + }, + { + "first_introduced": "20", + "name": "OH_NativeArkWeb_GetActiveWebEngineVersion" + }, + { + "first_introduced": "20", + "name": "OH_NativeArkWeb_IsActiveWebEngineEvergreen" } ] diff --git a/web/webview/interfaces/native/native_interface_arkweb.h b/web/webview/interfaces/native/native_interface_arkweb.h index 10332371c25..e90f5c060a1 100644 --- a/web/webview/interfaces/native/native_interface_arkweb.h +++ b/web/webview/interfaces/native/native_interface_arkweb.h @@ -93,6 +93,41 @@ typedef struct { int32_t loadingTime; } ArkWeb_BlanklessInfo; +/** + * @brief ArkWeb Engine Version. + * + * ArkWeb Dual Web Engine Versioning Convention: + *

See [ArkWeb Dual Web Engine Versioning Convention] for switching between Legacy and Evergreen Web Engine. + * + * @since 20 + */ +typedef enum { + /** + * the system default ArkWeb engine. + * @since 20 + */ + SYSTEM_DEFAULT = 0, + + /** + * ArkWeb M114 version. + * @since 20 + */ + ARKWEB_M114 = 1, + + /** + * ArkWeb M132 version. + * @since 20 + */ + ARKWEB_M132 = 2, + + /** + * ArkWeb Evergreen Web Engine, always use the new ArkWeb Engine. + * Evergreen Web Engine. + * @since 20 + */ + ARKWEB_EVERGREEN = 99999, +} ArkWebEngineVersion; + /** * @brief Loads a piece of code and execute JS code in the context of the currently displayed page. * @@ -315,6 +350,37 @@ ArkWeb_ErrorCode OH_ArkWebCookieManager_SaveCookieSync(); */ void OH_ArkWebCookieManager_SaveCookieAsync(OH_ArkWeb_OnCookieSaveCallback callback); +/** + * Set active ArkWeb engine version. + * If the system does not support the specified version, it will not take effect. + * + * This is a global static API that must be called before initializeWebEngine, and it will have no effect if any + * Web components are loaded. + * + * Legacy Web Engine Compatibility Note: + *

When using legacy ArkWeb Engine, some ArkWeb newly created API will not take effect,
+ * see [Compatible with Legacy Web Engine in release note] for compatibility guidelines. + *

+ * + * @param { ArkWebEngineVersion } webEngineVersion - the ArkWebEngineVersion + * @since 20 + */ +void OH_NativeArkWeb_SetActiveWebEngineVersion(ArkWebEngineVersion webEngineVersion); + +/** + * Get currently active ArkWeb engine version. + * @return { ArkWebEngineVersion } Active ArkWeb Engine version as defined by ArkWebEngineVersion + * @since 20 + */ +ArkWebEngineVersion OH_NativeArkWeb_GetActiveWebEngineVersion(); + +/** + * Check if the currently active ArkWeb engine is Evergreen. + * @return { bool } true means the application is using the Evergreen Web Engine, false means not. + * @since 20 + */ +bool OH_NativeArkWeb_IsActiveWebEngineEvergreen(); + #ifdef __cplusplus }; #endif -- Gitee From 48a3e97e9f77fe4fcdf192c755b8c7e0b8f83a6c Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Tue, 12 Aug 2025 14:46:03 +0800 Subject: [PATCH 32/95] LineHeight interface for c Signed-off-by: FTL1ght Change-Id: I79e0ea7c29befd4fa2accdc2eacab64ad88e5db0 --- .../native_drawing/drawing_text_typography.h | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 9bdf581f61d..4635826e802 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -582,6 +582,151 @@ typedef enum OH_Drawing_FontWidth { FONT_WIDTH_ULTRA_EXPANDED = 9, } OH_Drawing_FontWidth; +/** + * @brief Enumerates text style attribute. + * + * @since 21 + */ +typedef enum OH_Drawing_TextStyleAttributeId { + /** Line height maximum */ + TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 0, + /** Line height minimum */ + TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 1, + /** Line spacing */ + TEXT_STYLE_ATTR_D_LINE_SPACING = 2, + /** Line height style */ + TEXT_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 3, + /** Font width */ + TEXT_STYLE_ATTR_I_FONT_WIDTH = 4, +} OH_Drawing_TextStyleAttributeId; + +/** + * @brief Enumerates line height's scaling type. + * + * @since 21 + */ +typedef enum OH_Drawing_LineHeightStyle{ + /** Use the font size as the scale factor for line height scaling */ + TEXT_LINE_HEIGHT_BY_FONT_SIZE = 0, + /** Use the text height after shaping as the scale factor for line height scaling */ + TEXT_LINE_HEIGHT_BY_FONT_HEIGHT = 1, +} OH_Drawing_LineHeightStyle; + +/** + * @brief Enumerates typography style attribute. + * + * @since 21 + */ +typedef enum OH_Drawing_TypographyStyleAttributeId { + /** Line height maximum */ + TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 0, + /** Line height minimum */ + TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 1, + /** Line spacing */ + TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING = 2, + /** Line height style */ + TYPOGRAPHY_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 3, + /** Font width */ + TYPOGRAPHY_STYLE_ATTR_I_FONT_WIDTH = 4, +} OH_Drawing_TypographyStyleAttributeId; + +/** + * @brief Sets double value to the text style attribute. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param id Indicates the attribute id. + * @param value Indicates the value to set. + * @return Returns interface call status. + * @since 21 + */ +int OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, double value); + +/** + * @brief Gets the double type property's value from the text style. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param id Indicates the attribute id. + * @param value Indicates the return value of the interface. + * @return Returns interface call status. + * @since 21 + */ +int OH_Drawing_GetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, double* value); + +/** + * @brief Sets int value to the text style attribute. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param id Indicates the attribute id. + * @param value Indicates the value to set. + * @return Returns interface call status. + * @since 21 + */ +int OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, int value); + +/** + * @brief Gets the int type property's value from the text style. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @param id Indicates the attribute id. + * @param value Indicates the return value of the interface. + * @return Returns interface call status. + * @since 21 + */ +int OH_Drawing_GetTextStyleAttributeInt(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, int* value); + +/** + * @brief Sets double value to the typography style attribute. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param id Indicates the attribute id. + * @param value Indicates the value to set. + * @return Returns interface call status. + * @since 21 + */ +int OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, double value); + +/** + * @brief Gets the double type property's value from the typography style. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param id Indicates the attribute id. + * @param value Indicates the return value of the interface. + * @return Returns interface call status. + * @since 21 + */ +int OH_Drawing_GetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, double* value); + +/** + * @brief Sets int value to the typography style attribute. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param id Indicates the attribute id. + * @param value Indicates the value to set. + * @return Returns interface call status. + * @since 21 + */ +int OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, int value); + +/** + * @brief Gets the int type property's value from the typography style. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param id Indicates the attribute id. + * @param value Indicates the return value of the interface. + * @return Returns interface call status. + * @since 21 + */ +int OH_Drawing_GetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, int* value); + + /** * @brief Type of badge. * -- Gitee From ec675e3ddbaf9ce27b2dc502aa9f0e0b7be6244b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=9C=E7=A7=8B=E5=AE=8F?= Date: Mon, 25 Aug 2025 20:32:43 +0800 Subject: [PATCH 33/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 潜秋宏 --- arkui/ace_engine/native/ui_input_event.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index a13728fe50d..1e74a9ff75b 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -429,7 +429,7 @@ float OH_ArkUI_PointerEvent_GetXByIndex(const ArkUI_UIInputEvent* event, uint32_ * * @param event Indicates the pointer to the UI input event. * @return Returns the Y coordinate relative to the upper left corner of the current component; - * returns 0 if any parameter error occurs. + * returns 0.0f if any parameter error occurs. * @since 12 */ float OH_ArkUI_PointerEvent_GetY(const ArkUI_UIInputEvent* event); @@ -453,7 +453,7 @@ float OH_ArkUI_PointerEvent_GetYByIndex(const ArkUI_UIInputEvent* event, uint32_ * * @param event Indicates the pointer to the UI input event. * @return Returns the X coordinate relative to the upper left corner of the current application window; - * returns 0 if any parameter error occurs. + * returns 0.0f if any parameter error occurs. * @since 12 */ float OH_ArkUI_PointerEvent_GetWindowX(const ArkUI_UIInputEvent* event); @@ -477,7 +477,7 @@ float OH_ArkUI_PointerEvent_GetWindowXByIndex(const ArkUI_UIInputEvent* event, u * * @param event Indicates the pointer to the UI input event. * @return Returns the Y coordinate relative to the upper left corner of the current application window; - * returns 0 if any parameter error occurs. + * returns 0.0f if any parameter error occurs. * @since 12 */ float OH_ArkUI_PointerEvent_GetWindowY(const ArkUI_UIInputEvent* event); @@ -501,7 +501,7 @@ float OH_ArkUI_PointerEvent_GetWindowYByIndex(const ArkUI_UIInputEvent* event, u * * @param event Indicates the pointer to the UI input event. * @return Returns the X coordinate relative to the upper left corner of the current screen; - * returns 0 if any parameter error occurs. + * returns 0.0f if any parameter error occurs. * @since 12 */ float OH_ArkUI_PointerEvent_GetDisplayX(const ArkUI_UIInputEvent* event); @@ -525,7 +525,7 @@ float OH_ArkUI_PointerEvent_GetDisplayXByIndex(const ArkUI_UIInputEvent* event, * * @param event Indicates the pointer to the UI input event. * @return Returns the Y coordinate relative to the upper left corner of the current screen; - * returns 0 if any parameter error occurs. + * returns 0.0f if any parameter error occurs. * @since 12 */ float OH_ArkUI_PointerEvent_GetDisplayY(const ArkUI_UIInputEvent* event); @@ -666,8 +666,9 @@ float OH_ArkUI_PointerEvent_GetTouchAreaHeight(const ArkUI_UIInputEvent* event, * @brief Checks whether an event is triggered by the user's left or right hand. * This API is only effective on some touch devices. * - * @note The value is not available immediately upon press. Until the system infers the result, this API will return - * NONE. Do not rely on the return value for critical functionality. + * @note This value cannot be obtained in real time when pressed. Before the + * system completes result inference, it will return NONE by default. Therefore, + * please do not over-rely on the results returned by this interface. * * @param event Pointer to the current UI input event. * @param hand Whether the touch point is from the left or right hand. @@ -682,8 +683,9 @@ int32_t OH_ArkUI_PointerEvent_GetInteractionHand(const ArkUI_UIInputEvent *event * @brief Checks whether an event is triggered by the user's left or right hand. * This API is only effective on some touch devices. * - * @note The value is not available immediately upon press. Until the system infers the result, - * this API will return NONE. Do not rely on the return value for critical functionality. + * @note This value cannot be obtained in real time when pressed. Before the + * system completes result inference, it will return NONE by default. Therefore, + * please do not over-rely on the results returned by this interface. * * @param event Pointer to the current UI input event. * @param pointerIndex Index of the target touch point in the multi-touch data list. -- Gitee From d221c5c51a148a85da64c948ee5b345f747f18ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Tue, 26 Aug 2025 09:28:31 +0800 Subject: [PATCH 34/95] =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window_comm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index 46be3abab20..ad05a16950f 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -238,7 +238,7 @@ typedef struct { /** Display id of the window. */ uint64_t displayId; /** Window id. */ - int32_t windowId;; + int32_t windowId; /** Showing state of the window. */ bool showing; /** Label of the window. */ -- Gitee From d892154b45e2c473e93e14af955ad0e5c692ec10 Mon Sep 17 00:00:00 2001 From: fengyulong Date: Tue, 26 Aug 2025 10:59:28 +0800 Subject: [PATCH 35/95] fix comment Signed-off-by: fengyulong --- multimedia/audio_framework/ohaudio.ndk.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/multimedia/audio_framework/ohaudio.ndk.json b/multimedia/audio_framework/ohaudio.ndk.json index 858a405ccc3..327f7573d81 100644 --- a/multimedia/audio_framework/ohaudio.ndk.json +++ b/multimedia/audio_framework/ohaudio.ndk.json @@ -348,35 +348,35 @@ "name":"OH_AudioSessionManager_UnregisterSessionDeactivatedCallback" }, { - "first_introduced": "12", + "first_introduced": "20", "name":"OH_AudioSessionManager_SetScene" }, { - "first_introduced": "12", + "first_introduced": "20", "name":"OH_AudioSessionManager_RegisterStateChangeCallback" }, { - "first_introduced": "12", + "first_introduced": "20", "name":"OH_AudioSessionManager_UnregisterStateChangeCallback" }, { - "first_introduced": "12", + "first_introduced": "20", "name":"OH_AudioSessionManager_SetDefaultOutputDevice" }, { - "first_introduced": "12", + "first_introduced": "20", "name":"OH_AudioSessionManager_GetDefaultOutputDevice" }, { - "first_introduced": "12", + "first_introduced": "20", "name":"OH_AudioSessionManager_ReleaseDevices" }, { - "first_introduced": "12", + "first_introduced": "20", "name":"OH_AudioSessionManager_RegisterCurrentOutputDeviceChangeCallback" }, { - "first_introduced": "12", + "first_introduced": "20", "name":"OH_AudioSessionManager_UnregisterCurrentOutputDeviceChangeCallback" }, { -- Gitee From b4a815169bc508563ed38b120ce2e58b163856b6 Mon Sep 17 00:00:00 2001 From: wujinhui Date: Tue, 26 Aug 2025 12:02:40 +0800 Subject: [PATCH 36/95] add new func OH_ArkUI_NativeModule_InvalidateAttributes Signed-off-by: wujinhui --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/native_node.h | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index d75a5bc6bfe..a741af70523 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1559,6 +1559,10 @@ "first_introduced": "18", "name": "OH_ArkUI_NodeUtils_MoveTo" }, + { + "first_introduced": "21", + "name": "OH_ArkUI_NativeModule_InvalidateAttributes" + }, { "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_SetCrossLanguageOption" diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 788f8045470..df32a038e63 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9897,6 +9897,21 @@ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeH */ int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target_parent, int32_t index); +/** + * @brief Triggers node updates in the current frame. + * When node attributes are modified after the current frame's build phase (i.e., after + * the unified processing of dirty nodes), the node updates will be deferred to the next + * frame. This function forces immediate node updates within the current frame to + * ensure rendering effects are applied synchronously. + * + * @param node ArkUI_NodeHandle pointer. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} Success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * @since 21 + */ +int32_t OH_ArkUI_NativeModule_InvalidateAttributes(ArkUI_NodeHandle node); + /** * @brief Set the cross-language option of the target node handle. * -- Gitee From 07ac20967cfd85ad625940c017825c7c1a5f727b Mon Sep 17 00:00:00 2001 From: yuhaoqiang Date: Thu, 14 Aug 2025 16:50:09 +0800 Subject: [PATCH 37/95] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I418faeaad02eaefecf92c304c5c08c55c0cfd390 Signed-off-by: yuhaoqiang --- hiviewdfx/hidebug/include/hidebug/hidebug.h | 6 +++--- hiviewdfx/hidebug/include/hidebug/hidebug_type.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug.h b/hiviewdfx/hidebug/include/hidebug/hidebug.h index 05e4f24d1cd..242377c99be 100644 --- a/hiviewdfx/hidebug/include/hidebug/hidebug.h +++ b/hiviewdfx/hidebug/include/hidebug/hidebug.h @@ -247,9 +247,9 @@ HiDebug_Backtrace_Object OH_HiDebug_CreateBacktraceObject(void); void OH_HiDebug_DestroyBacktraceObject(HiDebug_Backtrace_Object object); /** - * @brief Create the graphics memory summary of application. + * @brief Obtain the graphics memory summary of application. * - * @param interval If the cache of graphics memory is older than interval (unit: second), than the latest + * @param interval If the cache of graphics memory is longer than interval (unit: second), the latest * graphics memory data will be obtained. The interval value range is 2 seconds to * 3600 seconds, If interval is an invalid value, the default value is 300 seconds. * @param summary Indicates value of graphics memory summary, in kibibytes. @@ -259,7 +259,7 @@ void OH_HiDebug_DestroyBacktraceObject(HiDebug_Backtrace_Object object); * {@link HIDEBUG_TRACE_ABNORMAL} Failed to get the application memory due to a remote exception. * @since 21 */ -HiDebug_ErrorCode OH_HiDebug_GetGraphicsMemorySummary(uint32_t interval, GraphicsMemorySummary *summary); +HiDebug_ErrorCode OH_HiDebug_GetGraphicsMemorySummary(uint32_t interval, HiDebug_GraphicsMemorySummary *summary); #ifdef __cplusplus } diff --git a/hiviewdfx/hidebug/include/hidebug/hidebug_type.h b/hiviewdfx/hidebug/include/hidebug/hidebug_type.h index 018e5e9c5e0..ce767a08e14 100644 --- a/hiviewdfx/hidebug/include/hidebug/hidebug_type.h +++ b/hiviewdfx/hidebug/include/hidebug/hidebug_type.h @@ -318,7 +318,7 @@ typedef struct HiDebug_Backtrace_Object__* HiDebug_Backtrace_Object; * * @since 21 */ -typedef struct GraphicsMemorySummary { +typedef struct HiDebug_GraphicsMemorySummary { /** * GL memory */ @@ -328,7 +328,7 @@ typedef struct GraphicsMemorySummary { * graph memory */ uint32_t graph; -} GraphicsMemorySummary; +} HiDebug_GraphicsMemorySummary; #ifdef __cplusplus } -- Gitee From c0cf0dc2d17e0f43f1f83fd9735a7405dba76319 Mon Sep 17 00:00:00 2001 From: zhengyutao Date: Tue, 26 Aug 2025 06:21:58 +0000 Subject: [PATCH 38/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9DidFailWithErrorV2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhengyutao --- web/webview/interfaces/native/arkweb_scheme_handler.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/webview/interfaces/native/arkweb_scheme_handler.h b/web/webview/interfaces/native/arkweb_scheme_handler.h index ead91cb02d6..d0232f3c349 100644 --- a/web/webview/interfaces/native/arkweb_scheme_handler.h +++ b/web/webview/interfaces/native/arkweb_scheme_handler.h @@ -1024,8 +1024,7 @@ int32_t OH_ArkWebResourceHandler_DidFailWithError(const ArkWeb_ResourceHandler* * if DidReceiveResponse has not been called, * a response is automatically constructed and the current request is terminated. * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param, the errorCode is either ARKWEB_NET_OK - * or outside the range of error codes in ArkWeb_NetError. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param, the resourceHandler is nullptr. * @since 20 */ int32_t OH_ArkWebResourceHandler_DidFailWithErrorV2(const ArkWeb_ResourceHandler* resourceHandler, -- Gitee From 92d407f26227c6af6d8cf772f4d59f58d15095a4 Mon Sep 17 00:00:00 2001 From: Shi Bofan Date: Tue, 19 Aug 2025 21:01:33 +0800 Subject: [PATCH 39/95] capi: layoutPolicy & position_edges Signed-off-by: Shi Bofan --- arkui/ace_engine/native/libace.ndk.json | 44 ++++++++ arkui/ace_engine/native/native_node.h | 47 +++++++++ arkui/ace_engine/native/native_type.h | 133 ++++++++++++++++++++++++ 3 files changed, 224 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index d75a5bc6bfe..b0acf00b2fd 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -4070,5 +4070,49 @@ { "first_introduced": "21", "name": "OH_ArkUI_NativeModule_UnregisterCommonEvent" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_Create" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_Copy" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_Dispose" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_SetTop" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_GetTop" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_SetLeft" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_GetLeft" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_SetBottom" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_GetBottom" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_SetRight" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_PositionEdges_GetRight" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 788f8045470..04a4f7d089a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1999,6 +1999,53 @@ typedef enum { */ NODE_ROTATE_ANGLE = 104, + /** + * @brief Defines the width attribute with param type LayoutPolicy, which 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: the LayoutPolicy that the width of the component follows.\n + * The parameter type is {@link ArkUI_LayoutPolicy}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: the LayoutPolicy that the width of the component follows.\n + * The parameter type is {@link ArkUI_LayoutPolicy}. \n + * + * @since 21 + */ + NODE_WIDTH_LAYOUTPOLICY = 105, + + /** + * @brief Defines the height attribute with param type LayoutPolicy, which 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: the LayoutPolicy that the height of the component follows.\n + * The parameter type is {@link ArkUI_LayoutPolicy}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: the LayoutPolicy that the height of the component follows.\n + * The parameter type is {@link ArkUI_LayoutPolicy}. \n + * + * @since 21 + */ + NODE_HEIGHT_LAYOUTPOLICY = 106, + + /** + * @brief Defines the position attribute in param type Edges, which specifies the position of the component + * by the distance relative to the parent container's four edges. This attribute can be set, reset, and obtained as + * required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .object indicates struct of edges for position. The parameter type is {@link ArkUI_PositionEdges}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object indicates struct of edges for position. The parameter type is {@link ArkUI_PositionEdges}. \n + * + * @since 21 + */ + NODE_POSITION_EDGES = 107, + /** * @brief Defines the text content attribute, which 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 f7b72cc37d0..25626e7d1e5 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -256,6 +256,13 @@ typedef struct AbilityBase_Want AbilityBase_Want; */ typedef struct ArkUI_EmbeddedComponentOption ArkUI_EmbeddedComponentOption; +/** + * @brief Define the Edges describing the position of a component by distances to the container's four edges. + * + * @since 21 + */ +typedef struct ArkUI_PositionEdges ArkUI_PositionEdges; + /** * @brief Defines the event callback type. * @@ -2818,6 +2825,23 @@ typedef enum { ARKUI_CORNER_DIRECTION_BOTTOM_RIGHT, } ArkUI_CornerDirection; +/** + * @brief Enumerates the LayoutPolicy. + * + * @since 21 + */ +typedef enum { + /** The component fills its parent, which means its size is as large as its parent */ + ARKUI_LAYOUTPOLICY_MATCHPARENT = 0, + /** + * The component fills its content, which means its size is as large as its children but it is constrained + * by its parent. + */ + ARKUI_LAYOUTPOLICY_WRAPCONTENT, + /** The component fills its content which means its size is as large as its children. */ + ARKUI_LAYOUTPOLICY_FIXATIDEALSIZE, +} ArkUI_LayoutPolicy; + /** * @brief Defines parameter used by the system font style callback event. * @@ -5394,6 +5418,115 @@ void OH_ArkUI_EmbeddedComponentOption_SetOnError( */ void OH_ArkUI_EmbeddedComponentOption_SetOnTerminated( ArkUI_EmbeddedComponentOption* option, void (*callback)(int32_t code, AbilityBase_Want* want)); + +/** + * @brief Create an edge object for position attribute. + * + * @return A pointer to the edge object. + * @since 21 + */ +ArkUI_PositionEdges* OH_ArkUI_PositionEdges_Create(); + +/** + * @brief Creates a deep copy of an edge object for position attribute. + * + * @param edges A pointer to an edge object. + * @return A pointer to the new edge object. + * @since 21 + */ +ArkUI_PositionEdges* OH_ArkUI_PositionEdges_Copy(const ArkUI_PositionEdges* edges); + +/** + * @brief Dispose an edge object for position attribute. + * + * @param edges Pointer to the edge object to be disposed. + * @since 21 + */ +void OH_ArkUI_PositionEdges_Dispose(ArkUI_PositionEdges* edges); + +/** + * @brief Sets the top edge of an edge object for position attribute. + * + * @param edges Pointer to the edge object. + * @param value The distance of top edge to the corresponding edge of parent container, in vp. + * @since 21 + */ +void OH_ArkUI_PositionEdges_SetTop(ArkUI_PositionEdges* edges, float value); + +/** + * @brief Gets the top edge of an edge object for position attribute. + * + * @param edges Pointer to the edge object. + * @param value The distance of top edge to the corresponding edge of parent container, in vp. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the parameter is invalid. + * @since 21 + */ +int32_t OH_ArkUI_PositionEdges_GetTop(ArkUI_PositionEdges* edges, float* value); + +/** + * @brief Sets the left edge of an edge object for position attribute. + * + * @param edges Pointer to the edge object. + * @param value The distance of left edge to the corresponding edge of parent container, in vp. + * @since 21 + */ +void OH_ArkUI_PositionEdges_SetLeft(ArkUI_PositionEdges* edges, float value); + +/** + * @brief Gets the left edge of an edge object for position attribute. + * + * @param edges Pointer to the edge object. + * @param value The distance of left edge to the corresponding edge of parent container, in vp. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the parameter is invalid. + * @since 21 + */ +int32_t OH_ArkUI_PositionEdges_GetLeft(ArkUI_PositionEdges* edges, float* value); + +/** + * @brief Sets the bottom edge of an edge object for position attribute. + * + * @param edges Pointer to the edge object. + * @param value The distance of bottom edge to the corresponding edge of parent container, in vp. + * @since 21 + */ +void OH_ArkUI_PositionEdges_SetBottom(ArkUI_PositionEdges* edges, float value); + +/** + * @brief Gets the bottom edge of an edge object for position attribute. + * + * @param edges Pointer to the edge object. + * @param value The distance of bottom edge to the corresponding edge of parent container, in vp. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the parameter is invalid. + * @since 21 + */ +int32_t OH_ArkUI_PositionEdges_GetBottom(ArkUI_PositionEdges* edges, float* value); + +/** + * @brief Sets the right edge of an edge object for position attribute. + * + * @param edges Pointer to the edge object. + * @param value The distance of right edge to the corresponding edge of parent container, in vp. + * @since 21 + */ +void OH_ArkUI_PositionEdges_SetRight(ArkUI_PositionEdges* edges, float value); + +/** + * @brief Gets the right edge of an edge object for position attribute. + * + * @param edges Pointer to the edge object. + * @param value The distance of right edge to the corresponding edge of parent container, in vp. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the parameter is invalid. + * @since 21 + */ +int32_t OH_ArkUI_PositionEdges_GetRight(ArkUI_PositionEdges* edges, float* value); #ifdef __cplusplus }; #endif -- Gitee From eb4a6cbc469f576dadedc9f5c649302d3312376e Mon Sep 17 00:00:00 2001 From: fangzhiyuan Date: Tue, 26 Aug 2025 14:59:18 +0800 Subject: [PATCH 40/95] =?UTF-8?q?=E4=BF=AE=E5=A4=8DonSizeChange=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B3=A8=E9=87=8A=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fangzhiyuan --- arkui/ace_engine/native/native_node.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 788f8045470..9d38bfadc46 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7318,12 +7318,17 @@ typedef enum { /** * @brief Defines the size change event. - * + * * The event will be triggered when the component size changes. - * When the event callback occurs, the {@link ArkUI_NodeEvent} object can be obtained from the - * {@link ArkUI_UIInputEvent} object. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. + * {@link ArkUI_NodeComponentEvent} contains four parameters: + * ArkUI_NodeComponentEvent.data[0].f32: the width of the old rectangle. + * ArkUI_NodeComponentEvent.data[1].f32: the height of the old rectangle. + * ArkUI_NodeComponentEvent.data[2].f32: the width of the old rectangle. + * ArkUI_NodeComponentEvent.data[3].f32: the height of the old rectangle. * @since 21 - */ + */ NODE_ON_SIZE_CHANGE = 30, /** -- Gitee From fe6bd46a06e6f0aaa404331121858792172930ba Mon Sep 17 00:00:00 2001 From: fangzhiyuan Date: Tue, 26 Aug 2025 16:59:44 +0800 Subject: [PATCH 41/95] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drender=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fangzhiyuan --- arkui/ace_engine/native/native_render.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arkui/ace_engine/native/native_render.h b/arkui/ace_engine/native/native_render.h index a0ab9902a81..d6ea4b1c332 100644 --- a/arkui/ace_engine/native/native_render.h +++ b/arkui/ace_engine/native/native_render.h @@ -1490,14 +1490,12 @@ void OH_ArkUI_RenderNodeUtils_DisposeRectShapeOption(ArkUI_RectShapeOption* opti * @brief Set the edge value of RectShape option. * * @param option Pointer to the RectShape option. - * @param top The top value of the RectShape. - * @param right The right value of the RectShape. - * @param bottom The bottom value of the RectShape. - * @param left The left value of the RectShape. + * @param edgeValue The edge value of the RectShape. + * @param direction {@Link ArkUI_EdgeDirection} The direction of the edge. * @since 20 */ void OH_ArkUI_RenderNodeUtils_SetRectShapeOptionEdgeValue( - ArkUI_RectShapeOption* option, float top, float right, float bottom, float left); + ArkUI_RectShapeOption* option, float edgeValue, ArkUI_EdgeDirection direction); /** * @brief Create a NodeBorderStyle option. @@ -1670,14 +1668,12 @@ void OH_ArkUI_RenderNodeUtils_DisposeRoundRectShapeOption(ArkUI_RoundRectShapeOp * @brief Set the edge value of RoundRectShape option. * * @param option Pointer to the RoundRectShape option. - * @param top The top value of the RoundRectShape. - * @param right The right value of the RoundRectShape. - * @param bottom The bottom value of the RoundRectShape. - * @param left The left value of the RoundRectShape. + * @param edgeValue The edge value of the RoundRectShape. + * @param direction {@Link ArkUI_EdgeDirection} The direction of the edge. * @since 20 */ void OH_ArkUI_RenderNodeUtils_SetRoundRectShapeOptionEdgeValue( - ArkUI_RoundRectShapeOption* option, float top, float right, float bottom, float left); + ArkUI_RoundRectShapeOption* option, float edgeValue, ArkUI_EdgeDirection direction); /** * @brief Set the coordinate value of the target corner. -- Gitee From 280056cd2eb5a913f9b1363269c8871e7c2474f6 Mon Sep 17 00:00:00 2001 From: sty28558 Date: Tue, 26 Aug 2025 17:04:59 +0800 Subject: [PATCH 42/95] =?UTF-8?q?=E8=93=9D=E9=BB=84=E5=90=8C=E6=AD=A5nativ?= =?UTF-8?q?=5Fchild=5Fprocess.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sty28558 --- .../child_process/native_child_process.h | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/ability/ability_runtime/child_process/native_child_process.h b/ability/ability_runtime/child_process/native_child_process.h index ce59adf740b..796b7920568 100644 --- a/ability/ability_runtime/child_process/native_child_process.h +++ b/ability/ability_runtime/child_process/native_child_process.h @@ -152,13 +152,13 @@ typedef struct Ability_ChildProcessConfigs Ability_ChildProcessConfigs; Ability_ChildProcessConfigs* OH_Ability_CreateChildProcessConfigs(); /** - * @brief Destroys a child process configs object and releases associated rescources. + * @brief Destroys a child process configs object and releases associated resources. * * @param configs Pointer to the child process configs object to be destroyed. * After this call, the pointer becomes invalid and must not be used. * Passing nullptr is allowed and will be ignored. * @return Returns {@link NCP_NO_ERROR} if the operation is successful or if the input is nullptr. - * Returns {@link NCP_NO_ERR_INVALID_PARAM} if the input parameters are invalid. + * Returns {@link NCP_ERR_INVALID_PARAM} if the input parameters are invalid. * @since 20 */ Ability_NativeChildProcess_ErrCode OH_Ability_DestroyChildProcessConfigs(Ability_ChildProcessConfigs* configs); @@ -169,8 +169,8 @@ Ability_NativeChildProcess_ErrCode OH_Ability_DestroyChildProcessConfigs(Ability * * @param configs Pointer to the child process configs object. Must not be nullptr. * @param isolationMode The isolation mode to set. See {@link NativeChildProcess_IsolationMode} for details. - * @return Returns {@link NCP_NO_ERROR} if the isolation mode is set successful. - * Returns {@link NCP_NO_ERR_INVALID_PARAM} if the input parameters are invalid. + * @return Returns {@link NCP_NO_ERROR} if the isolation mode is set successfully. + * Returns {@link NCP_ERR_INVALID_PARAM} if the input parameters are invalid. * @since 20 */ Ability_NativeChildProcess_ErrCode OH_Ability_ChildProcessConfigs_SetIsolationMode( @@ -184,8 +184,8 @@ Ability_NativeChildProcess_ErrCode OH_Ability_ChildProcessConfigs_SetIsolationMo * Must be a non-empty string containing only letters, digits, or underscores. * Maximum length is 64 characters. * The name ultimately assigned to the process is {bundleName}:{processName}. - * @return Returns {@link NCP_NO_ERROR} if the process name is set successful. - * Returns {@link NCP_NO_ERR_INVALID_PARAM} if the input parameters are invalid. + * @return Returns {@link NCP_NO_ERROR} if the process name is set successfully. + * Returns {@link NCP_ERR_INVALID_PARAM} if the input parameters are invalid. * @since 20 */ Ability_NativeChildProcess_ErrCode OH_Ability_ChildProcessConfigs_SetProcessName(Ability_ChildProcessConfigs* configs, @@ -426,7 +426,7 @@ Ability_NativeChildProcess_ErrCode OH_Ability_StartNativeChildProcessWithConfigs NativeChildProcess_Args* OH_Ability_GetCurrentChildProcessArgs(); /** - * @brief Define a callback function to handle the exit of a native child process. + * @brief Defines a callback function to handle the exit of a native child process. * * @param pid The pid of the exited native child process. * @param signal The signal of the exited native child process. @@ -434,14 +434,13 @@ NativeChildProcess_Args* OH_Ability_GetCurrentChildProcessArgs(); */ typedef void (*OH_Ability_OnNativeChildProcessExit)(int32_t pid, int32_t signal); -/** + /** * @brief Register a native child process exit callback. * Registering the same callback repeatedly will only keep one. * * @param onProcessExit Pointer to the callback function to handle the exit of a native child process. * For details, see {@link OH_Ability_OnNativeChildProcessExit}. * @return Returns {@link NCP_NO_ERROR} if the call is successful. - * Returns {@link NCP_ERR_INVALID_PARAM} if the param is invalid. * Returns {@link NCP_ERR_INTERNAL} if internal error occurs. * For details, see {@link Ability_NativeChildProcess_ErrCode}. * @since 20 @@ -449,13 +448,12 @@ typedef void (*OH_Ability_OnNativeChildProcessExit)(int32_t pid, int32_t signal) Ability_NativeChildProcess_ErrCode OH_Ability_RegisterNativeChildProcessExitCallback( OH_Ability_OnNativeChildProcessExit onProcessExit); -/** + /** * @brief Unregister a native child process exit callback. * * @param onProcessExit Pointer to the callback function to handle the exit of a native child process. * For details, see {@link OH_Ability_OnNativeChildProcessExit}. * @return Returns {@link NCP_NO_ERROR} if the call is successful. - * Returns {@link NCP_ERR_INVALID_PARAM} if the param is invalid. * Returns {@link NCP_ERR_INTERNAL} if internal error occurs. * Returns {@link NCP_ERR_CALLBACK_NOT_EXIST} if the callback is not exist. * For details, see {@link Ability_NativeChildProcess_ErrCode}. -- Gitee From 2d36bcfa6f5c7fb160647f7d778c3aa3d8b6b23a Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Mon, 25 Aug 2025 19:25:23 +0800 Subject: [PATCH 43/95] Attribute partitioning Signed-off-by: FTL1ght Change-Id: Icb8507f2e42aeca8a7f4d0065481c738aea0f5a1 --- .../native_drawing/drawing_text_typography.h | 47 ++++++++++--------- .../native_drawing/libnative_drawing.ndk.json | 32 +++++++++++++ 2 files changed, 58 insertions(+), 21 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 4635826e802..d707b7ac9b7 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -589,15 +589,13 @@ typedef enum OH_Drawing_FontWidth { */ typedef enum OH_Drawing_TextStyleAttributeId { /** Line height maximum */ - TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 0, + TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 100, /** Line height minimum */ - TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 1, - /** Line spacing */ - TEXT_STYLE_ATTR_D_LINE_SPACING = 2, + TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 101, /** Line height style */ - TEXT_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 3, + TEXT_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 102, /** Font width */ - TEXT_STYLE_ATTR_I_FONT_WIDTH = 4, + TEXT_STYLE_ATTR_I_FONT_WIDTH = 103, } OH_Drawing_TextStyleAttributeId; /** @@ -605,7 +603,7 @@ typedef enum OH_Drawing_TextStyleAttributeId { * * @since 21 */ -typedef enum OH_Drawing_LineHeightStyle{ +typedef enum OH_Drawing_LineHeightStyle { /** Use the font size as the scale factor for line height scaling */ TEXT_LINE_HEIGHT_BY_FONT_SIZE = 0, /** Use the text height after shaping as the scale factor for line height scaling */ @@ -619,15 +617,15 @@ typedef enum OH_Drawing_LineHeightStyle{ */ typedef enum OH_Drawing_TypographyStyleAttributeId { /** Line height maximum */ - TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 0, + TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 300, /** Line height minimum */ - TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 1, + TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 301, /** Line spacing */ - TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING = 2, + TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING = 302, /** Line height style */ - TYPOGRAPHY_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 3, + TYPOGRAPHY_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 303, /** Font width */ - TYPOGRAPHY_STYLE_ATTR_I_FONT_WIDTH = 4, + TYPOGRAPHY_STYLE_ATTR_I_FONT_WIDTH = 304, } OH_Drawing_TypographyStyleAttributeId; /** @@ -640,7 +638,8 @@ typedef enum OH_Drawing_TypographyStyleAttributeId { * @return Returns interface call status. * @since 21 */ -int OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, double value); +int OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, + OH_Drawing_TextStyleAttributeId id, double value); /** * @brief Gets the double type property's value from the text style. @@ -652,7 +651,8 @@ int OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, OH_Drawi * @return Returns interface call status. * @since 21 */ -int OH_Drawing_GetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, double* value); +int OH_Drawing_GetTextStyleAttributeDouble(const OH_Drawing_TextStyle* style, + OH_Drawing_TextStyleAttributeId id, double* value); /** * @brief Sets int value to the text style attribute. @@ -664,7 +664,8 @@ int OH_Drawing_GetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, OH_Drawi * @return Returns interface call status. * @since 21 */ -int OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, int value); +int OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* style, + OH_Drawing_TextStyleAttributeId id, int value); /** * @brief Gets the int type property's value from the text style. @@ -676,7 +677,8 @@ int OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* style, OH_Drawing_ * @return Returns interface call status. * @since 21 */ -int OH_Drawing_GetTextStyleAttributeInt(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, int* value); +int OH_Drawing_GetTextStyleAttributeInt(const OH_Drawing_TextStyle* style, + OH_Drawing_TextStyleAttributeId id, int* value); /** * @brief Sets double value to the typography style attribute. @@ -688,7 +690,8 @@ int OH_Drawing_GetTextStyleAttributeInt(OH_Drawing_TextStyle* style, OH_Drawing_ * @return Returns interface call status. * @since 21 */ -int OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, double value); +int OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* style, + OH_Drawing_TypographyStyleAttributeId id, double value); /** * @brief Gets the double type property's value from the typography style. @@ -700,7 +703,8 @@ int OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* sty * @return Returns interface call status. * @since 21 */ -int OH_Drawing_GetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, double* value); +int OH_Drawing_GetTypographyStyleAttributeDouble(const OH_Drawing_TypographyStyle* style, + OH_Drawing_TypographyStyleAttributeId id, double* value); /** * @brief Sets int value to the typography style attribute. @@ -712,7 +716,8 @@ int OH_Drawing_GetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* sty * @return Returns interface call status. * @since 21 */ -int OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, int value); +int OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, + OH_Drawing_TypographyStyleAttributeId id, int value); /** * @brief Gets the int type property's value from the typography style. @@ -724,8 +729,8 @@ int OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, * @return Returns interface call status. * @since 21 */ -int OH_Drawing_GetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, int* value); - +int OH_Drawing_GetTypographyStyleAttributeInt(const OH_Drawing_TypographyStyle* style, + OH_Drawing_TypographyStyleAttributeId id, int* value); /** * @brief Type of badge. diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 7472ebb0798..dd7a4376023 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -2037,5 +2037,37 @@ { "first_introduced": "20", "name": "OH_Drawing_FontFeaturesDestroy" + }, + { + "first_introduced": "21", + "name": "OH_Drawing_SetTextStyleAttributeDouble" + }, + { + "first_introduced": "21", + "name": "OH_Drawing_GetTextStyleAttributeDouble" + }, + { + "first_introduced": "21", + "name": "OH_Drawing_SetTextStyleAttributeInt" + }, + { + "first_introduced": "21", + "name": "OH_Drawing_GetTextStyleAttributeInt" + }, + { + "first_introduced": "21", + "name": "OH_Drawing_SetTypographyStyleAttributeDouble" + }, + { + "first_introduced": "21", + "name": "OH_Drawing_GetTypographyStyleAttributeDouble" + }, + { + "first_introduced": "21", + "name": "OH_Drawing_SetTypographyStyleAttributeInt" + }, + { + "first_introduced": "21", + "name": "OH_Drawing_GetTypographyStyleAttributeInt" } ] \ No newline at end of file -- Gitee From ea1ed8a663d126f3c3170a9ec81fefa33bc1622b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=9C=E7=A7=8B=E5=AE=8F?= Date: Tue, 26 Aug 2025 21:20:29 +0800 Subject: [PATCH 44/95] =?UTF-8?q?CAPI=E6=94=AF=E6=8C=81backgroundImagePosi?= =?UTF-8?q?tion=E5=AF=B9=E9=BD=90=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 潜秋宏 Change-Id: I1a338d64df007f3be5c1f6d6431992b84dede981 --- arkui/ace_engine/native/native_node.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index c1458a02f89..5abb2ea5d4e 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1242,11 +1242,19 @@ typedef enum { * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .value[0].f32: position along the x-axis, in px. \n * .value[1].f32: position along the y-axis, in px. \n - * \n + * .value[2].?i32: the alignment mode. The data type is {@link ArkUI_Alignment}. + * The default value is ARKUI_ALIGNMENT_TOP_START. \n + * .value[3].?i32: the direction. The type is {@link ArkUI_Direction}. + * The default value is ARKUI_DIRECTION_AUTO. \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .value[0].f32: position along the x-axis, in px. \n * .value[1].f32: position along the y-axis, in px. \n + * .value[2].i32: the alignment mode. The data type is {@link ArkUI_Alignment}. + * The default value is ARKUI_ALIGNMENT_TOP_START. \n + * .value[3].i32: the direction. The type is {@link ArkUI_Direction}. + * The default value is ARKUI_DIRECTION_AUTO. \n * + * @since 21 */ NODE_BACKGROUND_IMAGE_POSITION, /** -- Gitee From f0f76e81bd0f66445b55fc4ae101fea03317fa20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=9E=97=E8=82=AF?= Date: Wed, 27 Aug 2025 01:57:44 +0000 Subject: [PATCH 45/95] update arkui/ace_engine/native/native_node.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹林肯 --- arkui/ace_engine/native/native_node.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 9d38bfadc46..22da7f65fe0 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7325,8 +7325,8 @@ typedef enum { * {@link ArkUI_NodeComponentEvent} contains four parameters: * ArkUI_NodeComponentEvent.data[0].f32: the width of the old rectangle. * ArkUI_NodeComponentEvent.data[1].f32: the height of the old rectangle. - * ArkUI_NodeComponentEvent.data[2].f32: the width of the old rectangle. - * ArkUI_NodeComponentEvent.data[3].f32: the height of the old rectangle. + * ArkUI_NodeComponentEvent.data[2].f32: the width of the new rectangle. + * ArkUI_NodeComponentEvent.data[3].f32: the height of the new rectangle. * @since 21 */ NODE_ON_SIZE_CHANGE = 30, -- Gitee From 52a44a3463d6abe54a1918b4107980c903689eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Wed, 27 Aug 2025 11:06:51 +0800 Subject: [PATCH 46/95] =?UTF-8?q?0827=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 6184119734c..19d2de52939 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -292,7 +292,7 @@ int32_t OH_WindowManager_InjectTouchEvent( /** * @brief Get all main window info on device. * - * @permission {@code ohos.permission.CUSTOM_SCREEN_CAPTURE} + * @permission ohos.permission.CUSTOM_SCREEN_CAPTURE * @param infoList Indicates the pointer to a main window info list. * @param mainWindowInfoSize The size of main window info list. * @return Returns the status code of the execution. @@ -319,14 +319,14 @@ void OH_WindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInfo* inf * @param snapshotPixelMapList List of windows' snapshot * @param snapshotListSize Size of snapshotPixelMapList * @since 21 - */ -typedef void (*OH_WindowManager_WindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, + */ +typedef struct (*OH_WindowManager_WindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, size_t snapshotListSize); /** * @brief Get snapshot of the specified windows. * - * @permission {@code ohos.permission.CUSTOM_SCREEN_CAPTURE} + * @permission ohos.permission.CUSTOM_SCREEN_CAPTURE * @param windowIdList Main window id list for getting snapshot. * @param windowIdListSize Size of main window id list. * @param config Configuration for getting snapshot. -- Gitee From d3bcc582c865c96068079757f78201995bd14d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Wed, 27 Aug 2025 11:28:35 +0800 Subject: [PATCH 47/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=AE=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 4 ++-- arkui/window_manager/oh_window_comm.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 19d2de52939..6bd58b82a03 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -320,13 +320,13 @@ void OH_WindowManager_ReleaseAllMainWindowInfo(WindowManager_MainWindowInfo* inf * @param snapshotListSize Size of snapshotPixelMapList * @since 21 */ -typedef struct (*OH_WindowManager_WindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, +typedef void (*OH_WindowManager_WindowSnapshotCallback)(const OH_PixelmapNative* snapshotPixelMapList, size_t snapshotListSize); /** * @brief Get snapshot of the specified windows. * - * @permission ohos.permission.CUSTOM_SCREEN_CAPTURE + * @permission @code ohos.permission.CUSTOM_SCREEN_CAPTURE * @param windowIdList Main window id list for getting snapshot. * @param windowIdListSize Size of main window id list. * @param config Configuration for getting snapshot. diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index ad05a16950f..46be3abab20 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -238,7 +238,7 @@ typedef struct { /** Display id of the window. */ uint64_t displayId; /** Window id. */ - int32_t windowId; + int32_t windowId;; /** Showing state of the window. */ bool showing; /** Label of the window. */ -- Gitee From 6aa6fa4f2e8eb3d37931b07a9ff5c2221d814b94 Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Wed, 27 Aug 2025 16:49:47 +0800 Subject: [PATCH 48/95] Format error code Signed-off-by: FTL1ght Change-Id: I7a1570f54c494feae7be2a162f9593e6ac6135fc --- .../native_drawing/drawing_text_typography.h | 72 ++++++++++++++----- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index d707b7ac9b7..810a0e0d837 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -635,10 +635,15 @@ typedef enum OH_Drawing_TypographyStyleAttributeId { * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param id Indicates the attribute id. * @param value Indicates the value to set. - * @return Returns interface call status. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr. + * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. + * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id + * exceeds the allowable range. * @since 21 */ -int OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, +OH_Drawing_ErrorCode OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, double value); /** @@ -648,10 +653,15 @@ int OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param id Indicates the attribute id. * @param value Indicates the return value of the interface. - * @return Returns interface call status. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. + * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. + * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id + * exceeds the allowable range. * @since 21 */ -int OH_Drawing_GetTextStyleAttributeDouble(const OH_Drawing_TextStyle* style, +OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeDouble(const OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, double* value); /** @@ -661,10 +671,15 @@ int OH_Drawing_GetTextStyleAttributeDouble(const OH_Drawing_TextStyle* style, * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param id Indicates the attribute id. * @param value Indicates the value to set. - * @return Returns interface call status. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr. + * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. + * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id + * exceeds the allowable range. * @since 21 */ -int OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* style, +OH_Drawing_ErrorCode OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, int value); /** @@ -674,10 +689,15 @@ int OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* style, * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param id Indicates the attribute id. * @param value Indicates the return value of the interface. - * @return Returns interface call status. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. + * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. + * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id + * exceeds the allowable range. * @since 21 */ -int OH_Drawing_GetTextStyleAttributeInt(const OH_Drawing_TextStyle* style, +OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeInt(const OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, int* value); /** @@ -687,10 +707,15 @@ int OH_Drawing_GetTextStyleAttributeInt(const OH_Drawing_TextStyle* style, * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param id Indicates the attribute id. * @param value Indicates the value to set. - * @return Returns interface call status. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr. + * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. + * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id + * exceeds the allowable range. * @since 21 */ -int OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* style, +OH_Drawing_ErrorCode OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, double value); /** @@ -700,10 +725,15 @@ int OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* sty * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param id Indicates the attribute id. * @param value Indicates the return value of the interface. - * @return Returns interface call status. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. + * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. + * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id + * exceeds the allowable range. * @since 21 */ -int OH_Drawing_GetTypographyStyleAttributeDouble(const OH_Drawing_TypographyStyle* style, +OH_Drawing_ErrorCode OH_Drawing_GetTypographyStyleAttributeDouble(const OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, double* value); /** @@ -713,10 +743,15 @@ int OH_Drawing_GetTypographyStyleAttributeDouble(const OH_Drawing_TypographyStyl * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param id Indicates the attribute id. * @param value Indicates the value to set. - * @return Returns interface call status. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr. + * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. + * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id + * exceeds the allowable range. * @since 21 */ -int OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, +OH_Drawing_ErrorCode OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, int value); /** @@ -726,10 +761,15 @@ int OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param id Indicates the attribute id. * @param value Indicates the return value of the interface. - * @return Returns interface call status. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. + * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. + * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id + * exceeds the allowable range. * @since 21 */ -int OH_Drawing_GetTypographyStyleAttributeInt(const OH_Drawing_TypographyStyle* style, +OH_Drawing_ErrorCode OH_Drawing_GetTypographyStyleAttributeInt(const OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, int* value); /** -- Gitee From e4879478d0ad1ed7a2ff60e499881c8d4d0e0c74 Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Wed, 27 Aug 2025 17:18:57 +0800 Subject: [PATCH 49/95] Format enum Signed-off-by: FTL1ght Change-Id: Idccc05c8edcd4e497583954e316a24e1a5a57da5 --- .../native_drawing/drawing_text_typography.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 810a0e0d837..82586696640 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -589,13 +589,13 @@ typedef enum OH_Drawing_FontWidth { */ typedef enum OH_Drawing_TextStyleAttributeId { /** Line height maximum */ - TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 100, + TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 0, /** Line height minimum */ - TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 101, + TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 1, /** Line height style */ - TEXT_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 102, + TEXT_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 2, /** Font width */ - TEXT_STYLE_ATTR_I_FONT_WIDTH = 103, + TEXT_STYLE_ATTR_I_FONT_WIDTH = 3, } OH_Drawing_TextStyleAttributeId; /** @@ -617,15 +617,15 @@ typedef enum OH_Drawing_LineHeightStyle { */ typedef enum OH_Drawing_TypographyStyleAttributeId { /** Line height maximum */ - TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 300, + TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM = 0, /** Line height minimum */ - TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 301, + TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM = 1, /** Line spacing */ - TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING = 302, + TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING = 2, /** Line height style */ - TYPOGRAPHY_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 303, + TYPOGRAPHY_STYLE_ATTR_I_LINE_HEIGHT_STYLE = 3, /** Font width */ - TYPOGRAPHY_STYLE_ATTR_I_FONT_WIDTH = 304, + TYPOGRAPHY_STYLE_ATTR_I_FONT_WIDTH = 4, } OH_Drawing_TypographyStyleAttributeId; /** -- Gitee From ac0a512bb1d6c8599991baf80b25046392d41185 Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Wed, 27 Aug 2025 17:30:52 +0800 Subject: [PATCH 50/95] Add error code Signed-off-by: FTL1ght Change-Id: Ie8533f623f38b4f843c0bc6032b4f802e7058e16 --- graphic/graphic_2d/native_drawing/drawing_error_code.h | 5 +++++ graphic/graphic_2d/native_drawing/drawing_text_typography.h | 1 + 2 files changed, 6 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_error_code.h b/graphic/graphic_2d/native_drawing/drawing_error_code.h index 0c6e6e0c876..476e80bd962 100644 --- a/graphic/graphic_2d/native_drawing/drawing_error_code.h +++ b/graphic/graphic_2d/native_drawing/drawing_error_code.h @@ -70,6 +70,11 @@ typedef enum { * @since 13 */ OH_DRAWING_ERROR_ALLOCATION_FAILED = 26200002, + /** + * @error attribute id is not recognized or supported. + * @since 21 + */ + OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH = 26200003, } OH_Drawing_ErrorCode; /** diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 82586696640..14c83dcf7b0 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -48,6 +48,7 @@ #include #endif #include "drawing_canvas.h" +#include "drawing_error_code.h" #include "drawing_color.h" #include "drawing_font.h" #include "drawing_text_declaration.h" -- Gitee From 5f6802f18887c34ea738d72ad59c4608fcb7cc71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=9C=E7=A7=8B=E5=AE=8F?= Date: Wed, 27 Aug 2025 21:51:32 +0800 Subject: [PATCH 51/95] =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=80=A7=E4=BF=AE?= =?UTF-8?q?=E6=94=B902?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 潜秋宏 --- arkui/ace_engine/native/drag_and_drop.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arkui/ace_engine/native/drag_and_drop.h b/arkui/ace_engine/native/drag_and_drop.h index b484cafe18b..68865dfbdf7 100644 --- a/arkui/ace_engine/native/drag_and_drop.h +++ b/arkui/ace_engine/native/drag_and_drop.h @@ -467,8 +467,8 @@ float OH_ArkUI_DragEvent_GetVelocity(ArkUI_DragEvent* event); * @brief Obtains the pressed status of modifier keys from a drag event. * * @param event Indicates the pointer to an ArkUI_DragEvent object. - * @param keys {@link ArkUI_ModifierKeyName} Indicates the returned combination of modifier keys that are currently pressed. - * The application can determine the pressed modifier keys through bitwise operations. + * @param keys {@link ArkUI_ModifierKeyName} Indicates the returned combination of modifier keys that are + * currently pressed. The application can determine the pressed modifier keys through bitwise operations. * @return Returns the result code. * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. @@ -967,7 +967,6 @@ int32_t OH_ArkUI_NotifyDragEndPendingDone(int32_t requestIdentify); * to pass a character array for receiving the string and explicitly specify the array length. It is * recommended that the array length be no less than 128 characters. If the length cannot accommodate * the actual bundle name length, the ERROR result will be returned. - * * @param event Indicates the pointer to an ArkUI_DragEvent object. * @param bundleName A string array used to receive the source application's bundle name. * @param length Use this to explicitly specify the length of the incoming string array. -- Gitee From 04a02f7f8e33e84666e428c7dfbfdd45908c3ced Mon Sep 17 00:00:00 2001 From: wangyang2022 Date: Wed, 27 Aug 2025 14:10:41 +0000 Subject: [PATCH 52/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9sdk=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=20Signed-off-by:=20wangyang2022=20=20Change-Id:=20I6be2ed77669fcde03c3781b6cdb6b4025b696dd2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/ace_engine/native/libace.ndk.json | 6 +++--- arkui/ace_engine/native/native_interface.h | 2 +- arkui/ace_engine/native/native_node.h | 6 +++--- arkui/ace_engine/native/native_type.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 27725918d02..dc359a75005 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -4056,15 +4056,15 @@ "name": "OH_ArkUI_RenderNodeUtils_DisposeRenderNodeClipOption" }, { - "first_introduced": "20", + "first_introduced": "21", "name": "OH_ArkUI_PostAsyncUITask" }, { - "first_introduced": "20", + "first_introduced": "21", "name": "OH_ArkUI_PostUITask" }, { - "first_introduced": "20", + "first_introduced": "21", "name": "OH_ArkUI_PostUITaskAndWait" }, { diff --git a/arkui/ace_engine/native/native_interface.h b/arkui/ace_engine/native/native_interface.h index 4c340577951..0acd918d524 100644 --- a/arkui/ace_engine/native/native_interface.h +++ b/arkui/ace_engine/native/native_interface.h @@ -60,7 +60,7 @@ typedef enum { /** * API related to supported multi thread UI components. * For details, see the struct definition in . - * @since 20 + * @since 21 */ ARKUI_MULTI_THREAD_NATIVE_NODE, } ArkUI_NativeAPIVariantKind; diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 07456c72e7a..3aa771346e1 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -10180,7 +10180,7 @@ int32_t OH_ArkUI_SetForceDarkConfig(ArkUI_ContextHandle uiContext, bool forceDar * @return Returns the result code. * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if context or asyncUITask is nullptr. - * @since 20 + * @since 21 */ int32_t OH_ArkUI_PostAsyncUITask(ArkUI_ContextHandle context, void* asyncUITaskData, void (*asyncUITask)(void* asyncUITaskData), void (*onFinish)(void* asyncUITaskData)); @@ -10194,7 +10194,7 @@ int32_t OH_ArkUI_PostAsyncUITask(ArkUI_ContextHandle context, void* asyncUITaskD * @return Returns the result code. * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if context or task is nullptr. - * @since 20 + * @since 21 */ int32_t OH_ArkUI_PostUITask(ArkUI_ContextHandle context, void* taskData, void (*task)(void* taskData)); @@ -10207,7 +10207,7 @@ int32_t OH_ArkUI_PostUITask(ArkUI_ContextHandle context, void* taskData, void (* * @return Returns the result code. * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if context or task is nullptr. - * @since 20 + * @since 21 */ int32_t OH_ArkUI_PostUITaskAndWait(ArkUI_ContextHandle context, void* taskData, void (*task)(void* taskData)); diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 25626e7d1e5..92dc8f05d73 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2326,7 +2326,7 @@ typedef enum { ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE = 106203, /** * @error The node is running on invalid thread. - * @since 20 + * @since 21 */ ARKUI_ERROR_CODE_NODE_ON_INVALID_THREAD = 106204, /** -- Gitee From 248777297619b41967b8aea320f8c675923526d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=95=AC=E6=9D=BE?= <18328528985@163.com> Date: Tue, 26 Aug 2025 19:37:48 +0800 Subject: [PATCH 53/95] =?UTF-8?q?pip=E6=B3=A8=E9=87=8A=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周敬松 <18328528985@163.com> --- arkui/window_manager/oh_window_pip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/window_manager/oh_window_pip.h b/arkui/window_manager/oh_window_pip.h index dc16d176ead..6fd57bcaa63 100644 --- a/arkui/window_manager/oh_window_pip.h +++ b/arkui/window_manager/oh_window_pip.h @@ -358,7 +358,7 @@ int32_t OH_PictureInPicture_UpdatePipControlStatus(uint32_t controllerId, Pictur PictureInPicture_PipControlStatus status); /** - * @brief Set picture-in-picture controll enable status. + * @brief Set picture-in-picture control enable status. * * @param controllerId The picture-in-picture controller ID * @param controlType The picture-in-picture control type. -- Gitee From 62351fc2a33b1b038a1f6f10bcdb6bb5fe296eb4 Mon Sep 17 00:00:00 2001 From: zzz701 Date: Thu, 28 Aug 2025 10:30:10 +0800 Subject: [PATCH 54/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A3=80=E8=A7=86?= =?UTF-8?q?=E6=84=8F=E8=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zzz701 --- build-tools/clean_ndk_ani.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build-tools/clean_ndk_ani.py b/build-tools/clean_ndk_ani.py index 9249bc83fce..783bea743ac 100755 --- a/build-tools/clean_ndk_ani.py +++ b/build-tools/clean_ndk_ani.py @@ -82,7 +82,8 @@ def clean_ndk_ani_headers(ndk_header_path): process_header_file(file_path) -def clean_json__systemCapability_headers(capability_header_path): +# Clear the ani header file in the systemCapability configuration json file +def clean_json_systemCapability_headers(capability_header_path): try: with open(capability_header_path, 'r') as f: systemCapabilitys = json.load(f) @@ -94,7 +95,7 @@ def clean_json__systemCapability_headers(capability_header_path): for _systemCapability in systemCapabilitys: # filtering ani header file systemCapabilitys[_systemCapability] = [item for item in systemCapabilitys[_systemCapability] - if os.path.basename(item) not in _ANI_HEADER_LISTS] + if os.path.basename(item) not in _ANI_HEADER_LISTS] # Saving the modified JSON try: @@ -116,7 +117,7 @@ def main(): return clean_ndk_ani_headers(args.ndk_header_path) - clean_json__systemCapability_headers(args.system_capability_header_config) + clean_json_systemCapability_headers(args.system_capability_header_config) print("Ani Header file cleanup complete!") -- Gitee From fdbac5f0f7cf10f47800e08e91295872c99b81a3 Mon Sep 17 00:00:00 2001 From: lichaochen_huawei Date: Wed, 27 Aug 2025 15:37:08 +0800 Subject: [PATCH 55/95] =?UTF-8?q?=E7=AE=97=E6=B3=95=E5=BA=93capi=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=9A=8F=E6=9C=BA=E6=95=B0=E5=BC=80=E5=90=AF=E7=A1=AC?= =?UTF-8?q?=E4=BB=B6=E7=86=B5=E6=BA=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lichaochen_huawei --- CryptoArchitectureKit/crypto_rand.h | 13 +++++++++++++ CryptoArchitectureKit/libcrypto.ndk.json | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/CryptoArchitectureKit/crypto_rand.h b/CryptoArchitectureKit/crypto_rand.h index 1e9a4f8e017..a3b261c830a 100644 --- a/CryptoArchitectureKit/crypto_rand.h +++ b/CryptoArchitectureKit/crypto_rand.h @@ -98,6 +98,19 @@ const char *OH_CryptoRand_GetAlgoName(OH_CryptoRand *ctx); */ OH_Crypto_ErrCode OH_CryptoRand_SetSeed(OH_CryptoRand *ctx, Crypto_DataBlob *seed); +/** + * @brief Enables the hardware entropy source. + * + * @param ctx Indicates the random number generator context. + * @return {@link OH_Crypto_ErrCode#CRYPTO_SUCCESS} 0 - If the operation is successful. + * {@link OH_Crypto_ErrCode#CRYPTO_NOT_SUPPORTED} 801 - If the operation is not supported. + * {@link OH_Crypto_ErrCode#CRYPTO_MEMORY_ERROR} 17620001 - If memory operation failed. + * {@link OH_Crypto_ErrCode#CRYPTO_PARAMETER_CHECK_FAILED} 17620003 - If parameter check failed. + * {@link OH_Crypto_ErrCode#CRYPTO_OPERTION_ERROR} 17630001 - If crypto operation failed. + * @since 21 + */ +OH_Crypto_ErrCode OH_CryptoRand_EnableHardwareEntropy(OH_CryptoRand *ctx); + /** * @brief Destroys the random number generator context. * diff --git a/CryptoArchitectureKit/libcrypto.ndk.json b/CryptoArchitectureKit/libcrypto.ndk.json index 76e0508480c..81eb1be27b4 100644 --- a/CryptoArchitectureKit/libcrypto.ndk.json +++ b/CryptoArchitectureKit/libcrypto.ndk.json @@ -367,6 +367,10 @@ "first_introduced": "20", "name": "OH_CryptoRand_SetSeed" }, + { + "first_introduced": "21", + "name": "OH_CryptoRand_EnableHardwareEntropy" + }, { "first_introduced": "20", "name": "OH_CryptoRand_Destroy" -- Gitee From 068a470f401966dcf54af96c577873d81ce509f0 Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Thu, 28 Aug 2025 14:44:20 +0800 Subject: [PATCH 56/95] Fix description Signed-off-by: FTL1ght Change-Id: I20fa5ca4e9f225065f9ed34dd22b0c3817e9770e --- graphic/graphic_2d/native_drawing/drawing_error_code.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_error_code.h b/graphic/graphic_2d/native_drawing/drawing_error_code.h index 476e80bd962..239f948173b 100644 --- a/graphic/graphic_2d/native_drawing/drawing_error_code.h +++ b/graphic/graphic_2d/native_drawing/drawing_error_code.h @@ -71,7 +71,7 @@ typedef enum { */ OH_DRAWING_ERROR_ALLOCATION_FAILED = 26200002, /** - * @error attribute id is not recognized or supported. + * @error The attribute id is not recognized or supported. * @since 21 */ OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH = 26200003, -- Gitee From 27e2d7188c4425273930113e441c1460cced69db Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Thu, 28 Aug 2025 16:00:01 +0800 Subject: [PATCH 57/95] Remove useless returns Signed-off-by: FTL1ght Change-Id: Ifecd3ff3e6f57b5058b88b9cc2ded8e593532d33 --- .../graphic_2d/native_drawing/drawing_text_typography.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 14c83dcf7b0..42842a24a5e 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -658,8 +658,6 @@ OH_Drawing_ErrorCode OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. - * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id - * exceeds the allowable range. * @since 21 */ OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeDouble(const OH_Drawing_TextStyle* style, @@ -694,8 +692,6 @@ OH_Drawing_ErrorCode OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* s * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. - * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id - * exceeds the allowable range. * @since 21 */ OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeInt(const OH_Drawing_TextStyle* style, @@ -730,8 +726,6 @@ OH_Drawing_ErrorCode OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_Typ * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. - * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id - * exceeds the allowable range. * @since 21 */ OH_Drawing_ErrorCode OH_Drawing_GetTypographyStyleAttributeDouble(const OH_Drawing_TypographyStyle* style, @@ -766,8 +760,6 @@ OH_Drawing_ErrorCode OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_Typogr * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. - * Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id - * exceeds the allowable range. * @since 21 */ OH_Drawing_ErrorCode OH_Drawing_GetTypographyStyleAttributeInt(const OH_Drawing_TypographyStyle* style, -- Gitee From 76c20e83555453d8c4af34c9a29408a7a543e445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E5=80=A9?= Date: Thu, 28 Aug 2025 09:07:23 +0000 Subject: [PATCH 58/95] =?UTF-8?q?=E5=A2=9E=E5=8A=A0OH=5FUdmfData*=20OH=5FP?= =?UTF-8?q?asteboard=5FGetData=E6=9D=83=E9=99=90=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 任倩 --- distributeddatamgr/pasteboard/include/oh_pasteboard.h | 1 + 1 file changed, 1 insertion(+) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index 3218fff577e..e98d41b7aed 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -291,6 +291,7 @@ bool OH_Pasteboard_HasData(OH_Pasteboard* pasteboard); /** * @brief Obtains data from the Pasteboard. * + * @permission ohos.permission.READ_PASTEBOARD * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. * @param status The status code of the execution. For details, see {@link PASTEBOARD_ErrCode}. * @return Returns the pointer to the {@link OH_UdmfData} instance. -- Gitee From 800e2d36ec6a97df0fd77eec5baa690597c7fff5 Mon Sep 17 00:00:00 2001 From: zhang_hao_zheng Date: Tue, 26 Aug 2025 15:36:00 +0800 Subject: [PATCH 59/95] =?UTF-8?q?uid=E9=9A=94=E7=A6=BB=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhang_hao_zheng Change-Id: Ib1e9ffbbe64d94018acd6fea08cfc10ad1b2d956 --- .../child_process/libchild_process.ndk.json | 4 ++++ .../child_process/native_child_process.h | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ability/ability_runtime/child_process/libchild_process.ndk.json b/ability/ability_runtime/child_process/libchild_process.ndk.json index 60cf2b93d47..f4fa1706025 100644 --- a/ability/ability_runtime/child_process/libchild_process.ndk.json +++ b/ability/ability_runtime/child_process/libchild_process.ndk.json @@ -42,5 +42,9 @@ { "first_introduced": "20", "name": "OH_Ability_StartNativeChildProcessWithConfigs" + }, + { + "first_introduced": "21", + "name": "OH_Ability_ChildProcessConfigs_SetIsolationUid" } ] diff --git a/ability/ability_runtime/child_process/native_child_process.h b/ability/ability_runtime/child_process/native_child_process.h index ce59adf740b..ec4d5c561fa 100644 --- a/ability/ability_runtime/child_process/native_child_process.h +++ b/ability/ability_runtime/child_process/native_child_process.h @@ -165,7 +165,6 @@ Ability_NativeChildProcess_ErrCode OH_Ability_DestroyChildProcessConfigs(Ability /** * @brief Sets the isolation mode for the specified child process configs. - * The isolationMode only takes effect in {@link OH_Ability_StartNativeChildProcessWithConfigs}. * * @param configs Pointer to the child process configs object. Must not be nullptr. * @param isolationMode The isolation mode to set. See {@link NativeChildProcess_IsolationMode} for details. @@ -176,6 +175,22 @@ Ability_NativeChildProcess_ErrCode OH_Ability_DestroyChildProcessConfigs(Ability Ability_NativeChildProcess_ErrCode OH_Ability_ChildProcessConfigs_SetIsolationMode( Ability_ChildProcessConfigs* configs, NativeChildProcess_IsolationMode isolationMode); +/** + * @brief Sets the UID isolation flag for the specified child process configs. + * The isolationUid only takes effect when {@link OH_Ability_ChildProcessConfigs_SetIsolationMode} + * is set to {@link NCP_ISOLATION_MODE_ISOLATED}. + * + * @param configs Pointer to the child process configs object. Must not be nullptr. + * @param isolationUid The UID isolation setting to apply. + * - true: uses independent UID + * - false: uses parent process's UID + * @return Returns {@link NCP_NO_ERROR} if the UID isolation flag is set successfully. + * Returns {@link NCP_ERR_INVALID_PARAM} if the input parameters are invalid. + * @since 21 + */ +Ability_NativeChildProcess_ErrCode OH_Ability_ChildProcessConfigs_SetIsolationUid( + Ability_ChildProcessConfigs* configs, bool isolationUid); + /** * @brief Sets the process name for the specified child process configs. * -- Gitee From 329b590854a18450a2cc999bf9d916ead4bc4835 Mon Sep 17 00:00:00 2001 From: chenjiafeng10 Date: Fri, 29 Aug 2025 11:05:53 +0800 Subject: [PATCH 60/95] TextContentAlign CAPI Signed-off-by: chenjiafeng10 --- arkui/ace_engine/native/native_node.h | 16 ++++++++++++++++ arkui/ace_engine/native/native_type.h | 14 ++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 46baa337637..3e00d235fb8 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2538,6 +2538,22 @@ typedef enum { */ NODE_TEXT_VERTICAL_ALIGN = 1035, + /** + * @brief Sets the content align of the text. + * 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: content align of the text, specified using the {@link ArkUI_TextContentAlign} + * enum. The default value is ARKUI_TEXT_CONTENT_ALIGN_TOP. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: content align of the text, specified using the {@link ArkUI_TextContentAlign} + * enum. \n + * + * @since 21 + */ + NODE_TEXT_CONTENT_ALIGN = 1036, + /** * @brief Defines the text content attribute, which 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 25626e7d1e5..5796e2d6cdf 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -412,6 +412,20 @@ typedef enum { ARKUI_TEXT_VERTICAL_ALIGNMENT_TOP, } ArkUI_TextVerticalAlignment; +/** + * @brief Enumerates text content align styles. + * + * @since 21 + */ +typedef enum { + /** Top aligned. */ + ARKUI_TEXT_CONTENT_ALIGN_TOP = 0, + /** Center aligned. */ + ARKUI_TEXT_CONTENT_ALIGN_CENTER = 1, + /** Bottom aligned. */ + ARKUI_TEXT_CONTENT_ALIGN_BOTTOM = 2, +} ArkUI_TextContentAlign; + /** * @brief Enumerates the types of the Enter key for a single-line text box. * -- Gitee From 2882394157ed604209703a32b367bec3ac457200 Mon Sep 17 00:00:00 2001 From: hejunfei Date: Fri, 29 Aug 2025 12:10:26 +0800 Subject: [PATCH 61/95] add since Signed-off-by: hejunfei --- arkui/display_manager/oh_display_info.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arkui/display_manager/oh_display_info.h b/arkui/display_manager/oh_display_info.h index 641a72486c7..35120199f83 100644 --- a/arkui/display_manager/oh_display_info.h +++ b/arkui/display_manager/oh_display_info.h @@ -127,7 +127,11 @@ typedef enum { /** @error Operation system abnormal */ DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL = 1400003, - /** @error Operation illegal param */ + /** + * @error Operation illegal param + * + * @since 20 + */ DISPLAY_MANAGER_ERROR_ILLEGAL_PARAM = 1400004, } NativeDisplayManager_ErrorCode; -- Gitee From eadf0b997728d66002a1fe310623152f5c5e4f17 Mon Sep 17 00:00:00 2001 From: hejunfei Date: Fri, 29 Aug 2025 14:05:51 +0800 Subject: [PATCH 62/95] add Signed-off-by: hejunfei --- arkui/display_manager/oh_display_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/display_manager/oh_display_info.h b/arkui/display_manager/oh_display_info.h index 35120199f83..1aaf08f6dff 100644 --- a/arkui/display_manager/oh_display_info.h +++ b/arkui/display_manager/oh_display_info.h @@ -128,7 +128,7 @@ typedef enum { DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL = 1400003, /** - * @error Operation illegal param + * @error Operation illegal param. * * @since 20 */ -- Gitee From 76ea0b4ebc9e876e98add14b98eeee7094101f6c Mon Sep 17 00:00:00 2001 From: lizeqiang Date: Fri, 29 Aug 2025 18:14:05 +0800 Subject: [PATCH 63/95] revert interface Signed-off-by: lizeqiang --- web/webview/interfaces/native/libohweb.ndk.json | 4 ---- .../interfaces/native/native_interface_arkweb.h | 14 -------------- 2 files changed, 18 deletions(-) diff --git a/web/webview/interfaces/native/libohweb.ndk.json b/web/webview/interfaces/native/libohweb.ndk.json index 8119ca252b9..1cdb08fd6a8 100644 --- a/web/webview/interfaces/native/libohweb.ndk.json +++ b/web/webview/interfaces/native/libohweb.ndk.json @@ -374,9 +374,5 @@ { "first_introduced": "20", "name": "OH_NativeArkWeb_GetActiveWebEngineVersion" - }, - { - "first_introduced": "20", - "name": "OH_NativeArkWeb_IsActiveWebEngineEvergreen" } ] diff --git a/web/webview/interfaces/native/native_interface_arkweb.h b/web/webview/interfaces/native/native_interface_arkweb.h index e90f5c060a1..122d0c50bb4 100644 --- a/web/webview/interfaces/native/native_interface_arkweb.h +++ b/web/webview/interfaces/native/native_interface_arkweb.h @@ -119,13 +119,6 @@ typedef enum { * @since 20 */ ARKWEB_M132 = 2, - - /** - * ArkWeb Evergreen Web Engine, always use the new ArkWeb Engine. - * Evergreen Web Engine. - * @since 20 - */ - ARKWEB_EVERGREEN = 99999, } ArkWebEngineVersion; /** @@ -374,13 +367,6 @@ void OH_NativeArkWeb_SetActiveWebEngineVersion(ArkWebEngineVersion webEngineVers */ ArkWebEngineVersion OH_NativeArkWeb_GetActiveWebEngineVersion(); -/** - * Check if the currently active ArkWeb engine is Evergreen. - * @return { bool } true means the application is using the Evergreen Web Engine, false means not. - * @since 20 - */ -bool OH_NativeArkWeb_IsActiveWebEngineEvergreen(); - #ifdef __cplusplus }; #endif -- Gitee From 63f354210ee7236e4598759074b9fa9c030f4aae Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Sat, 30 Aug 2025 09:32:32 +0800 Subject: [PATCH 64/95] Remove syscap and value is null Signed-off-by: FTL1ght Change-Id: Iefeaba95b905ca48c75a4cdbeb0bbbb4c84e2072 --- .../native_drawing/drawing_text_typography.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 42842a24a5e..412ce2f2360 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -650,13 +650,12 @@ OH_Drawing_ErrorCode OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle /** * @brief Gets the double type property's value from the text style. * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param id Indicates the attribute id. * @param value Indicates the return value of the interface. * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. - * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr. * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. * @since 21 */ @@ -666,7 +665,6 @@ OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeDouble(const OH_Drawing_Tex /** * @brief Sets int value to the text style attribute. * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param id Indicates the attribute id. * @param value Indicates the value to set. @@ -684,13 +682,12 @@ OH_Drawing_ErrorCode OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* s /** * @brief Gets the int type property's value from the text style. * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param id Indicates the attribute id. * @param value Indicates the return value of the interface. * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. - * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr. * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. * @since 21 */ @@ -700,7 +697,6 @@ OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeInt(const OH_Drawing_TextSt /** * @brief Sets double value to the typography style attribute. * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param id Indicates the attribute id. * @param value Indicates the value to set. @@ -718,13 +714,12 @@ OH_Drawing_ErrorCode OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_Typ /** * @brief Gets the double type property's value from the typography style. * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param id Indicates the attribute id. * @param value Indicates the return value of the interface. * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. - * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr. * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. * @since 21 */ @@ -734,7 +729,6 @@ OH_Drawing_ErrorCode OH_Drawing_GetTypographyStyleAttributeDouble(const OH_Drawi /** * @brief Sets int value to the typography style attribute. * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param id Indicates the attribute id. * @param value Indicates the value to set. @@ -752,13 +746,12 @@ OH_Drawing_ErrorCode OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_Typogr /** * @brief Gets the int type property's value from the typography style. * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. * @param id Indicates the attribute id. * @param value Indicates the return value of the interface. * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. - * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style or value is nullptr. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr. * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. * @since 21 */ -- Gitee From dd97f539a68808e22b070ab616d1a9be1d396678 Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Sat, 30 Aug 2025 10:00:31 +0800 Subject: [PATCH 65/95] Remove const Signed-off-by: FTL1ght Change-Id: I7a7a4151be4ea64152eb1ad9ffee345115efefb5 --- .../graphic_2d/native_drawing/drawing_text_typography.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 412ce2f2360..633d974825b 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -632,7 +632,6 @@ typedef enum OH_Drawing_TypographyStyleAttributeId { /** * @brief Sets double value to the text style attribute. * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param style Indicates the pointer to an OH_Drawing_TextStyle object. * @param id Indicates the attribute id. * @param value Indicates the value to set. @@ -659,7 +658,7 @@ OH_Drawing_ErrorCode OH_Drawing_SetTextStyleAttributeDouble(OH_Drawing_TextStyle * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. * @since 21 */ -OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeDouble(const OH_Drawing_TextStyle* style, +OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeDouble(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, double* value); /** @@ -691,7 +690,7 @@ OH_Drawing_ErrorCode OH_Drawing_SetTextStyleAttributeInt(OH_Drawing_TextStyle* s * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. * @since 21 */ -OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeInt(const OH_Drawing_TextStyle* style, +OH_Drawing_ErrorCode OH_Drawing_GetTextStyleAttributeInt(OH_Drawing_TextStyle* style, OH_Drawing_TextStyleAttributeId id, int* value); /** @@ -723,7 +722,7 @@ OH_Drawing_ErrorCode OH_Drawing_SetTypographyStyleAttributeDouble(OH_Drawing_Typ * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. * @since 21 */ -OH_Drawing_ErrorCode OH_Drawing_GetTypographyStyleAttributeDouble(const OH_Drawing_TypographyStyle* style, +OH_Drawing_ErrorCode OH_Drawing_GetTypographyStyleAttributeDouble(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, double* value); /** @@ -755,7 +754,7 @@ OH_Drawing_ErrorCode OH_Drawing_SetTypographyStyleAttributeInt(OH_Drawing_Typogr * Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported. * @since 21 */ -OH_Drawing_ErrorCode OH_Drawing_GetTypographyStyleAttributeInt(const OH_Drawing_TypographyStyle* style, +OH_Drawing_ErrorCode OH_Drawing_GetTypographyStyleAttributeInt(OH_Drawing_TypographyStyle* style, OH_Drawing_TypographyStyleAttributeId id, int* value); /** -- Gitee From 87a096835eec7c9237f64a7bb0d6cf27e0441d4d Mon Sep 17 00:00:00 2001 From: fangzhiyuan Date: Sat, 30 Aug 2025 18:45:58 +0800 Subject: [PATCH 66/95] =?UTF-8?q?=E6=8F=90=E4=BA=A4areachange=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fangzhiyuan --- arkui/ace_engine/native/libace.ndk.json | 8 +++++++ arkui/ace_engine/native/native_node.h | 28 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index dc359a75005..d7a4753891a 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -4075,6 +4075,14 @@ "first_introduced": "21", "name": "OH_ArkUI_NativeModule_UnregisterCommonEvent" }, + { + "first_introduced": "21", + "name": "OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEvent" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEvent" + }, { "first_introduced": "21", "name": "OH_ArkUI_PositionEdges_Create" diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index ff2f5bb5462..5cd2e0fc1e8 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -10269,6 +10269,34 @@ int32_t OH_ArkUI_NativeModule_RegisterCommonEvent(ArkUI_NodeHandle node, ArkUI_N */ int32_t OH_ArkUI_NativeModule_UnregisterCommonEvent(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType); +/** + * @brief Register common visible area approximate change event callback of target node. + * + * @param node The ArkUI-NodeHandle pointer. + * @param ratios Threshold array representing the visible area of the component. + * @param size The size of the ratios. + * @param expectedUpdateInterval The expected calculation interval for developers. + * @param userData Indicates the pointer to the custom data. + * @param callback Indicates the event callback function. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid. + * @since 21 + */ +int32_t OH_ArkUI_NativeModule_RegisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node, float* ratios, + int32_t size, float expectedUpdateInterval, void* userData, void (*callback)(ArkUI_NodeEvent* event)); + +/** + * @brief Unregister common visible area approximate change event callback of target node. + * + * @param node The ArkUI-NodeHandle pointer. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function params is invalid. + * @since 21 + */ +int32_t OH_ArkUI_NativeModule_UnregisterCommonVisibleAreaApproximateChangeEvent(ArkUI_NodeHandle node); + #ifdef __cplusplus }; #endif -- Gitee From 0eb31f27b19fcfaa3efd3973b7f4ca97ed2be202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=80=9D=E8=BF=9C?= Date: Sun, 31 Aug 2025 14:18:11 +0800 Subject: [PATCH 67/95] Interface: Pasteboard Sync Delayed Data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 朱思远 --- distributeddatamgr/pasteboard/include/oh_pasteboard.h | 10 ++++++++++ distributeddatamgr/pasteboard/libpasteboard.ndk.json | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h index 3218fff577e..3190b5c5829 100644 --- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h +++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h @@ -441,6 +441,16 @@ void OH_Pasteboard_ProgressCancel(Pasteboard_GetDataParams* params); */ OH_UdmfData* OH_Pasteboard_GetDataWithProgress(OH_Pasteboard* pasteboard, Pasteboard_GetDataParams* params, int* status); + +/** + * @brief Notifies the system pasteboard to synchronize all time-lapse paste data from application. + * + * @param pasteboard Pointer to the {@link OH_Pasteboard} instance. + * @param callback Indicates the pointer to the callback that is called after the synchronize is finished. + * @since 21 + */ +void OH_Pasteboard_SyncDelayedDataAsync(OH_Pasteboard* pasteboard, void (*callback)(int errorCode)); + #ifdef __cplusplus }; #endif diff --git a/distributeddatamgr/pasteboard/libpasteboard.ndk.json b/distributeddatamgr/pasteboard/libpasteboard.ndk.json index 6b21588f7a0..84ec7a82593 100644 --- a/distributeddatamgr/pasteboard/libpasteboard.ndk.json +++ b/distributeddatamgr/pasteboard/libpasteboard.ndk.json @@ -98,6 +98,9 @@ { "first_introduced": "18", "name": "OH_Pasteboard_GetChangeCount" - + }, + { + "first_introduced": "21", + "name": "OH_Pasteboard_SyncDelayedDataAsync" } ] \ No newline at end of file -- Gitee From 94390d91ef0f22e31378ae973f829753fe2e7942 Mon Sep 17 00:00:00 2001 From: zzz701 Date: Mon, 1 Sep 2025 13:44:14 +0800 Subject: [PATCH 68/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zzz701 --- build-tools/clean_ndk_ani.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-tools/clean_ndk_ani.py b/build-tools/clean_ndk_ani.py index 783bea743ac..f28647ffbda 100755 --- a/build-tools/clean_ndk_ani.py +++ b/build-tools/clean_ndk_ani.py @@ -18,6 +18,7 @@ import re import argparse import shutil import json +import stat from typing import List # ani header file list @@ -99,7 +100,9 @@ def clean_json_systemCapability_headers(capability_header_path): # Saving the modified JSON try: - with open(capability_header_path, 'w') as f: + fd = os.open(capability_header_path, os.O_WRONLY | os.O_TRUNC | os.O_CREAT, + stat.S_IRUSR | stat.S_IWUSR) + with os.fdopen(fd, 'w') as f: json.dump(systemCapabilitys, f, indent=2) print("JSON file updated successfully") except Exception as e: -- Gitee From 28999dc48994ccc788d12606dd1e5ea345a0d144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Tue, 2 Sep 2025 10:46:36 +0800 Subject: [PATCH 69/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=AE=E5=BC=820902?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/oh_window.h | 2 +- arkui/window_manager/oh_window_comm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 6bd58b82a03..b99d6f4a7e0 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -326,7 +326,7 @@ typedef void (*OH_WindowManager_WindowSnapshotCallback)(const OH_PixelmapNative* /** * @brief Get snapshot of the specified windows. * - * @permission @code ohos.permission.CUSTOM_SCREEN_CAPTURE + * @permission ohos.permission.CUSTOM_SCREEN_CAPTURE * @param windowIdList Main window id list for getting snapshot. * @param windowIdListSize Size of main window id list. * @param config Configuration for getting snapshot. diff --git a/arkui/window_manager/oh_window_comm.h b/arkui/window_manager/oh_window_comm.h index 46be3abab20..ad05a16950f 100644 --- a/arkui/window_manager/oh_window_comm.h +++ b/arkui/window_manager/oh_window_comm.h @@ -238,7 +238,7 @@ typedef struct { /** Display id of the window. */ uint64_t displayId; /** Window id. */ - int32_t windowId;; + int32_t windowId; /** Showing state of the window. */ bool showing; /** Label of the window. */ -- Gitee From 54c425a0e2951c0efa1c920bc2a1911a90baf1c6 Mon Sep 17 00:00:00 2001 From: zpf Date: Tue, 2 Sep 2025 13:24:46 +0800 Subject: [PATCH 70/95] =?UTF-8?q?lpp=20=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zpf --- .../lowpower_avsink/liblowpower_avsink.ndk.json | 8 ++++++++ multimedia/player_framework/lowpower_avsink_base.h | 9 ++++++++- multimedia/player_framework/lowpower_video_sink.h | 14 ++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/multimedia/player_framework/lowpower_avsink/liblowpower_avsink.ndk.json b/multimedia/player_framework/lowpower_avsink/liblowpower_avsink.ndk.json index 7e53713e491..c59da8e1a9a 100644 --- a/multimedia/player_framework/lowpower_avsink/liblowpower_avsink.ndk.json +++ b/multimedia/player_framework/lowpower_avsink/liblowpower_avsink.ndk.json @@ -9,6 +9,10 @@ }, { "first_introduced": "20", + "name": "OH_LowPowerAVSink_GetCapability" + }, + { + "first_introduced": "21", "name": "OH_LowPowerAudioSink_CreateByMime" }, { @@ -185,6 +189,10 @@ }, { "first_introduced": "20", + "name": "OH_LowPowerVideoSink_GetLatestPts" + }, + { + "first_introduced": "21", "name": "OH_LowPowerVideoSink_RegisterCallback" }, { diff --git a/multimedia/player_framework/lowpower_avsink_base.h b/multimedia/player_framework/lowpower_avsink_base.h index fbb65514be1..d94bc8f8ed5 100644 --- a/multimedia/player_framework/lowpower_avsink_base.h +++ b/multimedia/player_framework/lowpower_avsink_base.h @@ -53,6 +53,13 @@ extern "C" { */ typedef struct OH_AVSamplesBuffer OH_AVSamplesBuffer; +/** + * @brief Forward declaration of OH_LowPowerAVSink_Capability. + * + * @since 21 + */ +typedef struct OH_LowPowerAVSink_Capability OH_LowPowerAVSink_Capability; + /** * @brief Append one OH_AVBuffer data to framePacketBuffer instance. * @@ -82,4 +89,4 @@ int32_t OH_AVSamplesBuffer_GetRemainedCapacity(OH_AVSamplesBuffer *samplesBuffer #endif #endif // NATIVE_LOWPOWER_AVSINK_BASE_H -/** @} */ \ No newline at end of file +/** @} */ diff --git a/multimedia/player_framework/lowpower_video_sink.h b/multimedia/player_framework/lowpower_video_sink.h index 52c77f14c4a..3f91faa1459 100644 --- a/multimedia/player_framework/lowpower_video_sink.h +++ b/multimedia/player_framework/lowpower_video_sink.h @@ -341,6 +341,20 @@ OH_AVErrCode OH_LowPowerVideoSink_ReturnSamples(OH_LowPowerVideoSink* sink, OH_A */ OH_AVErrCode OH_LowPowerVideoSink_RegisterCallback(OH_LowPowerVideoSink* sink, OH_LowPowerVideoSinkCallback* callback); +/** + * @brief Get the latest presentation timestamp (PTS) from lowpower video sink. + * + * @param {OH_LowPowerVideoSink*} sink Pointer to an OH_LowPowerVideoSink instance. + * @param {int64_t*} pts Pointer to store the latest PTS value (in microseconds). + * @return Returns AV_ERR_OK if the timestamp is obtained successfully; + * otherwise, returns a specific error code as defined in {@link OH_AVErrCode}: + * {@link AV_ERR_INVALID_VAL} the sink is nullptr, or sink is invalid. + * {@link AV_ERR_SERVICE_DIED} media service is died. + * {@link AV_ERR_OPERATE_NOT_PERMIT} operation not permitted. + * @since 21 + */ +OH_AVErrCode OH_LowPowerVideoSink_GetLatestPts(OH_LowPowerVideoSink *sink, int64_t *pts); + /** * @brief Creates a lowpower video sink callback instance. * -- Gitee From ee3512961eb708c965ae1a4e41fe699315897941 Mon Sep 17 00:00:00 2001 From: zhang-quanchao Date: Tue, 2 Sep 2025 16:08:45 +0800 Subject: [PATCH 71/95] svg feature Signed-off-by: zhang-quanchao --- arkui/ace_engine/native/native_node.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 5cd2e0fc1e8..39f3bba8e16 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2940,6 +2940,19 @@ typedef enum { * @since 21 */ NODE_IMAGE_ORIENTATION = 4020, + /** + * @brief Set the range of SVG parsing capabilities supported through enable switch. + * 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: enable switch.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: enable switch.\n + * + * @since 21 + */ + NODE_IMAGE_SUPPORT_SVG2 = 4021, /** * @brief Defines the color of the component when it is selected. * This attribute can be set, reset, and obtained as required through APIs. -- Gitee From 7f1484cd7de802b0f268943a9127fd699f864ca1 Mon Sep 17 00:00:00 2001 From: zhanglei Date: Tue, 2 Sep 2025 16:12:23 +0800 Subject: [PATCH 72/95] =?UTF-8?q?=E7=9B=B8=E6=9C=BA=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=AB=98=E6=80=A7=E8=83=BD=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanglei --- multimedia/camera_framework/camera.h | 18 +++++++++++++ multimedia/camera_framework/camera.ndk.json | 8 ++++++ multimedia/camera_framework/photo_output.h | 28 +++++++++++++++++++++ 3 files changed, 54 insertions(+) diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index c158c5ebe6b..5d2967e91f4 100644 --- a/multimedia/camera_framework/camera.h +++ b/multimedia/camera_framework/camera.h @@ -1265,6 +1265,24 @@ typedef struct Camera_ControlCenterStatusInfo { bool isActive; } Camera_ControlCenterStatusInfo; +/** + * @brief Enum for photo quality prioritization. + * + * @since 21 + * @version 1.0 + */ +typedef enum Camera_PhotoQualityPrioritization { + /** + * High quality photos are the top preference, even at the expense of shot-to-shot time. + */ + CAMERA_PHOTO_QUALITY_PRIORITIZATION_HIGH_QUALITY = 0, + + /** + * Prefering speed over quality, even at the expense of quality. + */ + CAMERA_PHOTO_QUALITY_PRIORITIZATION_SPEED = 1, +} Camera_PhotoQualityPrioritization; + #ifdef __cplusplus } #endif diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index 4c4d03826d2..cd755635d32 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -746,5 +746,13 @@ { "first_introduced": "20", "name": "OH_CaptureSession_UnregisterMacroStatusChangeCallback" + }, + { + "first_introduced": "21", + "name": "OH_PhotoOutput_IsPhotoQualityPrioritizationSupported" + }, + { + "first_introduced": "21", + "name": "OH_PhotoOutput_SetPhotoQualityPrioritization" } ] diff --git a/multimedia/camera_framework/photo_output.h b/multimedia/camera_framework/photo_output.h index 27e502b695a..fd7b3b415ff 100644 --- a/multimedia/camera_framework/photo_output.h +++ b/multimedia/camera_framework/photo_output.h @@ -499,6 +499,34 @@ Camera_ErrorCode OH_PhotoOutput_IsMovingPhotoSupported(Camera_PhotoOutput* photo */ Camera_ErrorCode OH_PhotoOutput_EnableMovingPhoto(Camera_PhotoOutput* photoOutput, bool enabled); +/** + * @brief Check whether to support photo quality prioritization. + * + * @param photoOutput the {@link Camera_PhotoOutput} instance which used to check whether photo quality prioritization supported. + * @param qualityPrioritization the {@link Camera_PhotoQualityPrioritization} instance indicating quality preference. + * @param isSupported the result of whether quality prioritization is supported. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * @since 21 + */ + +Camera_ErrorCode OH_PhotoOutput_IsPhotoQualityPrioritizationSupported(Camera_PhotoOutput* photoOutput, + Camera_PhotoQualityPrioritization qualityPrioritization, bool* isSupported); + +/** + * @brief Set photo quality prioritization. + * + * @param photoOutput the {@link Camera_PhotoOutput} instance which used to configure photo quality prioritization. + * @param qualityPrioritization the {@link Camera_PhotoQualityPrioritization} instance indicating the choice of quality or speed. + * @return {@link #CAMERA_OK} if the method call succeeds. + * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. + * @since 21 + */ +Camera_ErrorCode OH_PhotoOutput_SetPhotoQualityPrioritization(Camera_PhotoOutput* photoOutput, + Camera_PhotoQualityPrioritization qualityPrioritization); + #ifdef __cplusplus } #endif -- Gitee From f422487f0907c120932a3d28228fbb330fb74313 Mon Sep 17 00:00:00 2001 From: zpf Date: Tue, 2 Sep 2025 08:57:05 +0000 Subject: [PATCH 73/95] update multimedia/player_framework/lowpower_avsink_base.h. Signed-off-by: zpf --- multimedia/player_framework/lowpower_avsink_base.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/multimedia/player_framework/lowpower_avsink_base.h b/multimedia/player_framework/lowpower_avsink_base.h index d94bc8f8ed5..360bb88ff71 100644 --- a/multimedia/player_framework/lowpower_avsink_base.h +++ b/multimedia/player_framework/lowpower_avsink_base.h @@ -84,6 +84,19 @@ OH_AVErrCode OH_AVSamplesBuffer_AppendOneBuffer(OH_AVSamplesBuffer *samplesBuffe */ int32_t OH_AVSamplesBuffer_GetRemainedCapacity(OH_AVSamplesBuffer *samplesBuffer); +/** + * @brief Query the supported capabilities of a lowpower audio/video sink. + * + * This function queries and returns the capability set supported by the current + * lowpower audio/video sink, including but not limited to supported media formats, etc. + * + * @return {OH_LowPowerAVSink_Capability*} + * - A pointer to the capability structure if the sink supports capability queries and the query is successful. + * - nullptr if the sink does not support capability queries or the query fails. + * + * @since 21 + */ +OH_LowPowerAVSink_Capability *OH_LowPowerAVSink_GetCapability(); #ifdef __cplusplus } #endif -- Gitee From f9417d6a090dca3f8749c1f090a6820f0cba8c8b Mon Sep 17 00:00:00 2001 From: zpf Date: Tue, 2 Sep 2025 08:58:25 +0000 Subject: [PATCH 74/95] update multimedia/player_framework/lowpower_avsink_base.h. Signed-off-by: zpf --- multimedia/player_framework/lowpower_avsink_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/player_framework/lowpower_avsink_base.h b/multimedia/player_framework/lowpower_avsink_base.h index 360bb88ff71..133b3b8af16 100644 --- a/multimedia/player_framework/lowpower_avsink_base.h +++ b/multimedia/player_framework/lowpower_avsink_base.h @@ -56,7 +56,7 @@ typedef struct OH_AVSamplesBuffer OH_AVSamplesBuffer; /** * @brief Forward declaration of OH_LowPowerAVSink_Capability. * - * @since 21 + * @since 20 */ typedef struct OH_LowPowerAVSink_Capability OH_LowPowerAVSink_Capability; -- Gitee From b2055e48f8f9ac1d4124070e5ddc6074fdb4173b Mon Sep 17 00:00:00 2001 From: Zenix Date: Mon, 1 Sep 2025 11:33:27 +0800 Subject: [PATCH 75/95] overlay interface Signed-off-by: Zenix --- arkui/ace_engine/native/native_node.h | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index ff2f5bb5462..cb09147c0b9 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -946,6 +946,44 @@ typedef enum { * .value[1].f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. \n * .value[2].f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. * + * @since 12 + */ + /** + * @brief Defines the overlay attribute, which can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: mask text.\n + * .value[0]?.i32: position of the overlay relative to the component. Optional. + * The parameter type is {@link ArkUI_Alignment}. + * The default value is ARKUI_ALIGNMENT_TOP_START. \n + * .value[1]?.f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. Optional. \n + * .value[2]?.f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. Optional. + * \n + * .value[3]?.i32: the layout direction. + * The parameter type is {@link ArkUI_Direction}. + * The default value is ARKUI_DIRECTION_LTR. \n + * In most cases, this parameter should be set to Auto, this allowing the system to handle + * the layout direction automatically. If you need to keep a specific direction in any situation, set it to + * either LTR (Left-to-Right) or RTL (Right-to-Left). Optional. + * \n + * .object: the node tree used as the overlay. + * The parameter type is {@link ArkUI_NodeHandle}. + * The default value is nullptr. \n + * this parameter is conflict with .string, and it has lower priority than .string. Optional. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: mask text.\n + * .value[0].i32: position of the overlay relative to the component. + * The parameter type is {@link ArkUI_Alignment}. + * The default value is ARKUI_ALIGNMENT_TOP_START. \n + * .value[1].f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. \n + * .value[2].f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. + * .value[3].i32: the layout direction. + * The parameter type is {@link ArkUI_Direction}. + * The default value is ARKUI_DIRECTION_LTR. \n + * .object: the overlay node handle. \n + * + * @since 21 */ NODE_OVERLAY, /** -- Gitee From bc7833c2dc32b21b5889c88fda1006a46325a0c5 Mon Sep 17 00:00:00 2001 From: zpf Date: Tue, 2 Sep 2025 13:13:10 +0000 Subject: [PATCH 76/95] update multimedia/player_framework/lowpower_avsink_base.h. Signed-off-by: zpf --- multimedia/player_framework/lowpower_avsink_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/lowpower_avsink_base.h b/multimedia/player_framework/lowpower_avsink_base.h index 133b3b8af16..4613a6a1f5e 100644 --- a/multimedia/player_framework/lowpower_avsink_base.h +++ b/multimedia/player_framework/lowpower_avsink_base.h @@ -87,13 +87,13 @@ int32_t OH_AVSamplesBuffer_GetRemainedCapacity(OH_AVSamplesBuffer *samplesBuffer /** * @brief Query the supported capabilities of a lowpower audio/video sink. * - * This function queries and returns the capability set supported by the current + * This function queries and returns the capability set supported by the current * lowpower audio/video sink, including but not limited to supported media formats, etc. * * @return {OH_LowPowerAVSink_Capability*} * - A pointer to the capability structure if the sink supports capability queries and the query is successful. * - nullptr if the sink does not support capability queries or the query fails. - * + * * @since 21 */ OH_LowPowerAVSink_Capability *OH_LowPowerAVSink_GetCapability(); -- Gitee From 7f7f1bacbf4f5a6c6a168a1aef6ca36eb131e763 Mon Sep 17 00:00:00 2001 From: zhanghang Date: Fri, 15 Aug 2025 09:22:18 +0800 Subject: [PATCH 77/95] =?UTF-8?q?feat:=20List=E6=94=AF=E6=8C=81=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E6=8C=87=E5=AE=9A=E7=9A=84ListItem=E7=9A=84swipeActio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghang Change-Id: I286b01bfbe3dad80b92db6974b5c04bd56269f95 --- arkui/ace_engine/native/libace.ndk.json | 8 +++++ arkui/ace_engine/native/native_type.h | 48 +++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index d7a4753891a..1e0b4c4dfee 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -4126,5 +4126,13 @@ { "first_introduced": "21", "name": "OH_ArkUI_PositionEdges_GetRight" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_ListItemSwipeAction_Expand" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_ListItemSwipeAction_Collapse" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 44bd53cee15..e43a92fa2e6 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2442,6 +2442,11 @@ typedef enum { * @since 19 */ ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED = 190004, + /** + * @error Parameter error. + * @since 21 + */ + ARKUI_ERROR_CODE_PARAM_ERROR = 100023, } ArkUI_ErrorCode; /** @@ -2856,6 +2861,24 @@ typedef enum { ARKUI_LAYOUTPOLICY_FIXATIDEALSIZE, } ArkUI_LayoutPolicy; +/** + * @brief Define the direction to expand the swipe action. + * + * @since 21 + */ +typedef enum { + /** + * When the List direction is vertical, it indicates the left in LTR mode and right in RTL mode. + * When the List direction is horizontal, it indicates the top. + */ + ARKUI_LIST_ITEM_SWIPE_ACTION_DIRECTION_START = 0, + /** + * When the List direction is vertical, it indicates the right in LTR mode and left in RTL mode. + * When the List direction is horizontal, it indicates the bottom. + */ + ARKUI_LIST_ITEM_SWIPE_ACTION_DIRECTION_END = 1, +} ArkUI_ListItemSwipeActionDirection; + /** * @brief Defines parameter used by the system font style callback event. * @@ -5541,6 +5564,31 @@ void OH_ArkUI_PositionEdges_SetRight(ArkUI_PositionEdges* edges, float value); * @since 21 */ int32_t OH_ArkUI_PositionEdges_GetRight(ArkUI_PositionEdges* edges, float* value); + +/** + * @brief Expand the swipe action. + * + * @param node List Item node. + * @param direction expand direction of swipeAction. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_ERROR} The component type of the node is incorrect. + * {@link ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE} The node not mounted to component tree. + * @since 21 + */ +int32_t OH_ArkUI_ListItemSwipeAction_Expand(ArkUI_NodeHandle node, ArkUI_ListItemSwipeActionDirection direction); + +/** + * @brief Collapse the swipe action. + * + * @param node List Item node. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_ERROR} The component type of the node is incorrect. + * {@link ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE} The node not mounted to component tree. + * @since 21 + */ +int32_t OH_ArkUI_ListItemSwipeAction_Collapse(ArkUI_NodeHandle node); #ifdef __cplusplus }; #endif -- Gitee From 7ef2b82a492764a72e0386184b79c6fb05621e23 Mon Sep 17 00:00:00 2001 From: zpf Date: Wed, 3 Sep 2025 03:53:59 +0000 Subject: [PATCH 78/95] update multimedia/player_framework/lowpower_avsink_base.h. Signed-off-by: zpf --- multimedia/player_framework/lowpower_avsink_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/player_framework/lowpower_avsink_base.h b/multimedia/player_framework/lowpower_avsink_base.h index 4613a6a1f5e..5b8e4e1ad23 100644 --- a/multimedia/player_framework/lowpower_avsink_base.h +++ b/multimedia/player_framework/lowpower_avsink_base.h @@ -90,7 +90,7 @@ int32_t OH_AVSamplesBuffer_GetRemainedCapacity(OH_AVSamplesBuffer *samplesBuffer * This function queries and returns the capability set supported by the current * lowpower audio/video sink, including but not limited to supported media formats, etc. * - * @return {OH_LowPowerAVSink_Capability*} + * @return {OH_LowPowerAVSink_Capability*} * - A pointer to the capability structure if the sink supports capability queries and the query is successful. * - nullptr if the sink does not support capability queries or the query fails. * -- Gitee From 5faafa9667cf9be2ea85b484044eacd303a18305 Mon Sep 17 00:00:00 2001 From: wanghao1717 Date: Wed, 3 Sep 2025 15:24:28 +0800 Subject: [PATCH 79/95] update Signed-off-by: wanghao1717 --- multimodalinput/kits/c/input/oh_input_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 32432532486..8e3e7bd4942 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -2093,7 +2093,7 @@ Input_Result OH_Input_GetFunctionKeyState(int32_t keyCode, int32_t *state); * {@link INPUT_SUCCESS} if the operation is successful; * {@link INPUT_PARAMETER_ERROR} if count is a null pointer. * @since 20 -*/ + */ Input_Result OH_Input_QueryMaxTouchPoints(int32_t *count); /** -- Gitee From a9c74f37382555a9b30d94eb84c9145ac3db66c3 Mon Sep 17 00:00:00 2001 From: huangtianyu Date: Wed, 3 Sep 2025 07:46:51 +0000 Subject: [PATCH 80/95] FixLoudNessGainIntroudced Signed-off-by: huangtianyu --- multimedia/player_framework/lowpower_audio_sink.h | 2 +- .../lowpower_avsink/liblowpower_avsink.ndk.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/lowpower_audio_sink.h b/multimedia/player_framework/lowpower_audio_sink.h index 07f24a29998..3ed0476042c 100644 --- a/multimedia/player_framework/lowpower_audio_sink.h +++ b/multimedia/player_framework/lowpower_audio_sink.h @@ -268,7 +268,7 @@ OH_AVErrCode OH_LowPowerAudioSink_ReturnSamples(OH_LowPowerAudioSink* sink, OH_A * otherwise, returns a specific error code as defined in {@link OH_AVErrCode} * {@link AV_ERR_INVALID_VAL} the sink is nullptr or loudnessGain is out of valid range. * {@link AV_ERR_SERVICE_DIED} media service is died. - * @since 20 + * @since 21 */ OH_AVErrCode OH_LowPowerAudioSink_SetLoudnessGain(OH_LowPowerAudioSink* sink, float loudnessGain); diff --git a/multimedia/player_framework/lowpower_avsink/liblowpower_avsink.ndk.json b/multimedia/player_framework/lowpower_avsink/liblowpower_avsink.ndk.json index 7e53713e491..13c7c7167a1 100644 --- a/multimedia/player_framework/lowpower_avsink/liblowpower_avsink.ndk.json +++ b/multimedia/player_framework/lowpower_avsink/liblowpower_avsink.ndk.json @@ -68,7 +68,7 @@ "name": "OH_LowPowerAudioSink_ReturnSamples" }, { - "first_introduced": "20", + "first_introduced": "21", "name": "OH_LowPowerAudioSink_SetLoudnessGain" }, { -- Gitee From d289a35d5f79f915adcfe60cbec151314930e0ed Mon Sep 17 00:00:00 2001 From: zhanglei Date: Wed, 3 Sep 2025 23:53:00 -0700 Subject: [PATCH 81/95] fix camera ndk error code Signed-off-by: zhanglei --- multimedia/camera_framework/photo_output.h | 1 + 1 file changed, 1 insertion(+) diff --git a/multimedia/camera_framework/photo_output.h b/multimedia/camera_framework/photo_output.h index fd7b3b415ff..90b5161d624 100644 --- a/multimedia/camera_framework/photo_output.h +++ b/multimedia/camera_framework/photo_output.h @@ -507,6 +507,7 @@ Camera_ErrorCode OH_PhotoOutput_EnableMovingPhoto(Camera_PhotoOutput* photoOutpu * @param isSupported the result of whether quality prioritization is supported. * @return {@link #CAMERA_OK} if the method call succeeds. * {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect. + * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error. * @since 21 */ -- Gitee From d1e63e338d1050a613650414c0bbfa98e0cde1df Mon Sep 17 00:00:00 2001 From: wujinhui Date: Thu, 4 Sep 2025 15:13:19 +0800 Subject: [PATCH 82/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20OH=5FArkUI=5FNativeM?= =?UTF-8?q?odule=5FInvalidateAttributes=20=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wujinhui --- arkui/ace_engine/native/native_node.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 39f3bba8e16..516876804a0 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9988,8 +9988,8 @@ int32_t OH_ArkUI_NodeUtils_MoveTo(ArkUI_NodeHandle node, ArkUI_NodeHandle target /** * @brief Triggers node updates in the current frame. - * When node attributes are modified after the current frame's build phase (i.e., after - * the unified processing of dirty nodes), the node updates will be deferred to the next + * When node attributes are modified after the current frame's build phase, + * the node updates will be deferred to the next * frame. This function forces immediate node updates within the current frame to * ensure rendering effects are applied synchronously. * -- Gitee From ae30a14ccd1550f485335ea1124232862f35b8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=98=8A=E8=8B=8F?= Date: Thu, 4 Sep 2025 16:35:20 +0800 Subject: [PATCH 83/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=AB=E6=8F=8Fc-sdk?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A;=20Signed-off-by:liuhaosu@?= =?UTF-8?q?huawei.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘昊苏 --- BasicServicesKit/ohscan.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BasicServicesKit/ohscan.h b/BasicServicesKit/ohscan.h index acaa4ec22c1..5a5020091e1 100644 --- a/BasicServicesKit/ohscan.h +++ b/BasicServicesKit/ohscan.h @@ -185,7 +185,7 @@ int32_t OH_Scan_StartScannerDiscovery(Scan_ScannerDiscoveryCallback callback); * {@link SCAN_ERROR_DEVICE_BUSY} Indicates that the scanner is busy. * {@link SCAN_ERROR_INVALID_PARAMETER} Indicates that the input parameter is invalid. * {@link SCAN_ERROR_IO_ERROR} Indicates an error occured while communicating with the device. - * {@link SCAN_ERROR_NO_MEM} Indicates an insufficent amount of memory is available. + * {@link SCAN_ERROR_NO_MEMORY} Indicates an insufficent amount of memory is available. * @syscap SystemCapability.Print.PrintFramework * @since 12 */ @@ -259,7 +259,7 @@ int32_t OH_Scan_SetScannerParameter(const char* scannerId, const int32_t option, * {@link SCAN_ERROR_NO_DOCS} Indicates the document feeder is out of documents. * {@link SCAN_ERROR_COVER_OPEN} Indicates the scanner cover is open. * {@link SCAN_ERROR_IO_ERROR} Indicates an error occurred while communicating with the device. - * {@link SCAN_ERROR_NO_MEM} Indicates an insufficent amount of memory is available. + * {@link SCAN_ERROR_NO_MEMORY} Indicates an insufficent amount of memory is available. * {@link SCAN_ERROR_INVALID_PARAMETER} Indicates that the input parameter is invalid. * {@link SCAN_ERROR_DEVICE_BUSY} Indicates the device is busy, the operation should be retried later. * @syscap SystemCapability.Print.PrintFramework @@ -298,7 +298,7 @@ int32_t OH_Scan_CancelScan(const char* scannerId); * {@link SCAN_ERROR_NO_DOCS} Indicates the document feeder is out of documents. * {@link SCAN_ERROR_COVER_OPEN} Indicates the scanner cover is open. * {@link SCAN_ERROR_IO_ERROR} Indicates an error occurred while communicating with the scanner. - * {@link SCAN_ERROR_NO_MEM} Indicates an insufficent amount of memory is available. + * {@link SCAN_ERROR_NO_MEMORY} Indicates an insufficent amount of memory is available. * {@link SCAN_ERROR_DEVICE_BUSY} Indicates the device is busy, the operation should be retried later. * @syscap SystemCapability.Print.PrintFramework * @since 12 -- Gitee From ae4df62f1f02e84b232dcfc885f73551f2144738 Mon Sep 17 00:00:00 2001 From: xushunjie Date: Thu, 4 Sep 2025 08:54:27 +0000 Subject: [PATCH 84/95] update arkui/ace_engine/native/native_node.h. Signed-off-by: xushunjie --- arkui/ace_engine/native/native_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f0179d9266d..3720735b6d9 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4998,7 +4998,7 @@ typedef enum { NODE_SLIDER_SUFFIX, /** - * @brief Defines the color of the slider. This attribute can be set, reset, and obtained as required through APIs. + * @brief Defines the color of the slider block. This attribute can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .object: array of color stops, each of which consists of a color and its stop position. -- Gitee From 9c413c905f911a86fa751a910a45d3bec6089e58 Mon Sep 17 00:00:00 2001 From: zzhengxiang <2646125453@qq.com> Date: Thu, 4 Sep 2025 17:05:15 +0800 Subject: [PATCH 85/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zzhengxiang <2646125453@qq.com> --- ark_runtime/jsvm/jsvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index d211f329fc6..62a4d8f5950 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -1373,7 +1373,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueInt64(JSVM_Env env, * @param result Number of bytes copied into the buffer, excluding the null terminator. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n - * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n + * {@link JSVM_STRING_EXPECTED } If a non-string JSVM_Value is passed in.\n * @since 11 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringLatin1(JSVM_Env env, @@ -1394,7 +1394,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringLatin1(JSVM_Env env, * @param result Number of bytes copied into the buffer, excluding the null terminator. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n - * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n + * {@link JSVM_STRING_EXPECTED } If a non-string JSVM_Value is passed in.\n * @since 11 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringUtf8(JSVM_Env env, @@ -1415,7 +1415,7 @@ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringUtf8(JSVM_Env env, * @param result Number of 2-byte code units copied into the buffer, excluding the null terminator. * @return Returns JSVM funtions result code. * {@link JSVM_OK } If the function executed successfully.\n - * {@link JSVM_NUMBER_EXPECTED } If a non-number JSVM_Value is passed in.\n + * {@link JSVM_STRING_EXPECTED } If a non-string JSVM_Value is passed in.\n * @since 11 */ JSVM_EXTERN JSVM_Status OH_JSVM_GetValueStringUtf16(JSVM_Env env, -- Gitee From 27879b36397832ece3eb4a9a82b89faf5683fbd1 Mon Sep 17 00:00:00 2001 From: Nathan Yang Date: Mon, 28 Jul 2025 10:39:20 +0800 Subject: [PATCH 86/95] feat: add OH_AbilityRuntime_StartSelfUIAbilityWithReceivingPid Signed-off-by: Nathan Yang --- .../ability_runtime/ability_runtime_common.h | 10 +++++ .../ability_runtime/application_context.h | 39 +++++++++++++++++++ .../libability_runtime.ndk.json | 4 ++ 3 files changed, 53 insertions(+) diff --git a/AbilityKit/ability_runtime/ability_runtime_common.h b/AbilityKit/ability_runtime/ability_runtime_common.h index 7c2e98d4a63..bf736155281 100644 --- a/AbilityKit/ability_runtime/ability_runtime_common.h +++ b/AbilityKit/ability_runtime/ability_runtime_common.h @@ -143,6 +143,16 @@ typedef enum { * @since 21 */ ABILITY_RUNTIME_ERROR_CODE_GET_APPLICATION_INFO_FAILED = 16000081, + /** + * @error Start UIAbility timeout. + * @since 21 + */ + ABILITY_RUNTIME_ERROR_CODE_START_TIMEOUT = 16000133, + /** + * @error The API does not support being called in the main thread. + * @since 21 + */ + ABILITY_RUNTIME_ERROR_CODE_MAIN_THREAD_NOT_SUPPORTED = 16000134, } AbilityRuntime_ErrorCode; #ifdef __cplusplus diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 00c5d579d45..e974a0703ff 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -307,6 +307,45 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbilityWithStartOptions(Ab */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetVersionCode(int64_t* versionCode); +/** + * @brief Starts self UIAbility with start options and receives the process ID. + * + * @permission ohos.permission.NDK_START_SELF_UI_ABILITY + * @param want The arguments passed to start self UIAbility. + * For details, see {@link AbilityBase_Want}. + * @param options The start options passed to start self UIAbility. + * For details, see {@link AbilityRuntime_StartOptions}. + * @param targetPid The process ID of the started UIAbility. + * @return Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the call is successful. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_PERMISSION_DENIED} if the caller has no correct permission. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the arguments provided is invalid. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NOT_SUPPORTED} if the device does not support starting self uiability. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NO_SUCH_ABILITY} if the target ability does not exist. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INCORRECT_ABILITY_TYPE} if the ability type is incorrect. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROWDTEST_EXPIRED} if the crowdtesting application expires. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_WUKONG_MODE} if the ability cannot be started in Wukong mode. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CONTROLLED} if the app is controlled. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_EDM_CONTROLLED} if the app is controlled by EDM. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_CROSS_APP} if the caller tries to start a different application. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INTERNAL} if internal error occurs. such as connect system service failed. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_NOT_TOP_ABILITY} if the caller is not foreground process. + * Returns {@link ABILITY_RUNTIME_ERROR_VISIBILITY_SETTING_DISABLED} if setting visibility is disabled. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_MULTI_APP_NOT_SUPPORTED} + * if the app clone or multi-instance is not supported. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_INVALID_APP_INSTANCE_KEY} if the app instance key is invalid. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_UPPER_LIMIT_REACHED} if the number of app instances reached the limit. + * Returns {@link ABILITY_RUNTIME_ERROR_MULTI_INSTANCE_NOT_SUPPORTED} if the multi-instance is not supported. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_APP_INSTANCE_KEY_NOT_SUPPORTED} + * if the APP_INSTANCE_KEY cannot be specified. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_START_TIMEOUT} if starting UIAbility time out. + * Returns {@link ABILITY_RUNTIME_ERROR_CODE_MAIN_THREAD_NOT_SUPPORTED} + * if the API is called in the main thread of the app. + * For details, see {@link AbilityRuntime_ErrorCode}. + * @since 21 + */ +AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbilityWithPidResult(AbilityBase_Want *want, + AbilityRuntime_StartOptions *options, int32_t *targetPid); + #ifdef __cplusplus } // extern "C" #endif diff --git a/AbilityKit/ability_runtime/libability_runtime.ndk.json b/AbilityKit/ability_runtime/libability_runtime.ndk.json index f7939128e40..9bb543e11f9 100644 --- a/AbilityKit/ability_runtime/libability_runtime.ndk.json +++ b/AbilityKit/ability_runtime/libability_runtime.ndk.json @@ -182,5 +182,9 @@ { "first_introduced": "21", "name": "OH_AbilityRuntime_ApplicationContextGetVersionCode" + }, + { + "first_introduced": "21", + "name": "OH_AbilityRuntime_StartSelfUIAbilityWithPidResult" } ] \ No newline at end of file -- Gitee From ae6ccc160bc6569f34723be1b50f4db60b15382f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=9C=E7=A7=8B=E5=AE=8F?= Date: Tue, 2 Sep 2025 20:17:47 +0800 Subject: [PATCH 87/95] =?UTF-8?q?=E8=A1=A5=E5=85=85backgroundImagePosition?= =?UTF-8?q?API12=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 潜秋宏 Change-Id: Ia0b0ee96d20f81a3ee1cd4051f928d6437ac6db2 --- arkui/ace_engine/native/native_node.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 5abb2ea5d4e..1b7963c7a2e 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -1235,6 +1235,21 @@ typedef enum { * */ NODE_MARK_ANCHOR, + + /** + * @brief Defines the position of the background image in the component, that is, the coordinates relative to + * the upper left corner of the component. 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: position along the x-axis, in px. \n + * .value[1].f32: position along the y-axis, in px. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: position along the x-axis, in px. \n + * .value[1].f32: position along the y-axis, in px. \n + * + * @since 12 + */ /** * @brief Defines the position of the background image in the component, that is, the coordinates relative to * the upper left corner of the component. This attribute can be set, reset, and obtained as required through APIs. -- Gitee From 2145b6a909794aa0075416c948dcef19daac33d4 Mon Sep 17 00:00:00 2001 From: buzhenwang Date: Tue, 2 Sep 2025 19:59:13 +0800 Subject: [PATCH 88/95] add SetLogLevel Signed-off-by: buzhenwang --- hiviewdfx/hilog/include/hilog/log.h | 33 +++++++++++++++++++++++++++++ hiviewdfx/hilog/libhilog.ndk.json | 4 ++++ 2 files changed, 37 insertions(+) diff --git a/hiviewdfx/hilog/include/hilog/log.h b/hiviewdfx/hilog/include/hilog/log.h index 1c4cda70470..0aa747734a0 100644 --- a/hiviewdfx/hilog/include/hilog/log.h +++ b/hiviewdfx/hilog/include/hilog/log.h @@ -133,6 +133,30 @@ typedef enum { LOG_FATAL = 7, } LogLevel; +/** + * @brief Enumerates preference strategy to be used in {@link OH_LOG_SetLogLevel}. + * + * You are advised to select preference strategy based on their respective usage scenarios. + * + * @since 21 + */ +typedef enum { + /** Used to unset SetLogLevel, then none is set + */ + UNSET_LOGLEVEL = 0, + /** + * The actual lowest log level is determined by + * the maximum level between the new level and the system-controlled level. + * This is equivalent to calling OH_LOG_SetMinLogLevel. + */ + PREFER_CLOSE_LOG = 1, + /** + * The actual lowest log level is determined by + * the minimum level between the new level and the system-controlled level. + */ + PREFER_OPEN_LOG = 2, +} PreferStrategy; + /** * @brief Outputs logs. * @@ -351,6 +375,15 @@ void OH_LOG_SetCallback(LogCallback callback); */ void OH_LOG_SetMinLogLevel(LogLevel level); +/** + * @brief Sets the lowest log level of the current application process. Different preference strategy can be set. + * + * @param level log level. + * @param prefer preference strategy. See {@link PreferStrategy}. + * @since 21 + */ +void OH_LOG_SetLogLevel(LogLevel level, PreferStrategy prefer); + #ifdef __cplusplus } #endif diff --git a/hiviewdfx/hilog/libhilog.ndk.json b/hiviewdfx/hilog/libhilog.ndk.json index 0d14010e04c..2f06e93a984 100644 --- a/hiviewdfx/hilog/libhilog.ndk.json +++ b/hiviewdfx/hilog/libhilog.ndk.json @@ -19,5 +19,9 @@ }, { "name": "OH_LOG_SetMinLogLevel" + }, + { + "first_instroduced":"21", + "name": "OH_LOG_SetLogLevel" } ] -- Gitee From 4dcf387cb998d3b0e8d7f066457ae75c873a6579 Mon Sep 17 00:00:00 2001 From: wuliangdong Date: Thu, 21 Aug 2025 08:24:55 +0000 Subject: [PATCH 89/95] Intercept and ReDispatch KeyEvent To Support Secure Password Input. Signed-off-by: wuliangdong Change-Id: I0f72ee9059f6a631f2ec8c83c2e63a96e07c102d --- .../kits/c/input/oh_input_manager.h | 66 +++++++++++++++++++ multimodalinput/kits/c/ohinput.ndk.json | 16 +++++ 2 files changed, 82 insertions(+) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index eb4fc5764e6..91c425269db 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -640,8 +640,74 @@ void OH_Input_SetKeyEventDisplayId(struct Input_KeyEvent* keyEvent, int32_t disp */ int32_t OH_Input_GetKeyEventDisplayId(const struct Input_KeyEvent* keyEvent); +/** + * @brief Get the eventId of the keyEvent. + * + * @param keyEvent - Key event object. + * @param eventId - Get the keyEvent eventId. + * @return OH_Input_GetKeyEventId function result code. + * {@link INPUT_SUCCESS} Get the eventId of the keyEvent success.\n + * {@link INPUT_PARAMETER_ERROR} Parameter check failed.\n + * @since 21 + */ + +Input_Result OH_Input_GetKeyEventId(const struct Input_KeyEvent* keyEvent, int32_t* eventId); + +/** + * @brief Add a keyEvent interception hook function. Before using this interface, + * the user needs to authorize it in the settings. + * + * @permission ohos.permission.HOOK_KEY_EVENT + * @param callback - Hook function, keyEvent will be sent to the hook function for priority processing. + * @return OH_Input_AddKeyEventHook function result code. + * {@link INPUT_SUCCESS} Added hook function successfully.\n + * {@link INPUT_PARAMETER_ERROR} Failed to add the hook function. Reason: Parameter check failed.\n + * {@link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n + * {@link INPUT_PERMISSION_DENIED} Failed to add the hook function. Reason: Permission check failed.\n + * {@link INPUT_REPEAT_INTERCEPTOR} Failed to add the hook function.\n + * Reason: Repeatedly set the hook function. A process can only have one key hook function.\n + * {@link INPUT_SERVICE_EXCEPTION} Failed to add the hook function.\n + * Reason: Input service exception, please try again.\n + * @since 21 + */ +Input_Result OH_Input_AddKeyEventHook(Input_KeyEventCallback callback); +/** + * @brief Remove keyEvent interception hook function. + * + * @param callback - Hook function, Same as the parameters when calling OH_Input_AddKeyEventHook. + * @return OH_Input_RemoveKeyEventHook function result code. + * {@link INPUT_SUCCESS} Hook function removed successfully.\n + * Even if the hook function has not been added before, it will return success when removed.\n + * {@link INPUT_PARAMETER_ERROR} Failed to remove the hook function. Reason: Parameter check failed.\n + * {@link INPUT_SERVICE_EXCEPTION} Failed to remove the hook function.\n + * Reason: Input service exception, please try again.\n + * @since 21 + */ +Input_Result OH_Input_RemoveKeyEventHook(Input_KeyEventCallback callback); +/** + * @brief Redispatches keyEvent. + * Only keyEvent intercepted by hook functions can be redispatched, + * and the event order must be maintained during redispatching. + * The hook function intercepts the input event and then redistributes it for 3 seconds. + * If this time is exceeded, calling this function will return INPUT_PARAMETER_ERROR. + * Re-dispatching requires event pairing, usually starting with one or more KEY_ACTION_DOWN and + * ending with KEY_ACTION_UP or KEY_ACTION_CANCEL. + * Only KEY_ACTION_UP or KEY_ACTION_CANCEL is redispatched, the function call succeeds, + * but no actual dispatch is made. + * If an event is dispatched that is not intercepted by the hook function, + * the function call succeeds, but no actual dispatch action is taken. + * + * @param eventId - keyEvent eventId. + * @return OH_Input_DispatchToNextHandler function result code. + * {@link INPUT_SUCCESS} Redistribution successful.\n + * {@link INPUT_PARAMETER_ERROR} Redistribution failed. Reason: KeyEvent does not exist.\n + * {@link INPUT_SERVICE_EXCEPTION} Redistribution failed.\n + * Reason: Input service exception, it's recommended to reset the pending distribution status.\n + * @since 21 + */ +Input_Result OH_Input_DispatchToNextHandler(int32_t eventId); /** * @brief Inject mouse event. diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json index 2747b8fa116..83ce83a89e1 100644 --- a/multimodalinput/kits/c/ohinput.ndk.json +++ b/multimodalinput/kits/c/ohinput.ndk.json @@ -569,5 +569,21 @@ { "first_introduced": "20", "name": "OH_Input_InjectTouchEventGlobal" + }, + { + "first_introduced": "21", + "name": "OH_Input_GetKeyEventId" + }, + { + "first_introduced": "21", + "name": "OH_Input_AddKeyEventHook" + }, + { + "first_introduced": "21", + "name": "OH_Input_RemoveKeyEventHook" + }, + { + "first_introduced": "21", + "name": "OH_Input_DispatchToNextHandler" } ] \ No newline at end of file -- Gitee From 5a1879727c7470049b750430b6ecdce1ebeb29e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=99=93=E6=B8=AF?= Date: Fri, 5 Sep 2025 17:04:56 +0800 Subject: [PATCH 90/95] add AVPlayer capi SetDataSource MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李晓港 --- multimedia/player_framework/avplayer.h | 13 +++++++++++++ .../player_framework/avplayer/libavplayer.ndk.json | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/multimedia/player_framework/avplayer.h b/multimedia/player_framework/avplayer.h index 9f89bc00c2a..d206b6d46ed 100644 --- a/multimedia/player_framework/avplayer.h +++ b/multimedia/player_framework/avplayer.h @@ -47,6 +47,7 @@ #include "avplayer_base.h" #include "native_window/external_window.h" #include "ohaudio/native_audiostream_base.h" +#include "native_avcodec_base.h" #ifdef __cplusplus extern "C" { @@ -644,6 +645,18 @@ OH_AVErrCode OH_AVPlayer_SetVolumeMode(OH_AVPlayer *player, OH_AudioStream_Volum */ OH_AVErrCode OH_AVPlayer_SetLoudnessGain(OH_AVPlayer *player, float loudnessGain); +/** + * @brief Set the media source of the player. The data of this media source is provided by the application. + * @param {OH_AVPlayer*} player Pointer to an OH_AVPlayer instance + * @param {OH_AVDataSourceExt*} datasrc Pointer to an OH_AVDataSourceExt instance + * @param {void*} userData The handle passed in by the user is used to pass in the callback + * @return Function result code. + * {@link AV_ERR_OK} if the execution is successful. + * {@link AV_ERR_INVALID_VAL} if input player is nullptr or datasrc is nullptr. + * @since 21 + */ +OH_AVErrCode OH_AVPlayer_SetDataSource(OH_AVPlayer *player, OH_AVDataSourceExt* datasrc, void* userData); + #ifdef __cplusplus } #endif diff --git a/multimedia/player_framework/avplayer/libavplayer.ndk.json b/multimedia/player_framework/avplayer/libavplayer.ndk.json index 787c34354f8..2b372fe8fa0 100644 --- a/multimedia/player_framework/avplayer/libavplayer.ndk.json +++ b/multimedia/player_framework/avplayer/libavplayer.ndk.json @@ -150,5 +150,9 @@ { "first_introduced": "21", "name": "OH_AVPlayer_SetLoudnessGain" + }, + { + "first_introduced": "21", + "name": "OH_AVPlayer_SetDataSource" } ] \ No newline at end of file -- Gitee From 262789e182e0e76d6c96ba957d0f66861c041001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=A5=E7=BB=B4?= Date: Fri, 5 Sep 2025 09:33:54 +0000 Subject: [PATCH 91/95] update AbilityKit/ability_runtime/application_context.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 查维 --- AbilityKit/ability_runtime/application_context.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 4336a37c75f..af2d128fc67 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -294,7 +294,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbility(AbilityBase_Want * AbilityRuntime_ErrorCode OH_AbilityRuntime_StartSelfUIAbilityWithStartOptions(AbilityBase_Want *want, AbilityRuntime_StartOptions *options); - /** +/** * @brief Obtain the version code of the application. * * @param versionCode The version code of the application. @@ -340,6 +340,8 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLaunchParameter( */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetLatestParameter( char* buffer, const int32_t bufferSize, int32_t* writeLength); + +/** * @brief Starts self UIAbility with start options and receives the process ID. * * @permission ohos.permission.NDK_START_SELF_UI_ABILITY -- Gitee From 9fdf575426e9d9a371e51e563564ce988a796c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=91=E5=B1=B1?= Date: Fri, 5 Sep 2025 18:14:44 +0800 Subject: [PATCH 92/95] =?UTF-8?q?=E6=9B=B4=E6=96=B0json=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈树山 --- arkui/window_manager/libwm.ndk.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index 4f4f24f91b1..8bb60641f1b 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -203,5 +203,21 @@ { "first_instroduced":"20", "name":"OH_PictureInPicture_UnregisterAllResizeListeners" + }, + { + "first_instroduced":"21", + "name":"OH_WindowManager_GetAllMainWindowInfo" + }, + { + "first_instroduced":"21", + "name":"OH_WindowManager_ReleaseAllMainWindowInfo" + }, + { + "first_instroduced":"21", + "name":"OH_WindowManager_GetMainWindowSnapshot" + }, + { + "first_instroduced":"21", + "name":"OH_WindowManager_ReleaseMainWindowSnapshot" } ] \ No newline at end of file -- Gitee From e4eea40628c33d1b99c59a5e939fd6870741d039 Mon Sep 17 00:00:00 2001 From: xiaozuo00 Date: Mon, 1 Sep 2025 15:08:53 +0800 Subject: [PATCH 93/95] add GetAbilityResourceInfo Signed-off-by: xiaozuo00 --- .../bundle_framework/bundle/BUILD.gn | 12 +- .../bundle/include/ability_resource_info.h | 172 ++++++++++++++++++ .../bundle/include/bundle_manager_common.h | 72 ++++++++ .../bundle/include/native_interface_bundle.h | 17 ++ .../bundle/libbundle.ndk.json | 40 ++++ 5 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 bundlemanager/bundle_framework/bundle/include/ability_resource_info.h create mode 100644 bundlemanager/bundle_framework/bundle/include/bundle_manager_common.h diff --git a/bundlemanager/bundle_framework/bundle/BUILD.gn b/bundlemanager/bundle_framework/bundle/BUILD.gn index 22dfebfab4a..5f7c039ef55 100644 --- a/bundlemanager/bundle_framework/bundle/BUILD.gn +++ b/bundlemanager/bundle_framework/bundle/BUILD.gn @@ -18,7 +18,11 @@ config("bundle_ndk_config") { } ohos_ndk_headers("bundle_header") { dest_dir = "$ndk_headers_out_dir/bundle/" - sources = [ "./include/native_interface_bundle.h" ] + sources = [ + "./include/ability_resource_info.h", + "./include/bundle_manager_common.h", + "./include/native_interface_bundle.h", + ] } ohos_ndk_library("libbundle_ndk") { @@ -26,5 +30,9 @@ ohos_ndk_library("libbundle_ndk") { min_compact_version = "9" output_name = "bundle_ndk" system_capability = "SystemCapability.BundleManager.BundleFramework.Core" - system_capability_headers = [ "bundle/native_interface_bundle.h" ] + system_capability_headers = [ + "bundle/native_interface_bundle.h", + "bundle/bundle_manager_common.h", + "bundle/ability_resource_info.h", + ] } diff --git a/bundlemanager/bundle_framework/bundle/include/ability_resource_info.h b/bundlemanager/bundle_framework/bundle/include/ability_resource_info.h new file mode 100644 index 00000000000..e53815ca3fb --- /dev/null +++ b/bundlemanager/bundle_framework/bundle/include/ability_resource_info.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup Native_Bundle + * @{ + * + * @brief Describe the functions of AbilityResourceInfo. + * + * @since 21 + */ + +/** + * @file ability_resource_info.h + * + * @brief Defines the OH_NativeBundle_AbilityResourceInfo APIs. + * + * @library libbundle_ndk.z.so + * @kit AbilityKit + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @since 21 + */ + +#ifndef ABILITY_RESOURCE_INFO_H +#define ABILITY_RESOURCE_INFO_H + +#include +#include +#include "bundle_manager_common.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Indicates ability resource info. + * + * @since 21 + */ +struct OH_NativeBundle_AbilityResourceInfo; +typedef struct OH_NativeBundle_AbilityResourceInfo OH_NativeBundle_AbilityResourceInfo; + +/** +* @brief Get the bundle name of the abilityResourceInfo. + * + * @param abilityResourceInfo The ability resource info that has been obtained. + * @param bundleName The bundle name obtained from abilityResourceInfo. + * @return The error code. + * {@link BUNDLE_MANAGER_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link BUNDLE_MANAGER_ERROR_CODE_PARAM_INVALID} if the abilityResourceInfo is invalid. + * @since 21 + */ +BundleManager_ErrorCode OH_NativeBundle_GetBundleName( + OH_NativeBundle_AbilityResourceInfo* abilityResourceInfo, char** bundleName); + +/** +* @brief Get the module name of the abilityResourceInfo. + * + * @param abilityResourceInfo The ability resource info that has been obtained. + * @param moduleName The module name obtained from abilityResourceInfo. + * @return The error code. + * {@link BUNDLE_MANAGER_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link BUNDLE_MANAGER_ERROR_CODE_PARAM_INVALID} if the abilityResourceInfo is invalid. + * @since 21 + */ +BundleManager_ErrorCode OH_NativeBundle_GetModuleName( + OH_NativeBundle_AbilityResourceInfo* abilityResourceInfo, char** moduleName); + +/** +* @brief Get the ability name of the abilityResourceInfo. + * + * @param abilityResourceInfo The ability resource info that has been obtained. + * @param abilityName The ability name obtained from abilityResourceInfo. + * @return The error code. + * {@link BUNDLE_MANAGER_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link BUNDLE_MANAGER_ERROR_CODE_PARAM_INVALID} if the abilityResourceInfo is invalid. + * @since 21 + */ +BundleManager_ErrorCode OH_NativeBundle_GetAbilityName( + OH_NativeBundle_AbilityResourceInfo* abilityResourceInfo, char** abilityName); + +/** +* @brief Get the icon of the abilityResourceInfo. + * + * @param abilityResourceInfo The ability resource info that has been obtained. + * @param icon The icon obtained from abilityResourceInfo. + * @return The error code. + * {@link BUNDLE_MANAGER_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link BUNDLE_MANAGER_ERROR_CODE_PARAM_INVALID} if the abilityResourceInfo is invalid. + * @since 21 + */ +BundleManager_ErrorCode OH_NativeBundle_GetIcon( + OH_NativeBundle_AbilityResourceInfo* abilityResourceInfo, char** icon); + +/** +* @brief Get the label of the abilityResourceInfo. + * + * @param abilityResourceInfo The ability resource info that has been obtained. + * @param label The label obtained from abilityResourceInfo. + * @return The error code. + * {@link BUNDLE_MANAGER_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link BUNDLE_MANAGER_ERROR_CODE_PARAM_INVALID} if the abilityResourceInfo is invalid. + * @since 21 + */ +BundleManager_ErrorCode OH_NativeBundle_GetLabel( + OH_NativeBundle_AbilityResourceInfo* abilityResourceInfo, char** label); + +/** +* @brief Get the appIndex of the abilityResourceInfo. + * + * @param abilityResourceInfo The ability resource info that has been obtained. + * @param appIndex The appIndex obtained from abilityResourceInfo. + * @return The error code. + * {@link BUNDLE_MANAGER_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link BUNDLE_MANAGER_ERROR_CODE_PARAM_INVALID} if the abilityResourceInfo is invalid. + * @since 21 + */ +BundleManager_ErrorCode OH_NativeBundle_GetAppIndex( + OH_NativeBundle_AbilityResourceInfo* abilityResourceInfo, int* appIndex); + +/** +* @brief Check whether abilityResourceInfo is the default application. + * + * @param abilityResourceInfo The ability resource info that has been obtained. + * @param isDefault Check whether abilityResourceInfo is the default application. + * @return The error code. + * {@link BUNDLE_MANAGER_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link BUNDLE_MANAGER_ERROR_CODE_PARAM_INVALID} if the abilityResourceInfo is invalid. + * @since 21 + */ +BundleManager_ErrorCode OH_NativeBundle_CheckDefaultApp( + OH_NativeBundle_AbilityResourceInfo* abilityResourceInfo, bool* isDefault); + +/** +* @brief Destroy the ability resource info. + * + * @param abilityResourceInfo The ability resource info to be deleted. + * @param count Indicates the ability resource array size. + * @return The error code. + * {@link BUNDLE_MANAGER_ERROR_CODE_NO_ERROR} if the operation is successful. + * {@link BUNDLE_MANAGER_ERROR_CODE_PARAM_INVALID} if the abilityResourceInfo is invalid. + * @since 21 + */ +BundleManager_ErrorCode OH_AbilityResourceInfo_Destroy( + OH_NativeBundle_AbilityResourceInfo* abilityResourceInfo, size_t count); + +/** +* @brief Get the size of ability resource info. + * + * @return The size of ability resource info. + * + * @since 21 + */ +int OH_NativeBundle_GetSize(); +#ifdef __cplusplus +} // extern "C" +#endif + +/** @} */ +#endif // ABILITY_RESOURCE_INFO_H diff --git a/bundlemanager/bundle_framework/bundle/include/bundle_manager_common.h b/bundlemanager/bundle_framework/bundle/include/bundle_manager_common.h new file mode 100644 index 00000000000..3098a2582d3 --- /dev/null +++ b/bundlemanager/bundle_framework/bundle/include/bundle_manager_common.h @@ -0,0 +1,72 @@ +/* +* Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup Native_Bundle + * @{ + * + * @brief Describes the Native Bundle. + * + * @since 21 + * @version 1.0 + */ + +/** + * @file bundle_manager_common.h + * + * @brief Declare the common types for the native BundleManager. + * + * @library libbundle_ndk.z.so + * @kit AbilityKit + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @since 21 + */ + +#ifndef BUNDLE_MANAGER_COMMON_H +#define BUNDLE_MANAGER_COMMON_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumerates the error codes. + * + * @since 21 + */ +typedef enum { + /** + * @error No error. + * @since 21 + */ + BUNDLE_MANAGER_ERROR_CODE_NO_ERROR = 0, + /** + * @error permission denied. + * @since 21 + */ + BUNDLE_MANAGER_ERROR_CODE_PERMISSION_DENIED = 201, + /** + * @error param invalid. + * @since 21 + */ + BUNDLE_MANAGER_ERROR_CODE_PARAM_INVALID = 401, +} BundleManager_ErrorCode; + +#ifdef __cplusplus +} +#endif + +/** @} */ +#endif // BUNDLE_MANAGER_COMMON_H diff --git a/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h b/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h index d1b0201e4fb..9b7867ba143 100644 --- a/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h +++ b/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h @@ -40,6 +40,9 @@ #include #include +#include "ability_resource_info.h" +#include "bundle_manager_common.h" + #ifdef __cplusplus extern "C" { #endif @@ -224,6 +227,20 @@ bool OH_NativeBundle_IsDebugMode(bool* isDebugMode); * @since 20 */ OH_NativeBundle_ModuleMetadata* OH_NativeBundle_GetModuleMetadata(size_t* size); + +/** + * @brief Obtain a list of ability that support opening files in a certain format. + * + * @permisssion {@code ohos.permission.GET_ABILITY_INFO}. + * @param fileType Indicates the file type. + * @param abilityResourceInfo Indicates the ability resource array. + * @param size Indicates the ability resource array size. + * @return Returns {@link BUNDLE_MANAGER_ERROR_CODE_NO_ERROR} if the call is successful. + * Returns {@link BUNDLE_MANAGER_ERROR_CODE_PERMISSION_DENIED} if the caller has no correct permission. + * @since 21 + */ +BundleManager_ErrorCode OH_NativeBundle_GetAbilityResourceInfo(char* fileType, + OH_NativeBundle_AbilityResourceInfo** abilityResourceInfo, size_t* size); #ifdef __cplusplus }; #endif diff --git a/bundlemanager/bundle_framework/bundle/libbundle.ndk.json b/bundlemanager/bundle_framework/bundle/libbundle.ndk.json index 7c05eef7bb2..a21ec324459 100644 --- a/bundlemanager/bundle_framework/bundle/libbundle.ndk.json +++ b/bundlemanager/bundle_framework/bundle/libbundle.ndk.json @@ -26,5 +26,45 @@ { "first_introduced": "20", "name": "OH_NativeBundle_GetModuleMetadata" + }, + { + "first_introduced": "21", + "name": "OH_NativeBundle_GetAbilityResourceInfo" + }, + { + "first_introduced": "21", + "name": "OH_NativeBundle_GetBundleName" + }, + { + "first_introduced": "21", + "name": "OH_NativeBundle_GetModuleName" + }, + { + "first_introduced": "21", + "name": "OH_NativeBundle_GetAbilityName" + }, + { + "first_introduced": "21", + "name": "OH_NativeBundle_GetIcon" + }, + { + "first_introduced": "21", + "name": "OH_NativeBundle_GetLabel" + }, + { + "first_introduced": "21", + "name": "OH_NativeBundle_GetAppIndex" + }, + { + "first_introduced": "21", + "name": "OH_NativeBundle_CheckDefaultApp" + }, + { + "first_introduced": "21", + "name": "OH_AbilityResourceInfo_Destroy" + }, + { + "first_introduced": "21", + "name": "OH_NativeBundle_GetSize" } ] -- Gitee From e093781102098246e04b7cee11a535d3f7d4aed9 Mon Sep 17 00:00:00 2001 From: Lighting Artist Date: Sat, 6 Sep 2025 10:24:55 +0000 Subject: [PATCH 94/95] [BugFix]add strip for llvm/bin Signed-off-by: Lighting Artist --- third_party/musl/ndk_script/toolchain.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/third_party/musl/ndk_script/toolchain.sh b/third_party/musl/ndk_script/toolchain.sh index db0cf489e50..fab8b897981 100755 --- a/third_party/musl/ndk_script/toolchain.sh +++ b/third_party/musl/ndk_script/toolchain.sh @@ -74,3 +74,6 @@ function remove_unnecessary_file() { } remove_unnecessary_file strip_dir ${OUT_DIR}/lib +if [ -f "${OUT_DIR}/bin/python/lib/python3.11/lldb/_lldb.so" ]; then + ${TOOL_DIR}/llvm-strip ${OUT_DIR}/bin/python/lib/python3.11/lldb/_lldb.so +fi -- Gitee From e3197251edb660ee563e896e04e8f706a3adef0c Mon Sep 17 00:00:00 2001 From: xwx1135370 Date: Mon, 8 Sep 2025 12:55:12 +0800 Subject: [PATCH 95/95] [OpenHarmony-6.0-Release] strip _lldb.so Signed-off-by: xwx1135370 --- third_party/musl/ndk_script/toolchain.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/third_party/musl/ndk_script/toolchain.sh b/third_party/musl/ndk_script/toolchain.sh index fab8b897981..4c87b345f9c 100755 --- a/third_party/musl/ndk_script/toolchain.sh +++ b/third_party/musl/ndk_script/toolchain.sh @@ -77,3 +77,6 @@ strip_dir ${OUT_DIR}/lib if [ -f "${OUT_DIR}/bin/python/lib/python3.11/lldb/_lldb.so" ]; then ${TOOL_DIR}/llvm-strip ${OUT_DIR}/bin/python/lib/python3.11/lldb/_lldb.so fi +if [ -f "${OUT_DIR}/bin/python/lib/python3.11/lldb/_lldb.so" ]; then + ${TOOL_DIR}/llvm-strip ${OUT_DIR}/bin/python/lib/python3.11/lldb/_lldb.so +fi -- Gitee