diff --git a/AbilityKit/ability_base/libability_base_want.json b/AbilityKit/ability_base/libability_base_want.json
index 03133ce9184f429df9ec3fc7b412b27df94ab10f..96066b3d46506f54f5f97d19ecae2b0df4047807 100644
--- a/AbilityKit/ability_base/libability_base_want.json
+++ b/AbilityKit/ability_base/libability_base_want.json
@@ -32,35 +32,35 @@
"name": "OH_AbilityBase_GetWantFd"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AbilityBase_SetWantUri"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AbilityBase_GetWantUri"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AbilityBase_SetWantInt32Param"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AbilityBase_GetWantInt32Param"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AbilityBase_SetWantBoolParam"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AbilityBase_GetWantBoolParam"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AbilityBase_SetWantDoubleParam"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AbilityBase_GetWantDoubleParam"
}
]
\ No newline at end of file
diff --git a/AbilityKit/ability_base/want.h b/AbilityKit/ability_base/want.h
index e688836ec681e9ca2d66da0424513bf1d458a135..09355501285c417a6c3f94813b3f693f53bfd6fd 100644
--- a/AbilityKit/ability_base/want.h
+++ b/AbilityKit/ability_base/want.h
@@ -169,7 +169,7 @@ AbilityBase_ErrorCode OH_AbilityBase_GetWantFd(AbilityBase_Want* want, const cha
* @return The error code.
* {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful.
* {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid.
- * @since 18
+ * @since 17
*/
AbilityBase_ErrorCode OH_AbilityBase_SetWantUri(AbilityBase_Want* want, const char* uri);
@@ -182,7 +182,7 @@ AbilityBase_ErrorCode OH_AbilityBase_SetWantUri(AbilityBase_Want* want, const ch
* @return The error code.
* {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful.
* {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid.
- * @since 18
+ * @since 17
*/
AbilityBase_ErrorCode OH_AbilityBase_GetWantUri(AbilityBase_Want* want, char* uri, size_t uriSize);
@@ -195,7 +195,7 @@ AbilityBase_ErrorCode OH_AbilityBase_GetWantUri(AbilityBase_Want* want, char* ur
* @return The error code.
* {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful.
* {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid.
- * @since 18
+ * @since 17
*/
AbilityBase_ErrorCode OH_AbilityBase_SetWantInt32Param(AbilityBase_Want* want, const char* key, int32_t value);
@@ -208,7 +208,7 @@ AbilityBase_ErrorCode OH_AbilityBase_SetWantInt32Param(AbilityBase_Want* want, c
* @return The error code.
* {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful.
* {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid.
- * @since 18
+ * @since 17
*/
AbilityBase_ErrorCode OH_AbilityBase_GetWantInt32Param(AbilityBase_Want* want, const char* key, int32_t* value);
@@ -221,7 +221,7 @@ AbilityBase_ErrorCode OH_AbilityBase_GetWantInt32Param(AbilityBase_Want* want, c
* @return The error code.
* {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful.
* {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid.
- * @since 18
+ * @since 17
*/
AbilityBase_ErrorCode OH_AbilityBase_SetWantBoolParam(AbilityBase_Want* want, const char* key, bool value);
@@ -234,7 +234,7 @@ AbilityBase_ErrorCode OH_AbilityBase_SetWantBoolParam(AbilityBase_Want* want, co
* @return The error code.
* {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful.
* {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid.
- * @since 18
+ * @since 17
*/
AbilityBase_ErrorCode OH_AbilityBase_GetWantBoolParam(AbilityBase_Want* want, const char* key, bool* value);
@@ -247,7 +247,7 @@ AbilityBase_ErrorCode OH_AbilityBase_GetWantBoolParam(AbilityBase_Want* want, co
* @return The error code.
* {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful.
* {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid.
- * @since 18
+ * @since 17
*/
AbilityBase_ErrorCode OH_AbilityBase_SetWantDoubleParam(AbilityBase_Want* want, const char* key, double value);
@@ -260,7 +260,7 @@ AbilityBase_ErrorCode OH_AbilityBase_SetWantDoubleParam(AbilityBase_Want* want,
* @return The error code.
* {@link ABILITY_BASE_ERROR_CODE_NO_ERROR} if the operation is successful.
* {@link ABILITY_BASE_ERROR_CODE_PARAM_INVALID} if the input parameters are invalid.
- * @since 18
+ * @since 17
*/
AbilityBase_ErrorCode OH_AbilityBase_GetWantDoubleParam(AbilityBase_Want* want, const char* key, double* value);
diff --git a/BasicServicesKit/commonevent/oh_commonevent.h b/BasicServicesKit/commonevent/oh_commonevent.h
index a5b93c49881419da14aceea3f13abb2552f8721e..ea252db50df72ce92bfba3be69c35595e59a4930 100644
--- a/BasicServicesKit/commonevent/oh_commonevent.h
+++ b/BasicServicesKit/commonevent/oh_commonevent.h
@@ -59,6 +59,13 @@ typedef enum CommonEvent_ErrCode {
/** @error invalid input parameter. */
COMMONEVENT_ERR_INVALID_PARAMETER = 401,
+ /**
+ * @error The common event send frequency too high.
+ *
+ * @since 19
+ */
+ COMMONEVENT_ERR_SENDING_LIMIT_EXCEEDED = 1500003,
+
/** @error the application cannot send system common events. */
COMMONEVENT_ERR_NOT_SYSTEM_SERVICE = 1500004,
@@ -627,6 +634,7 @@ CommonEvent_ErrCode OH_CommonEvent_SetDoubleArrayToParameters(CommonEvent_Parame
* @return Returns the error code.
* Returns {@link COMMONEVENT_ERR_OK} if the operation is successful.
* Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs.
+ * Returns {@link COMMONEVENT_ERR_SENDING_LIMIT_EXCEEDED} if the common event sending frequency too high.
* Returns {@link COMMONEVENT_ERR_FAIL_SEND_REQUEST } if IPC request failed to send.
* Returns {@link COMMONEVENT_ERR_INIT_UNDONE } if ces not init done.
* @since 18
@@ -641,6 +649,7 @@ CommonEvent_ErrCode OH_CommonEvent_Publish(const char* event);
* @return Returns the error code.
* Returns {@link COMMONEVENT_ERR_OK} if the operation is successful.
* Returns {@link COMMONEVENT_ERR_INVALID_PARAMETER} if a parameter error occurs.
+ * Returns {@link COMMONEVENT_ERR_SENDING_LIMIT_EXCEEDED} if the common event sending frequency too high.
* Returns {@link COMMONEVENT_ERR_FAIL_SEND_REQUEST } if IPC request failed to send.
* Returns {@link COMMONEVENT_ERR_INIT_UNDONE } if ces not init done.
* @since 18
diff --git a/ConnectivityKit/wifi/oh_wifi.h b/ConnectivityKit/wifi/oh_wifi.h
index 1d8e1d64516cd22c4f20fbacbc4c2a502905bfa0..366c07ab77b7f6ed597c6559cc1b2f7a84090016 100644
--- a/ConnectivityKit/wifi/oh_wifi.h
+++ b/ConnectivityKit/wifi/oh_wifi.h
@@ -24,7 +24,7 @@
* @file oh_wifi.h
* @kit ConnectivityKit
* @brief Define interfaces for querying wifi switch status.
- * @library libwifi.so
+ * @library libwifi_ndk.so
* @syscap SystemCapability.Communication.WiFi.STA
* @since 13
*/
diff --git a/DataProtectionKit/dlp_permission_api.h b/DataProtectionKit/dlp_permission_api.h
index 40ec9c34700fa3271e90b6a107621c8769ec0c25..584d663c7c44903eca970fb850fa3b2ec54fae12 100644
--- a/DataProtectionKit/dlp_permission_api.h
+++ b/DataProtectionKit/dlp_permission_api.h
@@ -86,6 +86,18 @@ typedef enum {
*
* @param dlpFileAccess - Indicates the access permission for the DLP file.
* @param flags - Indicates the actions allowed for the DLP file.
+ * 0x00000000 - No file permissions.
+ * 0x00000001 - File view permission.
+ * 0x00000002 - File save permission.
+ * 0x00000004 - File save-as permission.
+ * 0x00000008 - File edit permission.
+ * 0x00000010 - File screenshot permission.
+ * 0x00000020 - File screen-sharing permission.
+ * 0x00000040 - File screen-recording permission.
+ * 0x00000080 - File copy permission.
+ * 0x00000100 - File print permission.
+ * 0x00000200 - File export permission.
+ * 0x00000400 - File permission modification permission.
* @return {@link DLP_ErrCode#ERR_OH_SUCCESS} 0 - If the operation is successful.
* {@link DLP_ErrCode#ERR_OH_INVALID_PARAMETER} 19100001 - If the parameter value is invalid.
* {@link DLP_ErrCode#ERR_OH_API_ONLY_FOR_SANDBOX} 19100006 - If no permission to
@@ -133,7 +145,7 @@ DLP_ErrCode OH_DLP_IsInSandbox(bool *isInSandbox);
* call this API, which is available only for non-DLP sandbox applications.
* {@link DLP_ErrCode#ERR_OH_SYSTEM_SERVICE_EXCEPTION} 19100011 - If the system ability
* works abnormally.
- * {@link DLP_ErrCode#ERR_OH_APPLICATION_NOT_AUTHORIZED} 19100018 - If not authorized application.
+ * {@link DLP_ErrCode#ERR_OH_APPLICATION_NOT_AUTHORIZED} 19100018 - If the application is not authorized.
* @since 14
*/
DLP_ErrCode OH_DLP_SetSandboxAppConfig(const char *configInfo);
@@ -146,7 +158,7 @@ DLP_ErrCode OH_DLP_SetSandboxAppConfig(const char *configInfo);
* {@link DLP_ErrCode#ERR_OH_SYSTEM_SERVICE_EXCEPTION} 19100011 - If the system ability
* works abnormally.
* {@link DLP_ErrCode#ERR_OH_OUT_OF_MEMORY} 19100012 - If the memory error.
- * {@link DLP_ErrCode#ERR_OH_APPLICATION_NOT_AUTHORIZED} 19100018 - If not authorized application.
+ * {@link DLP_ErrCode#ERR_OH_APPLICATION_NOT_AUTHORIZED} 19100018 - If the application is not authorized.
* @since 14
*/
DLP_ErrCode OH_DLP_GetSandboxAppConfig(char **configInfo);
@@ -159,7 +171,7 @@ DLP_ErrCode OH_DLP_GetSandboxAppConfig(char **configInfo);
* call this API, which is available only for non-DLP sandbox applications.
* {@link DLP_ErrCode#ERR_OH_SYSTEM_SERVICE_EXCEPTION} 19100011 - If the system ability
* works abnormally.
- * {@link DLP_ErrCode#ERR_OH_APPLICATION_NOT_AUTHORIZED} 19100018 - If not authorized application.
+ * {@link DLP_ErrCode#ERR_OH_APPLICATION_NOT_AUTHORIZED} 19100018 - If the application is not authorized.
* @since 14
*/
DLP_ErrCode OH_DLP_CleanSandboxAppConfig();
diff --git a/ability/ability_runtime/child_process/libchild_process.ndk.json b/ability/ability_runtime/child_process/libchild_process.ndk.json
index d812f5a08bc7ac6471ed7a2a96290acdc0faec5e..6f6bdcebf52d519ab862738a444bbdc8ae0a2a04 100644
--- a/ability/ability_runtime/child_process/libchild_process.ndk.json
+++ b/ability/ability_runtime/child_process/libchild_process.ndk.json
@@ -8,7 +8,7 @@
"name": "OH_Ability_StartNativeChildProcess"
},
{
- "first_introduced": "16",
+ "first_introduced": "17",
"name": "OH_Ability_GetCurrentChildProcessArgs"
}
]
\ No newline at end of file
diff --git a/ability/ability_runtime/child_process/native_child_process.h b/ability/ability_runtime/child_process/native_child_process.h
index 2837104000d588409635bf594b085559ed1da42c..ca195fdefad29793d3711a5fc3b03084cf25f7d1 100644
--- a/ability/ability_runtime/child_process/native_child_process.h
+++ b/ability/ability_runtime/child_process/native_child_process.h
@@ -284,7 +284,7 @@ Ability_NativeChildProcess_ErrCode OH_Ability_StartNativeChildProcess(
*
* @return Returns a pointer to the arguments passed to current child process.\n
* For details, see {@link NativeChildProcess_Args}.
- * @since 16
+ * @since 17
*/
NativeChildProcess_Args* OH_Ability_GetCurrentChildProcessArgs();
diff --git a/ark_runtime/jsvm/jsvm_types.h b/ark_runtime/jsvm/jsvm_types.h
index 999214b1ad1f53a5be04f435ac360ad842bba08d..8432207c513a0d874ba0936567c432b7fdda45fc 100644
--- a/ark_runtime/jsvm/jsvm_types.h
+++ b/ark_runtime/jsvm/jsvm_types.h
@@ -332,7 +332,7 @@ typedef enum {
*/
JSVM_INVALID_TYPE,
/** jit mode expected status.
- * @since 15
+ * @since 18
*/
JSVM_JIT_MODE_EXPECTED,
} JSVM_Status;
diff --git a/arkui/ace_engine/native/drag_and_drop.h b/arkui/ace_engine/native/drag_and_drop.h
index 38e49caad1f19bd895f11cf455359a9c4ea2cf44..c49081767a213c77ed3d31291e277cc153f5d7f6 100644
--- a/arkui/ace_engine/native/drag_and_drop.h
+++ b/arkui/ace_engine/native/drag_and_drop.h
@@ -869,6 +869,7 @@ int32_t OH_ArkUI_DragEvent_RequestDragEndPending(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_DROP_OPERATION_NOT_ALLOWED} if current is not during the drop handing.
* @since 18
*/
int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult result);
@@ -880,6 +881,7 @@ int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult resu
* @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_DROP_OPERATION_NOT_ALLOWED} if current is not during the drop handing.
* @since 18
*/
int32_t OH_ArkUI_NotifyDragEndPendingDone(int32_t requestIdentify);
diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json
index c80fc0750649e90dbc180d82275ce63ba87c42dc..3a129e8513165a962b3c12d276d8f94fe2992d9a 100644
--- a/arkui/ace_engine/native/libace.ndk.json
+++ b/arkui/ace_engine/native/libace.ndk.json
@@ -252,15 +252,15 @@
"name": "OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType"
},
{
- "first_introduced": "18",
+ "first_introduced": "15",
"name": "OH_ArkUI_GestureInterruptInfo_GetTouchRecognizers"
},
{
- "first_introduced": "18",
+ "first_introduced": "15",
"name": "OH_ArkUI_TouchRecognizer_GetNodeHandle"
},
{
- "first_introduced": "18",
+ "first_introduced": "15",
"name": "OH_ArkUI_TouchRecognizer_CancelTouch"
},
{
@@ -508,7 +508,7 @@
"name": "OH_ArkUI_PointerEvent_GetTiltY"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_PointerEvent_GetRollAngle"
},
{
@@ -2359,6 +2359,30 @@
"first_introduced": "12",
"name": "OH_ArkUI_StartDrag"
},
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_RegisterSystemColorModeChangeEvent"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_UnregisterSystemColorModeChangeEvent"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_RegisterSystemFontStyleChangeEvent"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_UnregisterSystemFontStyleChangeEvent"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale"
+ },
{
"first_introduced": "12",
"name": "OH_ArkUI_DialogDismissEvent_SetShouldBlockDismiss"
@@ -2435,30 +2459,6 @@
"first_introduced": "12",
"name": "OH_ArkUI_CustomSpanDrawInfo_GetBaseline"
},
- {
- "first_introduced": "12",
- "name": "OH_ArkUI_RegisterSystemColorModeChangeEvent"
- },
- {
- "first_introduced": "12",
- "name": "OH_ArkUI_UnregisterSystemColorModeChangeEvent"
- },
- {
- "first_introduced": "12",
- "name": "OH_ArkUI_RegisterSystemFontStyleChangeEvent"
- },
- {
- "first_introduced": "12",
- "name": "OH_ArkUI_UnregisterSystemFontStyleChangeEvent"
- },
- {
- "first_introduced": "12",
- "name": "OH_ArkUI_SystemFontStyleEvent_GetFontSizeScale"
- },
- {
- "first_introduced": "12",
- "name": "OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale"
- },
{
"first_introduced": "13",
"name": "OH_ArkUI_AccessibilityProviderRegisterCallback"
@@ -2952,67 +2952,67 @@
"name": "OH_ArkUI_KeyframeAnimateOption_GetExpectedFrameRate"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_VisibleAreaEventOptions_Create"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_VisibleAreaEventOptions_Dispose"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_VisibleAreaEventOptions_SetRatios"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_VisibleAreaEventOptions_GetRatios"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_UIInputEvent_GetEventTargetWidth"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_UIInputEvent_GetEventTargetHeight"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_UIInputEvent_GetEventTargetPositionX"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_UIInputEvent_GetEventTargetPositionY"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_HoverEvent_IsHovered"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_UIInputEvent_GetModifierKeyStates"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_AxisEvent_SetPropagation"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_ArkUI_AxisEvent_GetScrollStep"
},
{
@@ -3175,6 +3175,14 @@
"first_introduced": "18",
"name": "OH_ArkUI_CustomDialog_SetHoverModeArea"
},
+ {
+ "first_introduced": "18",
+ "name": "OH_ArkUI_CustomDialog_SetBackgroundBlurStyleOptions"
+ },
+ {
+ "first_introduced": "18",
+ "name": "OH_ArkUI_CustomDialog_SetBackgroundEffect"
+ },
{
"first_introduced": "18",
"name": "OH_ArkUI_CustomDialog_RegisterOnWillDismissCallback"
@@ -3290,5 +3298,25 @@
{
"first_introduced": "18",
"name": "OH_ArkUI_XComponent_IsInitialized"
+ },
+ {
+ "first_introduced": "18",
+ "name": "OH_ArkUI_KeyEvent_IsNumLockOn"
+ },
+ {
+ "first_introduced": "18",
+ "name": "OH_ArkUI_KeyEvent_IsCapsLockOn"
+ },
+ {
+ "first_introduced": "18",
+ "name": "OH_ArkUI_KeyEvent_IsScrollLockOn"
+ },
+ {
+ "first_introduced": "18",
+ "name": "OH_ArkUI_PanGesture_SetDistanceMap"
+ },
+ {
+ "first_introduced": "18",
+ "name": "OH_ArkUI_PanGesture_GetDistanceByToolType"
}
]
\ No newline at end of file
diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h
index 5de204ab42866f32ea1afae3fbb04128333ff732..a9967b8e68d833b6aa5f0608f4112e8207df11d6 100644
--- a/arkui/ace_engine/native/native_dialog.h
+++ b/arkui/ace_engine/native/native_dialog.h
@@ -642,6 +642,55 @@ typedef struct {
* @since 18
*/
int32_t (*setFocusable)(ArkUI_NativeDialogHandle handle, bool focusable);
+
+ /**
+ * @brief Sets the background blur effect for a custom dialog box.
+ *
+ * @note This method must be called before the show method.
+ * @param handle Indicates the pointer to the custom dialog box controller.
+ * @param backgroundBlurStyleOptions Background blur effect options.
+ * Format of the {@link ArkUI_AttributeItem} parameter: \n
+ * .value[0].i32: color mode. The value is an enum of {@link ArkUI_ColorMode}. \n
+ * .value[1]?.i32: adaptive color mode. The value is an enum of {@link ArkUI_AdaptiveColor}. \n
+ * .value[2]?.f32: blur degree. The value range is [0.0, 1.0]. \n
+ * .value[3]?.u32: brightness of black in the grayscale blur. The value range is [0, 127]. \n
+ * .value[4]?.u32: degree of darkening the white color in the grayscale blur. The value range is [0, 127]. \n
+ * .value[5]?.i32: blur activation policy. The value is an enum of {@link ArkUI_BlurStyleActivePolicy}. \n
+ * .value[6]?.u32: background color, in 0xARGB format, of the components within the window after the window
+ * loses focus (in which case, the blur effect on the components within the window is
+ * removed). \n
+ * @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.
+ * @since 18
+ */
+ int32_t (*setBackgroundBlurStyleOptions)(
+ ArkUI_NativeDialogHandle handle, const ArkUI_AttributeItem* backgroundBlurStyleOptions);
+
+ /**
+ * @brief Sets the background effect parameters for a custom dialog box.
+ *
+ * @note This method must be called before the show method.
+ * @param handle Indicates the pointer to the custom dialog box controller.
+ * @param backgroundEffect Background effect.
+ * Format of the {@link ArkUI_AttributeItem} parameter: \n
+ * .value[0].f32: blur radius, in vp. \n
+ * .value[1]?.f32: saturation. \n
+ * .value[2]?.f32: brightness. \n
+ * .value[3]?.u32: color, in 0xARGB format. \n
+ * .value[4]?.i32: adaptive color mode. The value is an enum of {@link ArkUI_AdaptiveColor}. \n
+ * .value[5]?.u32: brightness of black in the grayscale blur. The value range is [0, 127]. \n
+ * .value[6]?.u32: degree of darkening the white color in the grayscale blur. The value range is [0, 127]. \n
+ * .value[7]?.i32: blur activation policy. The value is an enum of {@link ArkUI_BlurStyleActivePolicy}. \n
+ * .value[8]?.u32: background color, in 0xARGB format, of the components within the window after the window
+ * loses focus (in which case, the blur effect on the components within the window is
+ * removed). \n
+ * @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.
+ * @since 18
+ */
+ int32_t (*setBackgroundEffect)(ArkUI_NativeDialogHandle handle, const ArkUI_AttributeItem* backgroundEffect);
} ArkUI_NativeDialogAPI_3;
/**
@@ -1087,6 +1136,52 @@ int32_t OH_ArkUI_CustomDialog_RegisterOnWillDisappearCallback(
int32_t OH_ArkUI_CustomDialog_RegisterOnDidDisappearCallback(
ArkUI_CustomDialogOptions* options, void* userData, void (*callback)(void* userData));
+/**
+ * @brief Sets the background blur effect for a dialog box.
+ *
+ * @param options Dialog box parameters.
+ * @param backgroundBlurStyleOptions Background blur effect options of the dialog box.
+ * Format of the {@link ArkUI_AttributeItem} parameter: \n
+ * .value[0].i32: color mode. The value is an enum of {@link ArkUI_ColorMode}. \n
+ * .value[1]?.i32: adaptive color mode. The value is an enum of {@link ArkUI_AdaptiveColor}. \n
+ * .value[2]?.f32: blur degree. The value range is [0.0, 1.0]. \n
+ * .value[3]?.u32: brightness of black in the grayscale blur. The value range is [0, 127]. \n
+ * .value[4]?.u32: degree of darkening the white color in the grayscale blur. The value range is [0, 127]. \n
+ * .value[5]?.i32: blur activation policy. The value is an enum of {@link ArkUI_BlurStyleActivePolicy}. \n
+ * .value[6]?.u32: background color, in 0xARGB format, of the components within the window after the window loses
+ * focus (in which case, the blur effect on the components within the window is removed). \n
+ * @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.
+ * @since 18
+ */
+int32_t OH_ArkUI_CustomDialog_SetBackgroundBlurStyleOptions(
+ ArkUI_CustomDialogOptions* options, const ArkUI_AttributeItem* backgroundBlurStyleOptions);
+
+/**
+ * @brief Sets the background effect parameters for a dialog box.
+ *
+ * @param options Dialog box parameters.
+ * @param backgroundEffect Background effect of the dialog box.
+ * Format of the {@link ArkUI_AttributeItem} parameter: \n
+ * .value[0].f32: blur radius, in vp. \n
+ * .value[1]?.f32: saturation. \n
+ * .value[2]?.f32: brightness. \n
+ * .value[3]?.u32: color, in 0xARGB format. \n
+ * .value[4]?.i32: adaptive color mode. The value is an enum of {@link ArkUI_AdaptiveColor}. \n
+ * .value[5]?.u32: brightness of black in the grayscale blur. The value range is [0, 127]. \n
+ * .value[6]?.u32: degree of darkening the white color in the grayscale blur. The value range is [0, 127]. \n
+ * .value[7]?.i32: blur activation policy. The value is an enum of {@link ArkUI_BlurStyleActivePolicy}. \n
+ * .value[8]?.u32: background color, in 0xARGB format, of the components within the window after the window loses
+ * focus (in which case, the blur effect on the components within the window is removed). \n
+ * @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.
+ * @since 18
+ */
+int32_t OH_ArkUI_CustomDialog_SetBackgroundEffect(
+ ArkUI_CustomDialogOptions* options, const ArkUI_AttributeItem* backgroundEffect);
+
#ifdef __cplusplus
};
#endif
diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h
index edfafda42cb3b8c2621de52af32ec4c27f44edc0..f8dbf864a18a458ef7b35153802f27772022e3e7 100644
--- a/arkui/ace_engine/native/native_gesture.h
+++ b/arkui/ace_engine/native/native_gesture.h
@@ -835,6 +835,39 @@ int32_t OH_ArkUI_GetGestureParam_angle(ArkUI_GestureRecognizer* recognizer, doub
*/
int32_t OH_ArkUI_GetGestureParam_distanceThreshold(ArkUI_GestureRecognizer* recognizer, double* distanceThreshold);
+/**
+* @brief Sets the minimum movement distance thresholds for gestures to be recognized by a gesture recognizer.
+*
+* @param recognizer Indicates the pointer to a gesture recognizer.
+* @param size Size of the array of minimum movement distance thresholds.
+* @param toolTypeArray Pointer to the array of tool types for which thresholds are set.
+* @param distanceArray Pointer to the array of minimum movement distances.
+* @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_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is
+* not supported.
+* @since 18
+*/
+ArkUI_ErrorCode OH_ArkUI_PanGesture_SetDistanceMap(
+ ArkUI_GestureRecognizer* recognizer, int size, int* toolTypeArray, double* distanceArray);
+
+/**
+* @brief Obtains the movement threshold for gestures to be recognized by a gesture recognizer for a specific tool type.
+*
+* @param recognizer Indicates the pointer to a gesture recognizer.
+* @param toolType Tool type for which you want to obtain the threshold.
+* @param distance Gesture movement threshold of the gesture recognizer.
+* @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 exception occurs.
+* Returns {@link ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED} if the gesture recognizer type is
+* not supported.
+* @since 18
+*/
+ArkUI_ErrorCode OH_ArkUI_PanGesture_GetDistanceByToolType(
+ ArkUI_GestureRecognizer* recognizer, int toolType, double* distance);
+
/**
* @brief Defines the gesture APIs.
*
diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h
index 851520486679499a38d2f774d4c45995fa4fc5c7..8d2a66804eb747f80637660243e7820398bb45fc 100644
--- a/arkui/ace_engine/native/native_interface_xcomponent.h
+++ b/arkui/ace_engine/native/native_interface_xcomponent.h
@@ -326,7 +326,21 @@ typedef struct OH_NativeXComponent OH_NativeXComponent;
* @version 1.0
*/
typedef struct OH_NativeXComponent_Callback {
- /** Called when the surface is created. */
+ /**
+ * @brief Called when the surface is created.
+ *
+ *
API Note
+ *
+ * Performance Note
+ *
By default, the window buffer in the current operating system is accessed via the CPU. If an application
+ * does not need to access the window buffer data using the CPU, it can proactively disable CPU access to
+ * enhance energy efficiency and reduce power consumption.
+ *
+ * For details about how to optimize power consumption for data read/write operations in data buffers,
+ * see [How do I proactively disable CPU access to window buffers to reduce power consumption?]{@link https://developer.huawei.com/consumer/en/doc/harmonyos-faqs/faqs-arkgraphics-2d-14}.
+ *
+ *
+ */
void (*OnSurfaceCreated)(OH_NativeXComponent* component, void* window);
/** Called when the surface is changed. */
void (*OnSurfaceChanged)(OH_NativeXComponent* component, void* window);
@@ -898,7 +912,7 @@ int32_t OH_ArkUI_XComponent_StopImageAnalyzer(ArkUI_NodeHandle node);
/**
* @brief Provides an encapsulated OH_ArkUI_SurfaceHolder instance.
*
- * @since 18
+ * @since 19
*/
typedef struct OH_ArkUI_SurfaceHolder OH_ArkUI_SurfaceHolder;
@@ -907,7 +921,7 @@ typedef struct OH_ArkUI_SurfaceHolder OH_ArkUI_SurfaceHolder;
*
* @param node Indicates the pointer to the XComponent node.
* @return Returns the created OH_ArkUI_SurfaceHolder object's pointer.
- * @since 18
+ * @since 19
*/
OH_ArkUI_SurfaceHolder* OH_ArkUI_SurfaceHolder_Create(ArkUI_NodeHandle node);
@@ -915,7 +929,7 @@ OH_ArkUI_SurfaceHolder* OH_ArkUI_SurfaceHolder_Create(ArkUI_NodeHandle node);
* @brief Disposes of a OH_ArkUI_SurfaceHolder object.
*
* @param node Indicates the pointer to OH_ArkUI_SurfaceHolder object needed to dispose.
- * @since 18
+ * @since 19
*/
void OH_ArkUI_SurfaceHolder_Dispose(OH_ArkUI_SurfaceHolder* surfaceHolder);
@@ -928,7 +942,7 @@ void OH_ArkUI_SurfaceHolder_Dispose(OH_ArkUI_SurfaceHolder* surfaceHolder);
* @return Returns the error 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.
- * @since 18
+ * @since 19
*/
int32_t OH_ArkUI_SurfaceHolder_SetUserData(OH_ArkUI_SurfaceHolder* surfaceHolder, void* userData);
@@ -937,14 +951,14 @@ int32_t OH_ArkUI_SurfaceHolder_SetUserData(OH_ArkUI_SurfaceHolder* surfaceHolder
*
* @param surfaceHolder Indicates the target OH_ArkUI_SurfaceHolder instance.
* @return Returns the custom data.
- * @since 18
+ * @since 19
*/
void* OH_ArkUI_SurfaceHolder_GetUserData(OH_ArkUI_SurfaceHolder* surfaceHolder);
/**
* @brief Define the surface lifecycle callback.
*
- * @since 18
+ * @since 19
*/
typedef struct OH_ArkUI_SurfaceCallback OH_ArkUI_SurfaceCallback;
@@ -952,7 +966,7 @@ typedef struct OH_ArkUI_SurfaceCallback OH_ArkUI_SurfaceCallback;
* @brief Create a OH_ArkUI_SurfaceCallback object.
*
* @return Returns the created OH_ArkUI_SurfaceCallback object's pointer.
- * @since 18
+ * @since 19
*/
OH_ArkUI_SurfaceCallback* OH_ArkUI_SurfaceCallback_Create();
@@ -960,7 +974,7 @@ OH_ArkUI_SurfaceCallback* OH_ArkUI_SurfaceCallback_Create();
* @brief Disposes of a OH_ArkUI_SurfaceCallback object.
*
* @param callback Indicates the pointer to OH_ArkUI_SurfaceCallback object needed to dispose.
- * @since 18
+ * @since 19
*/
void OH_ArkUI_SurfaceCallback_Dispose(OH_ArkUI_SurfaceCallback* callback);
@@ -970,7 +984,7 @@ void OH_ArkUI_SurfaceCallback_Dispose(OH_ArkUI_SurfaceCallback* callback);
* @param callback Indicated the pointer to the surface callback.
* @param onSurfaceCreated Indicates the surface created callback event
* which will called when the surface is created.
- * @since 18
+ * @since 19
*/
void OH_ArkUI_SurfaceCallback_SetSurfaceCreatedEvent(
OH_ArkUI_SurfaceCallback* callback,
@@ -982,7 +996,7 @@ void OH_ArkUI_SurfaceCallback_SetSurfaceCreatedEvent(
* @param callback Indicated the pointer to the surface callback.
* @param onSurfaceChanged Indicates the surface changed callback event
* which will called when the surface is changed.
- * @since 18
+ * @since 19
*/
void OH_ArkUI_SurfaceCallback_SetSurfaceChangedEvent(
OH_ArkUI_SurfaceCallback* callback,
@@ -994,7 +1008,7 @@ void OH_ArkUI_SurfaceCallback_SetSurfaceChangedEvent(
* @param callback Indicated the pointer to the surface callback.
* @param onSurfaceDestroyed Indicates the surface destroyed callback event
* which will called when the surface is destroyed.
- * @since 18
+ * @since 19
*/
void OH_ArkUI_SurfaceCallback_SetSurfaceDestroyedEvent(
OH_ArkUI_SurfaceCallback* callback,
@@ -1008,7 +1022,7 @@ void OH_ArkUI_SurfaceCallback_SetSurfaceDestroyedEvent(
* @return Returns the status code of the execution.
* {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.
* {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
- * @since 18
+ * @since 19
*/
int32_t OH_ArkUI_SurfaceHolder_AddSurfaceCallback(
OH_ArkUI_SurfaceHolder* surfaceHolder,
@@ -1023,7 +1037,7 @@ int32_t OH_ArkUI_SurfaceHolder_AddSurfaceCallback(
* @return Returns the status code of the execution.
* {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.
* {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
- * @since 18
+ * @since 19
*/
int32_t OH_ArkUI_SurfaceHolder_RemoveSurfaceCallback(
OH_ArkUI_SurfaceHolder* surfaceHolder,
@@ -1032,7 +1046,7 @@ int32_t OH_ArkUI_SurfaceHolder_RemoveSurfaceCallback(
/**
* @brief Forward declaration of OHNativeWindow.
*
- * @since 18
+ * @since 19
*/
typedef struct NativeWindow OHNativeWindow;
@@ -1041,7 +1055,7 @@ typedef struct NativeWindow OHNativeWindow;
*
* @param surfaceHolder Indicates the pointer to this OH_ArkUI_SurfaceHolder instance.
* @return Returns the nativeWindow associated with this OH_ArkUI_SurfaceHolder instance.
- * @since 18
+ * @since 19
*/
OHNativeWindow* OH_ArkUI_XComponent_GetNativeWindow(OH_ArkUI_SurfaceHolder* surfaceHolder);
@@ -1056,7 +1070,7 @@ OHNativeWindow* OH_ArkUI_XComponent_GetNativeWindow(OH_ArkUI_SurfaceHolder* surf
* @return Returns the status code of the execution.
* {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.
* {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid.
- * @since 18
+ * @since 19
*/
int32_t OH_ArkUI_XComponent_SetAutoInitialize(ArkUI_NodeHandle node, bool autoInitialize);
@@ -1068,7 +1082,7 @@ int32_t OH_ArkUI_XComponent_SetAutoInitialize(ArkUI_NodeHandle node, bool autoIn
* {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.
* {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid.
* {@link ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID} if the node has initialized.
- * @since 18
+ * @since 19
*/
int32_t OH_ArkUI_XComponent_Initialize(ArkUI_NodeHandle node);
@@ -1080,7 +1094,7 @@ int32_t OH_ArkUI_XComponent_Initialize(ArkUI_NodeHandle node);
* {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.
* {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid.
* {@link ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID} if the node has finalized.
- * @since 18
+ * @since 19
*/
int32_t OH_ArkUI_XComponent_Finalize(ArkUI_NodeHandle node);
@@ -1092,7 +1106,7 @@ int32_t OH_ArkUI_XComponent_Finalize(ArkUI_NodeHandle node);
* @return Returns the status code of the execution.
* {@link ARKUI_ERROR_CODE_NO_ERROR} the execution is successful.
* {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the node is invalid.
- * @since 18
+ * @since 19
*/
int32_t OH_ArkUI_XComponent_IsInitialized(ArkUI_NodeHandle node, bool* isInitialized);
diff --git a/arkui/ace_engine/native/native_key_event.h b/arkui/ace_engine/native/native_key_event.h
index a20f0e9b5f75e9ca329d42efdf748b49375ab77b..34a568953e5dafd4f143297e11c871392c748be4 100644
--- a/arkui/ace_engine/native/native_key_event.h
+++ b/arkui/ace_engine/native/native_key_event.h
@@ -565,6 +565,42 @@ void OH_ArkUI_KeyEvent_SetConsumed(const ArkUI_UIInputEvent* event, bool isConsu
* @since 15
*/
void OH_ArkUI_KeyEvent_Dispatch(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event);
+
+/**
+ * @brief Get the Num Lock state of the key event.
+ *
+ * @param event Pointer to an ArkUI_UIInputEvent object.
+ * @param state Return whether the Num Lock is on.
+ * @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.
+ * @since 18
+ */
+ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsNumLockOn(const ArkUI_UIInputEvent* event, bool* state);
+
+/**
+ * @brief Get the Caps Lock state of the key event.
+ *
+ * @param event Pointer to an ArkUI_UIInputEvent object.
+ * @param state Return whether the Caps Lock is on.
+ * @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.
+ * @since 18
+ */
+ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsCapsLockOn(const ArkUI_UIInputEvent* event, bool* state);
+
+/**
+ * @brief Get the Scroll Lock state of the key event.
+ *
+ * @param event Pointer to an ArkUI_UIInputEvent object.
+ * @param state Return whether the Scroll Lock is on.
+ * @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.
+ * @since 18
+ */
+ArkUI_ErrorCode OH_ArkUI_KeyEvent_IsScrollLockOn(const ArkUI_UIInputEvent* event, bool* state);
#ifdef __cplusplus
};
#endif
diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h
index 68e03458616775fbe8bbef56770b4b4334f26cdb..c6ac33c6a6c3cd44720baffd10a213ea981a4ffa 100644
--- a/arkui/ace_engine/native/native_node.h
+++ b/arkui/ace_engine/native/native_node.h
@@ -1925,10 +1925,63 @@ typedef enum {
* .object: parameters for visible area change events.
* The parameter type is {@link ArkUI_VisibleAreaEventOptions}. \n
*
- * @since 18
+ * @since 17
*/
NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_RATIO = 102,
+ /**
+ * @brief Defines the translate attribute, which supports for percentile translation input, and can be set, reset,
+ * and obtained as required through APIs.\n
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .value[0].f32: distance to translate along the x-axis. The default unit is percentage.
+ * The unit is vp only if value[3] exists and value[3] is 0. The default value of value[0] is 0.\n
+ * .value[1].f32: distance to translate along the y-axis. The default unit is percentage.
+ * The unit is vp only if value[4] exists and value[4] is 0. The default value of value[1] is 0.\n
+ * .value[2].f32: distance to translate along the z-axis, in vp. The default value is 0.\n
+ * .value[3]?.i32: Whether the translation distance along the x-axis is specified as a percentage.
+ * The value can be 0 or 1. When the value is 1, it is specified as a percentage.
+ * For example, value[0].f32=0.1 and value[3].i32=1 indicates a 10% shift in the x direction.
+ * The default value is 1.\n
+ * .value[4]?.i32: Whether the translation distance along the y-axis is specified as a percentage.
+ * The value can be 0 or 1. When the value is 1, it is specified as a percentage.
+ * For example, value[1].f32=0.1 and value[4].i32=1 indicates a 10% shift in the y direction.
+ * The default value is 1.\n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: distance to translate along the x-axis. The unit depends on value[3].\n
+ * .value[1].f32: distance to translate along the y-axis. The unit depends on value[4].\n
+ * .value[2].f32: distance to translate along the z-axis. The unit is vp.\n
+ * .value[3].i32: Whether the unit of the X-axis translation distance is in percentage. When value[3].i32 is 0,
+ * the unit of the X-axis translation distance is vp; when value[3].i32 is 1, the unit of the X-axis translation
+ * distance is percentage;\n
+ * .value[4].i32: Whether the unit of the Y-axis translation distance is in percentage. When value[4].i32 is 0,
+ * the unit of the Y-axis translation distance is vp; when value[4].i32 is 1, the unit of the Y-axis translation
+ * distance is percentage;\n
+ *
+ * @since 20
+ */
+ NODE_TRANSLATE_WITH_PERCENT = 103,
+
+ /**
+ * @brief Defines the rotate attribute about angle, 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].f32: rotation angle of the X-axis direction. The default value is 0.\n
+ * .value[1].f32: rotation angle of the Y-axis direction. The default value is 0.\n
+ * .value[2].f32: rotation angle of the Z-axis direction. The default value is 0.\n
+ * .value[3].f32: line of sight, that is, the distance from the viewpoint to the z=0 plane, in px.
+ * The default value is 0. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: rotation angle of the X-axis direction.\n
+ * .value[1].f32: rotation angle of the Y-axis direction.\n
+ * .value[2].f32: rotation angle of the Z-axis direction.\n
+ * .value[3].f32: line of sight, that is, the distance from the viewpoint to the z=0 plane, in px. \n
+ *
+ */
+ NODE_ROTATE_ANGLE = 104,
+
/**
* @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
*
@@ -4546,6 +4599,8 @@ typedef enum {
* \n
* Format of the return value {@link ArkUI_AttributeItem}:\n
* value[0].i32: whether to feedback.\n
+ * When enabling haptic feedback, you need to add "ohos.permission.VIBRATE" in the
+ * requestPermissions field of the module.json5 file to enable vibration permission.\n
*
* @since 18
*/
@@ -6601,7 +6656,7 @@ typedef enum {
* When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is
* {@link ArkUI_UIInputEvent}. \n
*
- * @since 18
+ * @since 17
*/
NODE_ON_AXIS = 25,
@@ -6622,7 +6677,7 @@ typedef enum {
* When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is
* {@link ArkUI_UIInputEvent}. \n
*
- *@since 18
+ *@since 17
*/
NODE_ON_HOVER_EVENT = 27,
@@ -6641,7 +6696,7 @@ typedef enum {
* ArkUI_NodeComponentEvent.data[1].f32: ratio of the component's visible area to its total area
* when this callback is invoked. \n
*
- * @since 18
+ * @since 17
*/
NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_EVENT = 28,
diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h
index 64676cb956567bca6b4a76e163dd7889c41599f8..ff4522e3cd431acdddd4d4b02f55863476e06847 100644
--- a/arkui/ace_engine/native/native_type.h
+++ b/arkui/ace_engine/native/native_type.h
@@ -1084,7 +1084,7 @@ typedef enum {
typedef enum {
/** The original image aspect ratio is retained. */
ARKUI_IMAGE_SIZE_AUTO = 0,
- /** Default value. The image is scaled with its aspect ratio retained for both sides to be greater than or equal
+ /** The image is scaled with its aspect ratio retained for both sides to be greater than or equal
* to the display boundaries. */
ARKUI_IMAGE_SIZE_COVER,
/** The image is scaled with its aspect ratio retained for the content to be completely displayed within the display
@@ -1164,6 +1164,21 @@ typedef enum {
ARKUI_BLUR_STYLE_COMPONENT_ULTRA_THICK,
} ArkUI_BlurStyle;
+/**
+ * @brief Enumerates the activation policies for the background blur effect.
+ *
+ * @since 18
+ */
+typedef enum {
+ /** The blur effect changes according to the window's focus state;
+ * it is inactive when the window is not in focus and active when the window is in focus. */
+ ARKUI_BLUR_STYLE_ACTIVE_POLICY_FOLLOWS_WINDOW_ACTIVE_STATE = 0,
+ /** The blur effect is always active. */
+ ARKUI_BLUR_STYLE_ACTIVE_POLICY_ALWAYS_ACTIVE,
+ /** The blur effect is always inactive. */
+ ARKUI_BLUR_STYLE_ACTIVE_POLICY_ALWAYS_INACTIVE,
+} ArkUI_BlurStyleActivePolicy;
+
/**
* @brief Enumerates the vertical alignment modes.
*
@@ -2143,7 +2158,7 @@ typedef enum {
ARKUI_ERROR_CODE_INTERNAL_ERROR = 100001,
/**
* @error The XComponent is in invalid state.
- * @since 18
+ * @since 19
*/
ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID = 103501,
/** @error The component does not support specific properties or events. */
@@ -4265,7 +4280,7 @@ float OH_ArkUI_ListChildrenMainSizeOption_GetMainSize(ArkUI_ListChildrenMainSize
*
If the result returns nullptr, there may be out of memory.
* @since 12
*/
-ArkUI_CustomSpanMeasureInfo* OH_ArkUI_CustomSpanMeasureInfo_Create();
+ArkUI_CustomSpanMeasureInfo* OH_ArkUI_CustomSpanMeasureInfo_Create(void);
/**
* @brief Disposes of measurement information of this custom span.
@@ -4292,7 +4307,7 @@ float OH_ArkUI_CustomSpanMeasureInfo_GetFontSize(ArkUI_CustomSpanMeasureInfo* in
*
If the result returns nullptr, there may be out of memory.
* @since 12
*/
-ArkUI_CustomSpanMetrics* OH_ArkUI_CustomSpanMetrics_Create();
+ArkUI_CustomSpanMetrics* OH_ArkUI_CustomSpanMetrics_Create(void);
/**
* @brief Disposes of measurement metrics of this custom span.
@@ -4335,7 +4350,7 @@ int32_t OH_ArkUI_CustomSpanMetrics_SetHeight(ArkUI_CustomSpanMetrics* metrics, f
*
If the result returns nullptr, there may be out of memory.
* @since 12
*/
-ArkUI_CustomSpanDrawInfo* OH_ArkUI_CustomSpanDrawInfo_Create();
+ArkUI_CustomSpanDrawInfo* OH_ArkUI_CustomSpanDrawInfo_Create(void);
/**
* @brief Disposes of drawing information for this custom span.
@@ -4958,7 +4973,7 @@ bool OH_ArkUI_CrossLanguageOption_GetAttributeSettingStatus(ArkUI_CrossLanguageO
/**
* @brief Defines the parameters for visible area change events.
*
- * @since 18
+ * @since 17
*/
typedef struct ArkUI_VisibleAreaEventOptions ArkUI_VisibleAreaEventOptions;
@@ -4966,7 +4981,7 @@ typedef struct ArkUI_VisibleAreaEventOptions ArkUI_VisibleAreaEventOptions;
* @brief Creates an instance of visible area change event parameters
*
* @return Returns the created instance of visible area change event parameters.
-* @since 18
+* @since 17
*/
ArkUI_VisibleAreaEventOptions* OH_ArkUI_VisibleAreaEventOptions_Create();
@@ -4974,7 +4989,7 @@ ArkUI_VisibleAreaEventOptions* OH_ArkUI_VisibleAreaEventOptions_Create();
* @brief Disposes of an instance of visible area change event parameters.
*
* @param option Instance to be destroyed.
-* @since 18
+* @since 17
*/
void OH_ArkUI_VisibleAreaEventOptions_Dispose(ArkUI_VisibleAreaEventOptions* option);
@@ -4992,7 +5007,7 @@ void OH_ArkUI_VisibleAreaEventOptions_Dispose(ArkUI_VisibleAreaEventOptions* opt
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* If an error code is returned, it may be due to a failure in parameter validation;
* the parameter must not be null.
-* @since 18
+* @since 17
*/
int32_t OH_ArkUI_VisibleAreaEventOptions_SetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t size);
@@ -5006,7 +5021,7 @@ int32_t OH_ArkUI_VisibleAreaEventOptions_SetRatios(ArkUI_VisibleAreaEventOptions
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* If an error code is returned, it may be due to a failure in parameter validation;
* the parameter must not be null.
-* @since 18
+* @since 17
*/
int32_t OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval(
ArkUI_VisibleAreaEventOptions *option, int32_t value);
@@ -5023,7 +5038,7 @@ int32_t OH_ArkUI_VisibleAreaEventOptions_SetExpectedUpdateInterval(
* Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR} if the provided buffer size is insufficient.
* If an error code is returned, it may be due to a failure in parameter validation;
* the parameter must not be null.
- * @since 18
+ * @since 17
*/
int32_t OH_ArkUI_VisibleAreaEventOptions_GetRatios(ArkUI_VisibleAreaEventOptions* option, float* value, int32_t* size);
@@ -5032,7 +5047,7 @@ int32_t OH_ArkUI_VisibleAreaEventOptions_GetRatios(ArkUI_VisibleAreaEventOptions
*
* @param option Instance of visible area change event parameters.
* @return Returns the expected update interval, in ms. Default value: 1000.
- * @since 18
+ * @since 17
*/
int32_t OH_ArkUI_VisibleAreaEventOptions_GetExpectedUpdateInterval(ArkUI_VisibleAreaEventOptions* option);
diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h
index 37497b2315d3a27099a8fbddd2551d8fb622b934..975d84df1a8b296d090d1cabea596faba1b5a1de 100644
--- a/arkui/ace_engine/native/ui_input_event.h
+++ b/arkui/ace_engine/native/ui_input_event.h
@@ -513,7 +513,7 @@ float OH_ArkUI_PointerEvent_GetTiltY(const ArkUI_UIInputEvent* event, uint32_t p
* @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.
- * @since 18
+ * @since 17
*/
int32_t OH_ArkUI_PointerEvent_GetRollAngle(const ArkUI_UIInputEvent* event, double* rollAngle);
@@ -888,7 +888,7 @@ int32_t OH_ArkUI_FocusAxisEvent_SetStopPropagation(const ArkUI_UIInputEvent* eve
*
* @param event Pointer to an ArkUI_UIInputEvent object.
* @return Returns the width of the component hit by the event; returns 0.0f if any parameter error occurs.
-* @since 18
+* @since 17
*/
float OH_ArkUI_UIInputEvent_GetEventTargetWidth(const ArkUI_UIInputEvent* event);
@@ -897,7 +897,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetWidth(const ArkUI_UIInputEvent* event)
*
* @param event Pointer to an ArkUI_UIInputEvent object.
* @return Returns the height of the component hit by the event; returns 0.0f if any parameter error occurs.
-* @since 18
+* @since 17
*/
float OH_ArkUI_UIInputEvent_GetEventTargetHeight(const ArkUI_UIInputEvent* event);
@@ -906,7 +906,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetHeight(const ArkUI_UIInputEvent* event
*
* @param event Pointer to an ArkUI_UIInputEvent object.
* @return Returns the X coordinate of the component hit by the event; returns 0.0f if any parameter error occurs.
-* @since 18
+* @since 17
*/
float OH_ArkUI_UIInputEvent_GetEventTargetPositionX(const ArkUI_UIInputEvent* event);
@@ -916,7 +916,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetPositionX(const ArkUI_UIInputEvent* ev
* @param event Pointer to an ArkUI_UIInputEvent object.
* @return Returns the Y coordinate of the component hit by the event;
* returns 0.0f if any parameter error occurs.
-* @since 18
+* @since 17
*/
float OH_ArkUI_UIInputEvent_GetEventTargetPositionY(const ArkUI_UIInputEvent* event);
@@ -926,7 +926,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetPositionY(const ArkUI_UIInputEvent* ev
* @param event Pointer to an ArkUI_UIInputEvent object.
* @return Returns the global X coordinate of the component hit by the event;
* returns 0.0f if any parameter error occurs.
-* @since 18
+* @since 17
*/
float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX(const ArkUI_UIInputEvent* event);
@@ -936,7 +936,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX(const ArkUI_UIInputEve
* @param event Pointer to an ArkUI_UIInputEvent object.
* @return Returns the global Y coordinate of the component hit by the event;
* returns 0.0f if any parameter error occurs.
-* @since 18
+* @since 17
*/
float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(const ArkUI_UIInputEvent* event);
@@ -946,7 +946,7 @@ float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(const ArkUI_UIInputEve
* @param event Pointer to an ArkUI_UIInputEvent object.
* @return Returns true if the cursor is hovering over the current component.
* Returns false if the cursor is not hovering over the current component.
-* @since 18
+* @since 17
*/
bool OH_ArkUI_HoverEvent_IsHovered(const ArkUI_UIInputEvent* event);
@@ -959,7 +959,7 @@ bool OH_ArkUI_HoverEvent_IsHovered(const ArkUI_UIInputEvent* event);
* @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.
- * @since 18
+ * @since 17
*/
int32_t OH_ArkUI_UIInputEvent_GetModifierKeyStates(const ArkUI_UIInputEvent* event, uint64_t* keys);
@@ -1028,7 +1028,7 @@ int32_t OH_ArkUI_UIInputEvent_GetTargetDisplayId(const ArkUI_UIInputEvent* event
* @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.
- * @since 18
+ * @since 17
*/
int32_t OH_ArkUI_AxisEvent_SetPropagation(const ArkUI_UIInputEvent* event, bool propagation);
@@ -1037,7 +1037,7 @@ int32_t OH_ArkUI_AxisEvent_SetPropagation(const ArkUI_UIInputEvent* event, bool
*
* @param event Pointer to the UI input event.
* @return Returns the scroll step configuration of the mouse wheel axis event.
- * @since 18
+ * @since 17
*/
int32_t OH_ArkUI_AxisEvent_GetScrollStep(const ArkUI_UIInputEvent* event);
diff --git a/arkui/napi/BUILD.gn b/arkui/napi/BUILD.gn
index eea7bc4512e1bcc3fb6dfc06bac9da94e855a452..f5867f115e32091bb11194dc9e4b2fcfd0c27603 100644
--- a/arkui/napi/BUILD.gn
+++ b/arkui/napi/BUILD.gn
@@ -19,6 +19,11 @@ ohos_ndk_library("libnapi_ndk") {
ndk_description_file = "./libnapi.ndk.json"
min_compact_version = "1"
output_name = "ace_napi"
+ system_capability = "SystemCapability.ArkUI.ArkUI.Napi"
+ system_capability_headers = [
+ "napi/common.h",
+ "napi/native_api.h",
+ ]
}
ohos_ndk_headers("napi_header") {
diff --git a/arkui/napi/native_api.h b/arkui/napi/native_api.h
index c1dd962f8acbcc1955df6dfd7c64abaf9a727415..788a6df98466a6febf306f4fbb5a40fda707fd71 100644
--- a/arkui/napi/native_api.h
+++ b/arkui/napi/native_api.h
@@ -1639,6 +1639,13 @@ NAPI_EXTERN napi_status napi_define_class(napi_env env,
size_t property_count,
const napi_property_descriptor* properties,
napi_value* result);
+
+/**
+ * @brief To load native libraries and this interface is defined in native libraries.
+ *
+ * @since 17
+ */
+NAPI_EXTERN void napi_onLoad();
#ifdef __cplusplus
}
#endif
diff --git a/arkui/window_manager/oh_window_event_filter.h b/arkui/window_manager/oh_window_event_filter.h
index 56a726525a3322483274c0bbd46cb412c830ad6c..5d8aa0dbf039d0c8bb59bb1d031109753323f28c 100644
--- a/arkui/window_manager/oh_window_event_filter.h
+++ b/arkui/window_manager/oh_window_event_filter.h
@@ -14,7 +14,7 @@
*/
/**
- * @addtogroup WindowManager_NativeModule
+ * @addtogroup WindowManager
* @{
*
* @brief Provides abilities of windowManager on the native side, such as key event
diff --git a/distributeddatamgr/pasteboard/include/oh_pasteboard.h b/distributeddatamgr/pasteboard/include/oh_pasteboard.h
index c4b9c2f665ae927ed454d993448f0a0058e37e6e..3218fff577ea728bcc29d5923b8a6d3c15d42c43 100644
--- a/distributeddatamgr/pasteboard/include/oh_pasteboard.h
+++ b/distributeddatamgr/pasteboard/include/oh_pasteboard.h
@@ -25,7 +25,7 @@
*/
/**
- * @file OH_Pasteboard.h
+ * @file oh_pasteboard.h
*
* @brief Provides APIs and enums of the Pasteboard module.
*
@@ -209,13 +209,14 @@ void OH_Pasteboard_Destroy(OH_Pasteboard* pasteboard);
* @brief Subscribes to the Pasteboard data change.
*
* @param pasteboard Pointer to the {@link OH_Pasteboard} instance.
- * @param type Event type to subscribe to.
+ * @param type Event type to subscribe to report the pasteboard data change.
+ * For details, see {@link Pasteboard_NotifyType}.
* @param observer - Pointer to the observer information, which specifies the callback used to
* reporting the pasteboard data change. For details, see {@link OH_PasteboardObserver}.
* @return Returns the status code of the execution. For details, {@link PASTEBOARD_ErrCode}.
* Returns {@link ERR_OK} if the operation is successful.
* Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected.
- * @see OH_Pasteboard OH_PasteboardObserver PASTEBOARD_ErrCode.
+ * @see OH_Pasteboard OH_PasteboardObserver Pasteboard_NotifyType PASTEBOARD_ErrCode.
* @since 13
*/
int OH_Pasteboard_Subscribe(OH_Pasteboard* pasteboard, int type, const OH_PasteboardObserver* observer);
@@ -224,13 +225,14 @@ int OH_Pasteboard_Subscribe(OH_Pasteboard* pasteboard, int type, const OH_Pasteb
* @brief Unsubscribes from the Pasteboard data change.
*
* @param pasteboard Pointer to the {@link OH_Pasteboard} instance.
- * @param type Event type to subscribe to.
+ * @param type Event type to subscribe to report the pasteboard data change.
+ * For details, see {@link Pasteboard_NotifyType}.
* @param observer - Pointer to the observer information, which specifies the callback used to
* reporting the pasteboard data change. For details, see {@link OH_PasteboardObserver}.
* @return Returns the status code of the execution. For details, {@link PASTEBOARD_ErrCode}.
* Returns {@link ERR_OK} if the operation is successful.
* Returns {@link ERR_INVALID_PARAMETER} if invalid args are detected.
- * @see OH_Pasteboard OH_PasteboardObserver PASTEBOARD_ErrCode.
+ * @see OH_Pasteboard OH_PasteboardObserver Pasteboard_NotifyType PASTEBOARD_ErrCode.
* @since 13
*/
int OH_Pasteboard_Unsubscribe(OH_Pasteboard* pasteboard, int type, const OH_PasteboardObserver* observer);
@@ -349,7 +351,7 @@ uint32_t OH_Pasteboard_GetChangeCount(OH_Pasteboard *pasteboard);
*
* @return If the operation is successful, a pointer to the instance of the {@link Pasteboard_GetDataParams}
* structure is returned. If the operation is failed, nullptr is returned.
- * @see Pasteboard_GetDataParams
+ * @see Pasteboard_GetDataParams.
* @since 15
*/
Pasteboard_GetDataParams *OH_Pasteboard_GetDataParams_Create(void);
@@ -358,7 +360,7 @@ Pasteboard_GetDataParams *OH_Pasteboard_GetDataParams_Create(void);
* @brief Destroy a pointer that points to an instance of {@link Pasteboard_GetDataParams}.
*
* @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}.
- * @see Pasteboard_GetDataParams
+ * @see Pasteboard_GetDataParams.
* @since 15
*/
void OH_Pasteboard_GetDataParams_Destroy(Pasteboard_GetDataParams* params);
@@ -368,7 +370,7 @@ void OH_Pasteboard_GetDataParams_Destroy(Pasteboard_GetDataParams* params);
*
* @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}.
* @param progressIndicator Represents to the progress indicator.
- * @see Pasteboard_GetDataParams Pasteboard_ProgressIndicator
+ * @see Pasteboard_GetDataParams Pasteboard_ProgressIndicator.
* @since 15
*/
void OH_Pasteboard_GetDataParams_SetProgressIndicator(Pasteboard_GetDataParams* params,
@@ -380,7 +382,7 @@ void OH_Pasteboard_GetDataParams_SetProgressIndicator(Pasteboard_GetDataParams*
* @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}.
* @param destUri Pointer to a destination uri.
* @param destUriLen Indicates the length of destination uri.
- * @see Pasteboard_GetDataParams
+ * @see Pasteboard_GetDataParams.
* @since 15
*/
void OH_Pasteboard_GetDataParams_SetDestUri(Pasteboard_GetDataParams* params, const char* destUri, uint32_t destUriLen);
@@ -390,7 +392,7 @@ void OH_Pasteboard_GetDataParams_SetDestUri(Pasteboard_GetDataParams* params, co
*
* @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}.
* @param option Represents to the file conflict options.
- * @see Pasteboard_GetDataParams Pasteboard_FileConflictOptions
+ * @see Pasteboard_GetDataParams Pasteboard_FileConflictOptions.
* @since 15
*/
void OH_Pasteboard_GetDataParams_SetFileConflictOptions(Pasteboard_GetDataParams* params,
@@ -401,7 +403,7 @@ void OH_Pasteboard_GetDataParams_SetFileConflictOptions(Pasteboard_GetDataParams
*
* @param params Represents a pointer to an instance of {@link Pasteboard_GetDataParams}.
* @param listener Represents to the data progress listener.
- * @see Pasteboard_GetDataParams OH_Pasteboard_ProgressListener
+ * @see Pasteboard_GetDataParams OH_Pasteboard_ProgressListener.
* @since 15
*/
void OH_Pasteboard_GetDataParams_SetProgressListener(Pasteboard_GetDataParams* params,
@@ -412,7 +414,7 @@ void OH_Pasteboard_GetDataParams_SetProgressListener(Pasteboard_GetDataParams* p
*
* @param progressInfo Represents a pointer to an instance of {@link Pasteboard_ProgressInfo}.
* @return Returns the progress.
- * @see Pasteboard_ProgressInfo
+ * @see Pasteboard_ProgressInfo.
* @since 15
*/
int OH_Pasteboard_ProgressInfo_GetProgress(Pasteboard_ProgressInfo* progressInfo);
diff --git a/distributeddatamgr/preferences/libpreferences.ndk.json b/distributeddatamgr/preferences/libpreferences.ndk.json
index 9c41566f528e86b05404777fa5528a6c277090af..2869d86519f11e5178b0b28fd75c5115b91f1ccd 100644
--- a/distributeddatamgr/preferences/libpreferences.ndk.json
+++ b/distributeddatamgr/preferences/libpreferences.ndk.json
@@ -47,6 +47,10 @@
"first_introduced": "13",
"name": "OH_Preferences_UnregisterDataObserver"
},
+ {
+ "first_introduced": "18",
+ "name": "OH_Preferences_IsStorageTypeSupported"
+ },
{
"first_introduced": "13",
"name": "OH_PreferencesOption_Create"
@@ -63,6 +67,10 @@
"first_introduced": "13",
"name": "OH_PreferencesOption_SetDataGroupId"
},
+ {
+ "first_introduced": "18",
+ "name": "OH_PreferencesOption_SetStorageType"
+ },
{
"first_introduced": "13",
"name": "OH_PreferencesOption_Destroy"
diff --git a/distributeddatamgr/relational_store/include/relational_store.h b/distributeddatamgr/relational_store/include/relational_store.h
index 54d2cc405782a27d4028fe17102aeb47872a0e2d..dc0cdee937877e154bd60412d176003c987ae63f 100644
--- a/distributeddatamgr/relational_store/include/relational_store.h
+++ b/distributeddatamgr/relational_store/include/relational_store.h
@@ -190,19 +190,22 @@ typedef enum Rdb_DBType {
/**
* @brief Define Rdb_Tokenizer type.
*
- * @since 18
+ * @since 17
*/
typedef enum Rdb_Tokenizer {
/**
* @brief Means not using tokenizer.
+ * @since 17
*/
RDB_NONE_TOKENIZER = 1,
/**
* @brief Means using native icu tokenizer.
+ * @since 17
*/
RDB_ICU_TOKENIZER = 2,
/**
* @brief Means using self-developed enhance tokenizer.
+ * @since 18
*/
RDB_CUSTOM_TOKENIZER = 3,
} Rdb_Tokenizer;
@@ -341,7 +344,7 @@ int OH_Rdb_SetDbType(OH_Rdb_ConfigV2 *config, int dbType);
* {@link RDB_OK} - success.
* {@link RDB_E_INVALID_ARGS} - The error code for common invalid args.
* {@link RDB_E_NOT_SUPPORTED} - The error code for not support tokenizer.
- * @since 18
+ * @since 17
*/
int OH_Rdb_SetTokenizer(OH_Rdb_ConfigV2 *config, Rdb_Tokenizer tokenizer);
diff --git a/distributeddatamgr/relational_store/include/relational_store_error_code.h b/distributeddatamgr/relational_store/include/relational_store_error_code.h
index c75b849e0a27769b2f621242b7d06217661a2cab..053fb1e1765591cdf296999228dcd38e1540c247 100644
--- a/distributeddatamgr/relational_store/include/relational_store_error_code.h
+++ b/distributeddatamgr/relational_store/include/relational_store_error_code.h
@@ -415,7 +415,7 @@ typedef enum OH_Rdb_ErrCode {
RDB_E_TYPE_MISMATCH = (E_BASE + 64),
/**
- * @brief Data value type is null.
+ * @brief SQLite: Abort due to constraint violation.
*
* @since 18
*/
diff --git a/distributeddatamgr/relational_store/libnative_rdb.ndk.json b/distributeddatamgr/relational_store/libnative_rdb.ndk.json
index 5d4110e087074620dbbcfdfba17a5a37ba4cda57..bd9e55864906c6a9433e06c2572124d041db43fb 100644
--- a/distributeddatamgr/relational_store/libnative_rdb.ndk.json
+++ b/distributeddatamgr/relational_store/libnative_rdb.ndk.json
@@ -44,10 +44,18 @@
"first_introduced": "14",
"name":"OH_Rdb_SetDbType"
},
+ {
+ "first_introduced": "17",
+ "name":"OH_Rdb_SetTokenizer"
+ },
{
"first_introduced": "18",
"name":"OH_Rdb_SetPersistent"
},
+ {
+ "first_introduced": "18",
+ "name":"OH_Rdb_IsTokenizerSupported"
+ },
{
"first_introduced": "14",
"name":"OH_Rdb_GetSupportedDbType"
diff --git a/drivers/external_device_manager/hid/hid_ddk_api.h b/drivers/external_device_manager/hid/hid_ddk_api.h
index 8ceafb01a6a2cd1f14505c637ec4039b8296fa61..ddbf2478ecf3ce6afaad802c26b64cffad866025 100644
--- a/drivers/external_device_manager/hid/hid_ddk_api.h
+++ b/drivers/external_device_manager/hid/hid_ddk_api.h
@@ -97,6 +97,7 @@ int32_t OH_Hid_EmitEvent(int32_t deviceId, const Hid_EmitItem items[], uint16_t
* @return {@link HID_DDK_SUCCESS} operation successful.
* {@link HID_DDK_NO_PERM} permission check failed.
* {@link HID_DDK_INVALID_OPERATION} connect hid ddk service failed or the caller is not the creator of device.
+ * {@link HID_DDK_NULL_PTR} the device does not exist.
* @since 11
* @version 1.0
*/
diff --git a/drivers/external_device_manager/scsi_peripheral/BUILD.gn b/drivers/external_device_manager/scsi_peripheral/BUILD.gn
index a475453507472d9559a3a0e2182b93e43fd0f193..8165df363ee164b12f05d25c409b24f2e8910940 100644
--- a/drivers/external_device_manager/scsi_peripheral/BUILD.gn
+++ b/drivers/external_device_manager/scsi_peripheral/BUILD.gn
@@ -23,7 +23,7 @@ ohos_ndk_headers("scsi_header") {
ohos_ndk_library("libscsi") {
ndk_description_file = "./libscsi.ndk.json"
- min_compact_version = "16"
+ min_compact_version = "18"
output_name = "scsi"
system_capability = "SystemCapability.Driver.SCSI.Extension"
system_capability_headers = [
diff --git a/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h
index f262f21df341f963e65da3b97380e6ccb5459272..ccfc694b4c21d4278fff8df03a3a8e9768a5827f 100644
--- a/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h
+++ b/drivers/external_device_manager/scsi_peripheral/scsi_peripheral_api.h
@@ -83,6 +83,7 @@ int32_t OH_ScsiPeripheral_Release(void);
* {@link SCSIPERIPHERAL_DDK_IO_ERROR} i/o operation error.
* {@link SCSIPERIPHERAL_DDK_DEVICE_NOT_FOUND} device not found by deviceId.
* {@link SCSIPERIPHERAL_DDK_INVALID_OPERATION} this operation is not supported.
+ * {@link SCSIPERIPHERAL_DDK_TIMEOUT} transmission timeout.
* @since 18
*/
int32_t OH_ScsiPeripheral_Open(uint64_t deviceId, uint8_t interfaceIndex, ScsiPeripheral_Device **dev);
diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h
index d13ed1319b0bb48194ef62ca01700a3ae8284463..bdf2fedc7a9703156c573ac32df92c84855ddd1d 100644
--- a/drivers/external_device_manager/usb/usb_ddk_api.h
+++ b/drivers/external_device_manager/usb/usb_ddk_api.h
@@ -55,7 +55,9 @@ extern "C" {
*
* @permission ohos.permission.ACCESS_DDK_USB
* @return {@link USB_DDK_SUCCESS} the operation is successful.
- * {@link USB_DDK_FAILED} permission check failed or connect usb ddk service failed or internal error failed.
+ * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed or internal error.
+ * {@link USB_DDK_NO_PERM} permission check failed.
+ * {@link USB_DDK_MEMORY_ERROR} memory allocation failed.
* @since 10
* @version 1.0
*/
@@ -76,6 +78,7 @@ void OH_Usb_Release(void);
* @permission ohos.permission.ACCESS_DDK_USB
* @return {@link USB_DDK_SUCCESS} the operation is successful.
* {@link USB_DDK_NO_PERM} permission check failed.
+ * {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed.
* @since 18
* @version 1.0
*/
@@ -109,6 +112,8 @@ int32_t OH_Usb_GetDeviceDescriptor(uint64_t deviceId, struct UsbDeviceDescriptor
* {@link USB_DDK_NO_PERM} permission check failed.
* {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed.
* {@link USB_DDK_INVALID_PARAMETER} config is null.
+ * {@link USB_DDK_IO_FAILED} data IO exception.
+ * {@link USB_DDK_MEMORY_ERROR} memory allocation failed.
* @since 10
* @version 1.0
*/
@@ -138,6 +143,7 @@ void OH_Usb_FreeConfigDescriptor(struct UsbDdkConfigDescriptor * const config);
* {@link USB_DDK_NO_PERM} permission check failed.
* {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed.
* {@link USB_DDK_INVALID_PARAMETER} interfaceHandle is null.
+ * {@link USB_DDK_MEMORY_ERROR} memory exceeds limit.
* @since 10
* @version 1.0
*/
@@ -151,6 +157,7 @@ int32_t OH_Usb_ClaimInterface(uint64_t deviceId, uint8_t interfaceIndex, uint64_
* @return {@link USB_DDK_SUCCESS} the operation is successful.
* {@link USB_DDK_NO_PERM} permission check failed.
* {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed.
+ * {@link USB_DDK_INVALID_PARAMETER} parameter error.
* @since 10
* @version 1.0
*/
@@ -166,6 +173,7 @@ int32_t OH_Usb_ReleaseInterface(uint64_t interfaceHandle);
* @return {@link USB_DDK_SUCCESS} the operation is successful.
* {@link USB_DDK_NO_PERM} permission check failed.
* {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed.
+ * {@link USB_DDK_INVALID_PARAMETER} parameter error.
* @since 10
* @version 1.0
*/
@@ -202,6 +210,8 @@ int32_t OH_Usb_GetCurrentInterfaceSetting(uint64_t interfaceHandle, uint8_t *set
* {@link USB_DDK_INVALID_PARAMETER} setup is null or data is null or dataLen is null or dataLen is less than\n
* size of the read data.
* {@link USB_DDK_MEMORY_ERROR} the memory of read data copies failed.
+ * {@link USB_DDK_IO_FAILED} data IO exception.
+ * {@link USB_DDK_TIMEOUT} interface timeout.
* @since 10
* @version 1.0
*/
@@ -221,6 +231,9 @@ int32_t OH_Usb_SendControlReadRequest(uint64_t interfaceHandle, const struct Usb
* {@link USB_DDK_NO_PERM} permission check failed.
* {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed.
* {@link USB_DDK_INVALID_PARAMETER} setup is null or data is null.
+ * {@link USB_DDK_MEMORY_ERROR} the memory of read data copies failed.
+ * {@link USB_DDK_IO_FAILED} data IO exception.
+ * {@link USB_DDK_TIMEOUT} interface timeout.
* @since 10
* @version 1.0
*/
@@ -238,6 +251,9 @@ int32_t OH_Usb_SendControlWriteRequest(uint64_t interfaceHandle, const struct Us
* {@link USB_DDK_NO_PERM} permission check failed.
* {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed.
* {@link USB_DDK_INVALID_PARAMETER} pipe is null or devMmap is null or address of devMmap is null.
+ * {@link USB_DDK_MEMORY_ERROR} the memory of read data copies failed.
+ * {@link USB_DDK_IO_FAILED} data IO exception.
+ * {@link USB_DDK_TIMEOUT} interface timeout.
* @since 10
* @version 1.0
*/
@@ -254,6 +270,9 @@ int32_t OH_Usb_SendPipeRequest(const struct UsbRequestPipe *pipe, UsbDeviceMemMa
* {@link USB_DDK_NO_PERM} permission check failed.
* {@link USB_DDK_INVALID_OPERATION} connect usb ddk service failed.
* {@link USB_DDK_INVALID_PARAMETER} pipe is null or ashmem is null or address of ashmem is null.
+ * {@link USB_DDK_MEMORY_ERROR} the memory of read data copies failed.
+ * {@link USB_DDK_IO_FAILED} data IO exception.
+ * {@link USB_DDK_TIMEOUT} interface timeout.
* @since 12
*/
int32_t OH_Usb_SendPipeRequestWithAshmem(const struct UsbRequestPipe *pipe, DDK_Ashmem *ashmem);
diff --git a/drivers/external_device_manager/usb_serial/BUILD.gn b/drivers/external_device_manager/usb_serial/BUILD.gn
index 0e47d0d1b99d3728d0b00e8c1ba9003c045547e3..dda999ca9f950c6d4763ea59484907f4e5536e6f 100644
--- a/drivers/external_device_manager/usb_serial/BUILD.gn
+++ b/drivers/external_device_manager/usb_serial/BUILD.gn
@@ -23,7 +23,7 @@ ohos_ndk_headers("usb_serial_header") {
ohos_ndk_library("libusb_serial") {
ndk_description_file = "./libusb_serial.ndk.json"
- min_compact_version = "16"
+ min_compact_version = "18"
output_name = "usb_serial_ndk"
system_capability = "SystemCapability.Driver.UsbSerial.Extension"
system_capability_headers = [
diff --git a/drivers/external_device_manager/usb_serial/usb_serial_api.h b/drivers/external_device_manager/usb_serial/usb_serial_api.h
index 46eb5542721f5136a5a6ea893b80723db9ae806d..850595951732b8061af66cc820df24986e4654a6 100644
--- a/drivers/external_device_manager/usb_serial/usb_serial_api.h
+++ b/drivers/external_device_manager/usb_serial/usb_serial_api.h
@@ -138,7 +138,6 @@ int32_t OH_UsbSerial_Read(UsbSerial_Device *dev, uint8_t *buff, uint32_t bufferS
* 2.buff is null; 3.bufferSize is zero; 4. bytesWritten is null.
* {@link USB_SERIAL_DDK_INIT_ERROR} the ddk not init.
* {@link USB_SERIAL_DDK_SERVICE_ERROR} communication with the ddk service failed.
- * {@link USB_SERIAL_DDK_MEMORY_ERROR} the buff is outside accessible address space error.
* {@link USB_SERIAL_DDK_IO_ERROR} the ddk I/O error.
* {@link USB_SERIAL_DDK_INVALID_OPERATION} invalid operation.
* @since 18
diff --git a/graphic/graphic_2d/native_buffer/native_buffer.h b/graphic/graphic_2d/native_buffer/native_buffer.h
index 70d47a631f87e2dbc026ae2cf59ba722381ac7b8..771256ac5402a3cfea51e66c389e0799049f1597 100644
--- a/graphic/graphic_2d/native_buffer/native_buffer.h
+++ b/graphic/graphic_2d/native_buffer/native_buffer.h
@@ -61,6 +61,11 @@ typedef enum OH_NativeBuffer_Usage {
NATIVEBUFFER_USAGE_CPU_READ = (1ULL << 0), /// < CPU read buffer */
NATIVEBUFFER_USAGE_CPU_WRITE = (1ULL << 1), /// < CPU write memory */
NATIVEBUFFER_USAGE_MEM_DMA = (1ULL << 3), /// < Direct memory access (DMA) buffer */
+ /**
+ * MMZ with cache
+ * @since 20
+ */
+ NATIVEBUFFER_USAGE_MEM_MMZ_CACHE = (1ULL << 5),
NATIVEBUFFER_USAGE_HW_RENDER = (1ULL << 8), /// < For GPU write case */
NATIVEBUFFER_USAGE_HW_TEXTURE = (1ULL << 9), /// < For GPU read case */
NATIVEBUFFER_USAGE_CPU_READ_OFTEN = (1ULL << 16), /// < Often be mapped for direct CPU reads */
@@ -203,6 +208,16 @@ typedef enum OH_NativeBuffer_Format {
* @since 15
*/
NATIVEBUFFER_PIXEL_FMT_RGBA16_FLOAT,
+ /**
+ * Y8 format
+ * @since 20
+ */
+ NATIVEBUFFER_PIXEL_FMT_Y8 = 40,
+ /**
+ * Y16 format
+ * @since 20
+ */
+ NATIVEBUFFER_PIXEL_FMT_Y16 = 41,
/**
* vendor mask format
* @since 12
diff --git a/graphic/graphic_2d/native_drawing/drawing_error_code.h b/graphic/graphic_2d/native_drawing/drawing_error_code.h
index 5bdc19682c4052b80b3c52d070ef15f78c099ae1..0c6e6e0c8769442fa067a5aa242eee703eabfc9e 100644
--- a/graphic/graphic_2d/native_drawing/drawing_error_code.h
+++ b/graphic/graphic_2d/native_drawing/drawing_error_code.h
@@ -89,7 +89,7 @@ OH_Drawing_ErrorCode OH_Drawing_ErrorCodeGet();
* @since 18
* @version 1.0
*/
-void OH_Drawing_ErrorCodeReset();
+void OH_Drawing_ErrorCodeReset(void);
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_drawing/drawing_font_collection.h b/graphic/graphic_2d/native_drawing/drawing_font_collection.h
index e6ac9f49424f699c6c830f9788619ca8093dec78..f69ef11d2198a0e072ac0c8baeb0576a88b8c5db 100644
--- a/graphic/graphic_2d/native_drawing/drawing_font_collection.h
+++ b/graphic/graphic_2d/native_drawing/drawing_font_collection.h
@@ -72,6 +72,8 @@ void OH_Drawing_DestroyFontCollection(OH_Drawing_FontCollection* fontCollection)
* @param fontCollection Indicates the pointer to an OH_Drawing_FontCollection object.
* @since 12
* @version 1.0
+ * @deprecated since 18
+ * @useinstead OH_Drawing_DisableFontCollectionSystemFont
*/
void OH_Drawing_DisableFontCollectionFallback(OH_Drawing_FontCollection* fontCollection);
diff --git a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h
index 1949a5e725f78c553096ebece81194d738b81f27..584e8d9288ddb58fbf2a5aa8d4233fe9a88d6c38 100644
--- a/graphic/graphic_2d/native_drawing/drawing_gpu_context.h
+++ b/graphic/graphic_2d/native_drawing/drawing_gpu_context.h
@@ -51,6 +51,7 @@ extern "C" {
*
* @since 12
* @version 1.0
+ * @deprecated since 18
*/
typedef struct {
/** If true this allows path mask textures to be cached */
@@ -65,6 +66,8 @@ typedef struct {
* @return Returns the pointer to the OH_Drawing_GpuContext object created.
* @since 12
* @version 1.0
+ * @deprecated since 18
+ * @useinstead OH_Drawing_GpuContextCreate
*/
OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOptions gpuContextOptions);
diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h
index 9666217288d549c081114e2ed343c13d6a8f6973..3d49d19341445f3125c0a3196aadbad7ad63a121 100644
--- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h
+++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h
@@ -64,12 +64,12 @@ extern "C" {
* @since 8
* @version 1.0
*/
-enum OH_Drawing_TextDirection {
+typedef enum OH_Drawing_TextDirection {
/** Right to left (RTL) */
TEXT_DIRECTION_RTL,
/** Left to right (LTR) */
TEXT_DIRECTION_LTR,
-};
+} OH_Drawing_TextDirection;
/**
* @brief Enumerates text alignment modes.
@@ -77,7 +77,7 @@ enum OH_Drawing_TextDirection {
* @since 8
* @version 1.0
*/
-enum OH_Drawing_TextAlign {
+typedef enum OH_Drawing_TextAlign {
/** Left-aligned */
TEXT_ALIGN_LEFT,
/** Right-aligned */
@@ -103,7 +103,7 @@ enum OH_Drawing_TextAlign {
* when OH_Drawing_TextDirection is TEXT_DIRECTION_RTL.
*/
TEXT_ALIGN_END,
-};
+} OH_Drawing_TextAlign;
/**
* @brief Enumerates font weights.
@@ -111,7 +111,7 @@ enum OH_Drawing_TextAlign {
* @since 8
* @version 1.0
*/
-enum OH_Drawing_FontWeight {
+typedef enum OH_Drawing_FontWeight {
/** Thin */
FONT_WEIGHT_100,
/** Extra-light */
@@ -130,7 +130,7 @@ enum OH_Drawing_FontWeight {
FONT_WEIGHT_800,
/** Black */
FONT_WEIGHT_900,
-};
+} OH_Drawing_FontWeight;
/**
* @brief Enumerates text baselines.
@@ -138,12 +138,12 @@ enum OH_Drawing_FontWeight {
* @since 8
* @version 1.0
*/
-enum OH_Drawing_TextBaseline {
+typedef enum OH_Drawing_TextBaseline {
/** Alphabetic, where the letters in alphabets like English sit on. */
TEXT_BASELINE_ALPHABETIC,
/** Ideographic. The baseline is at the bottom of the text area. */
TEXT_BASELINE_IDEOGRAPHIC,
-};
+} OH_Drawing_TextBaseline;
/**
* @brief Enumerates text decorations.
@@ -151,7 +151,7 @@ enum OH_Drawing_TextBaseline {
* @since 8
* @version 1.0
*/
-enum OH_Drawing_TextDecoration {
+typedef enum OH_Drawing_TextDecoration {
/** No decoration. */
TEXT_DECORATION_NONE = 0x0,
/** A underline is used for decoration. */
@@ -160,7 +160,7 @@ enum OH_Drawing_TextDecoration {
TEXT_DECORATION_OVERLINE = 0x2,
/** A strikethrough is used for decoration. */
TEXT_DECORATION_LINE_THROUGH = 0x4,
-};
+} OH_Drawing_TextDecoration;
/**
* @brief Enumerates font styles.
@@ -168,14 +168,14 @@ enum OH_Drawing_TextDecoration {
* @since 8
* @version 1.0
*/
-enum OH_Drawing_FontStyle {
+typedef enum OH_Drawing_FontStyle {
/** Normal style */
FONT_STYLE_NORMAL,
/** Italic style */
FONT_STYLE_ITALIC,
/** Oblique style */
FONT_STYLE_OBLIQUE,
-};
+} OH_Drawing_FontStyle;
/**
* @brief Enumerates placeholder vertical alignment.
@@ -326,7 +326,7 @@ typedef enum {
* @since 12
* @version 1.0
*/
-enum OH_Drawing_FontConfigInfoErrorCode {
+typedef enum OH_Drawing_FontConfigInfoErrorCode {
/** The list of system font configuration information was successfully obtained */
SUCCESS_FONT_CONFIG_INFO = 0,
/** Unknown error */
@@ -337,7 +337,7 @@ enum OH_Drawing_FontConfigInfoErrorCode {
ERROR_FONT_CONFIG_INFO_ALLOC_MEMORY = 3,
/** Copy string data error */
ERROR_FONT_CONFIG_INFO_COPY_STRING_DATA = 4,
-};
+} OH_Drawing_FontConfigInfoErrorCode;
/**
* @brief Fallback font information.
@@ -512,7 +512,7 @@ typedef struct OH_Drawing_LineMetrics {
* @since 12
* @version 1.0
*/
-enum OH_Drawing_TextHeightBehavior {
+typedef enum OH_Drawing_TextHeightBehavior {
/** both ascend of first row and last row style */
TEXT_HEIGHT_ALL = 0x0,
/** forbidding ascend of first row style*/
@@ -521,7 +521,7 @@ enum OH_Drawing_TextHeightBehavior {
TEXT_HEIGHT_DISABLE_LAST_ASCENT = 0x2,
/** neither ascend of first row nor last row style */
TEXT_HEIGHT_DISABLE_ALL = 0x1 | 0x2,
-};
+} OH_Drawing_TextHeightBehavior;
/**
* @brief Enumerates text style type.
@@ -529,7 +529,7 @@ enum OH_Drawing_TextHeightBehavior {
* @since 12
* @version 1.0
*/
-enum OH_Drawing_TextStyleType {
+typedef enum OH_Drawing_TextStyleType {
/** None style */
TEXT_STYLE_NONE,
/** All attributes style */
@@ -548,7 +548,7 @@ enum OH_Drawing_TextStyleType {
TEXT_STYLE_LETTER_SPACING,
/** Word spacing style */
TEXT_STYLE_WORD_SPACING
-};
+} OH_Drawing_TextStyleType;
/**
* @brief Enumerates font width.
@@ -556,7 +556,7 @@ enum OH_Drawing_TextStyleType {
* @since 12
* @version 1.0
*/
-enum OH_Drawing_FontWidth {
+typedef enum OH_Drawing_FontWidth {
/* Ultra condensed font width */
FONT_WIDTH_ULTRA_CONDENSED = 1,
/* Extra condensed font width */
@@ -575,7 +575,7 @@ enum OH_Drawing_FontWidth {
FONT_WIDTH_EXTRA_EXPANDED = 8,
/* Ultra expanded font width */
FONT_WIDTH_ULTRA_EXPANDED = 9,
-};
+} OH_Drawing_FontWidth;
/**
* @brief Defines the font style struct.
@@ -1272,6 +1272,8 @@ size_t OH_Drawing_GetSizeOfTextBox(OH_Drawing_TextBox* textBox);
* @return Returns the glyphposition at coordinate.
* @since 11
* @version 1.0
+ * @deprecated since 18
+ * @useinstead OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster
*/
OH_Drawing_PositionAndAffinity* OH_Drawing_TypographyGetGlyphPositionAtCoordinate(OH_Drawing_Typography* typography,
double dx, double dy);
@@ -1421,6 +1423,8 @@ void OH_Drawing_SetTextStyleHalfLeading(OH_Drawing_TextStyle* style, bool halfLe
* @param ellipsis Indicates the pointer to ellipsis style.
* @since 11
* @version 1.0
+ * @deprecated since 18
+ * @useinstead OH_Drawing_SetTypographyTextEllipsis
*/
void OH_Drawing_SetTextStyleEllipsis(OH_Drawing_TextStyle* style, const char* ellipsis);
@@ -1432,6 +1436,8 @@ void OH_Drawing_SetTextStyleEllipsis(OH_Drawing_TextStyle* style, const char* el
* @param ellipsisModal Indicates the ellipsis model to set. For details, see the enum OH_Drawing_EllipsisModal.
* @since 11
* @version 1.0
+ * @deprecated since 18
+ * @useinstead OH_Drawing_SetTypographyTextEllipsisModal
*/
void OH_Drawing_SetTextStyleEllipsisModal(OH_Drawing_TextStyle* style, int ellipsisModal);
@@ -1683,6 +1689,8 @@ OH_Drawing_TextStyle* OH_Drawing_TypographyGetTextStyle(OH_Drawing_TypographySty
* @return Returns line text align.
* @since 12
* @version 1.0
+ * @deprecated since 18
+ * @useinstead OH_Drawing_TypographyStyleGetEffectiveAlignment
*/
int OH_Drawing_TypographyGetEffectiveAlignment(OH_Drawing_TypographyStyle* style);
diff --git a/graphic/graphic_2d/native_image/libnative_image.ndk.json b/graphic/graphic_2d/native_image/libnative_image.ndk.json
index 1b40db3aafe575c466ec47ad9d4c2a83a71e8e2d..0a09bba188067f7d55a6428f842f4330a4cb92d6 100644
--- a/graphic/graphic_2d/native_image/libnative_image.ndk.json
+++ b/graphic/graphic_2d/native_image/libnative_image.ndk.json
@@ -34,5 +34,9 @@
{
"first_introduced": "13",
"name": "OH_ConsumerSurface_SetDefaultSize"
+ },
+ {
+ "first_introduced": "17",
+ "name": "OH_NativeImage_SetDropBufferMode"
}
]
\ No newline at end of file
diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h
index 83d30d81ff180b3b6c41b8106f567a36484f80c3..89935caed27d7a42f21b6baee6ab2d4614df72dc 100644
--- a/graphic/graphic_2d/native_image/native_image.h
+++ b/graphic/graphic_2d/native_image/native_image.h
@@ -350,6 +350,25 @@ int32_t OH_ConsumerSurface_SetDefaultUsage(OH_NativeImage* image, uint64_t usage
* @version 1.0
*/
int32_t OH_ConsumerSurface_SetDefaultSize(OH_NativeImage* image, int32_t width, int32_t height);
+
+/**
+ * @brief Set the rendering in drop buffer mode of the OH_NativeImage.\n
+ * In this mode, most of the buffers produced by the producer will be discarded,
+ * and the latest buffer will be selected for rending.\n
+ * This mode can not simultaneously guarantee high frame rate requirements.\n
+ * This interface suggest be called after the OH_NativeImage_Create call immediately.\n
+ * This interface will only take effect when used together with the OH_NativeImage_UpdateSurfaceImage.\n
+ * This interface is a non-thread-safe type interface.\n
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeImage
+ * @param image Indicates the pointer to a OH_NativeImage instance.
+ * @param isOpen Indicates the switch of drop buffer mode.
+ * @return {@link NATIVE_ERROR_OK} 0 - Success.
+ * {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - image is NULL.
+ * @since 17
+ * @version 1.0
+ */
+int32_t OH_NativeImage_SetDropBufferMode(OH_NativeImage* image, bool isOpen);
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h
index 41b01ce8d0503a1eb63d77c705c13fb120de7c2e..edc68d7f7565b45bcdc3389d339f68c25929c8e5 100644
--- a/graphic/graphic_2d/native_window/external_window.h
+++ b/graphic/graphic_2d/native_window/external_window.h
@@ -544,6 +544,17 @@ int32_t OH_NativeWindow_NativeWindowAbortBuffer(OHNativeWindow *window, OHNative
* @brief Sets or obtains the attributes of a native window, including the width, height, and content format.\n
* This interface is a non-thread-safe type interface.\n
*
+ * API Note
+ *
+ * Performance Note
+ *
By default, the window buffer in the current operating system is accessed via the CPU. If an application
+ * does not need to access the window buffer data using the CPU, it can proactively disable CPU access to
+ * enhance energy efficiency and reduce power consumption.
+ *
+ * For details about how to optimize power consumption for data read/write operations in data buffers,
+ * see [How do I proactively disable CPU access to window buffers to reduce power consumption?]{@link https://developer.huawei.com/consumer/en/doc/harmonyos-faqs/faqs-arkgraphics-2d-14}.
+ *
+ *
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a OHNativeWindow instance.
* @param code Indicates the operation code, pointer to NativeWindowOperation.
diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h
index 817691bb22183f3168098ada8c65f84df7ea96c1..8ea6331c1ec187318c181a78a2f75c1d26b9d4c0 100644
--- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h
+++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h
@@ -152,7 +152,6 @@ enum EventType {
* @brief The HiAppEvent_AppEventInfo structure is used to represent event information in an application, including
* the event's domain, name, type, and parameters.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @since 12
* @version 1.0
*/
@@ -221,7 +220,6 @@ typedef struct HiAppEvent_Config HiAppEvent_Config;
* @brief The OH_HiAppEvent_OnReceive function acts as the callback function for the HiAppEvent_Watcher. It is called
* when an event occurs.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param domain The domain of the event.
* @param appEventGroups The event group by the domain.
* @param groupLen The length of appEventGroups array.
@@ -234,7 +232,6 @@ typedef void (*OH_HiAppEvent_OnReceive)(
/**
* @brief Called when watcher receive the event meet the condition.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param row The row of events received by watcher.
* @param size The size of events received by watcher.
* @since 12
@@ -245,7 +242,6 @@ typedef void (*OH_HiAppEvent_OnTrigger)(int row, int size);
/**
* @brief Called when watcher take the events.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param events The event json string array.
* @param eventLen The length of events array.
* @since 12
@@ -517,7 +513,6 @@ bool OH_HiAppEvent_Configure(const char* name, const char* value);
/**
* @brief Create a HiAppEvent_Watcher handler pointer to set the property.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param name The name of the watcher.
* @return Returns a pointer to the HiAppEvent_Watcher instance.
* @since 12
@@ -528,7 +523,6 @@ HiAppEvent_Watcher* OH_HiAppEvent_CreateWatcher(const char* name);
/**
* @brief Destroy the specified HiAppEvent_Watcher handle resource.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @since 12
* @version 1.0
@@ -540,7 +534,6 @@ void OH_HiAppEvent_DestroyWatcher(HiAppEvent_Watcher* watcher);
* interface and any of the condition which is set over than 0 met, the onTrigger callback set through
* OH_HiAppEvent_SetWatcherOnTrigger will be invoked.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @param row The row of write events that trigger the onTrigger callback.
* @param size The size of write events that trigger the onTrigger callback.
@@ -557,7 +550,6 @@ int OH_HiAppEvent_SetTriggerCondition(HiAppEvent_Watcher* watcher, int row, int
/**
* @brief The interface to set the AppEventFilter which defines the kind of app events will be received by the watcher.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @param domain The name of the event domain to be monitored by the watcher.
* @param eventTypes The types of the events to be monitored by the watcher.0x08 means BEHAVIOR,0x04 means
@@ -581,7 +573,6 @@ int OH_HiAppEvent_SetAppEventFilter(HiAppEvent_Watcher* watcher, const char* dom
* to nullptr, the app events received by the watcher will be saved. When the new saved appEvents met the conditions set
* by OH_HiAppEvent_SetTriggerCondition, the onTrigger callback will be invoked.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @param onTrigger The callback of the watcher.
* @return Returns 0 if set OnTrigger is successful, and returns a
@@ -597,7 +588,6 @@ int OH_HiAppEvent_SetWatcherOnTrigger(HiAppEvent_Watcher* watcher, OH_HiAppEvent
* @brief The interface to set onReceive callback for watcher. When the watcher received an app event, the onReceive
* callback set will be invoked.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @param onReceive The callback of the watcher.
* @return Returns 0 if set OnReceive is successful, and returns a
@@ -612,7 +602,6 @@ int OH_HiAppEvent_SetWatcherOnReceive(HiAppEvent_Watcher* watcher, OH_HiAppEvent
/**
* @brief The interface to take saved events data for the watcher.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @param eventNum The num of events to take.
* @param onTake The callback of the watcher.
@@ -629,7 +618,6 @@ int OH_HiAppEvent_TakeWatcherData(HiAppEvent_Watcher* watcher, uint32_t eventNum
/**
* @brief The interface to add the watcher. The watcher will start receiving app events after it is added.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance which receive the event.
* @return Returns 0 if add watcher is successful, and returns a
* negative integer if add fail.
@@ -643,7 +631,6 @@ int OH_HiAppEvent_AddWatcher(HiAppEvent_Watcher* watcher);
/**
* @brief The interface to remove the watcher. The watcher will stop receiving app events after it is removed.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @param watcher The pointer to the HiAppEvent_Watcher instance.
* @return Returns 0 if remove watcher is successful, and returns a
* negative integer if remove fail.
@@ -658,7 +645,6 @@ int OH_HiAppEvent_RemoveWatcher(HiAppEvent_Watcher* watcher);
/**
* @brief Clear all local saved event data of the application.
*
- * @SystemCapability.HiviewDFX.HiAppEvent
* @since 12
* @version 1.0
*/
diff --git a/hiviewdfx/hitrace/include/hitrace/trace.h b/hiviewdfx/hitrace/include/hitrace/trace.h
index 4dcf2c51e49c98c0e7429582bb95be62900829f3..c5bf7c3251e2d710e75810ebce854046ef277b75 100644
--- a/hiviewdfx/hitrace/include/hitrace/trace.h
+++ b/hiviewdfx/hitrace/include/hitrace/trace.h
@@ -40,24 +40,6 @@
*
* @brief Defines APIs of the HiTraceMeter module for performance trace.
*
- * Sample code: \n
- * Synchronous timeslice trace event: \n
- * OH_HiTrace_StartTrace("hitraceTest");\n
- * OH_HiTrace_FinishTrace();\n
- * Output: \n
- * <...>-1668 (-------) [003] .... 135.059377: tracing_mark_write: B|1668|H:hitraceTest \n
- * <...>-1668 (-------) [003] .... 135.059415: tracing_mark_write: E|1668| \n
- * Asynchronous timeslice trace event:\n
- * OH_HiTrace_StartAsyncTrace("hitraceTest", 123); \n
- * OH_HiTrace_FinishAsyncTrace("hitraceTest", 123); \n
- * Output: \n
- * <...>-2477 (-------) [001] .... 396.427165: tracing_mark_write: S|2477|H:hitraceTest 123 \n
- * <...>-2477 (-------) [001] .... 396.427196: tracing_mark_write: F|2477|H:hitraceTest 123 \n
- * Integer value trace event:\n
- * OH_HiTrace_CountTrace("hitraceTest", 500); \n
- * Output: \n
- * <...>-2638 (-------) [002] .... 458.904382: tracing_mark_write: C|2638|H:hitraceTest 500 \n
- *
* @library libhitracechain.so
* @syscap SystemCapability.HiviewDFX.HiTrace
* @since 10
@@ -297,37 +279,49 @@ typedef enum HiTrace_Communication_Mode {
* @brief Enumerates the HiTrace output levels. The output level threshold system parameter determines
* the minimum output trace.
*
- * @since 18
+ * @atomicservice
+ *
+ * @since 19
*/
typedef enum HiTrace_Output_Level {
/**
- * @brief Ouput level only for debug usage.
+ * @brief Output level only for debug usage.
*
- * @since 18
+ * @atomicservice
+ *
+ * @since 19
*/
HITRACE_LEVEL_DEBUG = 0,
/**
- * @brief Output level for beta version usage.
+ * @brief Output level for log version usage.
+ *
+ * @atomicservice
*
- * @since 18
+ * @since 19
*/
HITRACE_LEVEL_INFO = 1,
/**
- * @brief Output level for beta version usage, with higher priority than HITRACE_LEVEL_INFO.
+ * @brief Output level for log version usage, with higher priority than HITRACE_LEVEL_INFO.
*
- * @since 18
+ * @atomicservice
+ *
+ * @since 19
*/
HITRACE_LEVEL_CRITICAL = 2,
/**
- * @brief Output level for commercial version usage.
+ * @brief Output level for nolog version usage.
+ *
+ * @atomicservice
*
- * @since 18
+ * @since 19
*/
HITRACE_LEVEL_COMMERCIAL = 3,
/**
* @brief Output level for range limit.
*
- * @since 18
+ * @atomicservice
+ *
+ * @since 19
*/
HITRACE_LEVEL_MAX = HITRACE_LEVEL_COMMERCIAL,
} HiTrace_Output_Level;
@@ -729,23 +723,25 @@ void OH_HiTrace_CountTrace(const char *name, int64_t count);
* The OH_HiTrace_StartTraceEx and OH_HiTrace_FinishTraceEx APIs must be used in pairs.
* The two APIs can be used in nested mode. The stack data structure is used for matching during trace data parsing.
*
- * @param level Level of output priority.
- * @param name Name of a trace task.
- * @param customArgs key=value pair, multiple pairs use comma as seperator.
+ * @param level Trace output priority level.
+ * @param name Name of the synchronous trace task.
+ * @param customArgs key=value pair, multiple pairs use comma as separator.
* @atomicservice
- * @since 18
+ * @since 19
*/
void OH_HiTrace_StartTraceEx(HiTrace_Output_Level level, const char* name, const char* customArgs);
/**
* @brief Marks the end of a synchronous trace task with output level control.
*
- * This API must be used with OH_HiTrace_StartTraceEx in pairs. During trace data parsing, the system matches
- * it with the most recent OH_HiTrace_StartTraceEx API invocation in the service process.
+ * This API must be used with OH_HiTrace_StartTraceEx in pairs. The two APIs, which have the same level,
+ * form an synchronous timeslice trace task.
+ * During trace data parsing, the system matches it with the most recent OH_HiTrace_StartTraceEx API
+ * invocation in the service process.
*
- * @param level Level of output priority.
+ * @param level Trace output priority level.
* @atomicservice
- * @since 18
+ * @since 19
*/
void OH_HiTrace_FinishTraceEx(HiTrace_Output_Level level);
@@ -764,13 +760,13 @@ void OH_HiTrace_FinishTraceEx(HiTrace_Output_Level level);
* If the trace tasks with the same name are not performed at the same time, the same taskId can be used.
* Different processes's taskId do not interfere.
*
- * @param level Level of output priority.
+ * @param level Trace output priority level.
* @param name Name of the asynchronous trace task.
* @param taskId ID of the asynchronous trace task.
* @param customCategory Label used to aggregate the asynchronous trace.
- * @param customArgs key=value pair, multiple pairs use comma as seperator.
+ * @param customArgs key=value pair, multiple pairs use comma as separator.
* @atomicservice
- * @since 18
+ * @since 19
*/
void OH_HiTrace_StartAsyncTraceEx(HiTrace_Output_Level level, const char* name, int32_t taskId,
const char* customCategory, const char* customArgs);
@@ -782,11 +778,11 @@ void OH_HiTrace_StartAsyncTraceEx(HiTrace_Output_Level level, const char* name,
* It is used with OH_HiTrace_StartAsyncTraceEx in pairs. Its level, name, and task ID must be
* the same as those of OH_HiTrace_StartAsyncTraceEx.
*
- * @param level Level of output priority.
+ * @param level Trace output priority level.
* @param name Name of the asynchronous trace task.
* @param taskId ID of the asynchronous trace task.
* @atomicservice
- * @since 18
+ * @since 19
*/
void OH_HiTrace_FinishAsyncTraceEx(HiTrace_Output_Level level, const char* name, int32_t taskId);
@@ -796,11 +792,11 @@ void OH_HiTrace_FinishAsyncTraceEx(HiTrace_Output_Level level, const char* name,
* This API can be executed for multiple times to trace the value change of a given integer variable at different
* time points.
*
- * @param level Level of output priority.
+ * @param level Trace output priority level.
* @param name Name of the integer variable. It does not need to be the same as the real variable name.
* @param count Integer value. Generally, an integer variable can be passed.
* @atomicservice
- * @since 18
+ * @since 19
*/
void OH_HiTrace_CountTraceEx(HiTrace_Output_Level level, const char* name, int64_t count);
@@ -809,9 +805,9 @@ void OH_HiTrace_CountTraceEx(HiTrace_Output_Level level, const char* name, int64
*
* @return Returns whether the calling process is allowed to output trace.
* @atomicservice
- * @since 18
+ * @since 19
*/
-bool OH_HiTrace_IsTraceEnabled();
+bool OH_HiTrace_IsTraceEnabled(void);
#ifdef __cplusplus
}
diff --git a/hiviewdfx/hitrace/libhitrace.ndk.json b/hiviewdfx/hitrace/libhitrace.ndk.json
index c98632da5caf1433e30e153ab4520de163cf6177..5cf5a3451793e662b3b37d7d3f0880864c073f8f 100644
--- a/hiviewdfx/hitrace/libhitrace.ndk.json
+++ b/hiviewdfx/hitrace/libhitrace.ndk.json
@@ -97,5 +97,29 @@
{
"first_introduced": "12",
"name": "OH_HiTrace_IdToBytes"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_HiTrace_StartTraceEx"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_HiTrace_FinishTraceEx"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_HiTrace_StartAsyncTraceEx"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_HiTrace_FinishAsyncTraceEx"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_HiTrace_CountTraceEx"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_HiTrace_IsTraceEnabled"
}
]
\ No newline at end of file
diff --git a/multimedia/audio_framework/BUILD.gn b/multimedia/audio_framework/BUILD.gn
index e3a53b3cf93cd734a46e6c067705fe3cc7687753..4c1cee6caaccd24a333f2b10da4f45562eb47524 100644
--- a/multimedia/audio_framework/BUILD.gn
+++ b/multimedia/audio_framework/BUILD.gn
@@ -21,6 +21,7 @@ ohos_ndk_headers("ohaudio_header") {
"audio_manager/native_audio_manager.h",
"audio_manager/native_audio_routing_manager.h",
"audio_manager/native_audio_session_manager.h",
+ "audio_manager/native_audio_stream_manager.h",
"audio_renderer/native_audiorenderer.h",
"common/native_audio_common.h",
"common/native_audio_device_base.h",
@@ -44,5 +45,6 @@ ohos_ndk_library("libohaudio_ndk") {
"ohaudio/native_audio_common.h",
"ohaudio/native_audio_device_base.h",
"ohaudio/native_audio_session_manager.h",
+ "ohaudio/native_audio_stream_manager.h",
]
}
diff --git a/multimedia/audio_framework/audio_manager/native_audio_stream_manager.h b/multimedia/audio_framework/audio_manager/native_audio_stream_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..8354c52d192de15724918829106dcbae46efeeb6
--- /dev/null
+++ b/multimedia/audio_framework/audio_manager/native_audio_stream_manager.h
@@ -0,0 +1,97 @@
+/*
+ * 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 OHAudio
+ * @{
+ *
+ * @brief Provide the definition of the C interface for the audio module.
+ *
+ * @syscap SystemCapability.Multimedia.Audio.Core
+ *
+ * @since 19
+ */
+
+/**
+ * @file native_audio_stream_manager.h
+ *
+ * @brief Declare audio stream manager related interfaces.
+ *
+ * This file interface is used for the creation of audioStreamManager
+ * as well as the audio stream settings and management.
+ *
+ * @library libohaudio.so
+ * @syscap SystemCapability.Multimedia.Audio.Core
+ * @kit AudioKit
+ * @since 19
+ */
+
+#ifndef NATIVE_AUDIO_STREAM_MANAGER_H
+#define NATIVE_AUDIO_STREAM_MANAGER_H
+
+#include "native_audio_common.h"
+#include "native_audiostream_base.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Declare the audio stream manager.
+ * Audio stream manager provides many functions about audio streams, like monitoring audio streams status,
+ * getting different stream types supported information and so on.
+ *
+ * @since 19
+ */
+typedef struct OH_AudioStreamManager OH_AudioStreamManager;
+
+/**
+ * @brief Fetch the audio streammanager handle, which is a singleton.
+ *
+ * @param streamManager output parameter to get the {@link #OH_AudioStreamManager}.
+ * @return
+ * {@link #AUDIOCOMMON_RESULT_SUCCESS} if execution succeeds
+ * {@link #AUDIOCOMMON_RESULT_ERROR_SYSTEM} if system state error
+ * @since 19
+ */
+OH_AudioCommon_Result OH_AudioManager_GetAudioStreamManager(OH_AudioStreamManager **streamManager);
+
+/**
+ * @brief Gets the mode of direct playback available for a given audio format with current active device.
+ *
+ * @param audioStreamManager the {@link OH_AudioStreamManager} handle provided by
+ * {@link OH_AudioManager_GetAudioStreamManager}.
+ * @param streamInfo the {@link OH_AudioStreamInfo}.
+ * @param usage the {@link OH_AudioStream_Usage}.
+ * @param directPlaybackMode the {@link OH_AudioStream_DirectPlaybackMode} pointer to a variable which receives the
+ * result.
+ * @return Function result code:
+ * {@link AUDIOCOMMON_RESULT_SUCCESS} If the execution is successful.
+ * {@link AUDIOCOMMON_RESULT_ERROR_INVALID_PARAM}:
+ * 1.The param of audioStreamManager is nullptr;
+ * 2.The param of streamInfo is nullptr;
+ * 3.The param of usage invalid;
+ * 4.The param of directPlaybackMode is nullptr.
+ * @since 19
+ */
+OH_AudioCommon_Result OH_AudioStreamManager_GetDirectPlaybackSupport(
+ OH_AudioStreamManager *audioStreamManager, OH_AudioStreamInfo *streamInfo,
+ OH_AudioStream_Usage usage, OH_AudioStream_DirectPlaybackMode *directPlaybackMode);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // NATIVE_AUDIO_STREAM_MANAGER_H
+/** @} */
diff --git a/multimedia/audio_framework/common/native_audio_device_base.h b/multimedia/audio_framework/common/native_audio_device_base.h
index 15a90dac346ef6bb7592de94e12bf2a6b95109e9..17f1b780465d0c850361ed174e7ec704333ccded 100644
--- a/multimedia/audio_framework/common/native_audio_device_base.h
+++ b/multimedia/audio_framework/common/native_audio_device_base.h
@@ -158,13 +158,13 @@ typedef enum {
/**
* @brief HDMI device, such as a device connected through an HDMI, ARC, or eARC interface.
- * @since 18
+ * @since 19
*/
AUDIO_DEVICE_TYPE_HDMI = 27,
/**
- * @brief line-connected, digital audio output device, such as an S/PDIF device.
- * @since 18
+ * @brief Line-connected, digital audio output device, such as an S/PDIF device.
+ * @since 19
*/
AUDIO_DEVICE_TYPE_LINE_DIGITAL = 28,
diff --git a/multimedia/audio_framework/common/native_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h
index 6b1fb6cb61edece25817d4b933662e5471abd470..7792e064e7180f9e5d0fa27b8490eab79d603b55 100644
--- a/multimedia/audio_framework/common/native_audiostream_base.h
+++ b/multimedia/audio_framework/common/native_audiostream_base.h
@@ -41,6 +41,7 @@
#define NATIVE_AUDIOSTREAM_BASE_H
#include
+#include "multimedia/native_audio_channel_layout.h"
#ifdef __cplusplus
extern "C" {
@@ -78,7 +79,14 @@ typedef enum {
*
* @since 10
*/
- AUDIOSTREAM_ERROR_SYSTEM = 3
+ AUDIOSTREAM_ERROR_SYSTEM = 3,
+
+ /**
+ * @error Unsupported audio format, such as unsupported encoding type, sample format etc.
+ *
+ * @since 19
+ */
+ AUDIOSTREAM_ERROR_UNSUPPORTED_FORMAT = 4
} OH_AudioStream_Result;
/**
@@ -136,7 +144,7 @@ typedef enum {
/**
* Float 32, little endian.
*
- * @since 18
+ * @since 17
*/
AUDIOSTREAM_SAMPLE_F32LE = 4,
} OH_AudioStream_SampleFormat;
@@ -159,8 +167,46 @@ typedef enum {
* @since 12
*/
AUDIOSTREAM_ENCODING_TYPE_AUDIOVIVID = 1,
+ /**
+ * E_AC3 encoding type.
+ *
+ * @since 19
+ */
+ AUDIOSTREAM_ENCODING_TYPE_E_AC3 = 2,
} OH_AudioStream_EncodingType;
+/**
+ * @brief Define the audio stream info structure, used to describe basic audio format.
+ *
+ * @since 19
+ */
+typedef struct OH_AudioStreamInfo {
+ /**
+ * @brief Audio sampling rate.
+ *
+ * @since 19
+ */
+ int32_t samplingRate;
+ /**
+ * @brief Audio channel layout.
+ *
+ * @since 19
+ */
+ OH_AudioChannelLayout channelLayout;
+ /**
+ * @brief Audio encoding format type.
+ *
+ * @since 19
+ */
+ OH_AudioStream_EncodingType encodingType;
+ /**
+ * @brief Audio sample format.
+ *
+ * @since 19
+ */
+ OH_AudioStream_SampleFormat sampleFormat;
+} OH_AudioStreamInfo;
+
/**
* @brief Define the audio stream usage.
* Audio stream usage is used to describe what work scenario
@@ -275,6 +321,32 @@ typedef enum {
AUDIOSTREAM_LATENCY_MODE_FAST = 1
} OH_AudioStream_LatencyMode;
+/**
+ * @brief Enumerates audio direct playback modes.
+ *
+ * @since 19
+ */
+typedef enum {
+ /**
+ * Direct playback is not supported.
+ *
+ * @since 19
+ */
+ AUDIOSTREAM_DIRECT_PLAYBACK_NOT_SUPPORTED = 0,
+ /**
+ * Direct playback mode which is bitstream pass-through such as compressed pass-through.
+ *
+ * @since 19
+ */
+ AUDIOSTREAM_DIRECT_PLAYBACK_BITSTREAM_SUPPORTED = 1,
+ /**
+ * Direct playback mode of pcm.
+ *
+ * @since 19
+ */
+ AUDIOSTREAM_DIRECT_PLAYBACK_PCM_SUPPORTED = 2
+} OH_AudioStream_DirectPlaybackMode;
+
/**
* @brief Define the audio event.
*
@@ -756,13 +828,13 @@ typedef OH_AudioData_Callback_Result (*OH_AudioRenderer_OnWriteDataCallback)(OH_
/**
* @brief Define the audio stream volume mode.
*
- * @since 18
+ * @since 19
*/
typedef enum {
/**
* Indicates this audio stream volume will be affected by system volume, also the default behavior.
*
- * @since 18
+ * @since 19
*/
AUDIOSTREAM_VOLUMEMODE_SYSTEM_GLOBAL = 0,
@@ -770,7 +842,7 @@ typedef enum {
* Indicates this audio stream volume will be affected by app's individual volume percentage which set by yourself
* using the app volume api.
*
- * @since 18
+ * @since 19
*/
AUDIOSTREAM_VOLUMEMODE_APP_INDIVIDUAL = 1
} OH_AudioStream_VolumeMode;
diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h
index 5fb946d8186ec1649a6d77d79588d82893d23aa6..4fd3502b0d62d231911f084e4d869c91b234d868 100644
--- a/multimedia/audio_framework/common/native_audiostreambuilder.h
+++ b/multimedia/audio_framework/common/native_audiostreambuilder.h
@@ -272,6 +272,22 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBu
/**
* Create the audio renderer client.
*
+ * The AudioRenderer instance is used to play streaming audio data.
+ * When using AudioRenderer apis, there are many instructions for application
+ * to achieve better performance and lower power consumption:
+ * In music or audiobook background playback situation, you can have low power
+ * consumption by following this best practices document [Low-Power Rules in Music Playback Scenarios]{@link
+ * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-music-playback-scenarios}.
+ * And for navigation situation, you can follow [Low-Power Rules in Navigation and Positioning Scenarios]{@link
+ * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-navigation-scenarios}.
+ *
+ * Application developer should also be careful when app goes to background, please check if your audio playback
+ * is still needed, see [Audio Resources]{@link
+ * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-reasonable-audio-use}.
+ * And avoiding to send silence audio data continuously to waste system resources, otherwise system will take
+ * control measures when this behavior is detected, see [Audio Playback]{@link
+ * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-reasonable-audio-playback-use}.
+ *
* @since 10
*
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
@@ -374,8 +390,6 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererWriteDataCallback(OH_Audi
/**
* Set the renderer volume mode of the stream client
*
- * @since 18
- *
* @param builder Reference provided by OH_AudioStreamBuilder_Create()
* @param volumeMode Set the volume mode for the renderer client.
* @return Function result code:
@@ -383,6 +397,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererWriteDataCallback(OH_Audi
* {@link AUDIOSTREAM_ERROR_INVALID_PARAM}:
* 1.The param of builder is nullptr;
* 2.The param of volumeMode invalid.
+ * @since 19
*/
OH_AudioStream_Result OH_AudioStreamBuilder_SetVolumeMode(OH_AudioStreamBuilder* builder,
OH_AudioStream_VolumeMode volumeMode);
diff --git a/multimedia/audio_framework/ohaudio.ndk.json b/multimedia/audio_framework/ohaudio.ndk.json
index 9366ddd759a8f380fc8fb8d784be308e011e562a..abe2f9773e81720a8fad7bceb14b0845a0d4051c 100644
--- a/multimedia/audio_framework/ohaudio.ndk.json
+++ b/multimedia/audio_framework/ohaudio.ndk.json
@@ -384,7 +384,7 @@
"name": "OH_AudioRenderer_GetAudioTimestampInfo"
},
{
- "first_introduced": "18",
+ "first_introduced": "19",
"name": "OH_AudioStreamBuilder_SetVolumeMode"
},
{
@@ -410,5 +410,13 @@
{
"first_introduced": "18",
"name": "OH_AudioStreamBuilder_SetCapturerErrorCallback"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_AudioManager_GetAudioStreamManager"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_AudioStreamManager_GetDirectPlaybackSupport"
}
]
diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json
index c84f06a8764f6b2f2f5c05f440080dd77685a450..8077a4119567a7bc3f9a471c6a9ffd51076c841b 100644
--- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json
+++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json
@@ -80,13 +80,17 @@
"name": "OH_AVCODEC_MIMETYPE_AUDIO_RAW"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AVCODEC_MIMETYPE_VIDEO_MPEG2"
},
{
- "first_introduced": "18",
+ "first_introduced": "17",
"name": "OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2"
},
+ {
+ "first_introduced": "17",
+ "name": "OH_AVCODEC_MIMETYPE_VIDEO_H263"
+ },
{
"first_introduced": "9",
"name": "OH_ED_KEY_TIME_STAMP"
diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h
index ce92ddfee08b5c255f721d09c2c138713696c7a9..609dc238e0af050156bd7952e9cbb0237a1cc935 100644
--- a/multimedia/av_codec/native_avcodec_base.h
+++ b/multimedia/av_codec/native_avcodec_base.h
@@ -366,17 +366,25 @@ extern const char *OH_AVCODEC_MIMETYPE_AUDIO_RAW;
* @brief Enumerates the MIME type of video mpeg2 codec.
*
* @syscap SystemCapability.Multimedia.Media.CodecBase
- * @since 18
+ * @since 17
*/
extern const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG2;
/**
* @brief Enumerates the MIME type of video mpeg4 part2 codec.
*
* @syscap SystemCapability.Multimedia.Media.CodecBase
- * @since 18
+ * @since 17
*/
extern const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG4_PART2;
+/**
+ * @brief Enumerates the MIME type of video h263 codec.
+ *
+ * @syscap SystemCapability.Multimedia.Media.CodecBase
+ * @since 17
+ */
+extern const char *OH_AVCODEC_MIMETYPE_VIDEO_H263;
+
/**
* @brief Key for timeStamp in surface's extraData, value type is int64_t.
*
@@ -1136,7 +1144,7 @@ typedef enum OH_VVCProfile {
* @brief MPEG2 Profile
*
* @syscap SystemCapability.Multimedia.Media.CodecBase
- * @since 18
+ * @since 17
*/
typedef enum OH_MPEG2Profile {
/** Simple profile */
@@ -1157,7 +1165,7 @@ typedef enum OH_MPEG2Profile {
* @brief MPEG4 Profile
*
* @syscap SystemCapability.Multimedia.Media.CodecBase
- * @since 18
+ * @since 17
*/
typedef enum OH_MPEG4Profile {
/** Simple profile */
@@ -1192,6 +1200,19 @@ typedef enum OH_MPEG4Profile {
MPEG4_PROFILE_ADVANCED_SIMPLE = 17,
} OH_MPEG4Profile;
+/**
+ * @brief H263 Profile
+ *
+ * @syscap SystemCapability.Multimedia.Media.CodecBase
+ * @since 17
+ */
+typedef enum OH_H263Profile {
+ /** Baseline profile */
+ H263_PROFILE_BASELINE = 0,
+ /** Version 1 backward compatibility profile */
+ H263_PROFILE_VERSION_1_BACKWARD_COMPATIBILITY = 2,
+} OH_H263Profile;
+
/**
* @brief Enumerates the muxer output file format
*
@@ -1444,7 +1465,7 @@ typedef enum OH_VVCLevel {
* @brief MPEG2 Level.
*
* @syscap SystemCapability.Multimedia.Media.CodecBase
- * @since 18
+ * @since 17
*/
typedef enum OH_MPEG2Level {
/** Low level */
@@ -1461,7 +1482,7 @@ typedef enum OH_MPEG2Level {
* @brief MPEG4 Level.
*
* @syscap SystemCapability.Multimedia.Media.CodecBase
- * @since 18
+ * @since 17
*/
typedef enum OH_MPEG4Level {
/** 0 level */
@@ -1486,6 +1507,31 @@ typedef enum OH_MPEG4Level {
MPEG4_LEVEL_6 = 9,
} OH_MPEG4Level;
+/**
+ * @brief H263 Level.
+ *
+ * @syscap SystemCapability.Multimedia.Media.CodecBase
+ * @since 17
+ */
+typedef enum OH_H263Level {
+ /** 10 level */
+ H263_LEVEL_10 = 0,
+ /** 20 level */
+ H263_LEVEL_20 = 1,
+ /** 30 level */
+ H263_LEVEL_30 = 2,
+ /** 40 level */
+ H263_LEVEL_40 = 3,
+ /** 45 level */
+ H263_LEVEL_45 = 4,
+ /** 50 level */
+ H263_LEVEL_50 = 5,
+ /** 60 level */
+ H263_LEVEL_60 = 6,
+ /** 70 level */
+ H263_LEVEL_70 = 7,
+} OH_H263Level;
+
/**
* @brief The reference mode in temporal group of picture.
*
diff --git a/multimedia/av_session/native_avsession.h b/multimedia/av_session/native_avsession.h
index 50b7e64592b3db56afd3b3ec3048e38300203da7..b877c0c88bed22409fd84699ee0556598043ec6e 100644
--- a/multimedia/av_session/native_avsession.h
+++ b/multimedia/av_session/native_avsession.h
@@ -327,6 +327,7 @@ typedef AVSessionCallback_Result (*OH_AVSessionCallback_OnToggleFavorite)(OH_AVS
* @param avsession Pointer to a viriable to receive the OH_AVSession
* @return Function result codeļ¼
* {@link AV_SESSION_ERR_SUCCESS} If the execution is successful.
+ * {@link AV_SESSION_ERR_SERVICE_EXCEPTION} If session already existed or internal server error.
* {@link AV_SESSION_ERR_INVALID_PARAMETER}:
* 1. The param of sessionType is invalid.
* 2. The param of sessionTag is nullptr.
diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h
index eecc0d386bda05a25aab781ca73cc34da243689e..274390abd1f8e5c21d6699f604f0454fb2ccba0f 100644
--- a/multimedia/camera_framework/camera.h
+++ b/multimedia/camera_framework/camera.h
@@ -1101,6 +1101,57 @@ typedef enum Camera_QualityPrioritization {
POWER_BALANCE = 1
} Camera_QualityPrioritization;
+/**
+ * @brief Enum for camera concurrent type.
+ *
+ * @since 18
+ * @version 1.0
+ */
+typedef enum Camera_ConcurrentType {
+ /**
+ * Cameras concurrency with limited capability.
+ */
+ CAMERA_CONCURRENT_TYPE_LIMITED_CAPABILITY = 0,
+
+ /**
+ * Cameras concurrenct with full capability.
+ */
+ CAMERA_CONCURRENT_TYPE_FULL_CAPABILITY = 1
+} Camera_ConcurrentType;
+
+/**
+ * @brief Concurrency capability infos.
+ *
+ * @since 18
+ * @version 1.0
+ */
+typedef struct Camera_ConcurrentInfo {
+ /**
+ * Camera instance.
+ */
+ Camera_Device camera;
+
+ /**
+ * Supported concurrent type.
+ */
+ Camera_ConcurrentType type;
+
+ /**
+ * Supported Modes.
+ */
+ Camera_SceneMode* sceneModes;
+
+ /**
+ * Supported outputCapabilities
+ */
+ Camera_OutputCapability* outputCapabilities;
+
+ /**
+ * Supported outputCapabilities size.
+ */
+ uint32_t modeAndCapabilitySize;
+} Camera_ConcurrentInfo;
+
#ifdef __cplusplus
}
#endif
diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json
index cc333d32825ff0b8ef44f719e1a8f054264b35aa..e92a2841fea73cf29949a8c360cd504a751e337d 100644
--- a/multimedia/camera_framework/camera.ndk.json
+++ b/multimedia/camera_framework/camera.ndk.json
@@ -650,5 +650,25 @@
{
"first_introduced": "14",
"name": "OH_CaptureSession_SetQualityPrioritization"
+ },
+ {
+ "first_introduced": "18",
+ "name": "OH_CameraManager_GetCameraDevice"
+ },
+ {
+ "first_introduced": "18",
+ "name": "OH_CameraManager_GetCameraConcurrentInfos"
+ },
+ {
+ "first_introduced": "18",
+ "name": "OH_CameraInput_OpenConcurrentCameras"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_CaptureSession_IsMacroSupported"
+ },
+ {
+ "first_introduced": "19",
+ "name": "OH_CaptureSession_EnableMacro"
}
]
diff --git a/multimedia/camera_framework/camera_input.h b/multimedia/camera_framework/camera_input.h
index 1438eda3e638e708da24a7d723f72e2ef7ecee53..a91452d9d46cdef6d27a3e7e68095be23b48bb5e 100644
--- a/multimedia/camera_framework/camera_input.h
+++ b/multimedia/camera_framework/camera_input.h
@@ -135,6 +135,20 @@ Camera_ErrorCode OH_CameraInput_Open(Camera_Input* cameraInput);
*/
Camera_ErrorCode OH_CameraInput_OpenSecureCamera(Camera_Input* cameraInput, uint64_t* secureSeqId);
+/**
+ * @brief Open camera with specified concurrent type.
+ *
+ * @param cameraInput the {@link Camera_Input} instance to be opened.
+ * @param type the {@link Camera_ConcurrentType} instance.
+ * @return {@link #CAMERA_OK} if the method call succeeds.
+ * {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
+ * {@link #CAMERA_CONFLICT_CAMERA} if can not use camera cause of conflict.
+ * {@link #CAMERA_DEVICE_DISABLED} if camera disabled cause of security reason.
+ * {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
+ * @since 18
+ */
+Camera_ErrorCode OH_CameraInput_OpenConcurrentCameras(Camera_Input* cameraInput, Camera_ConcurrentType type);
+
/**
* @brief Close camera.
*
diff --git a/multimedia/camera_framework/camera_manager.h b/multimedia/camera_framework/camera_manager.h
index 71a8f46166f73fda9dea770d94b460e813e77c5b..68e51c29060f037f89ae8793c02a8d4745431be0 100644
--- a/multimedia/camera_framework/camera_manager.h
+++ b/multimedia/camera_framework/camera_manager.h
@@ -470,6 +470,39 @@ Camera_ErrorCode OH_CameraManager_IsTorchSupportedByTorchMode(Camera_Manager* ca
Camera_ErrorCode OH_CameraManager_SetTorchMode(Camera_Manager* cameraManager,
Camera_TorchMode torchMode);
+/**
+ * @brief Queries a specified device based on position and type.
+ *
+ * @param cameraManager the {@link Camera_Manager} instance.
+ * @param position the {@link Camera_Position} instance.
+ * @param type the {@link Camera_Type} instance.
+ * @param camera the {@link Camera_Device} to be set.
+ * @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 18
+ */
+Camera_ErrorCode OH_CameraManager_GetCameraDevice(Camera_Manager* cameraManager, Camera_Position position,
+ Camera_Type type, Camera_Device* camera);
+
+/**
+ * @brief Obtains the concurrent information of specified cameras, the empty return means concurrency is not supported.
+ *
+ * @param cameraManager the {@link Camera_Manager} instance.
+ * @param camera the {@link Camera_Device} instance.
+ * @param deviceSize length of the input device array.
+ * @param cameraConcurrentInfo the {@link Camera_ConcurrentInfo} to be set.
+ * @param infoSize length of the returned concurrency information array.
+ * @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 18
+ */
+Camera_ErrorCode OH_CameraManager_GetCameraConcurrentInfos(Camera_Manager* cameraManager, const Camera_Device* camera,
+ uint32_t deviceSize,
+ Camera_ConcurrentInfo** cameraConcurrentInfo,
+ uint32_t* infoSize);
+
#ifdef __cplusplus
}
#endif
diff --git a/multimedia/camera_framework/capture_session.h b/multimedia/camera_framework/capture_session.h
index bbccf4e81b6e25290f39ca1b4254e8997bc8d54f..93e77e11881b41895cb9d56b4ba5141c5056c2e1 100644
--- a/multimedia/camera_framework/capture_session.h
+++ b/multimedia/camera_framework/capture_session.h
@@ -929,6 +929,33 @@ Camera_ErrorCode OH_CaptureSession_EnableAutoDeviceSwitch(Camera_CaptureSession*
Camera_ErrorCode OH_CaptureSession_SetQualityPrioritization(
Camera_CaptureSession* session, Camera_QualityPrioritization qualityPrioritization);
+/**
+ * @brief Checks whether the macro capability is supported.
+ *
+ * @param session Pointer to an {@link Camera_CaptureSession} instance.
+ * @param isSupported Pointer to the check result. The value true means that the macro capability is supported, and false means the opposite.
+ * @return {@link Camera_ErrorCode}:
+ * CAMERA_OK = 0: The function call is successful.\n
+ * CAMERA_INVALID_ARGUMENT = 7400101: A parameter is missing or the parameter type is incorrect.\n
+ * CAMERA_SESSION_NOT_CONFIG = 7400103: The capture session is not configured.
+ * @since 19
+ */
+Camera_ErrorCode OH_CaptureSession_IsMacroSupported(Camera_CaptureSession* session, bool* isSupported);
+
+/**
+ * @brief Enables or disables the macro capability of the camera device.
+ *
+ * @param session Pointer to an {@link Camera_CaptureSession} instance.
+ * @param enabled Whether to enable the macro capability. The value true means to enable the macro capability, and false means to disable it.
+ * @return {@link Camera_ErrorCode}:
+ * CAMERA_OK = 0: The function call is successful.\n
+ * CAMERA_INVALID_ARGUMENT = 7400101: A parameter is missing or the parameter type is incorrect.\n
+ * CAMERA_SESSION_NOT_CONFIG = 7400103: The capture session is not configured.\n
+ * CAMERA_OPERATION_NOT_ALLOWED = 7400102: The operation is not allowed.
+ * @since 19
+ */
+Camera_ErrorCode OH_CaptureSession_EnableMacro(Camera_CaptureSession* session, bool enabled);
+
#ifdef __cplusplus
}
#endif
diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h
index 67d972adf0b506d2c1961fcad25b835fd64e85c6..d17f95a5d5ebb8adbf2609da5e29731e87dc3840 100644
--- a/multimedia/image_framework/include/image/image_common.h
+++ b/multimedia/image_framework/include/image/image_common.h
@@ -27,7 +27,7 @@
*
* @brief Declares the common enums and structs used by the image interface.
*
- * @library libpixelmap.so
+ * @library libimage_common.so
* @kit ImageKit
* @syscap SystemCapability.Multimedia.Image.Core
* @since 12
diff --git a/multimedia/media_foundation/native_avbuffer.h b/multimedia/media_foundation/native_avbuffer.h
index 29ff41d31536af91b853ac9913aa96a421a5d150..9b81707911565a3865bffbe95e70d941aa37d0b2 100644
--- a/multimedia/media_foundation/native_avbuffer.h
+++ b/multimedia/media_foundation/native_avbuffer.h
@@ -133,7 +133,7 @@ OH_AVFormat *OH_AVBuffer_GetParameter(OH_AVBuffer *buffer);
* @return Function result code.
* {@link AV_ERR_OK} if the execution is successful.
* {@link AV_ERR_INVALID_VAL} if input buffer is nullptr, buffer's magic error,
- * input buffer's buffer is nulllptr, input format is nullptr, buffer's magic error, or input meta is nullptr.
+ * input buffer's buffer is nulllptr, input format is nullptr, or input meta is nullptr.
* @since 11
*/
OH_AVErrCode OH_AVBuffer_SetParameter(OH_AVBuffer *buffer, const OH_AVFormat *format);
diff --git a/multimedia/media_library/media_asset_base_capi.h b/multimedia/media_library/media_asset_base_capi.h
index 53380d6deedf25720000929db83002e18daa86cf..4c117ed6845e2d7553e7e3d08291ccb7ce9c2fde 100644
--- a/multimedia/media_library/media_asset_base_capi.h
+++ b/multimedia/media_library/media_asset_base_capi.h
@@ -246,7 +246,14 @@ typedef enum MediaLibrary_ResourceType {
*/
typedef enum MediaLibrary_ImageFileType {
/*JPEG type*/
- MEDIA_LIBRARY_IMAGE_JPEG = 1
+ MEDIA_LIBRARY_IMAGE_JPEG = 1,
+
+ /**
+ * @brief MPEG type
+ *
+ * @since 19
+ */
+ MEDIA_LIBRARY_FILE_VIDEO = 3,
} MediaLibrary_ImageFileType;
/**
diff --git a/multimedia/player_framework/avplayer.h b/multimedia/player_framework/avplayer.h
index f87d5b2bcdf5fe9cef44aaacaed63e0b5f3711f3..3cd37c2579b97eefadfe38ad9a4c134e102f4755 100644
--- a/multimedia/player_framework/avplayer.h
+++ b/multimedia/player_framework/avplayer.h
@@ -593,16 +593,17 @@ OH_AVErrCode OH_AVPlayer_SetOnInfoCallback(OH_AVPlayer *player, OH_AVPlayerOnInf
OH_AVErrCode OH_AVPlayer_SetOnErrorCallback(OH_AVPlayer *player, OH_AVPlayerOnErrorCallback callback, void *userData);
/**
- * @brief Set volume mode of the player
- * @param player Pointer to an OH_AVPlayer instance
- * @param volumeMode The value {@link OH_AudioStream_VolumeMode} indicated volume mode of the player.
- * @return Function result code.
- * {@link AV_ERR_OK} if the execution is successful.
- * {@link AV_ERR_INVALID_VAL} if input player is nullptr or volumeMode value is invalid.
- * {@link AV_ERR_INVALID_STATE} function called in invalid state, should before prepare state.
- * {@link AV_ERR_SERVICE_DIED} media service died, system error.
- * @since 18
- * @version 1.0
+ * @brief Sets the volume mode of the AVPlayer.
+ * @param player Pointer to an OH_AVPlayer instance.
+ * @param volumeMode Volume mode, which is defined in {@link OH_AudioStream_VolumeMode}.
+ * @return Result code.
+ * {@link AV_ERR_OK}: The execution is successful.
+ * {@link AV_ERR_INVALID_VAL}: The value of player is a null pointer or
+ * the value of volumeMode is invalid.
+ * {@link AV_ERR_INVALID_STATE}: The function is called in an incorrect state.
+ * This function should be called prior to prepare.
+ * {@link AV_ERR_SERVICE_DIED}: System errors such as media service breakdown.
+ * @since 19
*/
OH_AVErrCode OH_AVPlayer_SetVolumeMode(OH_AVPlayer *player, OH_AudioStream_VolumeMode volumeMode);
diff --git a/multimedia/player_framework/avplayer/libavplayer.ndk.json b/multimedia/player_framework/avplayer/libavplayer.ndk.json
index 28f2b2b13e4a378b88a8c650c121d16e6f761ba0..f0b48063e08abab1a1e2a1866ab92680c56036db 100644
--- a/multimedia/player_framework/avplayer/libavplayer.ndk.json
+++ b/multimedia/player_framework/avplayer/libavplayer.ndk.json
@@ -136,7 +136,7 @@
"name": "OH_AVPlayer_SetAudioEffectMode"
},
{
- "first_introduced": "18",
+ "first_introduced": "19",
"name": "OH_AVPlayer_SetVolumeMode"
}
]
\ No newline at end of file
diff --git a/multimedia/player_framework/avrecorder.h b/multimedia/player_framework/avrecorder.h
index b94e92b97e0fa7ddef4d986de7a68a2605660124..b5fc9847df671ecb4b66cd2aab6cc1da7b5a74d3 100644
--- a/multimedia/player_framework/avrecorder.h
+++ b/multimedia/player_framework/avrecorder.h
@@ -78,6 +78,7 @@ OH_AVErrCode OH_AVRecorder_Prepare(OH_AVRecorder *recorder, OH_AVRecorder_Config
* @return Function result code.
* {@link AV_ERR_OK} if the execution is successful.
* {@link AV_ERR_INVALID_VAL} if input recorder is nullptr or config is null.
+ * {@link AV_ERR_NO_MEMORY} failed to malloc memory.
* @since 18
*/
OH_AVErrCode OH_AVRecorder_GetAVRecorderConfig(OH_AVRecorder *recorder, OH_AVRecorder_Config **config);
@@ -181,6 +182,7 @@ OH_AVErrCode OH_AVRecorder_Release(OH_AVRecorder *recorder);
* @return Function result code.
* {@link AV_ERR_OK} if the execution is successful.
* {@link AV_ERR_INVALID_VAL} if input recorder is nullptr.
+ * {@link AV_ERR_NO_MEMORY} failed to malloc memory.
* @since 18
*/
OH_AVErrCode OH_AVRecorder_GetAvailableEncoder(OH_AVRecorder *recorder, OH_AVRecorder_EncoderInfo **info,
diff --git a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json
index d175c78a730a8663fa828c1bc08125b1291ba346..b5238bb2876da686c1c0c94202a7184e44f345c4 100644
--- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json
+++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json
@@ -108,7 +108,7 @@
"name": "OH_AVScreenCapture_ShowCursor"
},
{
- "first_introduced": "18",
+ "first_introduced": "15",
"name": "OH_AVScreenCapture_SetDisplayCallback"
}
]
\ No newline at end of file
diff --git a/resourceschedule/background_process_manager/background_process_manager.ndk.json b/resourceschedule/background_process_manager/background_process_manager.ndk.json
index 022e9497562bd27122e3edbccbeea32394f87f61..db04aecf143c3582923491dfbe5a6468b58cf7c5 100644
--- a/resourceschedule/background_process_manager/background_process_manager.ndk.json
+++ b/resourceschedule/background_process_manager/background_process_manager.ndk.json
@@ -1,10 +1,10 @@
[
{
- "first_introduced": "15",
+ "first_introduced": "17",
"name": "OH_BackgroundProcessManager_SetProcessPriority"
},
{
- "first_introduced": "15",
+ "first_introduced": "17",
"name": "OH_BackgroundProcessManager_ResetProcessPriority"
}
]
\ No newline at end of file
diff --git a/resourceschedule/background_process_manager/include/background_process_manager.h b/resourceschedule/background_process_manager/include/background_process_manager.h
index c9e3c085c02b91e650e312fc88b457118bcbf6e8..b2049aaadfe5d7b15eebffdaf9a8f7137a5819fc 100644
--- a/resourceschedule/background_process_manager/include/background_process_manager.h
+++ b/resourceschedule/background_process_manager/include/background_process_manager.h
@@ -19,7 +19,7 @@
*
* @brief BackgroundProcessManager provides APIs.
*
- * @since 15
+ * @since 17
*/
/**
@@ -32,7 +32,7 @@
* @library libbackground_process_manager.z.so
* @kit BackgroundTasksKit
* @syscap SystemCapability.Resourceschedule.BackgroundProcessManager
- * @since 15
+ * @since 17
*/
#ifndef RESOURCESCHEDULE_BACKGROUND_PROCESS_MANAGER_H
@@ -45,7 +45,7 @@ extern "C" {
/**
* @brief Describes the level of BackgroundProcessManager priority.
*
- * @since 15
+ * @since 17
*/
typedef enum BackgroundProcessManager_ProcessPriority {
/**
@@ -62,7 +62,7 @@ typedef enum BackgroundProcessManager_ProcessPriority {
/**
* @brief Enum for BackgroundProcessManager error code.
*
- * @since 15
+ * @since 17
*/
typedef enum BackgroundProcessManager_ErrorCode {
/**
@@ -91,8 +91,7 @@ typedef enum BackgroundProcessManager_ErrorCode {
Specific priority can be referenced {@link BackgroundProcessManager_ProcessPriority}.
* @return {@link ERR_BACKGROUND_PROCESS_MANAGER_SUCCESS} 0 - Success.
* {@link ERR_BACKGROUND_PROCESS_MANAGER_INVALID_PARAM} 401 - Parameter error.
- * {@link ERR_BACKGROUND_PROCESS_MANAGER_REMOTE_ERROR} 31800001 - Remote error.
- * @since 15
+ * @since 17
*/
int OH_BackgroundProcessManager_SetProcessPriority(int pid, BackgroundProcessManager_ProcessPriority priority);
@@ -101,8 +100,7 @@ int OH_BackgroundProcessManager_SetProcessPriority(int pid, BackgroundProcessMan
*
* @param pid Indicates the pid of the process to be reset.
* @return {@link ERR_BACKGROUND_PROCESS_MANAGER_SUCCESS} 0 - Success.
- * {@link ERR_BACKGROUND_PROCESS_MANAGER_REMOTE_ERROR} 31800001 - Remote error.
- * @since 15
+ * @since 17
*/
int OH_BackgroundProcessManager_ResetProcessPriority(int pid);
#ifdef __cplusplus
diff --git a/resourceschedule/ffrt/c/queue.h b/resourceschedule/ffrt/c/queue.h
index 9d91d12a26ab4c001c944efde6a117c1fc797525..758b79b5adf0d4641c9ef11d4d941cb77c2ea045 100644
--- a/resourceschedule/ffrt/c/queue.h
+++ b/resourceschedule/ffrt/c/queue.h
@@ -98,6 +98,8 @@ FFRT_C_API ffrt_qos_t ffrt_queue_attr_get_qos(const ffrt_queue_attr_t* attr);
/**
* @brief Sets the execution timeout of a serial queue attribute.
*
+ * The lower limit of timeout value is 1 ms, if the value is less than 1 ms, it will be set to 1 ms.
+ *
* @param attr Serial queue attribute pointer.
* @param timeout_us Serial queue task execution timeout.
* @since 10
diff --git a/security/huks/BUILD.gn b/security/huks/BUILD.gn
index 9c8b729850b37665f960c1e4138b4815aaa2f2eb..4a8d8ea12ac2b67f4ba45dd235513823c29ba6ac 100644
--- a/security/huks/BUILD.gn
+++ b/security/huks/BUILD.gn
@@ -19,7 +19,12 @@ ohos_ndk_library("libhuks_ndk") {
ndk_description_file = "./libhuks.ndk.json"
min_compact_version = "1"
- # system_capability = "SystemCapability.Security.Huks"
+ system_capability = "SystemCapability.Security.Huks"
+ system_capability_headers = [
+ "./include/native_huks_api.h",
+ "./include/native_huks_param.h",
+ "./include/native_huks_type.h",
+ ]
}
ohos_ndk_headers("huks_header") {
diff --git a/security/huks/include/native_huks_api.h b/security/huks/include/native_huks_api.h
index 37d74511b6a9d3e1b1e1b2d3f03092aec10e2b63..c8182d2833d77b6c97a41f4c1b3ed744c18b3ad0 100644
--- a/security/huks/include/native_huks_api.h
+++ b/security/huks/include/native_huks_api.h
@@ -437,6 +437,22 @@ struct OH_Huks_Result OH_Huks_FinishSession(const struct OH_Huks_Blob *handle,
struct OH_Huks_Result OH_Huks_AbortSession(const struct OH_Huks_Blob *handle,
const struct OH_Huks_ParamSet *paramSet);
+/**
+ * @brief Get key alias list.
+ *
+ * @param paramSet Indicates the pointer to the parameters required for getting key alias list.
+ * By default, this parameter is a null pointer.
+ * @param outData Indicates the pointer to the output data.
+ * @return {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} 0 - If the operation is successful.
+ * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT} 401 - If paramSet or outData is invalid.
+ * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INTERNAL_ERROR} 12000012 - If system error ocurred.
+ * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_COMMUNICATION_FAIL} 12000005 - If Ipc commuication failed.
+ * {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY} 12000014 - If the memory is insufficient.
+ * @since 20
+ */
+struct OH_Huks_Result OH_Huks_ListAliases(const struct OH_Huks_ParamSet *paramSet,
+ struct OH_Huks_KeyAliasSet **outData);
+
#ifdef __cplusplus
}
#endif
diff --git a/security/huks/libhuks.ndk.json b/security/huks/libhuks.ndk.json
index dac8b7470d519766b25694283c5a0d75e713c067..b77f21bebbc1f5ea96573ed29e5664137206ca4e 100644
--- a/security/huks/libhuks.ndk.json
+++ b/security/huks/libhuks.ndk.json
@@ -70,5 +70,8 @@
},
{
"name": "OH_Huks_CheckParamMatch"
+ },
+ {
+ "name":"OH_Huks_ListAliases"
}
]
\ No newline at end of file
diff --git a/web/webview/interfaces/native/native_interface_arkweb.h b/web/webview/interfaces/native/native_interface_arkweb.h
index 9f81279887649f751ae01cf250526640b5f368c4..7d40e22df06a3d600a5ce666932afef69adc2b32 100644
--- a/web/webview/interfaces/native/native_interface_arkweb.h
+++ b/web/webview/interfaces/native/native_interface_arkweb.h
@@ -69,7 +69,7 @@ typedef void (*NativeArkWeb_OnValidCallback)(const char*);
*/
typedef void (*NativeArkWeb_OnDestroyCallback)(const char*);
-/*
+/**
* @brief Loads a piece of code and execute JS code in the context of the currently displayed page.
*
* @param webTag The name of the web component.
@@ -81,7 +81,7 @@ typedef void (*NativeArkWeb_OnDestroyCallback)(const char*);
*/
void OH_NativeArkWeb_RunJavaScript(const char* webTag, const char* jsCode, NativeArkWeb_OnJavaScriptCallback callback);
-/*
+/**
* @brief Registers the JavaScript object and method list.
*
* @param webTag The name of the web component.
@@ -97,7 +97,7 @@ void OH_NativeArkWeb_RunJavaScript(const char* webTag, const char* jsCode, Nativ
void OH_NativeArkWeb_RegisterJavaScriptProxy(const char* webTag, const char* objName, const char** methodList,
NativeArkWeb_OnJavaScriptProxyCallback* callback, int32_t size, bool needRefresh);
-/*
+/**
* @brief Deletes the registered object which th given name.
*
* @param webTag The name of the web component.
@@ -108,7 +108,7 @@ void OH_NativeArkWeb_RegisterJavaScriptProxy(const char* webTag, const char* obj
*/
void OH_NativeArkWeb_UnregisterJavaScriptProxy(const char* webTag, const char* objName);
-/*
+/**
* @brief Registers the valid callback.
*
* @param webTag The name of the web component.
@@ -119,7 +119,7 @@ void OH_NativeArkWeb_UnregisterJavaScriptProxy(const char* webTag, const char* o
*/
void OH_NativeArkWeb_SetJavaScriptProxyValidCallback(const char* webTag, NativeArkWeb_OnValidCallback callback);
-/*
+/**
* @brief Get the valid callback.
*
* @param webTag The name of the web component.