From 3a60663c54c9e84f43ac57dcb18ebf6a7653d5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Tue, 4 Feb 2025 15:41:01 +0800 Subject: [PATCH] add showCursor interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- .../libnative_avscreen_capture.ndk.json | 4 ++++ .../player_framework/native_avscreen_capture.h | 15 +++++++++++++++ 2 files changed, 19 insertions(+) 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 8464ce4fd..8b135b291 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -102,5 +102,9 @@ { "first_introduced": "14", "name": "OH_AVScreenCapture_SetMaxVideoFrameRate" + }, + { + "first_introduced": "15", + "name": "OH_AVScreenCapture_ShowCursor" } ] \ No newline at end of file diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index a58f46164..c508cae4f 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -431,6 +431,21 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SkipPrivacyMode(struct OH_AVScree */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetMaxVideoFrameRate(struct OH_AVScreenCapture *capture, int32_t frameRate); + +/** + * @brief determines whether the cursor is visible in the session + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param capture Pointer to an OH_AVScreenCapture instance + * @param showCursor The switch of the cursor + * @return Function result code. + * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} input capture is nullptr. + * {@link AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT} opertation not be permitted, show cursor failed. + * @since 15 + * @version 1.0 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ShowCursor(struct OH_AVScreenCapture *capture, + bool showCursor); #ifdef __cplusplus } #endif -- Gitee