From 4e3b72ca73b7e4f4951a0963ed7e2becaa04965a Mon Sep 17 00:00:00 2001 From: Gloria Date: Thu, 10 Aug 2023 20:26:29 +0800 Subject: [PATCH] Update docs against 21765+21597+21679+21687 Signed-off-by: wusongqing --- en/application-dev/Readme-EN.md | 2 +- .../application-dev-guide-for-gitee.md | 2 +- en/application-dev/application-dev-guide.md | 4 +- .../js-apis-resourceschedule-deviceStandby.md | 293 ---- .../reference/native-apis/Readme-EN.md | 30 + .../native-apis/_a_v_screen_capture.md | 1044 ++++++++++++++ .../_o_h___a_v_screen_capture_callback.md | 28 + .../_o_h___a_v_screen_capture_config.md | 92 ++ .../native-apis/_o_h___audio_buffer.md | 76 + .../native-apis/_o_h___audio_capture_info.md | 64 + .../native-apis/_o_h___audio_enc_info.md | 56 + .../native-apis/_o_h___audio_info.md | 68 + .../native-apis/_o_h___native_x_component.md | 1223 ++++++++++++----- .../native-apis/_o_h___recorder_info.md | 68 + .../reference/native-apis/_o_h___rect.md | 76 + .../native-apis/_o_h___video_capture_info.md | 111 ++ .../native-apis/_o_h___video_enc_info.md | 68 + .../native-apis/_o_h___video_info.md | 56 + .../native-apis/_ohos_pixel_map_create_ops.md | 30 +- .../native__avscreen__capture_8h.md | 36 + .../native__avscreen__capture__base_8h.md | 76 + .../native__avscreen__capture__errors_8h.md | 31 + .../native__xcomponent__key__event_8h.md | 25 + en/application-dev/website.md | 44 +- en/release-notes/OpenHarmony-v3.2-beta1.md | 36 +- en/release-notes/OpenHarmony-v3.2-beta3.md | 14 +- en/release-notes/OpenHarmony-v3.2-beta4.md | 16 +- en/release-notes/OpenHarmony-v3.2-release.md | 6 +- 28 files changed, 3005 insertions(+), 670 deletions(-) delete mode 100644 en/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md create mode 100644 en/application-dev/reference/native-apis/_a_v_screen_capture.md create mode 100644 en/application-dev/reference/native-apis/_o_h___a_v_screen_capture_callback.md create mode 100644 en/application-dev/reference/native-apis/_o_h___a_v_screen_capture_config.md create mode 100644 en/application-dev/reference/native-apis/_o_h___audio_buffer.md create mode 100644 en/application-dev/reference/native-apis/_o_h___audio_capture_info.md create mode 100644 en/application-dev/reference/native-apis/_o_h___audio_enc_info.md create mode 100644 en/application-dev/reference/native-apis/_o_h___audio_info.md create mode 100644 en/application-dev/reference/native-apis/_o_h___recorder_info.md create mode 100644 en/application-dev/reference/native-apis/_o_h___rect.md create mode 100644 en/application-dev/reference/native-apis/_o_h___video_capture_info.md create mode 100644 en/application-dev/reference/native-apis/_o_h___video_enc_info.md create mode 100644 en/application-dev/reference/native-apis/_o_h___video_info.md create mode 100644 en/application-dev/reference/native-apis/native__avscreen__capture_8h.md create mode 100644 en/application-dev/reference/native-apis/native__avscreen__capture__base_8h.md create mode 100644 en/application-dev/reference/native-apis/native__avscreen__capture__errors_8h.md create mode 100644 en/application-dev/reference/native-apis/native__xcomponent__key__event_8h.md diff --git a/en/application-dev/Readme-EN.md b/en/application-dev/Readme-EN.md index 6e40eb34a5..4aaca6b826 100644 --- a/en/application-dev/Readme-EN.md +++ b/en/application-dev/Readme-EN.md @@ -101,7 +101,7 @@ - [DevEco Studio (OpenHarmony) User Guide](quick-start/deveco-studio-user-guide-for-openharmony.md) - [Debugging Tools](tools/Readme-EN.md) - Hands-On Tutorials - - [Samples](https://gitee.com/openharmony/applications_app_samples/blob/master/README.md) + - [Samples](https://gitee.com/openharmony/applications_app_samples/blob/OpenHarmony-4.0-Beta2/README.md) - [Codelabs](https://gitee.com/openharmony/codelabs/tree/master) - API References - [SystemCapability](reference/syscap.md) diff --git a/en/application-dev/application-dev-guide-for-gitee.md b/en/application-dev/application-dev-guide-for-gitee.md index 9770de4b35..30b7e344ae 100644 --- a/en/application-dev/application-dev-guide-for-gitee.md +++ b/en/application-dev/application-dev-guide-for-gitee.md @@ -53,7 +53,7 @@ DevEco Studio is a high-performance integrated development environment (IDE) rec ### Hands-On Tutorials -To make you better understand how functions work together and jumpstart your application development projects, we provide stripped-down, real-world [samples](https://gitee.com/openharmony/applications_app_samples/blob/master/README.md). +To make you better understand how functions work together and jumpstart your application development projects, we provide stripped-down, real-world [samples](https://gitee.com/openharmony/applications_app_samples/blob/OpenHarmony-4.0-Beta2/README.md) and [codelabs](https://gitee.com/openharmony/codelabs/tree/master). ### API References diff --git a/en/application-dev/application-dev-guide.md b/en/application-dev/application-dev-guide.md index 5aef516bfc..d8fa16d81a 100644 --- a/en/application-dev/application-dev-guide.md +++ b/en/application-dev/application-dev-guide.md @@ -53,7 +53,7 @@ DevEco Studio is a high-performance integrated development environment (IDE) rec ## Hands-On Tutorials -To make you better understand how functions work together and jumpstart your application development projects, we provide stripped-down, real-world [samples](https://gitee.com/openharmony/applications_app_samples/blob/master/README.md). +To make you better understand how functions work together and jumpstart your application development projects, we provide stripped-down, real-world [samples](https://gitee.com/openharmony/applications_app_samples/blob/OpenHarmony-4.0-Beta2/README.md) and [codelabs](https://gitee.com/openharmony/codelabs/tree/master). ## API References @@ -62,6 +62,8 @@ API references encompass all components and APIs available in OpenHarmony, helpi They are organized as follows: - [ArkTS API Reference](reference/apis/development-intro.md) + + - [Component Reference (TypeScript-based Declarative Development Paradigm)](reference/arkui-ts/ts-components-summary.md) - [Component Reference (JavaScript-compatible Web-like Development Paradigm-ArkUI.Full)](reference/arkui-js/js-components-common-attributes.md) - [Component Reference (JavaScript-compatible Web-like Development Paradigm-ArkUI.Lite)](reference/arkui-js-lite/js-framework-file.md) diff --git a/en/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md b/en/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md deleted file mode 100644 index 81d684b8f3..0000000000 --- a/en/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md +++ /dev/null @@ -1,293 +0,0 @@ -# @ohos.resourceschedule.deviceStandby (Device Standby) -A device enters standby mode if it is unused for a long period of time or after the Power button is pressed. The standby mode prolongs the battery life without affecting the use of applications. The **deviceStandby** module provides APIs for you to check whether a device is in standby mode and request or cancel standby resource control for an application. - -> **NOTE** -> -> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. - -## Modules to Import - -```js -import deviceStandby from '@ohos.resourceschedule.deviceStandby'; -``` - -## deviceStandby.getExemptedApps - -getExemptedApps(resourceTypes: number, callback: AsyncCallback): void; - -Obtains the list of applications that can still use resources of the specified types when the device is in standby mode. This API uses an asynchronous callback to return the result. - -**System capability**: SystemCapability.ResourceSchedule.DeviceStandby - -**Required permissions**: ohos.permission.DEVICE_STANDBY_EXEMPTION - -**System API**: This is a system API. - -**Parameters** - -| Name | Type | Mandatory | Description | -| -------- | -------------------- | ---- | ------------------------------ | -| [ResourceTypes](#resourcetype)|number | Yes | Types of resources that can be used.| -| callback | AsyncCallback | Yes |Callback used to return the exempted application information.| - -**Error codes** - -For details about the error codes, see [Background Task Management Error Codes](../errorcodes/errorcode-backgroundTaskMgr.md). - -| ID | Error Message | -| ---- | --------------------- | -| 9800001 | Memory operation failed. | -| 9800002 | Parcel operation failed. | -| 9800003 | Inner transact failed. | -| 9800004 | System service operation failed. | -| 18700001 | Caller information verification failed. | - -**Example** - -```js -try{ -deviceStandby.getExemptedApps(resourceTypes, (err, res) => { - if (err) { - console.log('DEVICE_STANDBY getExemptedApps callback failed. code is: ' + err.code + ',message is: ' + err.message); - } else { - console.log('DEVICE_STANDBY getExemptedApps callback success.'); - for (let i = 0; i < res.length; i++) { - console.log('DEVICE_STANDBY getExemptedApps callback result ' + JSON.stringify(res[i])); - } - } -}); -} catch (error) { -console.log('DEVICE_STANDBY getExemptedApps throw error, code is: ' + error.code + ',message is: ' + error.message); -} -``` - -## deviceStandby.getExemptedApps - -getExemptedApps(resourceTypes: number): Promise; - -Obtains the list of applications that can still use resources of the specified types when the device is in standby mode. This API uses a promise to return the result. - -**System capability**: SystemCapability.ResourceSchedule.DeviceStandby - -**Required permissions**: ohos.permission.DEVICE_STANDBY_EXEMPTION - -**System API**: This is a system API. - -**Parameters** - -| Name | Type | Mandatory | Description | -| -------- | -------------------- | ---- | ------------------------------ | -| [ResourceTypes](#resourcetype)|number | Yes |Types of resources that can be used.| - -**Return value** - -| Type | Description | -| --------------------- | ---------------------------------------- | -| Promise | Promise used to return the exempted application information.| - -**Error codes** - -For details about the error codes, see [Background Task Management Error Codes](../errorcodes/errorcode-backgroundTaskMgr.md). - -| ID | Error Message | -| ---- | --------------------- | -| 9800001 | Memory operation failed. | -| 9800002 | Parcel operation failed. | -| 9800003 | Inner transact failed. | -| 9800004 | System service operation failed. | -| 18700001 | Caller information verification failed. | - -**Example** - -```js -try{ -deviceStandby.getExemptedApps(resourceTypes).then( res => { - console.log('DEVICE_STANDBY getExemptedApps promise success.'); - for (let i = 0; i < res.length; i++) { - console.log('DEVICE_STANDBY getExemptedApps promise result ' + JSON.stringify(res[i])); - } -}).catch( err => { - console.log('DEVICE_STANDBY getExemptedApps promise failed. code is: ' + err.code + ',message is: ' + err.message); -}); -} catch (error) { -console.log('DEVICE_STANDBY getExemptedApps throw error, code is: ' + error.code + ',message is: ' + error.message); -} -``` - -## deviceStandby.requestExemptionResource - -requestExemptionResource(request: ResourceRequest): void; - -Requests exemption, so that the application can use restricted resources when the device is in standby mode. - -**System capability**: SystemCapability.ResourceSchedule.DeviceStandby - -**Required permissions**: ohos.permission.DEVICE_STANDBY_EXEMPTION - -**System API**: This is a system API. - -**Parameters** - -| Name | Type | Mandatory | Description | -| -------- | -------------------- | ---- | ------------------------------ | -| request |[ResourceRequest](#resourcerequest)| Yes | Request body.| - -**Error codes** - -For details about the error codes, see [Background Task Management Error Codes](../errorcodes/errorcode-backgroundTaskMgr.md). - -| ID | Error Message | -| ---- | --------------------- | -| 9800001 | Memory operation failed. | -| 9800002 | Parcel operation failed. | -| 9800003 | Inner transact failed. | -| 9800004 | System service operation failed. | -| 18700001 | Caller information verification failed. | - -**Example** - -```js -let resRequest = { - resourceTypes: 1, - uid:10003, - name:"com.example.app", - duration:10, - reason:"apply", -}; -// Promise mode -try{ -deviceStandby.requestExemptionResource(resRequest).then( () => { - console.log('DEVICE_STANDBY requestExemptionResource promise succeeded.'); -}).catch( err => { - console.log('DEVICE_STANDBY requestExemptionResource promise failed. code is: ' + err.code + ',message is: ' + err.message); -}); -} catch (error) { -console.log('DEVICE_STANDBY requestExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message); -} - -// Asynchronous callback mode -try{ -deviceStandby.requestExemptionResource(resRequest, (err) => { - if (err) { - console.log('DEVICE_STANDBY requestExemptionResource callback failed. code is: ' + err.code + ',message is: ' + err.message); - } else { - console.log('DEVICE_STANDBY requestExemptionResource callback succeeded.'); - } -}); -} catch (error) { -console.log('DEVICE_STANDBY requestExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message); -} -``` - -## deviceStandby.releaseExemptionResource - -releaseExemptionResource(request: ResourceRequest): void; - -Cancels exemption for the application. - -**System capability**: SystemCapability.ResourceSchedule.DeviceStandby - -**Required permissions**: ohos.permission.DEVICE_STANDBY_EXEMPTION - -**System API**: This is a system API. - -**Parameters** - -| Name | Type | Mandatory | Description | -| -------- | -------------------- | ---- | ------------------------------ | -| request |[ResourceRequest](#resourcerequest)| Yes | Request body.| - -**Error codes** - -For details about the error codes, see [Background Task Management Error Codes](../errorcodes/errorcode-backgroundTaskMgr.md). - -| ID | Error Message | -| ---- | --------------------- | -| 9800001 | Memory operation failed. | -| 9800002 | Parcel operation failed. | -| 9800003 | Inner transact failed. | -| 9800004 | System service operation failed. | -| 18700001 | Caller information verification failed. | - -**Example** - -```js -let resRequest = { - resourceTypes: 1, - uid:10003, - name:"com.demo.app", - duration:10, - reason:"unapply", -}; -// Promise mode -try{ -deviceStandby.releaseExemptionResource(resRequest).then( () => { - console.log('DEVICE_STANDBY releaseExemptionResource promise succeeded.'); -}).catch( err => { - console.log('DEVICE_STANDBY releaseExemptionResource promise failed. code is: ' + err.code + ',message is: ' + err.message); -}); -} catch (error) { -console.log('DEVICE_STANDBY releaseExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message); -} - -// Asynchronous callback mode -try{ -deviceStandby.releaseExemptionResource(resRequest, (err) => { - if (err) { - console.log('DEVICE_STANDBY releaseExemptionResource callback failed. code is: ' + err.code + ',message is: ' + err.message); - } else { - console.log('DEVICE_STANDBY releaseExemptionResource callback succeeded.'); - } -}); -} catch (error) { -console.log('DEVICE_STANDBY releaseExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message); -} -``` - -## ResourceType - -Enumerates the types of resources that can be used by exempted applications. - -**System capability**: SystemCapability.ResourceSchedule.DeviceStandby - -**System API**: This is a system API. - -|Name |Value |Description| -| ------------ | ------------ |--------------| -|NETWORK |1 |Network access resource.| -|RUNNING_LOCK |2 |CPU running lock resource.| -|TIMER |4 | Timer task resource.| -|WORK_SCHEDULER |8 | Work task resource.| -|AUTO_SYNC |16 | Automatic synchronization resource.| -|PUSH |32 | Push kit resource.| -|FREEZE |64 | Freezing application resource.| - -## ExemptedAppInfo - -Defines the information about an exempted application. - -**System capability**: SystemCapability.ResourceSchedule.DeviceStandby - -**System API**: This is a system API. - -|Name |Type | Mandatory |Description | -| ------------ | ------------ |------------ | ------------ | -|[resourceTypes](#resourcetype) | number | Yes |Types of resources that can be used. | -|name |string | Yes | Name of the application. | -|duration | number | Yes | Exemption duration.| - -## ResourceRequest - -Defines the message used to request to be an exempted application. - -**System capability**: SystemCapability.ResourceSchedule.DeviceStandby - -**System API**: This is a system API. - -|Name |Type | Mandatory |Description | -| ------------ | ------------ |------------| ------------ | -|[resourceTypes](#resourcetype) | number | Yes |Types of resources that can be used. | -|uid | number | Yes |UID of the application. | -|name |string | Yes | Name of the application. | -|duration | number | Yes | Exemption duration.| -|reason |string | Yes | Reason for the request. | diff --git a/en/application-dev/reference/native-apis/Readme-EN.md b/en/application-dev/reference/native-apis/Readme-EN.md index 7df15ff279..14b6fa8cb3 100644 --- a/en/application-dev/reference/native-apis/Readme-EN.md +++ b/en/application-dev/reference/native-apis/Readme-EN.md @@ -24,11 +24,13 @@ - [AVDemuxer](_a_v_demuxer.md) - [AVSource](_a_v_source.md) - [OHAudio](_o_h_audio.md) + - [AVScreenCapture](_a_v_screen_capture.md) - [HuksKeyApi](_huks_key_api.md) - [HuksParamSetApi](_huks_param_set_api.md) - [HuksTypeApi](_huks_type_api.md) - [Init](init.md) - [Memory](memory.md) + - [UsbDdk](_usb_ddk.md) - [Hitrace](_hitrace.md) - [Vulkan](_vulkan.md) - Header Files @@ -48,6 +50,7 @@ - [native_buffer.h](native__buffer_8h.md) - [native_image.h](native__image_8h.md) - [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) + - [native_xcomponent_key_event.h](native__xcomponent__key__event_8h.md) - [native_vsync.h](native__vsync_8h.md) - [raw_dir.h](raw__dir_8h.md) - [raw_file_manager.h](raw__file__manager_8h.md) @@ -78,6 +81,9 @@ - [native_audiorenderer.h](native__audiorenderer_8h.md) - [native_audiostream_base.h](native__audiostream__base_8h.md) - [native_audiostreambuilder.h](native__audiostreambuilder_8h.md) + - [native_avscreen_capture.h](native__avscreen__capture_8h.md) + - [native_avscreen_capture_base.h](native__avscreen__capture__base_8h.md) + - [native_avscreen_capture_errors.h](native__avscreen__capture__errors_8h.md) - [native_huks_api.h](native__huks__api_8h.md) - [native_huks_param.h](native__huks__param_8h.md) - [native_huks_type.h](native__huks__type_8h.md) @@ -89,6 +95,8 @@ - [relational_store.h](relational__store_8h.md) - [syscap_ndk.h](syscap__ndk_8h.md) - [purgeable_memory.h](purgeable__memory_8h.md) + - [usb_ddk_api.h](usb__ddk__api_8h.md) + - [usb_ddk_types.h](usb__ddk__types_8h.md) - [trace.h](trace_8h.md) - [vulkan_ohos.h](vulkan__ohos_8h.md) - Structs @@ -118,6 +126,17 @@ - [OH_AVRange](_o_h___a_v_range.md) - [OH_AudioCapturer_Callbacks_Struct](_o_h___audio_capturer___callbacks___struct.md) - [OH_AudioRenderer_Callbacks_Struct](_o_h___audio_renderer___callbacks___struct.md) + - [OH_AudioBuffer](_o_h___audio_buffer.md) + - [OH_AudioCaptureInfo](_o_h___audio_capture_info.md) + - [OH_AudioEncInfo](_o_h___audio_enc_info.md) + - [OH_AudioInfo](_o_h___audio_info.md) + - [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) + - [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md) + - [OH_RecorderInfo](_o_h___recorder_info.md) + - [OH_Rect](_o_h___rect.md) + - [OH_VideoCaptureInfo](_o_h___video_capture_info.md) + - [OH_VideoEncInfo](_o_h___video_enc_info.md) + - [OH_VideoInfo](_o_h___video_info.md) - [OH_Huks_Blob](_o_h___huks___blob.md) - [OH_Huks_CertChain](_o_h___huks___cert_chain.md) - [OH_Huks_KeyInfo](_o_h___huks___key_info.md) @@ -136,6 +155,17 @@ - [OH_Rdb_Store](_o_h___rdb___store.md) - [OH_VBucket](_o_h___v_bucket.md) - [OH_VObject](_o_h___v_object.md) + - [UsbConfigDescriptor](_usb_config_descriptor.md) + - [UsbControlRequestSetup](_usb_control_request_setup.md) + - [UsbDdkConfigDescriptor](_usb_ddk_config_descriptor.md) + - [UsbDdkEndpointDescriptor](_usb_ddk_endpoint_descriptor.md) + - [UsbDdkInterface](_usb_ddk_interface.md) + - [UsbDdkInterfaceDescriptor](_usb_ddk_interface_descriptor.md) + - [UsbDeviceDescriptor](_usb_device_descriptor.md) + - [UsbDeviceMemMap](_usb_device_mem_map.md) + - [UsbEndpointDescriptor](_usb_endpoint_descriptor.md) + - [UsbInterfaceDescriptor](_usb_interface_descriptor.md) + - [UsbRequestPipe](_usb_request_pipe.md) - [VkExternalFormatOHOS](_vk_external_format_o_h_o_s.md) - [VkImportNativeBufferInfoOHOS](_vk_import_native_buffer_info_o_h_o_s.md) - [VkMemoryGetNativeBufferInfoOHOS](_vk_memory_get_native_buffer_info_o_h_o_s.md) diff --git a/en/application-dev/reference/native-apis/_a_v_screen_capture.md b/en/application-dev/reference/native-apis/_a_v_screen_capture.md new file mode 100644 index 0000000000..71d8fb0a24 --- /dev/null +++ b/en/application-dev/reference/native-apis/_a_v_screen_capture.md @@ -0,0 +1,1044 @@ +# AVScreenCapture + + +## Overview + +The **AVScreenCapture** module provides APIs for screen capture. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + + +## Summary + + +### Files + +| Name| Description| +| -------- | -------- | +| [native_avscreen_capture.h](native__avscreen__capture_8h.md) | Declares the native APIs used to create an **OH_AVScreenCapture** instance.
**File to include**:
**Library**: libnative_avscreen_capture.so| +| [native_avscreen_capture_base.h](native__avscreen__capture__base_8h.md) | Declares the common structs, character constants, and enums used for running screen capture.
**File to include**:
**Library**: libnative_avscreen_capture.so| +| [native_avscreen_capture_errors.h](native__avscreen__capture__errors_8h.md) | Declares the error codes generated during screen capture.
**File to include**:
**Library**: libnative_avscreen_capture.so| + + +### Structs + +| Name| Description| +| -------- | -------- | +| [OH_AudioCaptureInfo](_o_h___audio_capture_info.md) | Defines audio capture information.| +| [OH_AudioEncInfo](_o_h___audio_enc_info.md) | Defines audio encoding information.
**NOTE**: This struct is reserved and will be provided in later versions.| +| [OH_AudioInfo](_o_h___audio_info.md) | Defines audio capture parameters.| +| [OH_VideoCaptureInfo](_o_h___video_capture_info.md) | Defines video capture information.| +| [OH_VideoEncInfo](_o_h___video_enc_info.md) | Defines video encoding information.
**NOTE**: This struct is reserved and will be provided in later versions.| +| [OH_VideoInfo](_o_h___video_info.md) | Defines video capture parameters.| +| [OH_RecorderInfo](_o_h___recorder_info.md) | Defines recording file information.
**NOTE**: This struct is reserved and will be provided in later versions.| +| [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md) | Defines the screen capture configuration.| +| [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) | Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance.| +| [OH_Rect](_o_h___rect.md) | Defines the width, height, and image information of the rectangle used for screen capture.| +| [OH_AudioBuffer](_o_h___audio_buffer.md) | Defines the configuration such as the size, type, and timestamp of audio data.| + + +### Types + +| Name| Description| +| -------- | -------- | +| [OH_NativeBuffer](#oh_nativebuffer) | Defines the native video stream class for screen capture.| +| [OH_AVScreenCapture](#oh_avscreencapture) | Defines a screen capture instance used to obtain original video and audio streams.| +| [OH_CaptureMode](#oh_capturemode) | Defines an enum that enumerates the screen capture modes.| +| [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype) | Defines an enum that enumerates the audio source types during screen capture.| +| [OH_AudioCodecFormat](#oh_audiocodecformat) | Defines an enum that enumerates the audio encoding formats.| +| [OH_VideoCodecFormat](#oh_videocodecformat) | Defines an enum that enumerates the video encoding formats.| +| [OH_DataType](#oh_datatype) | Defines an enum that enumerates the data types of screen capture streams.| +| [OH_VideoSourceType](#oh_videosourcetype) | Defines an enum that enumerates the video source formats.| +| [OH_ContainerFormatType](#oh_containerformattype) | Defines an enum that enumerates the types of files generated during screen capture.
**NOTE**: This type is reserved and will be provided in later versions.| +| [OH_AudioCaptureInfo](#oh_audiocaptureinfo) | Defines audio capture information.| +| [OH_AudioEncInfo](#oh_audioencinfo) | Defines audio encoding information.
**NOTE**: This type is reserved and will be provided in later versions.| +| [OH_AudioInfo](#oh_audioinfo) | Defines audio capture parameters.| +| [OH_VideoCaptureInfo](#oh_videocaptureinfo) | Defines video capture information.| +| [OH_VideoEncInfo](#oh_videoencinfo) | Defines video encoding information.
**NOTE**: This type is reserved and will be provided in later versions.| +| [OH_VideoInfo](#oh_videoinfo) | Defines video capture parameters.| +| [OH_RecorderInfo](#oh_recorderinfo) | Defines recording file information.| +| [OH_AVScreenCaptureConfig](#oh_avscreencaptureconfig) | Defines the screen capture configuration.| +| (\*[OH_AVScreenCaptureOnError](#oh_avscreencaptureonerror)) ([OH_AVScreenCapture](#oh_avscreencapture) \*capture, int32_t errorCode) | Defines a pointer to a callback function that is called when an error occurs during the running of an **OH_AVScreenCapture** instance.| +| (\*[OH_AVScreenCaptureOnAudioBufferAvailable](#oh_avscreencaptureonaudiobufferavailable)) ([OH_AVScreenCapture](#oh_avscreencapture) \*capture, bool isReady, [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype) type) | Defines a pointer to a callback function that is called when an audio buffer is available during the running of an **OH_AVScreenCapture** instance.| +| (\*[OH_AVScreenCaptureOnVideoBufferAvailable](#oh_avscreencaptureonvideobufferavailable)) ([OH_AVScreenCapture](#oh_avscreencapture) \*capture, bool isReady) | Defines a pointer to a callback function that is called when a video buffer is available during the running of an **OH_AVScreenCapture** instance.| +| [OH_AVScreenCaptureCallback](#oh_avscreencapturecallback) | Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance.| +| [OH_Rect](#oh_rect) | Defines the width, height, and image information of the rectangle used for screen capture.| +| [OH_AudioBuffer](#oh_audiobuffer) | Defines the configuration such as the size, type, and timestamp of audio data.| +| [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) | Defines an enum that enumerates the error codes generated during screen recording.| + + +### Enums + +| Name| Description| +| -------- | -------- | +| [OH_CaptureMode](#oh_capturemode) { OH_CAPTURE_HOME_SCREEN = 0, OH_CAPTURE_SPECIFIED_SCREEN = 1, OH_CAPTURE_SPECIFIED_WINDOW = 2, OH_CAPTURE_INVAILD = -1 } | Enumerates the screen capture modes.| +| [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype) {
OH_SOURCE_INVALID = -1, OH_SOURCE_DEFAULT = 0, OH_MIC = 1, OH_ALL_PLAYBACK = 2,
OH_APP_PLAYBACK = 3
} | Enumerates the audio source types during screen capture.| +| [OH_AudioCodecFormat](#oh_audiocodecformat) { OH_AUDIO_DEFAULT = 0, OH_AAC_LC = 3, OH_AUDIO_CODEC_FORMAT_BUTT } | Enumerates the audio encoding formats.| +| [OH_VideoCodecFormat](#oh_videocodecformat) {
OH_VIDEO_DEFAULT = 0, OH_H264 = 2, OH_H265 = 4, OH_MPEG4 = 6,
OH_VP8 = 8, OH_VP9 = 10, OH_VIDEO_CODEC_FORMAT_BUTT
} | Enumerates the video encoding formats.| +| [OH_DataType](#oh_datatype) { OH_ORIGINAL_STREAM = 0, OH_ENCODED_STREAM = 1, OH_CAPTURE_FILE = 2, OH_INVAILD = -1 } | Enumerates the data types of screen capture streams.| +| [OH_VideoSourceType](#oh_videosourcetype) { OH_VIDEO_SOURCE_SURFACE_YUV = 0, OH_VIDEO_SOURCE_SURFACE_ES, OH_VIDEO_SOURCE_SURFACE_RGBA, OH_VIDEO_SOURCE_BUTT } | Enumerates the video source formats.| +| [OH_ContainerFormatType](#oh_containerformattype) { CFT_MPEG_4A = 0, CFT_MPEG_4 = 1 } | Enumerates the types of files generated during screen capture.
**NOTE**: This enum is reserved and will be provided in later versions.| +| [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) {
AV_SCREEN_CAPTURE_ERR_BASE = 0, AV_SCREEN_CAPTURE_ERR_OK = AV_SCREEN_CAPTURE_ERR_BASE, AV_SCREEN_CAPTURE_ERR_NO_MEMORY = AV_SCREEN_CAPTURE_ERR_BASE + 1, AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT = AV_SCREEN_CAPTURE_ERR_BASE + 2,
AV_SCREEN_CAPTURE_ERR_INVALID_VAL = AV_SCREEN_CAPTURE_ERR_BASE + 3, AV_SCREEN_CAPTURE_ERR_IO = AV_SCREEN_CAPTURE_ERR_BASE + 4, AV_SCREEN_CAPTURE_ERR_TIMEOUT = AV_SCREEN_CAPTURE_ERR_BASE + 5, AV_SCREEN_CAPTURE_ERR_UNKNOWN = AV_SCREEN_CAPTURE_ERR_BASE + 6,
AV_SCREEN_CAPTURE_ERR_SERVICE_DIED = AV_SCREEN_CAPTURE_ERR_BASE + 7, AV_SCREEN_CAPTURE_ERR_INVALID_STATE = AV_SCREEN_CAPTURE_ERR_BASE + 8, AV_SCREEN_CAPTURE_ERR_UNSUPPORT = AV_SCREEN_CAPTURE_ERR_BASE + 9, AV_SCREEN_CAPTURE_ERR_EXTEND_START = AV_SCREEN_CAPTURE_ERR_BASE + 100
} | Enumerates the error codes generated during screen recording.| + + +### Functions + +| Name| Description| +| -------- | -------- | +| [OH_AVScreenCapture_Create](#oh_avscreencapture_create) (void) | Creates an **OH_AVScreenCapture** instance.| +| [OH_AVScreenCapture_Init](#oh_avscreencapture_init) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture, [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md) config) | Initializes parameters related to an **OH_AVScreenCapture** instance.| +| [OH_AVScreenCapture_StartScreenCapture](#oh_avscreencapture_startscreencapture) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Starts screen capture and collects original streams. After calling this function, the application can use the callback listeners **OH_AVScreenCaptureOnAudioBufferAvailable** and **OH_AVScreenCaptureOnVideoBufferAvailable** to check whether streams are generated.| +| [OH_AVScreenCapture_StopScreenCapture](#oh_avscreencapture_stopscreencapture) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Stops screen capture. This function is used in pair with **OH_AVScreenCapture_StartScreenCapture**. After calling this function, the application stops screen capture or screen share and releases the microphone.| +| [OH_AVScreenCapture_StartScreenRecording](#oh_avscreencapture_startscreenrecording) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Starts screen recording and collects encoded streams.
**NOTE**: This function is reserved and will be provided in later versions.| +| [OH_AVScreenCapture_StopScreenRecording](#oh_avscreencapture_stopscreenrecording) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Stops screen recording. This function is used in pair with **OH_AVScreenCapture_StartScreenRecording**.
**NOTE**: This function is reserved and will be provided in later versions.| +| [OH_AVScreenCapture_AcquireAudioBuffer](#oh_avscreencapture_acquireaudiobuffer) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture, [OH_AudioBuffer](_o_h___audio_buffer.md) \*\*audiobuffer, [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype) type) | Obtains an audio buffer. When calling this function, the application must allocate the memory of the corresponding struct size to the audio buffer.| +| [OH_AVScreenCapture_AcquireVideoBuffer](#oh_avscreencapture_acquirevideobuffer) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture, int32_t \*fence, int64_t \*timestamp, struct [OH_Rect](_o_h___rect.md) \*region) | Obtains a video buffer. An application can call this function to obtain information such as the video buffer and timestamp.| +| [OH_AVScreenCapture_ReleaseAudioBuffer](#oh_avscreencapture_releaseaudiobuffer) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture, [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype) type) | Releases an audio buffer.| +| [OH_AVScreenCapture_ReleaseVideoBuffer](#oh_avscreencapture_releasevideobuffer) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Releases a video buffer.| +| [OH_AVScreenCapture_SetCallback](#oh_avscreencapture_setcallback) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture, struct [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) callback) | Sets a callback to listen for available video buffers and audio buffers and errors that occur during the function calling.| +| [OH_AVScreenCapture_Release](#oh_avscreencapture_release) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture) | Releases an **OH_AVScreenCapture** instance. This function is used in pair with **OH_AVScreenCapture_Create**.| +| [OH_AVScreenCapture_SetMicrophoneEnabled](#oh_avscreencapture_setmicrophoneenabled) (struct [OH_AVScreenCapture](#oh_avscreencapture) \*capture, bool isMicrophone) | Enables or disables the microphone.| + + +## Type Description + + +### OH_AudioBuffer + +``` +typedef struct OH_AudioBuffer OH_AudioBuffer +``` + +**Description** + +Defines the configuration such as the size, type, and timestamp of audio data. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AudioCaptureInfo + +``` +typedef struct OH_AudioCaptureInfo OH_AudioCaptureInfo +``` + +**Description** + +Defines audio capture information. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AudioCaptureSourceType + +``` +typedef enum OH_AudioCaptureSourceType OH_AudioCaptureSourceType +``` + +**Description** + +Defines an enum that enumerates the audio source types during screen capture. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AudioCodecFormat + +``` +typedef enum OH_AudioCodecFormat OH_AudioCodecFormat +``` + +**Description** + +Defines an enum that enumerates the audio encoding formats. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AudioEncInfo + +``` +typedef struct OH_AudioEncInfo OH_AudioEncInfo +``` + +**Description** + +Defines audio encoding information. + +> **NOTE** +> +> This type is reserved and will be provided in later versions. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AudioInfo + +``` +typedef struct OH_AudioInfo OH_AudioInfo +``` + +**Description** + +Defines audio capture parameters. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AVSCREEN_CAPTURE_ErrCode + +``` +typedef enum OH_AVSCREEN_CAPTURE_ErrCode OH_AVSCREEN_CAPTURE_ErrCode +``` + +**Description** + +Defines an enum that enumerates the error codes generated during screen recording. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AVScreenCapture + +``` +typedef struct OH_AVScreenCapture OH_AVScreenCapture +``` + +**Description** + +Defines a screen capture instance used to obtain original video and audio streams. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AVScreenCaptureCallback + +``` +typedef struct OH_AVScreenCaptureCallback OH_AVScreenCaptureCallback +``` + +**Description** + +Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance. To ensure the normal running of **OH_AVScreenCapture**, you must register the instance of this struct with the **OH_AVScreenCapture** instance and process the information reported by the callback functions. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| onError | Pointer to a callback function that is called when an error occurs during the running of an **OH_AVScreenCapture** instance. For details, see [OH_AVScreenCaptureOnError](#oh_avscreencaptureonerror).| +| onAudioBufferAvailable | Pointer to a callback function that is called when an audio buffer is available during the running of an **OH_AVScreenCapture** instance. For details, see [OH_AVScreenCaptureOnAudioBufferAvailable](#oh_avscreencaptureonaudiobufferavailable).| +| onVideoBufferAvailable | Pointer to a callback function that is called when a video buffer is available during the running of an **OH_AVScreenCapture** instance. For details, see [OH_AVScreenCaptureOnVideoBufferAvailable](#oh_avscreencaptureonvideobufferavailable).| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AVScreenCaptureConfig + +``` +typedef struct OH_AVScreenCaptureConfig OH_AVScreenCaptureConfig +``` + +**Description** + +Defines the screen capture configuration. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AVScreenCaptureOnAudioBufferAvailable + +``` +typedef void(* OH_AVScreenCaptureOnAudioBufferAvailable) (OH_AVScreenCapture *capture, bool isReady, OH_AudioCaptureSourceType type) +``` + +**Description** + +Defines a pointer to a callback function that is called when an audio buffer is available during the running of an **OH_AVScreenCapture** instance. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| +| isReady | Whether the audio buffer is available.| +| type | Audio source type.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AVScreenCaptureOnError + +``` +typedef void(* OH_AVScreenCaptureOnError) (OH_AVScreenCapture *capture, int32_t errorCode) +``` + +**Description** + +Defines a pointer to a callback function that is called when an error occurs during the running of an **OH_AVScreenCapture** instance. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| +| errorCode | Error code.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_AVScreenCaptureOnVideoBufferAvailable + +``` +typedef void(* OH_AVScreenCaptureOnVideoBufferAvailable) (OH_AVScreenCapture *capture, bool isReady) +``` + +**Description** + +Defines a pointer to a callback function that is called when a video buffer is available during the running of an **OH_AVScreenCapture** instance. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| +| isReady | Whether the video buffer is available.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_CaptureMode + +``` +typedef enum OH_CaptureModeOH_CaptureMode +``` + +**Description** + +Defines an enum that enumerates the screen capture modes. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_ContainerFormatType + +``` +typedef enum OH_ContainerFormatType OH_ContainerFormatType +``` + +**Description** + +Defines an enum that enumerates the types of files generated during screen capture. + +> **NOTE** +> +> This type is reserved and will be provided in later versions. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_DataType + +``` +typedef enum OH_DataType OH_DataType +``` + +**Description** + +Defines an enum that enumerates the data types of screen capture streams. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_NativeBuffer + +``` +typedef struct OH_NativeBuffer OH_NativeBuffer +``` + +**Description** + +Defines the native video stream class for screen capture. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_RecorderInfo + +``` +typedef struct OH_RecorderInfo OH_RecorderInfo +``` + +**Description** + +Defines recording file information. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_Rect + +``` +typedef struct OH_Rect OH_Rect +``` + +**Description** + +Defines the width, height, and image information of the rectangle used for screen capture. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_VideoCaptureInfo + +``` +typedef struct OH_VideoCaptureInfo OH_VideoCaptureInfo +``` + +**Description** + +Defines video capture information. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_VideoCodecFormat + +``` +typedef enum OH_VideoCodecFormat OH_VideoCodecFormat +``` + +**Description** + +Defines an enum that enumerates the video encoding formats. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_VideoEncInfo + +``` +typedef struct OH_VideoEncInfo OH_VideoEncInfo +``` + +**Description** + +Defines video encoding parameters. + +> **NOTE** +> +> This type is reserved and will be provided in later versions. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_VideoInfo + +``` +typedef struct OH_VideoInfo OH_VideoInfo +``` + +**Description** + +Defines video capture parameters. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +### OH_VideoSourceType + +``` +typedef enum OH_VideoSourceType OH_VideoSourceType +``` + +**Description** + +Defines an enum that enumerates the video source formats. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + + +## Enum Description + + +### OH_AudioCaptureSourceType + +``` +enum OH_AudioCaptureSourceType +``` + +**Description** + +Enumerates the audio source types during screen capture. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +| Value| Description| +| -------- | -------- | +| OH_SOURCE_INVALID | Invalid audio source.| +| OH_SOURCE_DEFAULT | Default audio source. The default value is **MIC**.| +| OH_MIC | External audio streams recorded by the microphone.| +| OH_ALL_PLAYBACK | All internal audio streams played by the system.| +| OH_APP_PLAYBACK | Internal audio streams played by a specified application.| + + +### OH_AudioCodecFormat + +``` +enum OH_AudioCodecFormat +``` + +**Description** + +Enumerates the audio encoding formats. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +| Value| Description| +| -------- | -------- | +| OH_AUDIO_DEFAULT | Default audio encoding format. The default value is **AAC_LC**.| +| OH_AAC_LC | AAC_LC audio encoding.| +| OH_AUDIO_CODEC_FORMAT_BUTT | Invalid format.| + + +### OH_AVSCREEN_CAPTURE_ErrCode + +``` +enum OH_AVSCREEN_CAPTURE_ErrCode +``` + +**Description** + +Enumerates the error codes generated during screen recording. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +| Value| Description| +| -------- | -------- | +| AV_SCREEN_CAPTURE_ERR_BASE | Basic value returned when an API call error occurs.| +| AV_SCREEN_CAPTURE_ERR_OK | Operation successful.| +| AV_SCREEN_CAPTURE_ERR_NO_MEMORY | Memory insufficient.| +| AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT | Operation not allowed.| +| AV_SCREEN_CAPTURE_ERR_INVALID_VAL | Invalid parameter.| +| AV_SCREEN_CAPTURE_ERR_IO | Abnormal input and output streams.| +| AV_SCREEN_CAPTURE_ERR_TIMEOUT | Network timeout.| +| AV_SCREEN_CAPTURE_ERR_UNKNOWN | Unknown error.| +| AV_SCREEN_CAPTURE_ERR_SERVICE_DIED | Media service terminated.| +| AV_SCREEN_CAPTURE_ERR_INVALID_STATE | Unsupported operation in this state.| +| AV_SCREEN_CAPTURE_ERR_UNSUPPORT | Unsupported interface.| +| AV_SCREEN_CAPTURE_ERR_EXTEND_START | Unexpected error.| + + +### OH_CaptureMode + +``` +enum OH_CaptureMode +``` + +**Description** + +Enumerates the screen capture modes. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +| Value| Description| +| -------- | -------- | +| OH_CAPTURE_HOME_SCREEN | To capture the home screen.| +| OH_CAPTURE_SPECIFIED_SCREEN | To capture a specified screen.
**NOTE**: This value is reserved and will be provided in later versions.| +| OH_CAPTURE_SPECIFIED_WINDOW | To capture a specified window.
**NOTE**: This value is reserved and will be provided in later versions.| +| OH_CAPTURE_INVAILD | Invalid mode.| + + +### OH_ContainerFormatType + +``` +enum OH_ContainerFormatType +``` + +**Description** + +Enumerates the types of files generated during screen capture. + +> **NOTE** +> +> This enum is reserved and will be provided in later versions. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +| Value| Description| +| -------- | -------- | +| CFT_MPEG_4A | Audio format M4A.| +| CFT_MPEG_4 | Video format MP4.| + + +### OH_DataType + +``` +enum OH_DataType +``` + +**Description** + +Enumerates the data types of screen capture streams. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +| Value| Description| +| -------- | -------- | +| OH_ORIGINAL_STREAM | Original stream format, such as YUV, RGBA, and PCM.| +| OH_ENCODED_STREAM | Encoded stream format, such as H.264 and AAC.
**NOTE**: This value is reserved and will be provided in later versions.| +| OH_CAPTURE_FILE | Format of the recording file. The value can be **mp4**.
**NOTE**: This value is reserved and will be provided in later versions.| +| OH_INVAILD | Invalid format.| + + +### OH_VideoCodecFormat + +``` +enum OH_VideoCodecFormat +``` + +**Description** + +Enumerates the video encoding formats. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +| Value| Description| +| -------- | -------- | +| OH_VIDEO_DEFAULT | Default video encoding format. The default value is **H.264**.| +| OH_H264 | H.264.| +| OH_H265 | H.265/HEVC.| +| OH_MPEG4 | MPEG4.| +| OH_VP8 | VP8.| +| OH_VP9 | VP9.| +| OH_VIDEO_CODEC_FORMAT_BUTT | Invalid format.| + + +### OH_VideoSourceType + +``` +enum OH_VideoSourceType +``` + +**Description** + +Enumerates the video source formats. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +| Value| Description| +| -------- | -------- | +| OH_VIDEO_SOURCE_SURFACE_YUV | YUV format.| +| OH_VIDEO_SOURCE_SURFACE_ES | Raw format.| +| OH_VIDEO_SOURCE_SURFACE_RGBA | RGBA format.| +| OH_VIDEO_SOURCE_BUTT | Invalid format.| + + +## Function Description + + +### OH_AVScreenCapture_AcquireAudioBuffer() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_AcquireAudioBuffer (struct OH_AVScreenCapture * capture, OH_AudioBuffer ** audiobuffer, OH_AudioCaptureSourceType type ) +``` + +**Description** + +Obtains an audio buffer. When calling this function, the application must allocate the memory of the corresponding struct size to the audio buffer. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| +| audiobuffer | Pointer to the struct for storing the audio buffer. This struct is used to obtain the information about the audio buffer and the timestamp of the buffer.| +| type | Type of the audio buffer, which is used to distinguish external streams recorded by the microphone from internal streams played by the system. For details, see [OH_AudioCaptureSourceType](#oh_audiocapturesourcetype).| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_AcquireVideoBuffer() + +``` +OH_NativeBuffer* OH_AVScreenCapture_AcquireVideoBuffer (struct OH_AVScreenCapture * capture, int32_t * fence, int64_t * timestamp, struct OH_Rect * region ) +``` + +**Description** + +Obtains a video buffer. An application can call this function to obtain information such as the video buffer and timestamp. After the buffer is no longer needed, call **OH_AVScreenCapture_ReleaseVideoBuffer** to release it. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| +| fence | Pointer to parameters for synchronization display.| +| timestamp | Pointer to the timestamp of the video frame.| +| region | Pointer to the coordinates related to video display.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns an **OH_NativeBuffer** object if the operation is successful. The application can call the APIs provided by the **OH_NativeBuffer** object to obtain information such as the video buffer and resolution. + + +### OH_AVScreenCapture_Create() + +``` +struct OH_AVScreenCapture* OH_AVScreenCapture_Create (void ) +``` + +**Description** + +Creates an **OH_AVScreenCapture** instance. You can release the instance by calling **OH_AVScreenCapture_Release**. + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns the pointer to an **OH_AVScreenCapture** instance. + + +### OH_AVScreenCapture_Init() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_Init (struct OH_AVScreenCapture * capture, OH_AVScreenCaptureConfig config ) +``` + +**Description** + +Initializes **OH_AVScreenCapture** parameters, including audio microphone sampling parameters, audio capture parameters (optional), and video resolution parameters. + +To call this function, you must configure the **ohos.permission.MICROPHONE** and **ohos.permission.CAPTURE_SCREEN** permissions. Otherwise, the initialization fails and screen capture cannot be performed properly. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| +| config | Parameters related to screen capture initialization.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_Release() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_Release (struct OH_AVScreenCapture * capture) +``` + +**Description** + +Releases an **OH_AVScreenCapture** instance. This function is used in pair with **OH_AVScreenCapture_Create**. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_ReleaseAudioBuffer() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ReleaseAudioBuffer (struct OH_AVScreenCapture * capture, OH_AudioCaptureSourceType type ) +``` + +**Description** + +Releases an audio buffer. After the audio buffer is no longer needed, call this function to release it. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| +| type | Type of the audio buffer, which is used to distinguish external streams recorded by the microphone from internal streams played by the system.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_ReleaseVideoBuffer() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_ReleaseVideoBuffer (struct OH_AVScreenCapture * capture) +``` + +**Description** + +Releases a video buffer. After the video buffer is no longer needed, call this function to release it. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_SetCallback() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCallback (struct OH_AVScreenCapture * capture, struct OH_AVScreenCaptureCallback callback ) +``` + +**Description** + +Sets a callback to listen for available video buffers and audio buffers and errors that occur during the function calling. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| +| callback | [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) struct, which stores related callback function pointers.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_SetMicrophoneEnabled() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetMicrophoneEnabled (struct OH_AVScreenCapture * capture, bool isMicrophone ) +``` + +**Description** + +Enables or disables the microphone. When **isMicrophone** is set to **true**, the microphone is enabled, and the original PCM data of the microphone can be obtained by calling **OH_AVScreenCapture_StartScreenRecording** and **OH_AVScreenCapture_AcquireAudioBuffer**. When **isMicrophone** is set to **false**, the obtained audio data is silent data. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| +| isMicrophone | Whether to enable the microphone.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_StartScreenCapture() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StartScreenCapture (struct OH_AVScreenCapture * capture) +``` + +**Description** + +Starts screen capture and collects original streams. After calling this function, the application can use the callback listeners **OH_AVScreenCaptureOnAudioBufferAvailable** and **OH_AVScreenCaptureOnVideoBufferAvailable** to check whether streams are generated. + +The application can obtain the original streams of screen capture by calling **OH_AVScreenCapture_AcquireAudioBuffer** and **OH_AVScreenCapture_ReleaseVideoBuffer**. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_StartScreenRecording() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StartScreenRecording (struct OH_AVScreenCapture * capture) +``` + +**Description** + +Starts screen recording and collects encoded streams. + +> **NOTE** +> +> This function is reserved and will be provided in later versions. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_StopScreenCapture() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StopScreenCapture (struct OH_AVScreenCapture * capture) +``` + +**Description** + +Stops screen capture. This function is used in pair with **OH_AVScreenCapture_StartScreenCapture**. After calling this function, the application stops screen capture or screen share and releases the microphone. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. + + +### OH_AVScreenCapture_StopScreenRecording() + +``` +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StopScreenRecording (struct OH_AVScreenCapture * capture) +``` + +**Description** + +Stops screen recording. This function is used in pair with **OH_AVScreenCapture_StartScreenRecording**. + +> **NOTE** +> +> This function is reserved and will be provided in later versions. + +**Parameters** + +| Name| Description| +| -------- | -------- | +| capture | Pointer to an **OH_AVScreenCapture** instance.| + +**System capability** + +SystemCapability.Multimedia.Media.AVScreenCapture + +**Returns** + +Returns **AV_SCREEN_CAPTURE_ERR_OK** if the operation is successful; returns an error code defined in [OH_AVSCREEN_CAPTURE_ErrCode](#oh_avscreen_capture_errcode) otherwise. diff --git a/en/application-dev/reference/native-apis/_o_h___a_v_screen_capture_callback.md b/en/application-dev/reference/native-apis/_o_h___a_v_screen_capture_callback.md new file mode 100644 index 0000000000..51475cf1b5 --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___a_v_screen_capture_callback.md @@ -0,0 +1,28 @@ +# OH_AVScreenCaptureCallback + + +## Overview + +The **OH_AVScreenCaptureCallback** struct defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance. To ensure the normal running of **OH_AVScreenCapture**, you must register the instance of this struct with the **OH_AVScreenCapture** instance and process the information reported by the callback functions. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| **onError** | [OH_AVScreenCaptureOnError](_a_v_screen_capture.md#oh_avscreencaptureonerror) | +| **onAudioBufferAvailable** | [OH_AVScreenCaptureOnAudioBufferAvailable](_a_v_screen_capture.md#oh_avscreencaptureonaudiobufferavailable) | +| **onVideoBufferAvailable** | [OH_AVScreenCaptureOnVideoBufferAvailable](_a_v_screen_capture.md#oh_avscreencaptureonvideobufferavailable) | diff --git a/en/application-dev/reference/native-apis/_o_h___a_v_screen_capture_config.md b/en/application-dev/reference/native-apis/_o_h___a_v_screen_capture_config.md new file mode 100644 index 0000000000..a52d4cdc48 --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___a_v_screen_capture_config.md @@ -0,0 +1,92 @@ +# OH_AVScreenCaptureConfig + + +## Overview + +The **OH_AVScreenCaptureConfig** struct defines the screen capture configuration. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [captureMode](#capturemode) | [OH_CaptureMode](_a_v_screen_capture.md#oh_capturemode)
Defines the screen capture mode.| +| [dataType](#datatype) | [OH_DataType](_a_v_screen_capture.md#oh_datatype)
Defines the data type of the screen capture stream.| +| [audioInfo](#audioinfo) | [OH_AudioInfo](_o_h___audio_info.md)
Defines audio capture parameters.| +| [videoInfo](#videoinfo) | [OH_VideoInfo](_o_h___video_info.md)
Defines video capture parameters.| +| [recorderInfo](#recorderinfo) | [OH_RecorderInfo](_o_h___recorder_info.md)
Defines recording file parameters. This member variable is mandatory when the data type is **OH_CAPTURE_FILE**.
**NOTE**: This member variable is reserved and will be provided in later versions.| + + +## Member Variable Description + + +### audioInfo + +``` +OH_AudioInfo OH_AVScreenCaptureConfig::audioInfo +``` + +**Description** + +Defines audio capture parameters. + + +### captureMode + +``` +OH_CaptureMode OH_AVScreenCaptureConfig::captureMode +``` + +**Description** + +Defines the screen capture mode. + + +### dataType + +``` +OH_DataType OH_AVScreenCaptureConfig::dataType +``` + +**Description** + +Defines the data type of the screen capture stream. + + +### recorderInfo + +``` +OH_RecorderInfo OH_AVScreenCaptureConfig::recorderInfo +``` + +**Description** + +Defines recording file parameters. This member variable is mandatory when the data type is **OH_CAPTURE_FILE**. + +> **NOTE** +> +> This member variable is reserved and will be provided in later versions. + + +### videoInfo + +``` +OH_VideoInfo OH_AVScreenCaptureConfig::videoInfo +``` + +**Description** + +Defines video capture parameters. diff --git a/en/application-dev/reference/native-apis/_o_h___audio_buffer.md b/en/application-dev/reference/native-apis/_o_h___audio_buffer.md new file mode 100644 index 0000000000..f52b05c6ca --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___audio_buffer.md @@ -0,0 +1,76 @@ +# OH_AudioBuffer + + +## Overview + +The **OH_AudioBuffer** struct defines the configuration such as the size, type, and timestamp of audio data. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [buf](#buf) | Defines the pointer to an audio buffer.| +| [size](#size) | Defines the size of the audio buffer.| +| [timestamp](#timestamp) | Defines the timestamp of the audio buffer.| +| [type](#type) | Defines the type of the audio capture source.| + + +## Member Variable Description + + +### buf + +``` +uint8_t* OH_AudioBuffer::buf +``` + +**Description** + +Defines the pointer to an audio buffer. + + +### size + +``` +int32_t OH_AudioBuffer::size +``` + +**Description** + +Defines the size of the audio buffer. + + +### timestamp + +``` +int64_t OH_AudioBuffer::timestamp +``` + +**Description** + +Defines the timestamp of the audio buffer. + + +### type + +``` +OH_AudioCaptureSourceType OH_AudioBuffer::type +``` + +**Description** + +Defines the type of the audio capture source. diff --git a/en/application-dev/reference/native-apis/_o_h___audio_capture_info.md b/en/application-dev/reference/native-apis/_o_h___audio_capture_info.md new file mode 100644 index 0000000000..730997bdcf --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___audio_capture_info.md @@ -0,0 +1,64 @@ +# OH_AudioCaptureInfo + + +## Overview + +The **OH_AudioCaptureInfo** struct defines audio capture information. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [audioSampleRate](#audiosamplerate) | int32_t
Defines the audio sampling rate. For details about the supported rates, see **OH_AudioCapturer_GetSamplingRate**.| +| [audioChannels](#audiochannels) | int32_t
Defines the number of audio channels.| +| [audioSource](#audiosource) | [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype)
Defines the audio source.| + + +## Member Variable Description + + +### audioChannels + +``` +int32_t OH_AudioCaptureInfo::audioChannels +``` + +**Description** + +Defines the number of audio channels. + + +### audioSampleRate + +``` +int32_t OH_AudioCaptureInfo::audioSampleRate +``` + +**Description** + +Defines the audio sampling rate. For details about the supported rates, see **OH_AudioCapturer_GetSamplingRate**. + + +### audioSource + +``` +OH_AudioCaptureSourceType OH_AudioCaptureInfo::audioSource +``` + +**Description** + +Defines the audio source. diff --git a/en/application-dev/reference/native-apis/_o_h___audio_enc_info.md b/en/application-dev/reference/native-apis/_o_h___audio_enc_info.md new file mode 100644 index 0000000000..0605b53d19 --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___audio_enc_info.md @@ -0,0 +1,56 @@ +# OH_AudioEncInfo + + +## Overview + +The **OH_AudioEncInfo** struct defines audio encoding information. + +> **NOTE** +> +> This struct is reserved and will be provided in later versions. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [audioBitrate](#audiobitrate) | int32_t
Defines the audio bit rate.| +| [audioCodecformat](#audiocodecformat) | [OH_AudioCodecFormat](_a_v_screen_capture.md#oh_audiocodecformat)
Defines the audio codec format.| + + +## Member Variable Description + + +### audioBitrate + +``` +int32_t OH_AudioEncInfo::audioBitrate +``` + +**Description** + +Defines the audio bit rate. + + +### audioCodecformat + +``` +OH_AudioCodecFormat OH_AudioEncInfo::audioCodecformat +``` + +**Description** + +Defines the audio codec format. diff --git a/en/application-dev/reference/native-apis/_o_h___audio_info.md b/en/application-dev/reference/native-apis/_o_h___audio_info.md new file mode 100644 index 0000000000..7ee48cb89a --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___audio_info.md @@ -0,0 +1,68 @@ +# OH_AudioInfo + + +## Overview + +The **OH_AudioInfo** struct defines audio capture parameters. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [micCapInfo](#miccapinfo) | [OH_AudioCaptureInfo](_o_h___audio_capture_info.md)
Defines the audio parameters of the microphone.| +| [innerCapInfo](#innercapinfo) | [OH_AudioCaptureInfo](_o_h___audio_capture_info.md)
Defines the audio parameters for internal capture.| +| [audioEncInfo](#audioencinfo) | [OH_AudioEncInfo](_o_h___audio_enc_info.md)
Defines the audio encoding information. This member variable does not need to be set when **dataType** is set to **OH_ORIGINAL_STREAM**.
**NOTE**: This member variable is reserved and will be provided in later versions.| + + +## Member Variable Description + + +### audioEncInfo + +``` +OH_AudioEncInfo OH_AudioInfo::audioEncInfo +``` + +**Description** + +Defines the audio encoding information. This member variable does not need to be set when **dataType** is set to **OH_ORIGINAL_STREAM**. + +> **NOTE** +> +> This struct is reserved and will be provided in later versions. + + +### innerCapInfo + +``` +OH_AudioCaptureInfo OH_AudioInfo::innerCapInfo +``` + +**Description** + +Defines the audio parameters for internal capture. + + +### micCapInfo + +``` +OH_AudioCaptureInfo OH_AudioInfo::micCapInfo +``` + +**Description** + +Defines the audio parameters of the microphone. diff --git a/en/application-dev/reference/native-apis/_o_h___native_x_component.md b/en/application-dev/reference/native-apis/_o_h___native_x_component.md index 37dd107c61..9f9ceb24f0 100644 --- a/en/application-dev/reference/native-apis/_o_h___native_x_component.md +++ b/en/application-dev/reference/native-apis/_o_h___native_x_component.md @@ -3,117 +3,131 @@ ## Overview -Describes the surface and touch event held by the ArkUI XComponent, which can be used for the EGL/OpenGL ES and media data input and displayed on the ArkUI XComponent. +Describes the surface and touch event held by the ArkUI XComponent, which can be used for the EGL/OpenGL ES and media data input and displayed on the ArkUI XComponent. For details, see [XComponent Development](../../napi/xcomponent-guidelines.md) +**Since** -**Since:** 8 + ## Summary ### Files -| Name | Description | -| -------- | -------- | -| [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | Declare the APIs used to access the native XComponent.
File to Include: | +| Name | Description | +| ---------------------------------------- | ---------------------------------------- | +| [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | Declares the APIs for accessing **NativeXComponent**.
File to include: <ace/xcomponent/native_interface_xcomponent.h> | +| [native_xcomponent_key_event.h](native__xcomponent__key__event_8h.md) | Declares the enums used to access **NativeXComponent** key events.
File to include: <ace/xcomponent/native_xcomponent_key_event.h> | ### Structs -| Name | Description | -| -------- | -------- | -| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | Describes the touch point of the touch event. | -| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | Describes the touch event. | -| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | Describes the mouse event. | -| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | Registers a callback for the surface lifecycle and touch event. | -| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | Registers a callback for the mouse event. | +| Name | Description | +| ---------------------------------------- | --------------------- | +| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | Describes the touch point of the touch event. | +| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | Describes the touch event. | +| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | Describes the mouse event. | +| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | Registers callbacks for the surface lifecycle and touch event.| +| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | Registers callbacks for the mouse event. | ### Types -| Name | Description | -| -------- | -------- | -| [OH_NativeXComponent](#oh_nativexcomponent) | Provides an encapsulated OH_NativeXComponent instance. | -| [OH_NativeXComponent_Callback](#oh_nativexcomponent_callback) | Registers a callback for the surface lifecycle and touch event. | -| [OH_NativeXComponent_MouseEvent_Callback](#oh_nativexcomponent_mouseevent_callback) | Registers a callback for the mouse event. | +| Name | Description | +| ---------------------------------------- | ------------------------------------ | +| [OH_NativeXComponent](#oh_nativexcomponent) | Provides an encapsulated **OH_NativeXComponent** instance. | +| [OH_NativeXComponent_Callback](#oh_nativexcomponent_callback) | Registers callbacks for the surface lifecycle and touch event. | +| [OH_NativeXComponent_MouseEvent_Callback](#oh_nativexcomponent_mouseevent_callback) | Registers callbacks for the mouse event. | +| [OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) | Provides an encapsulated **OH_NativeXComponent_KeyEvent** instance.| ### Enums -| Name | Description | -| -------- | -------- | -| {OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0,
OH_NATIVEXCOMPONENT_RESULT_FAILED = -1,
OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2 } | [Enumerates](#anonymous-enum) the API access states. | -| [OH_NativeXComponent_TouchEventType](#oh_nativexcomponent_toucheventtype) {
OH_NATIVEXCOMPONENT_DOWN = 0,
OH_NATIVEXCOMPONENT_UP,
OH_NATIVEXCOMPONENT_MOVE,
OH_NATIVEXCOMPONENT_CANCEL,
OH_NATIVEXCOMPONENT_UNKNOWN } | Enumerates the touch event types. | -| [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype) {
OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN = 0,
OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER,
OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN,
OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,
OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH,
OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL,
OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH,
OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,
OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS } | Enumerates the contact point tool types. | -| [OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype) {
OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN = 0,
OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE, OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN,
OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,
OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK} | Enumerates the source types of the touch event. | -| [OH_NativeXComponent_MouseEventAction](#oh_nativexcomponent_mouseeventaction) {
OH_NATIVEXCOMPONENT_MOUSE_NONE = 0,
OH_NATIVEXCOMPONENT_MOUSE_PRESS,
OH_NATIVEXCOMPONENT_MOUSE_RELEASE,
OH_NATIVEXCOMPONENT_MOUSE_MOVE } | Enumerates the mouse event actions. | -| [OH_NativeXComponent_MouseEventButton](#oh_nativexcomponent_mouseeventbutton) {
OH_NATIVEXCOMPONENT_NONE_BUTTON = 0,
OH_NATIVEXCOMPONENT_LEFT_BUTTON = 0x01,
OH_NATIVEXCOMPONENT_RIGHT_BUTTON = 0x02,
OH_NATIVEXCOMPONENT_MIDDLE_BUTTON = 0x04,
OH_NATIVEXCOMPONENT_BACK_BUTTON = 0x08,
OH_NATIVEXCOMPONENT_FORWARD_BUTTON = 0x10 } | Enumerates the mouse event buttons. | +| Name | Description | +| ---------------------------------------- | ---------- | +| { OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2 } | Enumerates the API access states.| +| [OH_NativeXComponent_TouchEventType](#oh_nativexcomponent_toucheventtype) {
OH_NATIVEXCOMPONENT_DOWN = 0, OH_NATIVEXCOMPONENT_UP, OH_NATIVEXCOMPONENT_MOVE, OH_NATIVEXCOMPONENT_CANCEL,
OH_NATIVEXCOMPONENT_UNKNOWN
} | Enumerates the touch event types. | +| [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype) {
OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN = 0, OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER, OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN, OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,
OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH, OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL, OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH, OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,
OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS
} | Enumerates the touch point tool types. | +| [OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype) {
OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN = 0, OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE, OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN, OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,
OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK, OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD
} | Enumerates the touch event source types. | +| [OH_NativeXComponent_MouseEventAction](#oh_nativexcomponent_mouseeventaction) { OH_NATIVEXCOMPONENT_MOUSE_NONE = 0, OH_NATIVEXCOMPONENT_MOUSE_PRESS, OH_NATIVEXCOMPONENT_MOUSE_RELEASE, OH_NATIVEXCOMPONENT_MOUSE_MOVE } | Enumerates the mouse event actions. | +| [OH_NativeXComponent_MouseEventButton](#oh_nativexcomponent_mouseeventbutton) {
OH_NATIVEXCOMPONENT_NONE_BUTTON = 0, OH_NATIVEXCOMPONENT_LEFT_BUTTON = 0x01, OH_NATIVEXCOMPONENT_RIGHT_BUTTON = 0x02, OH_NATIVEXCOMPONENT_MIDDLE_BUTTON = 0x04,
OH_NATIVEXCOMPONENT_BACK_BUTTON = 0x08, OH_NATIVEXCOMPONENT_FORWARD_BUTTON = 0x10
} | Enumerates the mouse event buttons. | +| [OH_NativeXComponent_KeyCode](#oh_nativexcomponent_keycode) {
KEY_UNKNOWN = -1, KEY_FN = 0, KEY_HOME = 1, KEY_BACK = 2,KEY_MEDIA_PLAY_PAUSE = 10, KEY_MEDIA_STOP = 11, KEY_MEDIA_NEXT = 12, KEY_MEDIA_PREVIOUS = 13,
KEY_MEDIA_REWIND = 14, KEY_MEDIA_FAST_FORWARD = 15, KEY_VOLUME_UP = 16, KEY_VOLUME_DOWN = 17,
KEY_POWER = 18, KEY_CAMERA = 19, KEY_VOLUME_MUTE = 22, KEY_MUTE = 23,KEY_BRIGHTNESS_UP = 40, KEY_BRIGHTNESS_DOWN = 41, KEY_0 = 2000, KEY_1 = 2001,
KEY_2 = 2002, KEY_3 = 2003, KEY_4 = 2004, KEY_5 = 2005,
KEY_6 = 2006, KEY_7 = 2007, KEY_8 = 2008, KEY_9 = 2009,
KEY_STAR = 2010, KEY_POUND = 2011, KEY_DPAD_UP = 2012, KEY_DPAD_DOWN = 2013,KEY_DPAD_LEFT = 2014, KEY_DPAD_RIGHT = 2015, KEY_DPAD_CENTER = 2016,
KEY_A = 2017,
KEY_B = 2018, KEY_C = 2019, KEY_D = 2020, KEY_E = 2021,
KEY_F = 2022, KEY_G = 2023, KEY_H = 2024, KEY_I = 2025,
KEY_J = 2026, KEY_K = 2027, KEY_L = 2028, KEY_M = 2029,
KEY_N = 2030, KEY_O = 2031, KEY_P = 2032, KEY_Q = 2033,
KEY_R = 2034, KEY_S = 2035, KEY_T = 2036, KEY_U = 2037,
KEY_V = 2038, KEY_W = 2039, KEY_X = 2040, KEY_Y = 2041,
KEY_Z = 2042, KEY_COMMA = 2043, KEY_PERIOD = 2044, KEY_ALT_LEFT = 2045,
KEY_ALT_RIGHT = 2046, KEY_SHIFT_LEFT = 2047, KEY_SHIFT_RIGHT = 2048, KEY_TAB = 2049,
KEY_SPACE = 2050, KEY_SYM = 2051, KEY_EXPLORER = 2052, KEY_ENVELOPE = 2053,
KEY_ENTER = 2054, KEY_DEL = 2055, KEY_GRAVE = 2056, KEY_MINUS = 2057,
KEY_EQUALS = 2058, KEY_LEFT_BRACKET = 2059, KEY_RIGHT_BRACKET = 2060, KEY_BACKSLASH = 2061,
KEY_SEMICOLON = 2062, KEY_APOSTROPHE = 2063, KEY_SLASH = 2064, KEY_AT = 2065,
KEY_PLUS = 2066, KEY_MENU = 2067, KEY_PAGE_UP = 2068, KEY_PAGE_DOWN = 2069,
KEY_ESCAPE = 2070, KEY_FORWARD_DEL = 2071, KEY_CTRL_LEFT = 2072, KEY_CTRL_RIGHT = 2073,
KEY_CAPS_LOCK = 2074, KEY_SCROLL_LOCK = 2075, KEY_META_LEFT = 2076, KEY_META_RIGHT = 2077,
KEY_FUNCTION = 2078, KEY_SYSRQ = 2079, KEY_BREAK = 2080, KEY_MOVE_HOME = 2081,
KEY_MOVE_END = 2082, KEY_INSERT = 2083, KEY_FORWARD = 2084, KEY_MEDIA_PLAY = 2085,
KEY_MEDIA_PAUSE = 2086, KEY_MEDIA_CLOSE = 2087, KEY_MEDIA_EJECT = 2088, KEY_MEDIA_RECORD = 2089,
KEY_F1 = 2090, KEY_F2 = 2091, KEY_F3 = 2092, KEY_F4 = 2093,
KEY_F5 = 2094, KEY_F6 = 2095, KEY_F7 = 2096, KEY_F8 = 2097,
KEY_F9 = 2098, KEY_F10 = 2099, KEY_F11 = 2100, KEY_F12 = 2101,
KEY_NUM_LOCK = 2102, KEY_NUMPAD_0 = 2103, KEY_NUMPAD_1 = 2104, KEY_NUMPAD_2 = 2105,
KEY_NUMPAD_3 = 2106, KEY_NUMPAD_4 = 2107, KEY_NUMPAD_5 = 2108, KEY_NUMPAD_6 = 2109,
KEY_NUMPAD_7 = 2110, KEY_NUMPAD_8 = 2111, KEY_NUMPAD_9 = 2112, KEY_NUMPAD_DIVIDE = 2113,
KEY_NUMPAD_MULTIPLY = 2114, KEY_NUMPAD_SUBTRACT = 2115, KEY_NUMPAD_ADD = 2116, KEY_NUMPAD_DOT = 2117,
KEY_NUMPAD_COMMA = 2118, KEY_NUMPAD_ENTER = 2119, KEY_NUMPAD_EQUALS = 2120, KEY_NUMPAD_LEFT_PAREN = 2121,
KEY_NUMPAD_RIGHT_PAREN = 2122, KEY_VIRTUAL_MULTITASK = 2210, KEY_SLEEP = 2600, KEY_ZENKAKU_HANKAKU = 2601,
KEY_102ND = 2602, KEY_RO = 2603, KEY_KATAKANA = 2604, KEY_HIRAGANA = 2605,
KEY_HENKAN = 2606, KEY_KATAKANA_HIRAGANA = 2607, KEY_MUHENKAN = 2608, KEY_LINEFEED = 2609,
KEY_MACRO = 2610, KEY_NUMPAD_PLUSMINUS = 2611, KEY_SCALE = 2612, KEY_HANGUEL = 2613,
KEY_HANJA = 2614, KEY_YEN = 2615, KEY_STOP = 2616, KEY_AGAIN = 2617,
KEY_PROPS = 2618, KEY_UNDO = 2619, KEY_COPY = 2620, KEY_OPEN = 2621,
KEY_PASTE = 2622, KEY_FIND = 2623, KEY_CUT = 2624, KEY_HELP = 2625,
KEY_CALC = 2626, KEY_FILE = 2627, KEY_BOOKMARKS = 2628, KEY_NEXT = 2629,
KEY_PLAYPAUSE = 2630, KEY_PREVIOUS = 2631, KEY_STOPCD = 2632, KEY_CONFIG = 2634,
KEY_REFRESH = 2635, KEY_EXIT = 2636, KEY_EDIT = 2637, KEY_SCROLLUP = 2638,
KEY_SCROLLDOWN = 2639, KEY_NEW = 2640, KEY_REDO = 2641, KEY_CLOSE = 2642,
KEY_PLAY = 2643, KEY_BASSBOOST = 2644, KEY_PRINT = 2645, KEY_CHAT = 2646,
KEY_FINANCE = 2647, KEY_CANCEL = 2648, KEY_KBDILLUM_TOGGLE = 2649, KEY_KBDILLUM_DOWN = 2650,
KEY_KBDILLUM_UP = 2651, KEY_SEND = 2652, KEY_REPLY = 2653, KEY_FORWARDMAIL = 2654,
KEY_SAVE = 2655, KEY_DOCUMENTS = 2656, KEY_VIDEO_NEXT = 2657, KEY_VIDEO_PREV = 2658,
KEY_BRIGHTNESS_CYCLE = 2659, KEY_BRIGHTNESS_ZERO = 2660, KEY_DISPLAY_OFF = 2661, KEY_BTN_MISC = 2662,
KEY_GOTO = 2663, KEY_INFO = 2664, KEY_PROGRAM = 2665, KEY_PVR = 2666,
KEY_SUBTITLE = 2667, KEY_FULL_SCREEN = 2668, KEY_KEYBOARD = 2669, KEY_ASPECT_RATIO = 2670,
KEY_PC = 2671, KEY_TV = 2672, KEY_TV2 = 2673, KEY_VCR = 2674,
KEY_VCR2 = 2675, KEY_SAT = 2676, KEY_CD = 2677, KEY_TAPE = 2678,
KEY_TUNER = 2679, KEY_PLAYER = 2680, KEY_DVD = 2681, KEY_AUDIO = 2682,
KEY_VIDEO = 2683, KEY_MEMO = 2684, KEY_CALENDAR = 2685, KEY_RED = 2686,
KEY_GREEN = 2687, KEY_YELLOW = 2688, KEY_BLUE = 2689, KEY_CHANNELUP = 2690,
KEY_CHANNELDOWN = 2691, KEY_LAST = 2692, KEY_RESTART = 2693, KEY_SLOW = 2694,
KEY_SHUFFLE = 2695, KEY_VIDEOPHONE = 2696, KEY_GAMES = 2697, KEY_ZOOMIN = 2698,
KEY_ZOOMOUT = 2699, KEY_ZOOMRESET = 2700, KEY_WORDPROCESSOR = 2701, KEY_EDITOR = 2702,
KEY_SPREADSHEET = 2703, KEY_GRAPHICSEDITOR = 2704, KEY_PRESENTATION = 2705, KEY_DATABASE = 2706,
KEY_NEWS = 2707, KEY_VOICEMAIL = 2708, KEY_ADDRESSBOOK = 2709, KEY_MESSENGER = 2710,
KEY_BRIGHTNESS_TOGGLE = 2711, KEY_SPELLCHECK = 2712, KEY_COFFEE = 2713, KEY_MEDIA_REPEAT = 2714,
KEY_IMAGES = 2715, KEY_BUTTONCONFIG = 2716, KEY_TASKMANAGER = 2717, KEY_JOURNAL = 2718,
KEY_CONTROLPANEL = 2719, KEY_APPSELECT = 2720, KEY_SCREENSAVER = 2721, KEY_ASSISTANT = 2722,
KEY_KBD_LAYOUT_NEXT = 2723, KEY_BRIGHTNESS_MIN = 2724, KEY_BRIGHTNESS_MAX = 2725, KEY_KBDINPUTASSIST_PREV = 2726,
KEY_KBDINPUTASSIST_NEXT = 2727, KEY_KBDINPUTASSIST_PREVGROUP = 2728, KEY_KBDINPUTASSIST_NEXTGROUP = 2729, KEY_KBDINPUTASSIST_ACCEPT = 2730,
KEY_KBDINPUTASSIST_CANCEL = 2731, KEY_FRONT = 2800, KEY_SETUP = 2801, KEY_WAKEUP = 2802,
KEY_SENDFILE = 2803, KEY_DELETEFILE = 2804, KEY_XFER = 2805, KEY_PROG1 = 2806,
KEY_PROG2 = 2807, KEY_MSDOS = 2808, KEY_SCREENLOCK = 2809, KEY_DIRECTION_ROTATE_DISPLAY = 2810,
KEY_CYCLEWINDOWS = 2811, KEY_COMPUTER = 2812, KEY_EJECTCLOSECD = 2813, KEY_ISO = 2814,
KEY_MOVE = 2815, KEY_F13 = 2816, KEY_F14 = 2817, KEY_F15 = 2818,
KEY_F16 = 2819, KEY_F17 = 2820, KEY_F18 = 2821, KEY_F19 = 2822,
KEY_F20 = 2823, KEY_F21 = 2824, KEY_F22 = 2825, KEY_F23 = 2826,
KEY_F24 = 2827, KEY_PROG3 = 2828, KEY_PROG4 = 2829, KEY_DASHBOARD = 2830,
KEY_SUSPEND = 2831, KEY_HP = 2832, KEY_SOUND = 2833, KEY_QUESTION = 2834,
KEY_CONNECT = 2836, KEY_SPORT = 2837, KEY_SHOP = 2838, KEY_ALTERASE = 2839,
KEY_SWITCHVIDEOMODE = 2841, KEY_BATTERY = 2842, KEY_BLUETOOTH = 2843, KEY_WLAN = 2844,
KEY_UWB = 2845, KEY_WWAN_WIMAX = 2846, KEY_RFKILL = 2847, KEY_CHANNEL = 3001,
KEY_BTN_0 = 3100, KEY_BTN_1 = 3101, KEY_BTN_2 = 3102, KEY_BTN_3 = 3103,
KEY_BTN_4 = 3104, KEY_BTN_5 = 3105, KEY_BTN_6 = 3106, KEY_BTN_7 = 3107,
KEY_BTN_8 = 3108, KEY_BTN_9 = 3109
} | Enumerates the mouse event key codes. | +| [OH_NativeXComponent_KeyAction](#oh_nativexcomponent_keyaction) { OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN = -1, OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN = 0, OH_NATIVEXCOMPONENT_KEY_ACTION_UP } | Enumerates the key event actions. | ### Functions -| Name | Description | -| -------- | -------- | -| [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, char \*id, uint64_t \*size) | Obtains the ID of the ArkUI XComponent. | -| [OH_NativeXComponent_GetXComponentSize](#oh_nativexcomponent_getxcomponentsize) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, uint64_t \*width, uint64_t \*height) | Obtains the size of the surface held by the ArkUI XComponent. | -| [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, double \*x, double \*y) | Obtains the offset of the ArkUI XComponent relative to the upper left vertex of the screen. | -| [OH_NativeXComponent_GetTouchEvent](#oh_nativexcomponent_gettouchevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) \*touchEvent) | Obtains the touch event scheduled by the ArkUI XComponent. | -| [OH_NativeXComponent_GetTouchPointToolType](#oh_nativexcomponent_gettouchpointtooltype) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype) \*toolType) | Obtains the ArkUI XComponent touch point tool type. | -| [OH_NativeXComponent_GetTouchPointTiltX](#oh_nativexcomponent_gettouchpointtiltx) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltX) | Obtains the angle between the tilt of the ArkUI XComponent touch point and the x-axis. | -| [OH_NativeXComponent_GetTouchPointTiltY](#oh_nativexcomponent_gettouchpointtilty) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltY) | Obtains the angle between the tilt of the ArkUI XComponent touch point and the y-axis. | -| [OH_NativeXComponent_GetMouseEvent](#oh_nativexcomponent_getmouseevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) \*mouseEvent) | Obtains the mouse event scheduled by ArkUI XComponent. | -| [OH_NativeXComponent_RegisterCallback](#oh_nativexcomponent_registercallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) \*callback) | Registers a callback for this **OH_NativeXComponent** instance. | -| [OH_NativeXComponent_RegisterMouseEventCallback](#oh_nativexcomponent_registermouseeventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) \*callback) | Registers a mouse event callback for this **OH_NativeXComponent** instance. | +| Name | Description | +| ---------------------------------------- | -------------------------------------- | +| [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, char \*id, uint64_t \*size) | Obtains the ID of the ArkUI XComponent. | +| [OH_NativeXComponent_GetXComponentSize](#oh_nativexcomponent_getxcomponentsize) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, uint64_t \*width, uint64_t \*height) | Obtains the size of the surface held by the ArkUI XComponent. | +| [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, double \*x, double \*y) | Obtains the offset of the ArkUI XComponent relative to the upper left vertex of the screen.| +| [OH_NativeXComponent_GetTouchEvent](#oh_nativexcomponent_gettouchevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) \*touchEvent) | Obtains the touch event scheduled by the ArkUI XComponent. | +| [OH_NativeXComponent_GetTouchPointToolType](#oh_nativexcomponent_gettouchpointtooltype) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype) \*toolType) | Obtains the ArkUI XComponent touch point tool type. | +| [OH_NativeXComponent_GetTouchPointTiltX](#oh_nativexcomponent_gettouchpointtiltx) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltX) | Obtains the angle between the Y-Z plane of the ArkUI XComponent touch point and the x-axis. | +| [OH_NativeXComponent_GetTouchPointTiltY](#oh_nativexcomponent_gettouchpointtilty) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltY) | Obtains the angle between the X-Z plane of the ArkUI XComponent touch point and the y-axis. | +| [OH_NativeXComponent_GetMouseEvent](#oh_nativexcomponent_getmouseevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) \*mouseEvent) | Obtains the mouse event scheduled by ArkUI XComponent. | +| [OH_NativeXComponent_RegisterCallback](#oh_nativexcomponent_registercallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) \*callback) | Registers a callback for this **OH_NativeXComponent** instance. | +| [OH_NativeXComponent_RegisterMouseEventCallback](#oh_nativexcomponent_registermouseeventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) \*callback) | Registers the mouse event callback for this **OH_NativeXComponent** instance. | +| [OH_NativeXComponent_RegisterFocusEventCallback](#oh_nativexcomponent_registerfocuseventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window)) | Registers the focus obtaining event callback for this **OH_NativeXComponent** instance. | +| [OH_NativeXComponent_RegisterKeyEventCallback](#oh_nativexcomponent_registerkeyeventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window)) | Registers the key event callback for this **OH_NativeXComponent** instance. | +| [OH_NativeXComponent_RegisterBlurEventCallback](#oh_nativexcomponent_registerblureventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window)) | Registers the focus loss event callback for this **OH_NativeXComponent** instance. | +| [OH_NativeXComponent_GetKeyEvent](#oh_nativexcomponent_getkeyevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*\*keyEvent) | Obtains the key event scheduled by the ArkUI XComponent. | +| [OH_NativeXComponent_GetKeyEventAction](#oh_nativexcomponent_getkeyeventaction) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, [OH_NativeXComponent_KeyAction](#oh_nativexcomponent_keyaction) \*action) | Obtains the action of the specified key event. | +| [OH_NativeXComponent_GetKeyEventCode](#oh_nativexcomponent_getkeyeventcode) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, [OH_NativeXComponent_KeyCode](#oh_nativexcomponent_keycode) \*code) | Obtains the key code of the specified key event. | +| [OH_NativeXComponent_GetKeyEventSourceType](#oh_nativexcomponent_getkeyeventsourcetype) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, [OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype) \*sourceType) | Obtains the source type of the specified key event. | +| [OH_NativeXComponent_GetKeyEventDeviceId](#oh_nativexcomponent_getkeyeventdeviceid) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, int64_t \*deviceId) | Obtains the device ID of the specified key event. | +| [OH_NativeXComponent_GetKeyEventTimeStamp](#oh_nativexcomponent_getkeyeventtimestamp) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, int64_t \*timeStamp) | Obtains the timestamp of the specified key event. | ### Variables -| Name | Description | -| -------- | -------- | -| [OH_XCOMPONENT_ID_LEN_MAX](#oh_xcomponent_id_len_max) = 128 | Maximum length of an ArkUI XComponent ID. | -| [OH_MAX_TOUCH_POINTS_NUMBER](#oh_max_touch_points_number) = 10 | Maximum number of identifiable touch points in a touch event. | -| [OH_NativeXComponent_TouchPoint::id](#id-12) = 0 | Unique identifier of the finger. | -| [OH_NativeXComponent_TouchPoint::screenX](#screenx-13) = 0.0 | X coordinate of the touch point relative to the left edge of the screen. | -| [OH_NativeXComponent_TouchPoint::screenY](#screeny-13) = 0.0 | Y coordinate of the touch point relative to the left edge of the screen. | -| [OH_NativeXComponent_TouchPoint::x](#x-13) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. | -| [OH_NativeXComponent_TouchPoint::y](#y-13) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. | -| [OH_NativeXComponent_TouchPoint::type](#type-12) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. | -| [OH_NativeXComponent_TouchPoint::size](#size-12) = 0.0 | Contact area between the finger pad and the screen. | -| [OH_NativeXComponent_TouchPoint::force](#force-12) = 0.0 | Pressure of the current touch event. | -| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12) = 0 | Timestamp of the current touch event. | -| [OH_NativeXComponent_TouchPoint::isPressed](#ispressed) = false | Whether the current point is pressed. | -| [OH_NativeXComponent_TouchEvent::id](#id-22) = 0 | Unique identifier of the finger. | -| [OH_NativeXComponent_TouchEvent::screenX](#screenx-23) = 0.0 | X coordinate of the touch point relative to the left edge of the screen. | -| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23) = 0.0 | Y coordinate of the touch point relative to the left edge of the screen. | -| [OH_NativeXComponent_TouchEvent::x](#x-23) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. | -| [OH_NativeXComponent_TouchEvent::y](#y-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. | -| [OH_NativeXComponent_TouchEvent::type](#type-22) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. | -| [OH_NativeXComponent_TouchEvent::size](#size-22) = 0.0 | Contact area between the finger pad and the screen. | -| [OH_NativeXComponent_TouchEvent::force](#force-22) = 0.0 | Pressure of the current touch event. | -| [OH_NativeXComponent_TouchEvent::deviceId](#deviceid) = 0 | ID of the device where the current touch event is triggered. | -| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22) = 0 | Timestamp of the current touch event. | -| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints) [OH_MAX_TOUCH_POINTS_NUMBER] | Array of the current touch points. | -| [OH_NativeXComponent_TouchEvent::numPoints](#numpoints) = 0 | Number of current touch points. | -| [OH_NativeXComponent_MouseEvent::x](#x-33) = 0.0 | X coordinate of the clicked point relative to the upper left corner of the component. | -| [OH_NativeXComponent_MouseEvent::y](#y-33) = 0.0 | Y coordinate of the clicked point relative to the upper left corner of the component. | -| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33) = 0.0 | X coordinate of the clicked point relative to the upper left corner of the screen. | -| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33) = 0.0 | Y coordinate of the clicked point relative to the upper left corner of the screen. | -| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp) = 0 | Timestamp of the current mouse event. | -| [OH_NativeXComponent_MouseEvent::action](#action) = [OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | Current mouse event action. | -| [OH_NativeXComponent_MouseEvent::button](#button) = [OH_NativeXComponent_MouseEventButton::OH_NATIVEXCOMPONENT_NONE_BUTTON](#oh_nativexcomponent_mouseeventbutton) | Mouse event button | -| [OH_NativeXComponent_Callback::OnSurfaceCreated](#onsurfacecreated) | Invoked when a surface is created. | -| [OH_NativeXComponent_Callback::OnSurfaceChanged](#onsurfacechanged) | Invoked when the surface changes. | -| [OH_NativeXComponent_Callback::OnSurfaceDestroyed](#onsurfacedestroyed) | Invoked when the surface is destroyed. | -| [OH_NativeXComponent_Callback::DispatchTouchEvent](#dispatchtouchevent) | Invoked when a touch event is triggered. | -| [OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent](#dispatchmouseevent) | Invoked when a mouse event is triggered. | -| [OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent](#dispatchhoverevent) | Invoked when a hover event is triggered. | +| Name | Description | +| ---------------------------------------- | ------------------------------ | +| **OH_XCOMPONENT_ID_LEN_MAX** = 128 | Maximum length of the ArkUI XComponent ID. | +| **OH_MAX_TOUCH_POINTS_NUMBER** = 10 | Maximum number of identifiable touch points in a touch event. | +| [OH_NativeXComponent_TouchPoint::id](#id-12) = 0 | Unique identifier of the finger. | +| [OH_NativeXComponent_TouchPoint::screenX](#screenx-13) = 0.0 | X coordinate of the touch point relative to the left edge of the application window where the XComponent is located.| +| [OH_NativeXComponent_TouchPoint::screenY](#screeny-13) = 0.0 | Y coordinate of the touch point relative to the left edge of the application window where the XComponent is located.| +| [OH_NativeXComponent_TouchPoint::x](#x-13) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. | +| [OH_NativeXComponent_TouchPoint::y](#y-13) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. | +| [OH_NativeXComponent_TouchPoint::type](#type-12) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. | +| [OH_NativeXComponent_TouchPoint::size](#size-12) = 0.0 | Contact area between the finger pad and the screen. | +| [OH_NativeXComponent_TouchPoint::force](#force-12) = 0.0 | Pressure of the touch event. | +| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12) = 0 | Timestamp of the touch point. | +| [OH_NativeXComponent_TouchPoint::isPressed](#ispressed) = false | Whether the current point is pressed. | +| [OH_NativeXComponent_TouchEvent::id](#id-22) = 0 | Unique identifier of the finger. | +| [OH_NativeXComponent_TouchEvent::screenX](#screenx-23) = 0.0 | X coordinate of the touch point relative to the left edge of the screen. | +| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the screen. | +| [OH_NativeXComponent_TouchEvent::x](#x-23) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. | +| [OH_NativeXComponent_TouchEvent::y](#y-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. | +| [OH_NativeXComponent_TouchEvent::type](#type-22) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. | +| [OH_NativeXComponent_TouchEvent::size](#size-22) = 0.0 | Contact area between the finger pad and the screen. | +| [OH_NativeXComponent_TouchEvent::force](#force-22) = 0.0 | Pressure of the touch event. | +| [OH_NativeXComponent_TouchEvent::deviceId](#deviceid) = 0 | ID of the device where the current touch event is triggered. | +| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22) = 0 | Timestamp of the touch event. | +| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints) [OH_MAX_TOUCH_POINTS_NUMBER] | Array of the touch points. | +| [OH_NativeXComponent_TouchEvent::numPoints](#numpoints) = 0 | Number of current touch points. | +| [OH_NativeXComponent_MouseEvent::x](#x-33) = 0.0 | X coordinate of the clicked point relative to the upper left corner of the component. | +| [OH_NativeXComponent_MouseEvent::y](#y-33)= 0.0 | Y coordinate of the clicked point relative to the upper left corner of the component. | +| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33)= 0.0 | X coordinate of the clicked point relative to the upper left corner of the screen. | +| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33)= 0.0 | Y coordinate of the clicked point relative to the upper left corner of the screen. | +| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp)= 0 | Timestamp of the mouse event. | +| [OH_NativeXComponent_MouseEvent::action](#action)= [OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | Action of the mouse event. | +| [OH_NativeXComponent_MouseEvent::button](#button)= [OH_NativeXComponent_MouseEventButton::OH_NATIVEXCOMPONENT_NONE_BUTTON](#oh_nativexcomponent_mouseeventbutton) | Enumerates the mouse event buttons. | +| [OH_NativeXComponent_Callback::OnSurfaceCreated](#onsurfacecreated) | Invoked when a surface is created. | +| [OH_NativeXComponent_Callback::OnSurfaceChanged](#onsurfacechanged) | Invoked when the surface changes. | +| [OH_NativeXComponent_Callback::OnSurfaceDestroyed](#onsurfacedestroyed) | Invoked when the surface is destroyed. | +| [OH_NativeXComponent_Callback::DispatchTouchEvent](#dispatchtouchevent) | Invoked when a touch event is triggered. | +| [OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent](#dispatchmouseevent) | Invoked when a mouse event is triggered. | +| [OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent](#dispatchhoverevent) | Invoked when a hover event is triggered. | ## Type Description -### OH_NativeXComponent +### OH_NativeXComponent ``` typedef struct OH_NativeXComponent OH_NativeXComponent @@ -121,31 +135,44 @@ typedef struct OH_NativeXComponent OH_NativeXComponent **Description** -Provides an encapsulated OH_NativeXComponent instance. +Provides an encapsulated **OH_NativeXComponent** instance. -**Since:** +**Since** 8 ### OH_NativeXComponent_Callback - ``` typedef struct OH_NativeXComponent_Callback OH_NativeXComponent_Callback ``` **Description** -Registers a callback for the surface lifecycle and touch event. +Registers callbacks for the surface lifecycle and touch event. -**Since:** +**Since** 8 -### OH_NativeXComponent_MouseEvent_Callback +### OH_NativeXComponent_KeyEvent + +``` +typedef struct OH_NativeXComponent_KeyEvent OH_NativeXComponent_KeyEvent +``` + +**Description** + +Provides an encapsulated **OH_NativeXComponent_KeyEvent** instance. +**Since** + +10 + + +### OH_NativeXComponent_MouseEvent_Callback ``` typedef struct OH_NativeXComponent_MouseEvent_Callback OH_NativeXComponent_MouseEvent_Callback @@ -153,17 +180,17 @@ typedef struct OH_NativeXComponent_MouseEvent_Callback OH_NativeXComponent_Mouse **Description** -Registers a callback for the mouse event. +Registers callbacks for the mouse event. -**Since:** +**Since** 9 ## Enum Description -### anonymous enum +### anonymous enum ``` anonymous enum @@ -173,43 +200,411 @@ anonymous enum Enumerates the API access states. -| Name | Description | -| ---------------------------------------- | ---------- | -| OH_NATIVEXCOMPONENT_RESULT_SUCCESS | Success result. | -| OH_NATIVEXCOMPONENT_RESULT_FAILED | Failure. | -| OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER | Invalid parameter. | +| Value | Description | +| ---------------------------------------- | ----- | +| OH_NATIVEXCOMPONENT_RESULT_SUCCESS | Success.| +| OH_NATIVEXCOMPONENT_RESULT_FAILED | Failure.| +| OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER | Invalid parameter.| -**Since:** +**Since** 8 -### OH_NativeXComponent_EventSourceType -OH_NativeXComponent_EventSourceType +### OH_NativeXComponent_EventSourceType - ``` enum OH_NativeXComponent_EventSourceType ``` **Description** -Enumerates the source types of the touch event. +Enumerates the touch event source types. -| Name | Description | -| -------- | -------- | -| OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN | Unknown source type. | -| OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE | Source that generates a mouse multi-touch event. | -| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN | Source that generates a touchscreen multi-touch event. | -| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD | Source that generates a touchpad multi-touch event. | -| OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK | Source that generates a joystick multi-touch event. | +| Value | Description | +| ---------------------------------------- | ------------------- | +| OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN | Unknown source type. | +| OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE | Source that generates a mouse multi-click event. | +| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN | Source that generates a touchscreen multi-touch event.| +| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD | Source that generates a touchpad multi-touch event.| +| OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK | Source that generates a joystick multi-touch event.| +| OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD | Source that generates a key event. | -**Since:** +**Since** 9 -### OH_NativeXComponent_MouseEventAction +### OH_NativeXComponent_KeyAction + +``` +enum OH_NativeXComponent_KeyAction +``` + +**Description** + +Enumerates the key event actions. + +| Value | Description | +| -------------------------------------- | -------- | +| OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN | Unknown key event action.| +| OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN | Button press. | +| OH_NATIVEXCOMPONENT_KEY_ACTION_UP | Button release. | + +**Since** + +10 + + +### OH_NativeXComponent_KeyCode + +``` +enum OH_NativeXComponent_KeyCode +``` + +**Description** + +Enumerates the mouse event key codes. + +| Value | Description | +| ---------------------------- | --------------------------- | +| KEY_UNKNOWN | Unknown key. | +| KEY_FN | Function (Fn) key. | +| KEY_HOME | Function (Home) key. | +| KEY_BACK | Back key. | +| KEY_MEDIA_PLAY_PAUSE | Multimedia key - play/pause. | +| KEY_MEDIA_STOP | Multimedia key - stop. | +| KEY_MEDIA_NEXT | Multimedia key - next song. | +| KEY_MEDIA_PREVIOUS | Multimedia key - previous song. | +| KEY_MEDIA_REWIND | Multimedia key - rewind. | +| KEY_MEDIA_FAST_FORWARD | Multimedia key - fast-forward. | +| KEY_VOLUME_UP | Volume Up key. | +| KEY_VOLUME_DOWN | Volume Down key. | +| KEY_POWER | Power key. | +| KEY_CAMERA | Camera key. | +| KEY_VOLUME_MUTE | Speaker Mute key. | +| KEY_MUTE | Microphone Mute key. | +| KEY_BRIGHTNESS_UP | Brightness key - turn up. | +| KEY_BRIGHTNESS_DOWN | Brightness key - turn down. | +| KEY_0 | Key **0**. | +| KEY_1 | Key **1**. | +| KEY_2 | Key **2**. | +| KEY_3 | Key **3**. | +| KEY_4 | Key **4**. | +| KEY_5 | Key **5**. | +| KEY_6 | Key **6**. | +| KEY_7 | Key **7**. | +| KEY_8 | Key **8**. | +| KEY_9 | Key **9**. | +| KEY_STAR | Key **\***. | +| KEY_POUND | Key **\#**. | +| KEY_DPAD_UP | Navigation key - up. | +| KEY_DPAD_DOWN | Navigation key - down. | +| KEY_DPAD_LEFT | Navigation key - left. | +| KEY_DPAD_RIGHT | Navigation key - right. | +| KEY_DPAD_CENTER | Navigation key - OK. | +| KEY_A | Key **A**. | +| KEY_B | Key **B**. | +| KEY_C | Key **C**. | +| KEY_D | Key **D**. | +| KEY_E | Key **E**. | +| KEY_F | Key **F**. | +| KEY_G | Key **G**. | +| KEY_H | Key **H**. | +| KEY_I | Key **I**. | +| KEY_J | Key **J**. | +| KEY_K | Key **K**. | +| KEY_L | Key **L**. | +| KEY_M | Key **M**. | +| KEY_N | Key **N**. | +| KEY_O | Key **O**. | +| KEY_P | Key **P**. | +| KEY_Q | Key **Q**. | +| KEY_R | Key **R**. | +| KEY_S | Key **S**. | +| KEY_T | Key **T**. | +| KEY_U | Key **U**. | +| KEY_V | Key **V**. | +| KEY_W | Key **W**. | +| KEY_X | Key **X**. | +| KEY_Y | Key **Y**. | +| KEY_Z | Key **Z**. | +| KEY_COMMA | Key **,**. | +| KEY_PERIOD | Key **.**. | +| KEY_ALT_LEFT | Left Alt key. | +| KEY_ALT_RIGHT | Right Alt key. | +| KEY_SHIFT_LEFT | Left Shift key. | +| KEY_SHIFT_RIGHT | Right Shift key. | +| KEY_TAB | Tab key. | +| KEY_SPACE | Space key. | +| KEY_SYM | Symbol key. | +| KEY_EXPLORER | Explorer key, which is used to start the explorer application. | +| KEY_ENVELOPE | Email key, which is used to start the email application. | +| KEY_ENTER | Enter key. | +| KEY_DEL | Delete key. | +| KEY_GRAVE | Key **`**. | +| KEY_MINUS | Key **-**. | +| KEY_EQUALS | Key **=**. | +| KEY_LEFT_BRACKET | Key **[**. | +| KEY_RIGHT_BRACKET | Key **]**. | +| KEY_BACKSLASH | Key **\**. | +| KEY_SEMICOLON | Key **;**. | +| KEY_APOSTROPHE | Key **'**. | +| KEY_SLASH | Key **/**. | +| KEY_AT | Key **\@**. | +| KEY_PLUS | Key **+**. | +| KEY_MENU | Menu key. | +| KEY_PAGE_UP | Page Up key. | +| KEY_PAGE_DOWN | Page Down key. | +| KEY_ESCAPE | ESC key. | +| KEY_FORWARD_DEL | Delete key. | +| KEY_CTRL_LEFT | Left Ctrl key. | +| KEY_CTRL_RIGHT | Right Ctrl key. | +| KEY_CAPS_LOCK | Caps Lock key. | +| KEY_SCROLL_LOCK | Scroll Lock key. | +| KEY_META_LEFT | Left Meta key. | +| KEY_META_RIGHT | Right Meta key. | +| KEY_FUNCTION | Function key. | +| KEY_SYSRQ | System Request/Print Screen key. | +| KEY_BREAK | Break/Pause key. | +| KEY_MOVE_HOME | Move to Home key. | +| KEY_MOVE_END | Move to End key. | +| KEY_INSERT | Insert key. | +| KEY_FORWARD | Forward key. | +| KEY_MEDIA_PLAY | Multimedia key - play. | +| KEY_MEDIA_PAUSE | Multimedia key - pause. | +| KEY_MEDIA_CLOSE | Multimedia key - close. | +| KEY_MEDIA_EJECT | Multimedia key - eject. | +| KEY_MEDIA_RECORD | Multimedia key - record. | +| KEY_F1 | F1 key. | +| KEY_F2 | F2 key. | +| KEY_F3 | F3 key. | +| KEY_F4 | F4 key. | +| KEY_F5 | F5 key. | +| KEY_F6 | F6 key. | +| KEY_F7 | F7 key. | +| KEY_F8 | F8 key. | +| KEY_F9 | F9 key. | +| KEY_F10 | F10 key. | +| KEY_F11 | F11 key. | +| KEY_F12 | F12 key. | +| KEY_NUM_LOCK | Number Lock key. | +| KEY_NUMPAD_0 | Key **0** on numeric keypad. | +| KEY_NUMPAD_1 | Key **1** on numeric keypad. | +| KEY_NUMPAD_2 | Key **2** on numeric keypad. | +| KEY_NUMPAD_3 | Key **3** on numeric keypad. | +| KEY_NUMPAD_4 | Key **4** on numeric keypad. | +| KEY_NUMPAD_5 | Key **5** on numeric keypad. | +| KEY_NUMPAD_6 | Key **6** on numeric keypad. | +| KEY_NUMPAD_7 | Key **7** on numeric keypad. | +| KEY_NUMPAD_8 | Key **8** on numeric keypad. | +| KEY_NUMPAD_9 | Key **9** on numeric keypad. | +| KEY_NUMPAD_DIVIDE | Key **/** on numeric keypad. | +| KEY_NUMPAD_MULTIPLY | Key ***** on numeric keypad. | +| KEY_NUMPAD_SUBTRACT | Key **-** on numeric keypad. | +| KEY_NUMPAD_ADD | Key **+** on numeric keypad. | +| KEY_NUMPAD_DOT | Key **.** on numeric keypad. | +| KEY_NUMPAD_COMMA | Key **,** on numeric keypad. | +| KEY_NUMPAD_ENTER | Enter key on numeric keypad. | +| KEY_NUMPAD_EQUALS | Key **=** on numeric keypad. | +| KEY_NUMPAD_LEFT_PAREN | Key **(** on numeric keypad. | +| KEY_NUMPAD_RIGHT_PAREN | Key **)** on numeric keypad. | +| KEY_VIRTUAL_MULTITASK | Multi-task key. | +| KEY_SLEEP | Sleep key. | +| KEY_ZENKAKU_HANKAKU | Zenkaku/Hankaku key. | +| KEY_102ND | 102nd key. | +| KEY_RO | Ro key. | +| KEY_KATAKANA | Katakana key. | +| KEY_HIRAGANA | Hiragana key. | +| KEY_HENKAN | Henkan key. | +| KEY_KATAKANA_HIRAGANA | Katakana/Hiragana key. | +| KEY_MUHENKAN | Muhenkan key. | +| KEY_LINEFEED | Linefeed key. | +| KEY_MACRO | Macro key. | +| KEY_NUMPAD_PLUSMINUS | Plus/Minus key on the numeric keypad. | +| KEY_SCALE | Scale key. | +| KEY_HANGUEL | Hanguel key. | +| KEY_HANJA | Hanja key. | +| KEY_YEN | Yen key. | +| KEY_STOP | Stop key. | +| KEY_AGAIN | Again key. | +| KEY_PROPS | Props key. | +| KEY_UNDO | Undo key. | +| KEY_COPY | Copy key. | +| KEY_OPEN | Open key. | +| KEY_PASTE | Paste key. | +| KEY_FIND | Find key. | +| KEY_CUT | Cut key. | +| KEY_HELP | Help key. | +| KEY_CALC | Calc key, which is used to start the calculator application. | +| KEY_FILE | File key. | +| KEY_BOOKMARKS | Bookmarks key. | +| KEY_NEXT | Next key. | +| KEY_PLAYPAUSE | Play/Pause key. | +| KEY_PREVIOUS | Previous key. | +| KEY_STOPCD | Stop CD key. | +| KEY_CONFIG | Config key. | +| KEY_REFRESH | Refresh key. | +| KEY_EXIT | Exit key. | +| KEY_EDIT | Edit key. | +| KEY_SCROLLUP | Scroll Up key. | +| KEY_SCROLLDOWN | Scroll Down key. | +| KEY_NEW | New key. | +| KEY_REDO | Redo key. | +| KEY_CLOSE | Close key. | +| KEY_PLAY | Play key. | +| KEY_BASSBOOST | Bass Boost key. | +| KEY_PRINT | Print key. | +| KEY_CHAT | Chat key. | +| KEY_FINANCE | Finance key. | +| KEY_CANCEL | Cancel key. | +| KEY_KBDILLUM_TOGGLE | Keyboard Illumination Toggle key. | +| KEY_KBDILLUM_DOWN | Keyboard Illumination Up key. | +| KEY_KBDILLUM_UP | Keyboard Illumination Down key. | +| KEY_SEND | Send key. | +| KEY_REPLY | Reply key. | +| KEY_FORWARDMAIL | Forward Mail key. | +| KEY_SAVE | Save key. | +| KEY_DOCUMENTS | Documents key. | +| KEY_VIDEO_NEXT | Next Video key. | +| KEY_VIDEO_PREV | Previous Video key. | +| KEY_BRIGHTNESS_CYCLE | Brightness Cycle key. | +| KEY_BRIGHTNESS_ZERO | Brightness Zero key. | +| KEY_DISPLAY_OFF | Display Off Key. | +| KEY_BTN_MISC | Misc Button key. | +| KEY_GOTO | Goto key. | +| KEY_INFO | Info key. | +| KEY_PROGRAM | Program key. | +| KEY_PVR | PVR key. | +| KEY_SUBTITLE | Subtitle key. | +| KEY_FULL_SCREEN | Full Screen key. | +| KEY_KEYBOARD | Keyboard. | +| KEY_ASPECT_RATIO | Aspect Ratio key. | +| KEY_PC | Port Control key. | +| KEY_TV | TV key. | +| KEY_TV2 | TV key 2. | +| KEY_VCR | VCR key. | +| KEY_VCR2 | VCR key 2. | +| KEY_SAT | SAT key. | +| KEY_CD | CD key. | +| KEY_TAPE | Tape key. | +| KEY_TUNER | Tuner key. | +| KEY_PLAYER | Player key. | +| KEY_DVD | DVD key. | +| KEY_AUDIO | Audio key. | +| KEY_VIDEO | Video key. | +| KEY_MEMO | Memo key. | +| KEY_CALENDAR | Calendar key. | +| KEY_RED | Red indicator. | +| KEY_GREEN | Green indicator. | +| KEY_YELLOW | Yellow indicator. | +| KEY_BLUE | Blue indicator. | +| KEY_CHANNELUP | Channel Up key. | +| KEY_CHANNELDOWN | Channel Down key. | +| KEY_LAST | Last key. | +| KEY_RESTART | Restart key. | +| KEY_SLOW | Slow key. | +| KEY_SHUFFLE | Shuffle key. | +| KEY_VIDEOPHONE | Videophone key. | +| KEY_GAMES | Games key. | +| KEY_ZOOMIN | Zoom in key. | +| KEY_ZOOMOUT | Zoom out key. | +| KEY_ZOOMRESET | Zoom Reset key. | +| KEY_WORDPROCESSOR | Word Processor key. | +| KEY_EDITOR | Editor key. | +| KEY_SPREADSHEET | Spreadsheet key. | +| KEY_GRAPHICSEDITOR | Graphics Editor key. | +| KEY_PRESENTATION | Presentation key. | +| KEY_DATABASE | Database key. | +| KEY_NEWS | News key. | +| KEY_VOICEMAIL | Voicemail key. | +| KEY_ADDRESSBOOK | Address book key. | +| KEY_MESSENGER | Messenger key. | +| KEY_BRIGHTNESS_TOGGLE | Brightness Toggle key. | +| KEY_SPELLCHECK | Spell Check key. | +| KEY_COFFEE | Coffee key, which is used to launch screen lock or screen saver. | +| KEY_MEDIA_REPEAT | Media Repeat key. | +| KEY_IMAGES | Images key. | +| KEY_BUTTONCONFIG | Button Configuration key. | +| KEY_TASKMANAGER | Task Manager key. | +| KEY_JOURNAL | Log key. | +| KEY_CONTROLPANEL | Control Panel key. | +| KEY_APPSELECT | App Select key. | +| KEY_SCREENSAVER | Screen Saver key. | +| KEY_ASSISTANT | Assistant key. | +| KEY_KBD_LAYOUT_NEXT | Next Keyboard Layout key. | +| KEY_BRIGHTNESS_MIN | Min Brightness key. | +| KEY_BRIGHTNESS_MAX | Max Brightness key. | +| KEY_KBDINPUTASSIST_PREV | Keyboard Input-assisted Previous key. | +| KEY_KBDINPUTASSIST_NEXT | Keyboard Input-assisted Next key. | +| KEY_KBDINPUTASSIST_PREVGROUP | Keyboard Input-assisted Previous key. | +| KEY_KBDINPUTASSIST_NEXTGROUP | Keyboard Input-assisted Next key. | +| KEY_KBDINPUTASSIST_ACCEPT | Keyboard Input-assisted Accept key. | +| KEY_KBDINPUTASSIST_CANCEL | Keyboard Input-assisted Cancel key. | +| KEY_FRONT | Front key, which is used to launch the windshield defogger. | +| KEY_SETUP | Setup key. | +| KEY_WAKEUP | Wakeup key. | +| KEY_SENDFILE | Send File key. | +| KEY_DELETEFILE | Delete File key. | +| KEY_XFER | XFER key, which is used to start file transfer. | +| KEY_PROG1 | Program key 1. | +| KEY_PROG2 | Program key 2. | +| KEY_MSDOS | MS-DOS key. | +| KEY_SCREENLOCK | Screen Lock key. | +| KEY_DIRECTION_ROTATE_DISPLAY | Directional Rotation Display key. | +| KEY_CYCLEWINDOWS | Windows Cycle key. | +| KEY_COMPUTER | Keys. | +| KEY_EJECTCLOSECD | Eject CD key. | +| KEY_ISO | ISO key. | +| KEY_MOVE | Move key. | +| KEY_F13 | F13 key. | +| KEY_F14 | F14 key. | +| KEY_F15 | F15 key. | +| KEY_F16 | F16 key. | +| KEY_F17 | F17 key. | +| KEY_F18 | F18 key. | +| KEY_F19 | F19 key. | +| KEY_F20 | F20 key. | +| KEY_F21 | F21 key. | +| KEY_F22 | F22 key. | +| KEY_F23 | F23 key. | +| KEY_F24 | F24 key. | +| KEY_PROG3 | Program key 3. | +| KEY_PROG4 | Program key 4. | +| KEY_DASHBOARD | Dashboard. | +| KEY_SUSPEND | Suspend key. | +| KEY_HP | HP key. | +| KEY_SOUND | Sound key. | +| KEY_QUESTION | Question key. | +| KEY_CONNECT | Connect key. | +| KEY_SPORT | Sport key. | +| KEY_SHOP | Shop key. | +| KEY_ALTERASE | Alternate key. | +| KEY_SWITCHVIDEOMODE | Switch Video Mode key (monitor, LCD, and TV, etc.).| +| KEY_BATTERY | Battery key. | +| KEY_BLUETOOTH | Bluetooth key. | +| KEY_WLAN | WLAN key. | +| KEY_UWB | Ultra-wideband key. | +| KEY_WWAN_WIMAX | WWAN WiMAX key. | +| KEY_RFKILL | RF Kill key. | +| KEY_CHANNEL | Channel key. | +| KEY_BTN_0 | Button 0. | +| KEY_BTN_1 | Button 1. | +| KEY_BTN_2 | Button 2. | +| KEY_BTN_3 | Button 3. | +| KEY_BTN_4 | Button 4. | +| KEY_BTN_5 | Button 5. | +| KEY_BTN_6 | Button 6. | +| KEY_BTN_7 | Button 7. | +| KEY_BTN_8 | Button 8. | +| KEY_BTN_9 | Button 9. | + +**Since** + +10 + + +### OH_NativeXComponent_MouseEventAction ``` enum OH_NativeXComponent_MouseEventAction @@ -219,21 +614,20 @@ enum OH_NativeXComponent_MouseEventAction Enumerates the mouse event actions. -| Name | Description | -| --------------------------------- | -------------------------------- | -| OH_NATIVEXCOMPONENT_MOUSE_NONE | Invalid mouse event. | -| OH_NATIVEXCOMPONENT_MOUSE_PRESS | The mouse event is triggered when a mouse button is pressed. | -| OH_NATIVEXCOMPONENT_MOUSE_RELEASE | The mouse event is triggered when a mouse button is released. | -| OH_NATIVEXCOMPONENT_MOUSE_MOVE | The mouse event is triggered when the mouse moves on the screen. | +| Value | Description | +| --------------------------------- | ---------------- | +| OH_NATIVEXCOMPONENT_MOUSE_NONE | Invalid mouse event. | +| OH_NATIVEXCOMPONENT_MOUSE_PRESS | Mouse button press. | +| OH_NATIVEXCOMPONENT_MOUSE_RELEASE | Mouse button release. | +| OH_NATIVEXCOMPONENT_MOUSE_MOVE | Mouse movement.| -**Since:** +**Since** 9 ### OH_NativeXComponent_MouseEventButton - ``` enum OH_NativeXComponent_MouseEventButton ``` @@ -242,23 +636,22 @@ enum OH_NativeXComponent_MouseEventButton Enumerates the mouse event buttons. -| Name | Description | -| ---------------------------------- | ---------------------------------- | -| OH_NATIVEXCOMPONENT_NONE_BUTTON | The mouse event is triggered when no mouse button is pressed. | -| OH_NATIVEXCOMPONENT_LEFT_BUTTON | The mouse event is triggered when the left mouse button is pressed. | -| OH_NATIVEXCOMPONENT_RIGHT_BUTTON | The mouse event is triggered when the right mouse button is pressed. | -| OH_NATIVEXCOMPONENT_MIDDLE_BUTTON | The mouse event is triggered when the middle mouse button is pressed. | -| OH_NATIVEXCOMPONENT_BACK_BUTTON | The mouse event is triggered when the back button on the left of the mouse is pressed. | -| OH_NATIVEXCOMPONENT_FORWARD_BUTTON | The mouse event is triggered when the forward button on the left of the mouse is pressed. | +| Value | Description | +| ---------------------------------- | ----------------- | +| OH_NATIVEXCOMPONENT_NONE_BUTTON | No button. | +| OH_NATIVEXCOMPONENT_LEFT_BUTTON | Left mouse button. | +| OH_NATIVEXCOMPONENT_RIGHT_BUTTON | Right mouse button. | +| OH_NATIVEXCOMPONENT_MIDDLE_BUTTON | Middle mouse button. | +| OH_NATIVEXCOMPONENT_BACK_BUTTON | Back button on the left of the mouse.| +| OH_NATIVEXCOMPONENT_FORWARD_BUTTON | Forward key on the left of the mouse.| -**Since:** +**Since** 9 ### OH_NativeXComponent_TouchEventType - ``` enum OH_NativeXComponent_TouchEventType ``` @@ -267,42 +660,42 @@ enum OH_NativeXComponent_TouchEventType Enumerates the touch event types. -| Name | Description | -| --------------------------- | ------------------------------------------ | -| OH_NATIVEXCOMPONENT_DOWN | The touch event is triggered when a finger is pressed. | -| OH_NATIVEXCOMPONENT_UP | The touch event is triggered when a finger is lifted. | -| OH_NATIVEXCOMPONENT_MOVE | The touch event is triggered when a finger is pressed and moves on the screen. | +| Value | Description | +| --------------------------- | --------------------- | +| OH_NATIVEXCOMPONENT_DOWN | The touch event is triggered when a finger is pressed. | +| OH_NATIVEXCOMPONENT_UP | The touch event is triggered when a finger is lifted. | +| OH_NATIVEXCOMPONENT_MOVE | The touch event is triggered when a finger is moved on the screen.| | OH_NATIVEXCOMPONENT_CANCEL | The event is triggered when a touch event is canceled. | -| OH_NATIVEXCOMPONENT_UNKNOWN | Invalid touch type. | +| OH_NATIVEXCOMPONENT_UNKNOWN | Invalid touch type. | -**Since:** +**Since** 8 + ### OH_NativeXComponent_TouchPointToolType - ``` enum OH_NativeXComponent_TouchPointToolType ``` **Description** -Enumerates the contact point tool types. +Enumerates the touch point tool types. -| Name | Description | -| -------- | -------- | -| OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN | Unknown tool type. | -| OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER | Finger. | -| OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN | Stylus. | -| OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER | Eraser. | -| OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH | Brush. | -| OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL | Pencil. | -| OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH | Air brush. | -| OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE | Mouse. | -| OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS | Lens. | +| Value | Description | +| -------------------------------------- | -------- | +| OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN | Unknown tool type.| +| OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER | Finger. | +| OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN | Stylus. | +| OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER | Rubber. | +| OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH | Brush. | +| OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL | Pencil. | +| OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH | Air brush. | +| OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE | Mouse. | +| OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS | Lens. | -**Since:** +**Since** 9 @@ -310,8 +703,163 @@ Enumerates the contact point tool types. ## Function Description -### OH_NativeXComponent_GetMouseEvent() +### OH_NativeXComponent_GetKeyEvent() + +``` +int32_t OH_NativeXComponent_GetKeyEvent (OH_NativeXComponent * component, OH_NativeXComponent_KeyEvent ** keyEvent ) +``` + +**Description** + +Obtains the key event scheduled by ArkUI XComponent. + +**Parameters** + +| Name | Description | +| --------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| keyEvent | Pointer to the current key event. | + +**Returns** + +Returns the status code of the execution. + +**Since** + +10 + + +### OH_NativeXComponent_GetKeyEventAction() + +``` +int32_t OH_NativeXComponent_GetKeyEventAction (OH_NativeXComponent_KeyEvent * keyEvent, OH_NativeXComponent_KeyAction * action ) +``` + +**Description** + +Obtains the action of the specified key event. + +**Parameters** + +| Name | Description | +| -------- | -------------------------------------- | +| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| +| action | Pointer to the key event action. | + +**Returns** + +Returns the status code of the execution. + +**Since** + +10 + + +### OH_NativeXComponent_GetKeyEventCode() + +``` +int32_t OH_NativeXComponent_GetKeyEventCode (OH_NativeXComponent_KeyEvent * keyEvent, OH_NativeXComponent_KeyCode * code ) +``` + +**Description** + +Obtains the key code of the specified key event. + +**Parameters** + +| Name | Description | +| -------- | -------------------------------------- | +| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| +| code | Pointer to the key code of the key event. | + +**Returns** + +Returns the status code of the execution. + +**Since** + +10 + + +### OH_NativeXComponent_GetKeyEventDeviceId() + +``` +int32_t OH_NativeXComponent_GetKeyEventDeviceId (OH_NativeXComponent_KeyEvent * keyEvent, int64_t * deviceId ) +``` + +**Description** + +Obtains the device ID of the specified key event. + +**Parameters** + +| Name | Description | +| -------- | -------------------------------------- | +| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| +| deviceId | Pointer to the device ID of the key event. | + +**Returns** + +Returns the status code of the execution. + +**Since** + +10 + + +### OH_NativeXComponent_GetKeyEventSourceType() + +``` +int32_t OH_NativeXComponent_GetKeyEventSourceType (OH_NativeXComponent_KeyEvent * keyEvent, OH_NativeXComponent_EventSourceType * sourceType ) +``` + +**Description** + +Obtains the source type of the specified key event. + +**Parameters** + +| Name | Description | +| ---------- | -------------------------------------- | +| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| +| sourceType | Pointer to the source type of the key event. | + +**Returns** + +Returns the status code of the execution. +**Since** + +10 + + +### OH_NativeXComponent_GetKeyEventTimeStamp() + +``` +int32_t OH_NativeXComponent_GetKeyEventTimeStamp (OH_NativeXComponent_KeyEvent * keyEvent, int64_t * timeStamp ) +``` + +**Description** + +Obtains the timestamp of the specified key event. + +**Parameters** + +| Name | Description | +| --------- | -------------------------------------- | +| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| +| timeStamp | Pointer to the timestamp of the key event. | + +**Returns** + +Returns the status code of the execution. + +**Since** + +10 + + +### OH_NativeXComponent_GetMouseEvent() ``` int32_t OH_NativeXComponent_GetMouseEvent (OH_NativeXComponent * component, const void * window, OH_NativeXComponent_MouseEvent * mouseEvent ) @@ -323,24 +871,23 @@ Obtains the mouse event scheduled by ArkUI XComponent. **Parameters** -| Name | Description | -| ---------- | --------------------------------------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| window | Indicates the pointer to a **NativeWindow** handle. | -| mouseEvent | Indicates the pointer to the current mouse event. | +| Name | Description | +| ---------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| window | Handle to the **NativeWindow** instance. | +| mouseEvent | Pointer to the current mouse event. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 9 ### OH_NativeXComponent_GetTouchEvent() - ``` int32_t OH_NativeXComponent_GetTouchEvent (OH_NativeXComponent * component, const void * window, OH_NativeXComponent_TouchEvent * touchEvent ) ``` @@ -351,79 +898,77 @@ Obtains the touch event scheduled by the ArkUI XComponent. **Parameters** -| Name | Description | -| ---------- | --------------------------------------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| window | Indicates the pointer to a **NativeWindow** handle. | -| touchEvent | Indicates the pointer to the current touch event. | +| Name | Description | +| ---------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| window | Handle to the **NativeWindow** instance. | +| touchEvent | Pointer to the current touch event. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 8 + ### OH_NativeXComponent_GetTouchPointTiltX() - ``` int32_t OH_NativeXComponent_GetTouchPointTiltX (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltX ) ``` **Description** -Obtains the angle between the tilt of the ArkUI XComponent touch point and the x-axis. +Obtains the angle between the Y-Z plane of the ArkUI XComponent touch point and the x-axis. **Parameters** -| Name | Description | -| -------- | -------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| pointIndex | Indicates the index of the pointer to a touch point. | -| tiltX | Indicates the pointer to the tilt along the x-axis. | +| Name | Description | +| ---------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| pointIndex | Pointer to the index of the touch point. | +| tiltX | Pointer to the angle between the Y-Z plane of the touch point and the x-axis. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 9 ### OH_NativeXComponent_GetTouchPointTiltY() - ``` -int32_t OH_NativeXComponent_GetTouchPointTiltX (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltY ) +int32_t OH_NativeXComponent_GetTouchPointTiltY (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltY ) ``` **Description** -Obtains the angle between the tilt of the ArkUI XComponent touch point and the y-axis. +Obtains the angle between the X-Z plane of the ArkUI XComponent touch point and the x-axis. **Parameters** -| Name | Description | -| -------- | -------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| pointIndex | Indicates the index of the pointer to a touch point. | -| tiltY | Indicates the pointer to the tilt along the y-axis. | +| Name | Description | +| ---------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| pointIndex | Pointer to the index of the touch point. | +| tiltY | Pointer to the angle between the X-Z plane of the touch point and the y-axis. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 9 ### OH_NativeXComponent_GetTouchPointToolType() - ``` int32_t OH_NativeXComponent_GetTouchPointToolType (OH_NativeXComponent * component, uint32_t pointIndex, OH_NativeXComponent_TouchPointToolType * toolType ) ``` @@ -434,52 +979,50 @@ Obtains the ArkUI XComponent touch point tool type. **Parameters** -| Name | Description | -| -------- | -------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| pointIndex | Indicates the index of the pointer to a touch point. | -| toolType | Indicates the pointer to the tool type. | +| Name | Description | +| ---------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| pointIndex | Pointer to the index of the touch point. | +| toolType | Pointer to the tool type. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 9 ### OH_NativeXComponent_GetXComponentId() - ``` int32_t OH_NativeXComponent_GetXComponentId (OH_NativeXComponent * component, char * id, uint64_t * size ) ``` **Description** -Obtains the ID of the ArkUI XComponent. +Obtain the ID of ArkUI XComponent. **Parameters** -| Name | Description | -| --------- | ------------------------------------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| id | Indicates the pointer to the character buffer used to hold the ID of the OH_NativeXComponent instance.
Note that the null terminator is attached to the character buffer, so the size of the character buffer should be at least one unit greater than the length of the real ID.
The recommended size of the character buffer is [OH_XCOMPONENT_ID_LEN_MAX + 1]. | -| size | Indicates the pointer to the length of the ID. | +| Name | Description | +| --------- | ---------------------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance. | +| id | Pointer to the character buffer for storing the ID of the **OH_NativeXComponent** instance. Note that null terminators will be attached to the character buffer, so the size of the character buffer should be at least one unit greater than the length of the real ID. The recommended size is [OH_XCOMPONENT_ID_LEN_MAX + 1].| +| size | Pointer to the length of the ID. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 8 ### OH_NativeXComponent_GetXComponentOffset() - ``` int32_t OH_NativeXComponent_GetXComponentOffset (OH_NativeXComponent * component, const void * window, double * x, double * y ) ``` @@ -490,25 +1033,24 @@ Obtains the offset of the ArkUI XComponent relative to the upper left vertex of **Parameters** -| Name | Description | -| --------- | --------------------------------------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| window | Indicates the pointer to a **NativeWindow** handle. | -| x | Indicates the pointer to the x coordinate of the current surface. | -| y | Indicates the pointer to the y coordinate of the current surface. | +| Name | Description | +| --------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| window | Handle to the **NativeWindow** instance. | +| x | Pointer to the x coordinate of the current surface. | +| y | Pointer to the y coordinate of the current surface. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 8 ### OH_NativeXComponent_GetXComponentSize() - ``` int32_t OH_NativeXComponent_GetXComponentSize (OH_NativeXComponent * component, const void * window, uint64_t * width, uint64_t * height ) ``` @@ -519,24 +1061,49 @@ Obtains the size of the surface held by the ArkUI XComponent. **Parameters** -| Name | Description | -| --------- | --------------------------------------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| window | Indicates the pointer to a **NativeWindow** handle. | -| width | Indicates the pointer to the width of the current surface. | -| height | Indicates the pointer to the height of the current surface. | +| Name | Description | +| --------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| window | Handle to the **NativeWindow** instance. | +| width | Pointer to the width of the current surface. | +| height | Pointer to the height of the current surface. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 8 -### OH_NativeXComponent_RegisterCallback() +### OH_NativeXComponent_RegisterBlurEventCallback() +``` +int32_t OH_NativeXComponent_RegisterBlurEventCallback (OH_NativeXComponent * component, void(*)(OH_NativeXComponent *component, void *window) callback ) +``` + +**Description** + +Registers the focus loss event callback for this **OH_NativeXComponent** instance. + +**Parameters** + +| Name | Description | +| --------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| callback | Pointer to the focus loss event callback. | + +**Returns** + +Returns the status code of the execution. + +**Since** + +8 + + +### OH_NativeXComponent_RegisterCallback() ``` int32_t OH_NativeXComponent_RegisterCallback (OH_NativeXComponent * component, OH_NativeXComponent_Callback * callback ) @@ -548,43 +1115,94 @@ Registers a callback for this **OH_NativeXComponent** instance. **Parameters** -| Name | Description | -| --------- | --------------------------------------------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| callback | Indicates the pointer to the surface lifecycle and touch event callback.| +| Name | Description | +| --------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| callback | Pointer to the surface lifecycle and touch event callback. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 8 -### OH_NativeXComponent_RegisterMouseEventCallback() +### OH_NativeXComponent_RegisterFocusEventCallback() + +``` +int32_t OH_NativeXComponent_RegisterFocusEventCallback (OH_NativeXComponent * component, void(*)(OH_NativeXComponent *component, void *window) callback ) +``` + +**Description** + +Registers the focus obtaining event callback for this **OH_NativeXComponent** instance. + +**Parameters** + +| Name | Description | +| --------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| callback | Pointer to the focus obtaining event callback. | + +**Returns** + +Returns the status code of the execution. + +**Since** + +10 +### OH_NativeXComponent_RegisterKeyEventCallback() + +``` +int32_t OH_NativeXComponent_RegisterKeyEventCallback (OH_NativeXComponent * component, void(*)(OH_NativeXComponent *component, void *window) callback ) +``` + +**Description** + +Registers the key event callback for this **OH_NativeXComponent** instance. + +**Parameters** + +| Name | Description | +| --------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| callback | Pointer to the key event callback. | + +**Returns** + +Returns the status code of the execution. + +**Since** + +10 + + +### OH_NativeXComponent_RegisterMouseEventCallback() + ``` int32_t OH_NativeXComponent_RegisterMouseEventCallback (OH_NativeXComponent * component, OH_NativeXComponent_MouseEvent_Callback * callback ) ``` **Description** -Registers a mouse event callback for this **OH_NativeXComponent** instance. +Registers the mouse event callback for this **OH_NativeXComponent** instance. **Parameters** -| Name | Description | -| --------- | --------------------------------------- | -| component | Indicates the pointer to an **OH_NativeXComponent** instance. | -| callback | Indicates the pointer to the mouse event callback. | +| Name | Description | +| --------- | ----------------------------- | +| component | Pointer to the **OH_NativeXComponent** instance.| +| callback | Pointer to the mouse event callback. | **Returns** -Returns the status code of the operation. +Returns the status code of the execution. -**Since:** +**Since** 9 @@ -594,23 +1212,25 @@ Returns the status code of the operation. ### OH_XCOMPONENT_ID_LEN_MAX - ``` const uint32_t OH_XCOMPONENT_ID_LEN_MAX = 128 ``` + **Description** -Maximum length of an ArkUI XComponent ID. -**Since:** +Maximum length of the ArkUI XComponent ID. + + +**Since** + 8 ### OH_MAX_TOUCH_POINTS_NUMBER - ``` const uint32_t OH_MAX_TOUCH_POINTS_NUMBER = 10 ``` @@ -619,46 +1239,43 @@ const uint32_t OH_MAX_TOUCH_POINTS_NUMBER = 10 Maximum number of identifiable touch points in a touch event. -**Since:** +**Since** 8 ### action - ``` OH_NativeXComponent_MouseEventAction OH_NativeXComponent_MouseEvent::action ``` **Description** -Current mouse event action. +Action of the mouse event. -**Since:** +**Since** 8 ### button - ``` OH_NativeXComponent_MouseEventButton OH_NativeXComponent_MouseEvent::button ``` **Description** -Mouse event button +Mouse event button. -**Since:** +**Since** 8 ### deviceId - ``` int64_t OH_NativeXComponent_TouchEvent::deviceId = 0 ``` @@ -667,14 +1284,13 @@ int64_t OH_NativeXComponent_TouchEvent::deviceId = 0 ID of the device where the current touch event is triggered. -**Since:** +**Since** 8 ### DispatchHoverEvent - ``` void(* OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent) (OH_NativeXComponent *component, bool isHover) ``` @@ -683,14 +1299,13 @@ void(* OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent) (OH_NativeXC Invoked when a hover event is triggered. -**Since:** +**Since** 8 ### DispatchMouseEvent - ``` void(* OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent) (OH_NativeXComponent *component, void *window) ``` @@ -699,14 +1314,13 @@ void(* OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent) (OH_NativeXC Invoked when a mouse event is triggered. -**Since:** +**Since** 8 ### DispatchTouchEvent - ``` void(* OH_NativeXComponent_Callback::DispatchTouchEvent) (OH_NativeXComponent *component, void *window) ``` @@ -715,46 +1329,43 @@ void(* OH_NativeXComponent_Callback::DispatchTouchEvent) (OH_NativeXComponent *c Invoked when a touch event is triggered. -**Since:** +**Since** 8 ### force [1/2] - ``` float OH_NativeXComponent_TouchPoint::force = 0.0 ``` **Description** -Pressure of the current touch event. +Pressure of the touch event. -**Since:** +**Since** 8 ### force [2/2] - ``` float OH_NativeXComponent_TouchEvent::force = 0.0 ``` **Description** -Pressure of the current touch event. +Pressure of the touch event. -**Since:** +**Since** 8 ### id [1/2] - ``` int32_t OH_NativeXComponent_TouchPoint::id = 0 ``` @@ -763,14 +1374,13 @@ int32_t OH_NativeXComponent_TouchPoint::id = 0 Unique identifier of the finger. -**Since:** +**Since** 8 ### id [2/2] - ``` int32_t OH_NativeXComponent_TouchEvent::id = 0 ``` @@ -779,14 +1389,13 @@ int32_t OH_NativeXComponent_TouchEvent::id = 0 Unique identifier of the finger. -**Since:** +**Since** 8 ### isPressed - ``` bool OH_NativeXComponent_TouchPoint::isPressed = false ``` @@ -795,14 +1404,13 @@ bool OH_NativeXComponent_TouchPoint::isPressed = false Whether the current point is pressed. -**Since:** +**Since** 8 ### numPoints - ``` uint32_t OH_NativeXComponent_TouchEvent::numPoints = 0 ``` @@ -811,14 +1419,13 @@ uint32_t OH_NativeXComponent_TouchEvent::numPoints = 0 Number of current touch points. -**Since:** +**Since** 8 ### OnSurfaceChanged - ``` void(* OH_NativeXComponent_Callback::OnSurfaceChanged) (OH_NativeXComponent *component, void *window) ``` @@ -827,30 +1434,28 @@ void(* OH_NativeXComponent_Callback::OnSurfaceChanged) (OH_NativeXComponent *com Invoked when the surface changes. -**Since:** +**Since** 8 ### OnSurfaceCreated - ``` void(* OH_NativeXComponent_Callback::OnSurfaceCreated) (OH_NativeXComponent *component, void *window) ``` **Description** -Invoked when a surface is created. +Invoked when a surface is created. -**Since:** +**Since** 8 ### OnSurfaceDestroyed - ``` void(* OH_NativeXComponent_Callback::OnSurfaceDestroyed) (OH_NativeXComponent *component, void *window) ``` @@ -859,46 +1464,43 @@ void(* OH_NativeXComponent_Callback::OnSurfaceDestroyed) (OH_NativeXComponent *c Invoked when the surface is destroyed. -**Since:** +**Since** 8 ### screenX [1/3] - ``` float OH_NativeXComponent_TouchPoint::screenX = 0.0 ``` **Description** -X coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. +X coordinate of the touch point relative to the left edge of the application window where the XComponent is located. -**Since:** +**Since** 8 ### screenX [2/3] - ``` float OH_NativeXComponent_TouchEvent::screenX = 0.0 ``` **Description** -X coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. +X coordinate of the touch point relative to the left edge of the screen. -**Since:** +**Since** 8 ### screenX [3/3] - ``` float OH_NativeXComponent_MouseEvent::screenX ``` @@ -907,46 +1509,43 @@ float OH_NativeXComponent_MouseEvent::screenX X coordinate of the clicked point relative to the upper left corner of the screen. -**Since:** +**Since** 8 ### screenY [1/3] - ``` float OH_NativeXComponent_TouchPoint::screenY = 0.0 ``` **Description** -Y coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. +Y coordinate of the touch point relative to the left edge of the application window where the XComponent is located. -**Since:** +**Since** 8 ### screenY [2/3] - ``` float OH_NativeXComponent_TouchEvent::screenY = 0.0 ``` **Description** -Y coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. +Y coordinate of the touch point relative to the upper edge of the screen. -**Since:** +**Since** 8 ### screenY [3/3] - ``` float OH_NativeXComponent_MouseEvent::screenY ``` @@ -955,14 +1554,13 @@ float OH_NativeXComponent_MouseEvent::screenY Y coordinate of the clicked point relative to the upper left corner of the screen. -**Since:** +**Since** 8 ### size [1/2] - ``` double OH_NativeXComponent_TouchPoint::size = 0.0 ``` @@ -971,14 +1569,13 @@ double OH_NativeXComponent_TouchPoint::size = 0.0 Contact area between the finger pad and the screen. -**Since:** +**Since** 8 ### size [2/2] - ``` double OH_NativeXComponent_TouchEvent::size = 0.0 ``` @@ -987,94 +1584,88 @@ double OH_NativeXComponent_TouchEvent::size = 0.0 Contact area between the finger pad and the screen. -**Since:** +**Since** 8 ### timeStamp [1/2] - ``` long long OH_NativeXComponent_TouchPoint::timeStamp = 0 ``` **Description** -Timestamp of the current touch event. +Timestamp of the touch point. -**Since:** +**Since** 8 ### timeStamp [2/2] - ``` long long OH_NativeXComponent_TouchEvent::timeStamp = 0 ``` **Description** -Timestamp of the current touch event. +Timestamp of the touch event. -**Since:** +**Since** 8 ### timestamp - ``` int64_t OH_NativeXComponent_MouseEvent::timestamp ``` **Description** -Timestamp of the current mouse event. +Timestamp of the mouse event. -**Since:** +**Since** 8 ### touchPoints - ``` OH_NativeXComponent_TouchPoint OH_NativeXComponent_TouchEvent::touchPoints[OH_MAX_TOUCH_POINTS_NUMBER] ``` **Description** -Array of the current touch points. +Array of the touch points. -**Since:** +**Since** 8 ### type [1/2] - ``` OH_NativeXComponent_TouchEventType OH_NativeXComponent_TouchPoint::type = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN ``` **Description** -Touch type of the touch event. +Touch type of the touch point. -**Since:** +**Since** 8 ### type [2/2] - ``` OH_NativeXComponent_TouchEventType OH_NativeXComponent_TouchEvent::type = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN ``` @@ -1083,14 +1674,13 @@ OH_NativeXComponent_TouchEventType OH_NativeXComponent_TouchEvent::type = OH_Nat Touch type of the touch event. -**Since:** +**Since** 8 ### x [1/3] - ``` float OH_NativeXComponent_TouchPoint::x = 0.0 ``` @@ -1099,14 +1689,13 @@ float OH_NativeXComponent_TouchPoint::x = 0.0 X coordinate of the touch point relative to the left edge of the XComponent. -**Since:** +**Since** 8 ### x [2/3] - ``` float OH_NativeXComponent_TouchEvent::x = 0.0 ``` @@ -1115,14 +1704,13 @@ float OH_NativeXComponent_TouchEvent::x = 0.0 X coordinate of the touch point relative to the left edge of the XComponent. -**Since:** +**Since** 8 ### x [3/3] - ``` float OH_NativeXComponent_MouseEvent::x ``` @@ -1131,14 +1719,13 @@ float OH_NativeXComponent_MouseEvent::x X coordinate of the clicked point relative to the upper left corner of the component. -**Since:** +**Since** 8 ### y [1/3] - ``` float OH_NativeXComponent_TouchPoint::y = 0.0 ``` @@ -1147,14 +1734,13 @@ float OH_NativeXComponent_TouchPoint::y = 0.0 Y coordinate of the touch point relative to the upper edge of the XComponent. -**Since:** +**Since** 8 ### y [2/3] - ``` float OH_NativeXComponent_TouchEvent::y = 0.0 ``` @@ -1163,14 +1749,13 @@ float OH_NativeXComponent_TouchEvent::y = 0.0 Y coordinate of the touch point relative to the upper edge of the XComponent. -**Since:** +**Since** 8 ### y [3/3] - ``` float OH_NativeXComponent_MouseEvent::y ``` @@ -1179,6 +1764,6 @@ float OH_NativeXComponent_MouseEvent::y Y coordinate of the clicked point relative to the upper left corner of the component. -**Since:** +**Since** -8 \ No newline at end of file +8 diff --git a/en/application-dev/reference/native-apis/_o_h___recorder_info.md b/en/application-dev/reference/native-apis/_o_h___recorder_info.md new file mode 100644 index 0000000000..fd625e1900 --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___recorder_info.md @@ -0,0 +1,68 @@ +# OH_RecorderInfo + + +## Overview + +The **OH_RecorderInfo** struct defines recording file information. + +> **NOTE** +> +> This struct is reserved and will be provided in later versions. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [url](#url) | Defines the URL of the recording file.| +| [urlLen](#urllen) | Defines the URL length.| +| [fileFormat](#fileformat) | Defines the format of the recording file.| + + +## Member Variable Description + + +### fileFormat + +``` +OH_ContainerFormatType OH_RecorderInfo::fileFormat +``` + +**Description** + +Defines the format of the recording file. + + +### url + +``` +char* OH_RecorderInfo::url +``` + +**Description** + +Defines the URL of the recording file. + + +### urlLen + +``` +uint32_t OH_RecorderInfo::urlLen +``` + +**Description** + +Defines the URL length. diff --git a/en/application-dev/reference/native-apis/_o_h___rect.md b/en/application-dev/reference/native-apis/_o_h___rect.md new file mode 100644 index 0000000000..17d2343c9a --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___rect.md @@ -0,0 +1,76 @@ +# OH_Rect + + +## Overview + +The **OH_Rect** struct defines the width, height, and image information of the rectangle used for screen capture. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [x](#x) | int32_t
Defines the X coordinate of the screen capture rectangle.| +| [y](#y) | int32_t
Defines the Y coordinate of the screen capture rectangle.| +| [width](#width) | int32_t
Defines the width of the screen capture rectangle.| +| [height](#height) | int32_t
Defines the height of the screen capture rectangle.| + + +## Member Variable Description + + +### height + +``` +int32_t OH_Rect::height +``` + +**Description** + +Defines the height of the screen capture rectangle. + + +### width + +``` +int32_t OH_Rect::width +``` + +**Description** + +Defines the width of the screen capture rectangle. + + +### x + +``` +int32_t OH_Rect::x +``` + +**Description** + +Defines the X coordinate of the screen capture rectangle. + + +### y + +``` +int32_t OH_Rect::y +``` + +**Description** + +Defines the Y coordinate of the screen capture rectangle. diff --git a/en/application-dev/reference/native-apis/_o_h___video_capture_info.md b/en/application-dev/reference/native-apis/_o_h___video_capture_info.md new file mode 100644 index 0000000000..31add51eb2 --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___video_capture_info.md @@ -0,0 +1,111 @@ +# OH_VideoCaptureInfo + + +## Overview + +The **OH_VideoCaptureInfo** struct defines video capture information. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [displayId](#displayid) | uint64_t
Defines the ID of the physical screen to capture. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_SCREEN**.
**NOTE**: This member variable is reserved and will be provided in later versions.| +| [missionIDs](#missionids) | int32_t \*
Defines the mission ID list. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_WINDOW**.
**NOTE**: This member variable is reserved and will be provided in later versions.| +| [missionIDsLen](#missionidslen) | int32_t
Defines the length of the mission ID list. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_WINDOW**.
**NOTE**: This member variable is reserved and will be provided in later versions.| +| [videoFrameWidth](#videoframewidth) | int32_t
Defines the width of the captured video.| +| [videoFrameHeight](#videoframeheight) | int32_t
Defines the height of the captured video.| +| [videoSource](#videosource) | [OH_VideoSourceType](_a_v_screen_capture.md#oh_videosourcetype)
Defines the video source type. Currently, only RGBA is supported.| + + +## Member Variable Description + + +### displayId + +``` +uint64_t OH_VideoCaptureInfo::displayId +``` + +**Description** + +Defines the ID of the physical screen to capture. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_SCREEN**. + +> **NOTE** +> +> This member variable is reserved and will be provided in later versions. + + +### missionIDs + +``` +int32_t* OH_VideoCaptureInfo::missionIDs +``` + +**Description** + +Defines the mission ID list. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_WINDOW**. + +> **NOTE** +> +> This member variable is reserved and will be provided in later versions. + +### missionIDsLen + +``` +int32_t OH_VideoCaptureInfo::missionIDsLen +``` + +**Description** + +Defines the length of the mission ID list. This member variable is valid when **capturemode** is set to **CAPTURE_SPECIFIED_WINDOW**. + +> **NOTE** +> +> This member variable is reserved and will be provided in later versions. + + +### videoFrameHeight + +``` +int32_t OH_VideoCaptureInfo::videoFrameHeight +``` + +**Description** + +Defines the height of the captured video. + + +### videoFrameWidth + +``` +int32_t OH_VideoCaptureInfo::videoFrameWidth +``` + +**Description** + +Defines the width of the captured video. + + +### videoSource + +``` +OH_VideoSourceType OH_VideoCaptureInfo::videoSource +``` + +**Description** + +Defines the video source type. Currently, only RGBA is supported. diff --git a/en/application-dev/reference/native-apis/_o_h___video_enc_info.md b/en/application-dev/reference/native-apis/_o_h___video_enc_info.md new file mode 100644 index 0000000000..2c6163f9c2 --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___video_enc_info.md @@ -0,0 +1,68 @@ +# OH_VideoEncInfo + + +## Overview + +The **OH_VideoEncInfo** struct defines video encoding parameters. + +> **NOTE** +> +> This struct is reserved and will be provided in later versions. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [videoCodec](#videocodec) | [OH_VideoCodecFormat](_a_v_screen_capture.md#oh_videocodecformat)
Defines the video encoding format.| +| [videoBitrate](#videobitrate) | int32_t
Defines the video bit rate.| +| [videoFrameRate](#videoframerate) | int32_t
Defines the video frame rate.| + + +## Member Variable Description + + +### videoBitrate + +``` +int32_t OH_VideoEncInfo::videoBitrate +``` + +**Description** + +Defines the video bit rate. + + +### videoCodec + +``` +OH_VideoCodecFormat OH_VideoEncInfo::videoCodec +``` + +**Description** + +Defines the video encoding format. + + +### videoFrameRate + +``` +int32_t OH_VideoEncInfo::videoFrameRate +``` + +**Description** + +Defines the video frame rate. diff --git a/en/application-dev/reference/native-apis/_o_h___video_info.md b/en/application-dev/reference/native-apis/_o_h___video_info.md new file mode 100644 index 0000000000..e0b0ac98d6 --- /dev/null +++ b/en/application-dev/reference/native-apis/_o_h___video_info.md @@ -0,0 +1,56 @@ +# OH_VideoInfo + + +## Overview + +The **OH_VideoInfo** struct defines video capture parameters. + +**System capability**: SystemCapability.Multimedia.Media.AVScreenCapture + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Member Variables + +| Name| Description| +| -------- | -------- | +| [videoCapInfo](#videocapinfo) | [OH_VideoCaptureInfo](_o_h___video_capture_info.md)
Defines video capture information.| +| [videoEncInfo](#videoencinfo) | [OH_VideoEncInfo](_o_h___video_enc_info.md)
Defines video encoding parameters.
**NOTE**: This member variable is reserved and will be provided in later versions.| + + +## Member Variable Description + + +### videoCapInfo + +``` +OH_VideoCaptureInfo OH_VideoInfo::videoCapInfo +``` + +**Description** + +Defines video capture information. + + +### videoEncInfo + +``` +OH_VideoEncInfo OH_VideoInfo::videoEncInfo +``` + +**Description** + +Defines video encoding parameters. + +> **NOTE** +> +> This member variable is reserved and will be provided in later versions. diff --git a/en/application-dev/reference/native-apis/_ohos_pixel_map_create_ops.md b/en/application-dev/reference/native-apis/_ohos_pixel_map_create_ops.md index 99a0725313..9090cb9c5b 100644 --- a/en/application-dev/reference/native-apis/_ohos_pixel_map_create_ops.md +++ b/en/application-dev/reference/native-apis/_ohos_pixel_map_create_ops.md @@ -3,7 +3,7 @@ ## Overview -Defines the options used for creating a pixel map. +The **OhosPixelMapCreateOps** struct defines the options used for creating a pixel map. **Since** @@ -19,14 +19,14 @@ Defines the options used for creating a pixel map. ### Member Variables -| Name| Description| +| Name| Description| | -------- | -------- | -| [width](#width) | Image width, in pixels.| -| [height](#height) | Image height, in pixels.| -| [pixelFormat](#pixelformat) | Image format.| -| [editable](#editable) | Editing type of the image.| -| [alphaType](#alphatype) | Alpha type of the image.| -| [scaleMode](#scalemode) | Scale mode of the image.| +| [width](#width) | Image width, in pixels.| +| [height](#height) | Image height, in pixels.| +| [pixelFormat](#pixelformat) | Image format.| +| [editable](#editable) | Editing type of the image.| +| [alphaType](#alphatype) | Alpha type of the image.| +| [scaleMode](#scalemode) | Scale mode of the image.| ## Member Variable Description @@ -34,10 +34,10 @@ Defines the options used for creating a pixel map. ### alphaType - ``` uint32_t OhosPixelMapCreateOps::alphaType ``` + **Description** Alpha type of the image. @@ -45,10 +45,10 @@ Alpha type of the image. ### editable - ``` uint32_t OhosPixelMapCreateOps::editable ``` + **Description** Editing type of the image. @@ -56,10 +56,10 @@ Editing type of the image. ### height - ``` uint32_t OhosPixelMapCreateOps::height ``` + **Description** Image height, in pixels. @@ -67,10 +67,10 @@ Image height, in pixels. ### pixelFormat - ``` int32_t OhosPixelMapCreateOps::pixelFormat ``` + **Description** Image format. @@ -78,10 +78,10 @@ Image format. ### scaleMode - ``` uint32_t OhosPixelMapCreateOps::scaleMode ``` + **Description** Scale mode of the image. @@ -89,10 +89,10 @@ Scale mode of the image. ### width - ``` uint32_t OhosPixelMapCreateOps::width ``` + **Description** -Image width, in pixels. \ No newline at end of file +Image width, in pixels. diff --git a/en/application-dev/reference/native-apis/native__avscreen__capture_8h.md b/en/application-dev/reference/native-apis/native__avscreen__capture_8h.md new file mode 100644 index 0000000000..5ffdae63b4 --- /dev/null +++ b/en/application-dev/reference/native-apis/native__avscreen__capture_8h.md @@ -0,0 +1,36 @@ +# native_avscreen_capture.h + + +## Overview + +The **native_avscreen_capture.h** file declares the native APIs used to create an **OH_AVScreenCapture** instance. + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Functions + +| Name| Description| +| -------- | -------- | +| [OH_AVScreenCapture_Create](_a_v_screen_capture.md#oh_avscreencapture_create) (void) | Creates an **OH_AVScreenCapture** instance.| +| [OH_AVScreenCapture_Init](_a_v_screen_capture.md#oh_avscreencapture_init) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md) config) | Initializes parameters related to an **OH_AVScreenCapture** instance.| +| [OH_AVScreenCapture_StartScreenCapture](_a_v_screen_capture.md#oh_avscreencapture_startscreencapture) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Starts screen capture and collects original streams. After calling this function, the application can use the callback listeners **OH_AVScreenCaptureOnAudioBufferAvailable** and **OH_AVScreenCaptureOnVideoBufferAvailable** to check whether streams are generated.| +| [OH_AVScreenCapture_StopScreenCapture](_a_v_screen_capture.md#oh_avscreencapture_stopscreencapture) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Stops screen capture. This function is used in pair with **OH_AVScreenCapture_StartScreenCapture**. After calling this function, the application stops screen capture or screen share and releases the microphone.| +| [OH_AVScreenCapture_StartScreenRecording](_a_v_screen_capture.md#oh_avscreencapture_startscreenrecording) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Starts screen recording and collects encoded streams.
**NOTE**: This function is reserved and will be provided in later versions.| +| [OH_AVScreenCapture_StopScreenRecording](_a_v_screen_capture.md#oh_avscreencapture_stopscreenrecording) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Stops screen recording. This function is used in pair with **OH_AVScreenCapture_StartScreenRecording**.
**NOTE**: This function is reserved and will be provided in later versions.| +| [OH_AVScreenCapture_AcquireAudioBuffer](_a_v_screen_capture.md#oh_avscreencapture_acquireaudiobuffer) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, [OH_AudioBuffer](_o_h___audio_buffer.md) \*\*audiobuffer, [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) type) | Obtains an audio buffer. When calling this function, the application must allocate the memory of the corresponding struct size to the audio buffer.| +| [OH_AVScreenCapture_AcquireVideoBuffer](_a_v_screen_capture.md#oh_avscreencapture_acquirevideobuffer) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, int32_t \*fence, int64_t \*timestamp, struct [OH_Rect](_o_h___rect.md) \*region) | Obtains a video buffer. An application can call this function to obtain information such as the video buffer and timestamp.| +| [OH_AVScreenCapture_ReleaseAudioBuffer](_a_v_screen_capture.md#oh_avscreencapture_releaseaudiobuffer) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) type) | Releases an audio buffer.| +| [OH_AVScreenCapture_ReleaseVideoBuffer](_a_v_screen_capture.md#oh_avscreencapture_releasevideobuffer) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Releases a video buffer.| +| [OH_AVScreenCapture_SetCallback](_a_v_screen_capture.md#oh_avscreencapture_setcallback) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, struct [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) callback) | Sets a callback to listen for available video buffers and audio buffers and errors that occur during the function calling.| +| [OH_AVScreenCapture_Release](_a_v_screen_capture.md#oh_avscreencapture_release) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture) | Releases an **OH_AVScreenCapture** instance. This function is used in pair with **OH_AVScreenCapture_Create**.| +| [OH_AVScreenCapture_SetMicrophoneEnabled](_a_v_screen_capture.md#oh_avscreencapture_setmicrophoneenabled) (struct [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, bool isMicrophone) | Enables or disables the microphone.| diff --git a/en/application-dev/reference/native-apis/native__avscreen__capture__base_8h.md b/en/application-dev/reference/native-apis/native__avscreen__capture__base_8h.md new file mode 100644 index 0000000000..b9030883c3 --- /dev/null +++ b/en/application-dev/reference/native-apis/native__avscreen__capture__base_8h.md @@ -0,0 +1,76 @@ +# native_avscreen_capture_base.h + + +## Overview + +The **native_avscreen_capture_base.h** file declares the common structs, character constants, and enums used for running screen capture. + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Structs + +| Name| Description| +| -------- | -------- | +| [OH_AudioCaptureInfo](_o_h___audio_capture_info.md) | Defines audio capturing information.| +| [OH_AudioEncInfo](_o_h___audio_enc_info.md) | Defines audio encoding information.
**NOTE**: This struct is reserved and will be provided in later versions.| +| [OH_AudioInfo](_o_h___audio_info.md) | Defines audio capturing parameters.| +| [OH_VideoCaptureInfo](_o_h___video_capture_info.md) | Defines video capturing information.| +| [OH_VideoEncInfo](_o_h___video_enc_info.md) | Defines video encoding information.
**NOTE**: This struct is reserved and will be provided in later versions.| +| [OH_VideoInfo](_o_h___video_info.md) | Defines video capturing parameters.| +| [OH_RecorderInfo](_o_h___recorder_info.md) | Defines recording file information.| +| [OH_AVScreenCaptureConfig](_o_h___a_v_screen_capture_config.md) | Defines the screen capture configuration.| +| [OH_AVScreenCaptureCallback](_o_h___a_v_screen_capture_callback.md) | Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance.| +| [OH_Rect](_o_h___rect.md) | Defines the width, height, and image information of the rectangle used for screen capture.| +| [OH_AudioBuffer](_o_h___audio_buffer.md) | Defines the configuration such as the size, type, and timestamp of audio data.| + + +### Types + +| Name| Description| +| -------- | -------- | +| [OH_NativeBuffer](_a_v_screen_capture.md#oh_nativebuffer) | Defines the native video stream class for screen capture.| +| [OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) | Defines a screen capture instance used to obtain original video and audio streams.| +| [OH_CaptureMode](_a_v_screen_capture.md#oh_capturemode) | Defines an enum that enumerates the screen capture modes.| +| [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) | Defines an enum that enumerates the audio source types during screen capture.| +| [OH_AudioCodecFormat](_a_v_screen_capture.md#oh_audiocodecformat) | Defines an enum that enumerates the audio encoding formats.| +| [OH_VideoCodecFormat](_a_v_screen_capture.md#oh_videocodecformat) | Defines an enum that enumerates the video encoding formats.| +| [OH_DataType](_a_v_screen_capture.md#oh_datatype) | Defines an enum that enumerates the data types of screen capture streams.| +| [OH_VideoSourceType](_a_v_screen_capture.md#oh_videosourcetype) | Defines an enum that enumerates the video source formats.| +| [OH_ContainerFormatType](_a_v_screen_capture.md#oh_containerformattype) | Defines an enum that enumerates the types of files generated during screen capture.
**NOTE**: This type is reserved and will be provided in later versions.| +| [OH_AudioCaptureInfo](_a_v_screen_capture.md#oh_audiocaptureinfo) | Defines audio capturing information.| +| [OH_AudioEncInfo](_a_v_screen_capture.md#oh_audioencinfo) | Defines audio encoding information.
**NOTE**: This type is reserved and will be provided in later versions.| +| [OH_AudioInfo](_a_v_screen_capture.md#oh_audioinfo) | Defines audio capturing parameters.| +| [OH_VideoCaptureInfo](_a_v_screen_capture.md#oh_videocaptureinfo) | Defines video capturing information.| +| [OH_VideoEncInfo](_a_v_screen_capture.md#oh_videoencinfo) | Defines video encoding information.
**NOTE**: This type is reserved and will be provided in later versions.| +| [OH_VideoInfo](_a_v_screen_capture.md#oh_videoinfo) | Defines video capturing parameters.| +| [OH_RecorderInfo](_a_v_screen_capture.md#oh_recorderinfo) | Defines recording file information.| +| [OH_AVScreenCaptureConfig](_a_v_screen_capture.md#oh_avscreencaptureconfig) | Defines the screen recording configuration.| +| (\*[OH_AVScreenCaptureOnError](_a_v_screen_capture.md#oh_avscreencaptureonerror)) ([OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, int32_t errorCode) | Defines a pointer to a callback function that is called when an error occurs during the running of an **OH_AVScreenCapture** instance.| +| (\*[OH_AVScreenCaptureOnAudioBufferAvailable](_a_v_screen_capture.md#oh_avscreencaptureonaudiobufferavailable)) ([OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, bool isReady, [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) type) | Defines a pointer to a callback function that is called when an audio buffer is available during the running of an **OH_AVScreenCapture** instance.| +| (\*[OH_AVScreenCaptureOnVideoBufferAvailable](_a_v_screen_capture.md#oh_avscreencaptureonvideobufferavailable)) ([OH_AVScreenCapture](_a_v_screen_capture.md#oh_avscreencapture) \*capture, bool isReady) | Defines a pointer to a callback function that is called when a video buffer is available during the running of an **OH_AVScreenCapture** instance.| +| [OH_AVScreenCaptureCallback](_a_v_screen_capture.md#oh_avscreencapturecallback) | Defines all the asynchronous callback function pointers of an **OH_AVScreenCapture** instance.| +| [OH_Rect](_a_v_screen_capture.md#oh_rect) | Defines the width, height, and image information of the rectangle used for screen capture.| +| [OH_AudioBuffer](_a_v_screen_capture.md#oh_audiobuffer) | Defines the configuration such as the size, type, and timestamp of audio data.| + + +### Enums + +| Name| Description| +| -------- | -------- | +| [OH_CaptureMode](_a_v_screen_capture.md#oh_capturemode) { [OH_CAPTURE_HOME_SCREEN](_a_v_screen_capture.md) = 0, [OH_CAPTURE_SPECIFIED_SCREEN](_a_v_screen_capture.md) = 1, [OH_CAPTURE_SPECIFIED_WINDOW](_a_v_screen_capture.md) = 2, [OH_CAPTURE_INVAILD](_a_v_screen_capture.md) = -1 } | Enumerates the screen capture modes.| +| [OH_AudioCaptureSourceType](_a_v_screen_capture.md#oh_audiocapturesourcetype) {
[OH_SOURCE_INVALID](_a_v_screen_capture.md) = -1, [OH_SOURCE_DEFAULT](_a_v_screen_capture.md) = 0, [OH_MIC](_a_v_screen_capture.md) = 1, [OH_ALL_PLAYBACK](_a_v_screen_capture.md) = 2,
[OH_APP_PLAYBACK](_a_v_screen_capture.md) = 3
} | Enumerates the audio source types during screen capture.| +| [OH_AudioCodecFormat](_a_v_screen_capture.md#oh_audiocodecformat) { [OH_AUDIO_DEFAULT](_a_v_screen_capture.md) = 0, [OH_AAC_LC](_a_v_screen_capture.md) = 3, [OH_AUDIO_CODEC_FORMAT_BUTT](_a_v_screen_capture.md) } | Enumerates the audio encoding formats.| +| [OH_VideoCodecFormat](_a_v_screen_capture.md#oh_videocodecformat) {
[OH_VIDEO_DEFAULT](_a_v_screen_capture.md) = 0, [OH_H264](_a_v_screen_capture.md) = 2, [OH_H265](_a_v_screen_capture.md) = 4, [OH_MPEG4](_a_v_screen_capture.md) = 6,
[OH_VP8](_a_v_screen_capture.md) = 8, [OH_VP9](_a_v_screen_capture.md) = 10, [OH_VIDEO_CODEC_FORMAT_BUTT](_a_v_screen_capture.md)
} | Enumerates the video encoding formats.| +| [OH_DataType](_a_v_screen_capture.md#oh_datatype) { [OH_ORIGINAL_STREAM](_a_v_screen_capture.md) = 0, [OH_ENCODED_STREAM](_a_v_screen_capture.md) = 1, [OH_CAPTURE_FILE](_a_v_screen_capture.md) = 2, OH_INVAILD = -1 } | Enumerates the data sources of screen capture streams.| +| [OH_VideoSourceType](_a_v_screen_capture.md#oh_videosourcetype) { [OH_VIDEO_SOURCE_SURFACE_YUV](_a_v_screen_capture.md) = 0, [OH_VIDEO_SOURCE_SURFACE_ES](_a_v_screen_capture.md), [OH_VIDEO_SOURCE_SURFACE_RGBA](_a_v_screen_capture.md), [OH_VIDEO_SOURCE_BUTT](_a_v_screen_capture.md) } | Enumerates the video source formats.| +| [OH_ContainerFormatType](_a_v_screen_capture.md#oh_containerformattype) { [CFT_MPEG_4A](_a_v_screen_capture.md) = 0, [CFT_MPEG_4](_a_v_screen_capture.md) = 1 } | Enumerates the types of files generated during screen capture.
**NOTE**: This enum is reserved and will be provided in later versions.| diff --git a/en/application-dev/reference/native-apis/native__avscreen__capture__errors_8h.md b/en/application-dev/reference/native-apis/native__avscreen__capture__errors_8h.md new file mode 100644 index 0000000000..73ac04dcee --- /dev/null +++ b/en/application-dev/reference/native-apis/native__avscreen__capture__errors_8h.md @@ -0,0 +1,31 @@ +# native_avscreen_capture_errors.h + + +## Overview + +The **native_avscreen_capture_errors.h** file declares the error codes generated during screen capture. + +**Since** + +10 + +**Related Modules** + +[AVScreenCapture](_a_v_screen_capture.md) + + +## Summary + + +### Types + +| Name| Description| +| -------- | -------- | +| [OH_AVSCREEN_CAPTURE_ErrCode](_a_v_screen_capture.md#oh_avscreen_capture_errcode) | Defines an enum that enumerates the error codes generated during screen recording.| + + +### Enums + +| Name| Description| +| -------- | -------- | +| [OH_AVSCREEN_CAPTURE_ErrCode](_a_v_screen_capture.md#oh_avscreen_capture_errcode) {
[AV_SCREEN_CAPTURE_ERR_BASE](_a_v_screen_capture.md) = 0, [AV_SCREEN_CAPTURE_ERR_OK](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE, [AV_SCREEN_CAPTURE_ERR_NO_MEMORY](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 1, [AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 2,
[AV_SCREEN_CAPTURE_ERR_INVALID_VAL](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 3, [AV_SCREEN_CAPTURE_ERR_IO](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 4, [AV_SCREEN_CAPTURE_ERR_TIMEOUT](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 5, [AV_SCREEN_CAPTURE_ERR_UNKNOWN](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 6,
[AV_SCREEN_CAPTURE_ERR_SERVICE_DIED](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 7, [AV_SCREEN_CAPTURE_ERR_INVALID_STATE](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 8, [AV_SCREEN_CAPTURE_ERR_UNSUPPORT](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 9, [AV_SCREEN_CAPTURE_ERR_EXTEND_START](_a_v_screen_capture.md) = AV_SCREEN_CAPTURE_ERR_BASE + 100
} | Enumerates the error codes generated during screen recording.| diff --git a/en/application-dev/reference/native-apis/native__xcomponent__key__event_8h.md b/en/application-dev/reference/native-apis/native__xcomponent__key__event_8h.md new file mode 100644 index 0000000000..6a5e639eae --- /dev/null +++ b/en/application-dev/reference/native-apis/native__xcomponent__key__event_8h.md @@ -0,0 +1,25 @@ +# native_xcomponent_key_event.h + + +## Overview + +Declares the enums used for accessing **NativeXComponent** key events. + +**Since** + +10 + +**Related Modules** + +[Native XComponent](_o_h___native_x_component.md) + + +## Summary + + +### Enums + +| Name| Description| +| -------- | -------- | +| [OH_NativeXComponent_KeyCode](_o_h___native_x_component.md#oh_nativexcomponent_keycode) {
KEY_UNKNOWN = -1, KEY_FN = 0, KEY_HOME = 1, KEY_BACK = 2,KEY_MEDIA_PLAY_PAUSE = 10, KEY_MEDIA_STOP = 11, KEY_MEDIA_NEXT = 12, KEY_MEDIA_PREVIOUS = 13,
KEY_MEDIA_REWIND = 14, KEY_MEDIA_FAST_FORWARD = 15, KEY_VOLUME_UP = 16, KEY_VOLUME_DOWN = 17,
KEY_POWER = 18, KEY_CAMERA = 19, KEY_VOLUME_MUTE = 22, KEY_MUTE = 23,KEY_BRIGHTNESS_UP = 40, KEY_BRIGHTNESS_DOWN = 41, KEY_0 = 2000, KEY_1 = 2001,
KEY_2 = 2002, KEY_3 = 2003, KEY_4 = 2004, KEY_5 = 2005,
KEY_6 = 2006, KEY_7 = 2007, KEY_8 = 2008, KEY_9 = 2009,
KEY_STAR = 2010, KEY_POUND = 2011, KEY_DPAD_UP = 2012, KEY_DPAD_DOWN = 2013,KEY_DPAD_LEFT = 2014, KEY_DPAD_RIGHT = 2015, KEY_DPAD_CENTER = 2016,
KEY_A = 2017,
KEY_B = 2018, KEY_C = 2019, KEY_D = 2020, KEY_E = 2021,
KEY_F = 2022, KEY_G = 2023, KEY_H = 2024, KEY_I = 2025,
KEY_J = 2026, KEY_K = 2027, KEY_L = 2028, KEY_M = 2029,
KEY_N = 2030, KEY_O = 2031, KEY_P = 2032, KEY_Q = 2033,
KEY_R = 2034, KEY_S = 2035, KEY_T = 2036, KEY_U = 2037,
KEY_V = 2038, KEY_W = 2039, KEY_X = 2040, KEY_Y = 2041,
KEY_Z = 2042, KEY_COMMA = 2043, KEY_PERIOD = 2044, KEY_ALT_LEFT = 2045,
KEY_ALT_RIGHT = 2046, KEY_SHIFT_LEFT = 2047, KEY_SHIFT_RIGHT = 2048, KEY_TAB = 2049,
KEY_SPACE = 2050, KEY_SYM = 2051, KEY_EXPLORER = 2052, KEY_ENVELOPE = 2053,
KEY_ENTER = 2054, KEY_DEL = 2055, KEY_GRAVE = 2056, KEY_MINUS = 2057,
KEY_EQUALS = 2058, KEY_LEFT_BRACKET = 2059, KEY_RIGHT_BRACKET = 2060, KEY_BACKSLASH = 2061,
KEY_SEMICOLON = 2062, KEY_APOSTROPHE = 2063, KEY_SLASH = 2064, KEY_AT = 2065,
KEY_PLUS = 2066, KEY_MENU = 2067, KEY_PAGE_UP = 2068, KEY_PAGE_DOWN = 2069,
KEY_ESCAPE = 2070, KEY_FORWARD_DEL = 2071, KEY_CTRL_LEFT = 2072, KEY_CTRL_RIGHT = 2073,
KEY_CAPS_LOCK = 2074, KEY_SCROLL_LOCK = 2075, KEY_META_LEFT = 2076, KEY_META_RIGHT = 2077,
KEY_FUNCTION = 2078, KEY_SYSRQ = 2079, KEY_BREAK = 2080, KEY_MOVE_HOME = 2081,
KEY_MOVE_END = 2082, KEY_INSERT = 2083, KEY_FORWARD = 2084, KEY_MEDIA_PLAY = 2085,
KEY_MEDIA_PAUSE = 2086, KEY_MEDIA_CLOSE = 2087, KEY_MEDIA_EJECT = 2088, KEY_MEDIA_RECORD = 2089,
KEY_F1 = 2090, KEY_F2 = 2091, KEY_F3 = 2092, KEY_F4 = 2093,
KEY_F5 = 2094, KEY_F6 = 2095, KEY_F7 = 2096, KEY_F8 = 2097,
KEY_F9 = 2098, KEY_F10 = 2099, KEY_F11 = 2100, KEY_F12 = 2101,
KEY_NUM_LOCK = 2102, KEY_NUMPAD_0 = 2103, KEY_NUMPAD_1 = 2104, KEY_NUMPAD_2 = 2105,
KEY_NUMPAD_3 = 2106, KEY_NUMPAD_4 = 2107, KEY_NUMPAD_5 = 2108, KEY_NUMPAD_6 = 2109,
KEY_NUMPAD_7 = 2110, KEY_NUMPAD_8 = 2111, KEY_NUMPAD_9 = 2112, KEY_NUMPAD_DIVIDE = 2113,
KEY_NUMPAD_MULTIPLY = 2114, KEY_NUMPAD_SUBTRACT = 2115, KEY_NUMPAD_ADD = 2116, KEY_NUMPAD_DOT = 2117,
KEY_NUMPAD_COMMA = 2118, KEY_NUMPAD_ENTER = 2119, KEY_NUMPAD_EQUALS = 2120, KEY_NUMPAD_LEFT_PAREN = 2121,
KEY_NUMPAD_RIGHT_PAREN = 2122, KEY_VIRTUAL_MULTITASK = 2210, KEY_SLEEP = 2600, KEY_ZENKAKU_HANKAKU = 2601,
KEY_102ND = 2602, KEY_RO = 2603, KEY_KATAKANA = 2604, KEY_HIRAGANA = 2605,
KEY_HENKAN = 2606, KEY_KATAKANA_HIRAGANA = 2607, KEY_MUHENKAN = 2608, KEY_LINEFEED = 2609,
KEY_MACRO = 2610, KEY_NUMPAD_PLUSMINUS = 2611, KEY_SCALE = 2612, KEY_HANGUEL = 2613,
KEY_HANJA = 2614, KEY_YEN = 2615, KEY_STOP = 2616, KEY_AGAIN = 2617,
KEY_PROPS = 2618, KEY_UNDO = 2619, KEY_COPY = 2620, KEY_OPEN = 2621,
KEY_PASTE = 2622, KEY_FIND = 2623, KEY_CUT = 2624, KEY_HELP = 2625,
KEY_CALC = 2626, KEY_FILE = 2627, KEY_BOOKMARKS = 2628, KEY_NEXT = 2629,
KEY_PLAYPAUSE = 2630, KEY_PREVIOUS = 2631, KEY_STOPCD = 2632, KEY_CONFIG = 2634,
KEY_REFRESH = 2635, KEY_EXIT = 2636, KEY_EDIT = 2637, KEY_SCROLLUP = 2638,
KEY_SCROLLDOWN = 2639, KEY_NEW = 2640, KEY_REDO = 2641, KEY_CLOSE = 2642,
KEY_PLAY = 2643, KEY_BASSBOOST = 2644, KEY_PRINT = 2645, KEY_CHAT = 2646,
KEY_FINANCE = 2647, KEY_CANCEL = 2648, KEY_KBDILLUM_TOGGLE = 2649, KEY_KBDILLUM_DOWN = 2650,
KEY_KBDILLUM_UP = 2651, KEY_SEND = 2652, KEY_REPLY = 2653, KEY_FORWARDMAIL = 2654,
KEY_SAVE = 2655, KEY_DOCUMENTS = 2656, KEY_VIDEO_NEXT = 2657, KEY_VIDEO_PREV = 2658,
KEY_BRIGHTNESS_CYCLE = 2659, KEY_BRIGHTNESS_ZERO = 2660, KEY_DISPLAY_OFF = 2661, KEY_BTN_MISC = 2662,
KEY_GOTO = 2663, KEY_INFO = 2664, KEY_PROGRAM = 2665, KEY_PVR = 2666,
KEY_SUBTITLE = 2667, KEY_FULL_SCREEN = 2668, KEY_KEYBOARD = 2669, KEY_ASPECT_RATIO = 2670,
KEY_PC = 2671, KEY_TV = 2672, KEY_TV2 = 2673, KEY_VCR = 2674,
KEY_VCR2 = 2675, KEY_SAT = 2676, KEY_CD = 2677, KEY_TAPE = 2678,
KEY_TUNER = 2679, KEY_PLAYER = 2680, KEY_DVD = 2681, KEY_AUDIO = 2682,
KEY_VIDEO = 2683, KEY_MEMO = 2684, KEY_CALENDAR = 2685, KEY_RED = 2686,
KEY_GREEN = 2687, KEY_YELLOW = 2688, KEY_BLUE = 2689, KEY_CHANNELUP = 2690,
KEY_CHANNELDOWN = 2691, KEY_LAST = 2692, KEY_RESTART = 2693, KEY_SLOW = 2694,
KEY_SHUFFLE = 2695, KEY_VIDEOPHONE = 2696, KEY_GAMES = 2697, KEY_ZOOMIN = 2698,
KEY_ZOOMOUT = 2699, KEY_ZOOMRESET = 2700, KEY_WORDPROCESSOR = 2701, KEY_EDITOR = 2702,
KEY_SPREADSHEET = 2703, KEY_GRAPHICSEDITOR = 2704, KEY_PRESENTATION = 2705, KEY_DATABASE = 2706,
KEY_NEWS = 2707, KEY_VOICEMAIL = 2708, KEY_ADDRESSBOOK = 2709, KEY_MESSENGER = 2710,
KEY_BRIGHTNESS_TOGGLE = 2711, KEY_SPELLCHECK = 2712, KEY_COFFEE = 2713, KEY_MEDIA_REPEAT = 2714,
KEY_IMAGES = 2715, KEY_BUTTONCONFIG = 2716, KEY_TASKMANAGER = 2717, KEY_JOURNAL = 2718,
KEY_CONTROLPANEL = 2719, KEY_APPSELECT = 2720, KEY_SCREENSAVER = 2721, KEY_ASSISTANT = 2722,
KEY_KBD_LAYOUT_NEXT = 2723, KEY_BRIGHTNESS_MIN = 2724, KEY_BRIGHTNESS_MAX = 2725, KEY_KBDINPUTASSIST_PREV = 2726,
KEY_KBDINPUTASSIST_NEXT = 2727, KEY_KBDINPUTASSIST_PREVGROUP = 2728, KEY_KBDINPUTASSIST_NEXTGROUP = 2729, KEY_KBDINPUTASSIST_ACCEPT = 2730,
KEY_KBDINPUTASSIST_CANCEL = 2731, KEY_FRONT = 2800, KEY_SETUP = 2801, KEY_WAKEUP = 2802,
KEY_SENDFILE = 2803, KEY_DELETEFILE = 2804, KEY_XFER = 2805, KEY_PROG1 = 2806,
KEY_PROG2 = 2807, KEY_MSDOS = 2808, KEY_SCREENLOCK = 2809, KEY_DIRECTION_ROTATE_DISPLAY = 2810,
KEY_CYCLEWINDOWS = 2811, KEY_COMPUTER = 2812, KEY_EJECTCLOSECD = 2813, KEY_ISO = 2814,
KEY_MOVE = 2815, KEY_F13 = 2816, KEY_F14 = 2817, KEY_F15 = 2818,
KEY_F16 = 2819, KEY_F17 = 2820, KEY_F18 = 2821, KEY_F19 = 2822,
KEY_F20 = 2823, KEY_F21 = 2824, KEY_F22 = 2825, KEY_F23 = 2826,
KEY_F24 = 2827, KEY_PROG3 = 2828, KEY_PROG4 = 2829, KEY_DASHBOARD = 2830,
KEY_SUSPEND = 2831, KEY_HP = 2832, KEY_SOUND = 2833, KEY_QUESTION = 2834,
KEY_CONNECT = 2836, KEY_SPORT = 2837, KEY_SHOP = 2838, KEY_ALTERASE = 2839,
KEY_SWITCHVIDEOMODE = 2841, KEY_BATTERY = 2842, KEY_BLUETOOTH = 2843, KEY_WLAN = 2844,
KEY_UWB = 2845, KEY_WWAN_WIMAX = 2846, KEY_RFKILL = 2847, KEY_CHANNEL = 3001,
KEY_BTN_0 = 3100, KEY_BTN_1 = 3101, KEY_BTN_2 = 3102, KEY_BTN_3 = 3103,
KEY_BTN_4 = 3104, KEY_BTN_5 = 3105, KEY_BTN_6 = 3106, KEY_BTN_7 = 3107,
KEY_BTN_8 = 3108, KEY_BTN_9 = 3109
} | Enumerates the mouse event key codes.| +| [OH_NativeXComponent_KeyAction](_o_h___native_x_component.md#oh_nativexcomponent_keyaction) { OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN = -1, OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN = 0, OH_NATIVEXCOMPONENT_KEY_ACTION_UP } | Enumerates the key event actions.| diff --git a/en/application-dev/website.md b/en/application-dev/website.md index 655a4dc5ef..21e9c108c8 100644 --- a/en/application-dev/website.md +++ b/en/application-dev/website.md @@ -399,6 +399,7 @@ - [Asynchronous Concurrency Overview](arkts-utils/async-concurrency-overview.md) - [Single I/O Task Development](arkts-utils/single-io-development.md) - Using Multithread Concurrency for Development + - [Multithread Concurrency Overview](arkts-utils/multi-thread-concurrency-overview.md) - [Comparison Between TaskPool and Worker](arkts-utils/taskpool-vs-worker.md) - [CPU Intensive Task Development](arkts-utils/cpu-intensive-task-development.md) - [I/O Intensive Task Development](arkts-utils/io-intensive-task-development.md) @@ -507,6 +508,7 @@ - Best Practices - [Camera Photographing Sample](media/camera-shooting-case.md) - [Camera Recording Sample](media/camera-recording-case.md) + - [Using Performance Improvement Features (for System Applications Only)](media/camera-performance-improvement.md) - Image - [Image Overview](media/image-overview.md) - [Image Decoding](media/image-decoding.md) @@ -692,6 +694,8 @@ - [Connecting the Neural Network Runtime to an AI Inference Framework](napi/neural-network-runtime-guidelines.md) - Memory Management - [Purgeable Memory Development](napi/purgeable-memory-guidelines.md) + - Device Management + - [USB DDK Development](napi/usb-ddk-guidelines.md) - Tools - [DevEco Studio (OpenHarmony) User Guide](quick-start/deveco-studio-user-guide-for-openharmony.md) - Debugging Tools @@ -705,7 +709,7 @@ - [restool](tools/restool.md) - [LLDB Usage Guide](tools/lldb-tool.md) - Hands-On Tutorials - - [Samples](https://gitee.com/openharmony/applications_app_samples/blob/master/README.md) + - [Samples](https://gitee.com/openharmony/applications_app_samples/blob/OpenHarmony-4.0-Beta2/README.md) - [Codelabs](https://gitee.com/openharmony/codelabs/tree/master) - API References - [SystemCapability](reference/syscap.md) @@ -905,17 +909,18 @@ - UI Page - [@ohos.animator (Animator)](reference/apis/js-apis-animator.md) - [@ohos.arkui.componentSnapshot (Component Snapshot)](reference/apis/js-apis-arkui-componentSnapshot.md) + - [@ohos.arkui.dragController (DragController)](reference/apis/js-apis-arkui-dragController.md) - [@ohos.arkui.drawableDescriptor (DrawableDescriptor)](reference/apis/js-apis-arkui-drawableDescriptor.md) - [@ohos.arkui.inspector (Layout Callback)](reference/apis/js-apis-arkui-inspector.md) - [@ohos.arkui.UIContext (UIContext)](reference/apis/js-apis-arkui-UIContext.md) - [@ohos.curves (Interpolation Calculation)](reference/apis/js-apis-curve.md) - [@ohos.font (Custom Font Registration)](reference/apis/js-apis-font.md) - [@ohos.matrix4 (Matrix Transformation)](reference/apis/js-apis-matrix4.md) + - [@ohos.measure (Text Measurement)](reference/apis/js-apis-measure.md) - [@ohos.mediaquery (Media Query)](reference/apis/js-apis-mediaquery.md) - [@ohos.pluginComponent (PluginComponentManager)](reference/apis/js-apis-plugincomponent.md) - [@ohos.promptAction (Prompt)](reference/apis/js-apis-promptAction.md) - [@ohos.router (Page Routing)](reference/apis/js-apis-router.md) - - [@ohos.measure (Text Measurement)](reference/apis/js-apis-measure.md) - [@ohos.uiAppearance (UI Appearance)](reference/apis/js-apis-uiappearance.md) - Graphics - [@ohos.animation.windowAnimationManager (Window Animation Management)](reference/apis/js-apis-windowAnimationManager.md) @@ -983,8 +988,8 @@ - [@ohos.file.fileuri (File URI)](reference/apis/js-apis-file-fileuri.md) - [@ohos.file.fs (File Management)](reference/apis/js-apis-file-fs.md) - [@ohos.file.hash (File Hash Processing)](reference/apis/js-apis-file-hash.md) - - [@ohos.file.picker (File Picker)](reference/apis/js-apis-file-picker.md) - [@ohos.file.photoAccessHelper (Album Management)](reference/apis/js-apis-photoAccessHelper.md) + - [@ohos.file.picker (File Picker)](reference/apis/js-apis-file-picker.md) - [@ohos.file.securityLabel (Data Label)](reference/apis/js-apis-file-securityLabel.md) - [@ohos.file.statvfs (File System Space Statistics)](reference/apis/js-apis-file-statvfs.md) - [@ohos.file.storageStatistics (Application Storage Statistics)](reference/apis/js-apis-file-storage-statistics.md) @@ -1089,7 +1094,6 @@ - [@ohos.multimodalInput.touchEvent (Touch Event)](reference/apis/js-apis-touchevent.md) - [@ohos.multimodalInput.shortKey (Shortcut Key)](reference/apis/js-apis-shortKey.md) - [@ohos.power (System Power Management)](reference/apis/js-apis-power.md) - - [@ohos.resourceschedule.deviceStandby (Device Standby)](reference/apis/js-apis-resourceschedule-deviceStandby.md) - [@ohos.runningLock (Runninglock)](reference/apis/js-apis-runninglock.md) - [@ohos.sensor (Sensor)](reference/apis/js-apis-sensor.md) - [@ohos.settings (Data Item Settings)](reference/apis/js-apis-settings.md) @@ -1380,6 +1384,7 @@ - [Component Transition](reference/arkui-ts/ts-transition-animation-component.md) - [Transition of Shared Elements](reference/arkui-ts/ts-transition-animation-shared-elements.md) - [Implicit Shared Element Transition](reference/arkui-ts/ts-transition-animation-geometrytransition.md) + - [Motion Path Animation](reference/arkui-ts/ts-motion-path-animation.md) - Global UI Methods - Pop-up Window - [Alert Dialog Box](reference/arkui-ts/ts-methods-alert-dialog-box.md) @@ -1629,6 +1634,7 @@ - [Network Connection Management Error Codes](reference/errorcodes/errorcode-net-connection.md) - [Ethernet Connection Error Codes](reference/errorcodes/errorcode-net-ethernet.md) - [Network Sharing Error Codes](reference/errorcodes/errorcode-net-sharing.md) + - [Policy Management Error Codes](reference/errorcodes/errorcode-net-policy.md) - [mDNS Error Codes](reference/errorcodes/errorcode-net-mdns.md) - [Traffic Management Error Codes](reference/errorcodes/errorcode-net-statistics.md) - Connectivity @@ -1698,11 +1704,13 @@ - [AVDemuxer](reference/native-apis/_a_v_demuxer.md) - [AVSource](reference/native-apis/_a_v_source.md) - [OHAudio](reference/native-apis/_o_h_audio.md) + - [AVScreenCapture](reference/native-apis/_a_v_screen_capture.md) - [HuksKeyApi](reference/native-apis/_huks_key_api.md) - [HuksParamSetApi](reference/native-apis/_huks_param_set_api.md) - [HuksTypeApi](reference/native-apis/_huks_type_api.md) - [Init](reference/native-apis/init.md) - [Memory](reference/native-apis/memory.md) + - [UsbDdk](reference/native-apis/_usb_ddk.md) - [Hitrace](reference/native-apis/_hitrace.md) - [Vulkan](reference/native-apis/_vulkan.md) - Header Files @@ -1722,6 +1730,7 @@ - [native_buffer.h](reference/native-apis/native__buffer_8h.md) - [native_image.h](reference/native-apis/native__image_8h.md) - [native_interface_xcomponent.h](reference/native-apis/native__interface__xcomponent_8h.md) + - [native_xcomponent_key_event.h](reference/native-apis/native__xcomponent__key__event_8h.md) - [native_vsync.h](reference/native-apis/native__vsync_8h.md) - [raw_dir.h](reference/native-apis/raw__dir_8h.md) - [raw_file_manager.h](reference/native-apis/raw__file__manager_8h.md) @@ -1752,6 +1761,9 @@ - [native_audiorenderer.h](reference/native-apis/native__audiorenderer_8h.md) - [native_audiostream_base.h](reference/native-apis/native__audiostream__base_8h.md) - [native_audiostreambuilder.h](reference/native-apis/native__audiostreambuilder_8h.md) + - [native_avscreen_capture.h](reference/native-apis/native__avscreen__capture_8h.md) + - [native_avscreen_capture_base.h](reference/native-apis/native__avscreen__capture__base_8h.md) + - [native_avscreen_capture_errors.h](reference/native-apis/native__avscreen__capture__errors_8h.md) - [native_huks_api.h](reference/native-apis/native__huks__api_8h.md) - [native_huks_param.h](reference/native-apis/native__huks__param_8h.md) - [native_huks_type.h](reference/native-apis/native__huks__type_8h.md) @@ -1763,6 +1775,8 @@ - [relational_store.h](reference/native-apis/relational__store_8h.md) - [syscap_ndk.h](reference/native-apis/syscap__ndk_8h.md) - [purgeable_memory.h](reference/native-apis/purgeable__memory_8h.md) + - [usb_ddk_api.h](reference/native-apis/usb__ddk__api_8h.md) + - [usb_ddk_types.h](reference/native-apis/usb__ddk__types_8h.md) - [trace.h](reference/native-apis/trace_8h.md) - [vulkan_ohos.h](reference/native-apis/vulkan__ohos_8h.md) - Structs @@ -1792,6 +1806,17 @@ - [OH_AVRange](reference/native-apis/_o_h___a_v_range.md) - [OH_AudioCapturer_Callbacks_Struct](reference/native-apis/_o_h___audio_capturer___callbacks___struct.md) - [OH_AudioRenderer_Callbacks_Struct](reference/native-apis/_o_h___audio_renderer___callbacks___struct.md) + - [OH_AudioBuffer](reference/native-apis/_o_h___audio_buffer.md) + - [OH_AudioCaptureInfo](reference/native-apis/_o_h___audio_capture_info.md) + - [OH_AudioEncInfo](reference/native-apis/_o_h___audio_enc_info.md) + - [OH_AudioInfo](reference/native-apis/_o_h___audio_info.md) + - [OH_AVScreenCaptureCallback](reference/native-apis/_o_h___a_v_screen_capture_callback.md) + - [OH_AVScreenCaptureConfig](reference/native-apis/_o_h___a_v_screen_capture_config.md) + - [OH_RecorderInfo](reference/native-apis/_o_h___recorder_info.md) + - [OH_Rect](reference/native-apis/_o_h___rect.md) + - [OH_VideoCaptureInfo](reference/native-apis/_o_h___video_capture_info.md) + - [OH_VideoEncInfo](reference/native-apis/_o_h___video_enc_info.md) + - [OH_VideoInfo](reference/native-apis/_o_h___video_info.md) - [OH_Huks_Blob](reference/native-apis/_o_h___huks___blob.md) - [OH_Huks_CertChain](reference/native-apis/_o_h___huks___cert_chain.md) - [OH_Huks_KeyInfo](reference/native-apis/_o_h___huks___key_info.md) @@ -1810,6 +1835,17 @@ - [OH_Rdb_Store](reference/native-apis/_o_h___rdb___store.md) - [OH_VBucket](reference/native-apis/_o_h___v_bucket.md) - [OH_VObject](reference/native-apis/_o_h___v_object.md) + - [UsbConfigDescriptor](reference/native-apis/_usb_config_descriptor.md) + - [UsbControlRequestSetup](reference/native-apis/_usb_control_request_setup.md) + - [UsbDdkConfigDescriptor](reference/native-apis/_usb_ddk_config_descriptor.md) + - [UsbDdkEndpointDescriptor](reference/native-apis/_usb_ddk_endpoint_descriptor.md) + - [UsbDdkInterface](reference/native-apis/_usb_ddk_interface.md) + - [UsbDdkInterfaceDescriptor](reference/native-apis/_usb_ddk_interface_descriptor.md) + - [UsbDeviceDescriptor](reference/native-apis/_usb_device_descriptor.md) + - [UsbDeviceMemMap](reference/native-apis/_usb_device_mem_map.md) + - [UsbEndpointDescriptor](reference/native-apis/_usb_endpoint_descriptor.md) + - [UsbInterfaceDescriptor](reference/native-apis/_usb_interface_descriptor.md) + - [UsbRequestPipe](reference/native-apis/_usb_request_pipe.md) - [VkExternalFormatOHOS](reference/native-apis/_vk_external_format_o_h_o_s.md) - [VkImportNativeBufferInfoOHOS](reference/native-apis/_vk_import_native_buffer_info_o_h_o_s.md) - [VkMemoryGetNativeBufferInfoOHOS](reference/native-apis/_vk_memory_get_native_buffer_info_o_h_o_s.md) diff --git a/en/release-notes/OpenHarmony-v3.2-beta1.md b/en/release-notes/OpenHarmony-v3.2-beta1.md index 05c0924b13..27ae521373 100644 --- a/en/release-notes/OpenHarmony-v3.2-beta1.md +++ b/en/release-notes/OpenHarmony-v3.2-beta1.md @@ -185,24 +185,24 @@ For details about the adaptation status, see [SIG_DevBoard](https://gitee.com/op | Subsystem| Sample| Introduction| Programming Language| | -------- | -------- | -------- | -------- | -| ArkUI | [Vibrator](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DeviceManagement/Vibrator) | This sample simulates the countdown scenario to show the use of the vibrator APIs.| ArkTS | -| DFX | [FaultLogger](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DFX/FaultLogger) | This sample illustrates how to obtain fault information of an application in ArkTS.| ArkTS | -| ArkUI | [ComponentCollection](https://gitee.com/openharmony/applications_app_samples/tree/master/code/UI/ArkTsComponentClollection/ComponentCollection) | This sample illustrates all the components, animations, and global methods of ArkUI.| ArkTS | -| ArkUI | [ArkTSClock](https://gitee.com/openharmony/applications_app_samples/tree/master/code/Solutions/Tools/ArkTSClock) | This sample exemplifies how to implement a simple clock application using the ArkTS UI capability. | ArkTS | -| Network management| [Http](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Connectivity/Http) | This sample simulates Postman, which requires the input of an API address and outputs the data obtained, to show the use of the data request APIs.| ArkTS | -| Network management| [Socket](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Connectivity/Socket) | This sample demonstrates the application of Socket in network communication, including connection authentication and chat communication between two devices.| ArkTS | -| Distributed data management| [DistributedRdb](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/DistributedAppDev/DistributedRdb) | This sample shows how to add, delete, modify, query, and synchronize data in the distributed relational database with ArkTS.| ArkTS | -| Ability| [WorkScheduler](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/TaskManagement/WorkScheduler) | This sample simulates the update process starting from downloading and saving an update package to sending a notification and installing the update package. Being processed by the background task management, the download task continues after the application exits. It stops until the download is complete.| ArkTS | -| Ability| [AbilityStartMode](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/ApplicationModels/AbilityStartMode) | This sample shows how to implement the standard, singleton, and specified ability launch modes in the stage model.| ArkTS | -| Multimedia| [MediaCollections](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/FileManagement/MediaCollections) | This sample illustrates media management in ArkTS, including network stream playback, audio and video playback control, and volume adjustment.| ArkTS | -| Ability| [ArkTSDistributedCalc](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/DistributedAppDev/ArkTSDistributedCalc) | This sample implements a simple calculator application using JS distributed features. The calculator can perform simple numerical calculations and start a remote calculator FA to perform collaborative calculation.| ArkTS | -| Web | [Browser](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Web/Browser) | This sample uses the stage model and related APIs to show a simple browser.| ArkTS | -| Ability| [DeviceUsageStatistics](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DeviceUsageStatistics/DeviceUsageStatistics) | This sample shows the device usage statistics.| ArkTS | -| ArkUI | [AdaptiveCapabilities](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/AdaptiveCapabilities) | This sample shows multi-device adaptation in ArkTS, including resource qualifiers, atomic layouts, and responsive layouts.| ArkTS | -| ArkUI | [Game2048](https://gitee.com/openharmony/applications_app_samples/tree/master/code/Solutions/Game/Game2048) | This sample shows how to develop a 2048 game using the **\** component.| ArkTS | -| Typical Setting Page of One-Time Development for Multi-Device Deployment| [Settings](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/Settings) | This sample shows a typical page for setting an application. The page has different display effects in the small window and large window, reflecting the capability of one-time development for multi-device deployment.| ArkTS | -| Distributed data management| [Preference](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DataManagement/Preferences) | This sample shows the theme switching function of preferences.| ArkTS | -| Globalization| [International](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/Internationalnation/International) | This sample shows how to use APIs related to i18n, intl, and resourceManager in ArkTS to set the system language, region, time, and time zone. It also provides locale setting examples.| ArkTS | +| ArkUI | [Vibrator](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DeviceManagement/Vibrator) | This sample simulates the countdown scenario to show the use of the vibrator APIs.| ArkTS | +| DFX | [FaultLogger](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DFX/FaultLogger) | This sample illustrates how to obtain fault information of an application in ArkTS.| ArkTS | +| ArkUI | [ComponentCollection](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/UI/ArkTsComponentCollection/ComponentCollection) | This sample illustrates all the components, animations, and global methods of ArkUI.| ArkTS | +| ArkUI | [ArkTSClock](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/Solutions/Tools/ArkTSClock) | This sample exemplifies how to implement a simple clock application using the ArkTS UI capability. | ArkTS | +| Network management| [Http](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/Connectivity/Http) | This sample simulates Postman, which requires the input of an API address and outputs the data obtained, to show the use of the data request APIs.| ArkTS | +| Network management| [Socket](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/Connectivity/Socket) | This sample demonstrates the application of Socket in network communication, including connection authentication and chat communication between two devices.| ArkTS | +| Distributed data management| [DistributedRdb](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/DistributedAppDev/DistributedRdb) | This sample shows how to add, delete, modify, query, and synchronize data in the distributed relational database with ArkTS.| ArkTS | +| Ability| [WorkScheduler](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/TaskManagement/WorkScheduler) | This sample simulates the update process starting from downloading and saving an update package to sending a notification and installing the update package. Being processed by the background task management, the download task continues after the application exits. It stops until the download is complete.| ArkTS | +| Ability| [AbilityStartMode](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/ApplicationModels/AbilityStartMode) | This sample shows how to implement the standard, singleton, and specified ability launch modes in the stage model.| ArkTS | +| Multimedia| [MediaCollections](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/FileManagement/MediaCollections) | This sample illustrates media management in ArkTS, including network stream playback, audio and video playback control, and volume adjustment.| ArkTS | +| Ability| [ArkTSDistributedCalc](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/DistributedAppDev/ArkTSDistributedCalc) | This sample implements a simple calculator application using JS distributed features. The calculator can perform simple numerical calculations and start a remote calculator FA to perform collaborative calculation.| ArkTS | +| Web | [Browser](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/Web/Browser) | This sample uses the stage model and related APIs to show a simple browser.| ArkTS | +| Ability| [DeviceUsageStatistics](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DeviceUsageStatistics/DeviceUsageStatistics) | This sample shows the device usage statistics.| ArkTS | +| ArkUI | [AdaptiveCapabilities](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/AdaptiveCapabilities) | This sample shows multi-device adaptation in ArkTS, including resource qualifiers, atomic layouts, and responsive layouts.| ArkTS | +| ArkUI | [Game2048](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/Solutions/Game/Game2048) | This sample shows how to develop a 2048 game using the **\** component.| ArkTS | +| Typical Setting Page of One-Time Development for Multi-Device Deployment| [Settings](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/Settings) | This sample shows a typical page for setting an application. The page has different display effects in the small window and large window, reflecting the capability of one-time development for multi-device deployment.| ArkTS | +| Distributed data management| [Preference](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/DataManagement/Preferences) | This sample shows the theme switching function of preferences.| ArkTS | +| Globalization| [International](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/Internationalnation/International) | This sample shows how to use APIs related to i18n, intl, and resourceManager in ArkTS to set the system language, region, time, and time zone. It also provides locale setting examples.| ArkTS | For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples). diff --git a/en/release-notes/OpenHarmony-v3.2-beta3.md b/en/release-notes/OpenHarmony-v3.2-beta3.md index b7d7bf83fa..7c4dba003e 100644 --- a/en/release-notes/OpenHarmony-v3.2-beta3.md +++ b/en/release-notes/OpenHarmony-v3.2-beta3.md @@ -190,13 +190,13 @@ For details about the adaptation status, see [SIG_DevBoard](https://gitee.com/op | Subsystem| Name| Introduction| Programming Language| | -------- | -------- | -------- | -------- | -| ArkUI development framework| [HealthyDiet](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/HealthyDiet)| This sample app helps you keep food records and view food information. After you add food records, including the food type, weight, and meal time, the app can calculate nutrition data (calories, proteins, fats, and carbon water) for the meals and display the data in a bar chart.| ArkTS | -| ArkUI development framework| [MusicAlbum](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/MusicAlbum)| This sample shows the home page of a music album app. The adaptive layout and responsive layout are used to ensure that the app can be properly displayed on devices irrespective of screen sizes.| ArkTS | -| Ability framework and file management subsystem| [CustomShare](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/ApplicationModels/CustomShare) | Using this sample app, you can share texts, links, and images with third-party applications and display them in these applications.| ArkTS | -| Ability framework| [GalleryForm](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/FormExtAbility) | This sample demonstrates the display of **Gallery** images in a widget and periodic update of the widget.| ArkTS | -| ArkUI development framework| [AppMarket](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/AppMarket) | This sample shows the home page of an application market, which contains the tab bar, banner, featured apps, and featured games.| ArkTS | -| ArkUI development framework| [Weather](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/Weather) | This sample demonstrates one-time development for multi-device deployment by showing how to develop a weather app and deploy it across different devices. The demo app includes the following: home page, **Manage City** page, **Add City** page, and **Update Time** page.| ArkTS | -| Multimedia subsystem| [MediaCollections](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/FileManagement/MediaCollections) | This sample shows the capabilities of online streaming, audio and video playback control, and volume adjustment.| ArkTS | +| ArkUI development framework| [HealthyDiet](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/HealthyDiet)| This sample app helps you keep food records and view food information. After you add food records, including the food type, weight, and meal time, the app can calculate nutrition data (calories, proteins, fats, and carbon water) for the meals and display the data in a bar chart.| ArkTS | +| ArkUI development framework| [MusicAlbum](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/MusicAlbum)| This sample shows the home page of a music album app. The adaptive layout and responsive layout are used to ensure that the app can be properly displayed on devices irrespective of screen sizes.| ArkTS | +| Ability framework and file management subsystem| [CustomShare](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/ApplicationModels/CustomShare) | Using this sample app, you can share texts, links, and images with third-party applications and display them in these applications.| ArkTS | +| Ability framework| [GalleryForm](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/Widget/FormExtAbility) | This sample demonstrates the display of **Gallery** images in a widget and periodic update of the widget.| ArkTS | +| ArkUI development framework| [AppMarket](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/AppMarket) | This sample shows the home page of an application market, which contains the tab bar, banner, featured apps, and featured games.| ArkTS | +| ArkUI development framework| [Weather](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SuperFeature/MultiDeviceAppDev/Weather) | This sample demonstrates one-time development for multi-device deployment by showing how to develop a weather app and deploy it across different devices. The demo app includes the following: home page, **Manage City** page, **Add City** page, and **Update Time** page.| ArkTS | +| Multimedia subsystem| [MediaCollections](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/FileManagement/MediaCollections) | This sample shows the capabilities of online streaming, audio and video playback control, and volume adjustment.| ArkTS | For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples). diff --git a/en/release-notes/OpenHarmony-v3.2-beta4.md b/en/release-notes/OpenHarmony-v3.2-beta4.md index 87f4cf9ae5..57b0a62f75 100644 --- a/en/release-notes/OpenHarmony-v3.2-beta4.md +++ b/en/release-notes/OpenHarmony-v3.2-beta4.md @@ -203,14 +203,14 @@ The following samples written in ArkTS are added. | Subsystem
| Name| Introduction| | -------- | -------- | -------- | -| Common event and notification subsystem| [Event Notification](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Notification/CustomEmitter)| This sample shows the in-process event notification. After a user selects an offering and submits an order, the selected offering is displayed in the order list.| -| Data management subsystem| [Cross-Application Data Sharing](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/DataManagement/CrossAppDataShare)| This sample implements cross-application data sharing. It provides contacts (data provider) and contacts assistant (data user). Contacts support functionalities such as adding, deleting, modifying, and querying contacts data. Contacts assistant supports contacts data synchronization and merging of duplicate data.| -| Resource scheduler subsystem| [Agent-Powered Scheduled Reminder](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/TaskManagement/ReminderAgentManager)| This sample uses agent-powered scheduled reminder to create three types of scheduled reminders: alarm clocks, calendar events, and countdown timers. Agent-powered scheduled reminder ensures that the timing and pop-up notification functions will be performed by the system service agent in the background when the application is frozen or exits.| -| File management subsystem| [Storage Space Statistics](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/DeviceManagement/StorageStatistic)| This sample uses the application package management, application space statistics, and volume management modules to implement the viewing of storage space information of the current device, all installed applications, and all available volumes.| -| Window manager| [Screenshot](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/Media/Screenshot)| This sample uses the screenshot, window, and display modules to take screenshots, switch the privacy window, and query the privacy window, in sequence.| -| Bundle management framework| [Multi-HAP](https://gitee.com/openharmony/applications_app_samples/tree/master/code/Project/ApplicationHap/MultiHap)| This sample shows the development of multi-HAP. The sample app includes one entry HAP and two feature HAPs. The two feature HAPs provide audio and video playback components, respectively. The two components are also used in the entry component.| -| Ability framework| [Ability Launch Mode](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/ApplicationModels/AbilityStartMode)| This sample shows how to implement the standard, singleton, and specified ability launch modes in the stage model.| -| Resource management| [Application Theme Switch](https://gitee.com/openharmony/applications_app_samples/tree/master/code/Project/ResourceAllocation/ApplicationThemeSwitch)| This sample creates the **dark** and **light** folders at the same level as the **base** folder to configure resources related to the dark and light themes. The custom theme file is configured in the **ThemeConst** file to implement multi-theme switching by controlling variables.| +| Common event and notification subsystem| [Event Notification](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/Notification/CustomEmitter)| This sample shows the in-process event notification. After a user selects an offering and submits an order, the selected offering is displayed in the order list.| +| Data management subsystem| [Cross-Application Data Sharing](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/DataManagement/CrossAppDataShare)| This sample implements cross-application data sharing. It provides contacts (data provider) and contacts assistant (data user). Contacts support functionalities such as adding, deleting, modifying, and querying contacts data. Contacts assistant supports contacts data synchronization and merging of duplicate data.| +| Resource scheduler subsystem| [Agent-Powered Scheduled Reminder](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/TaskManagement/ReminderAgentManager)| This sample uses agent-powered scheduled reminder to create three types of scheduled reminders: alarm clocks, calendar events, and countdown timers. Agent-powered scheduled reminder ensures that the timing and pop-up notification functions will be performed by the system service agent in the background when the application is frozen or exits.| +| File management subsystem| [Storage Space Statistics](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/DeviceManagement/StorageStatistic)| This sample uses the application package management, application space statistics, and volume management modules to implement the viewing of storage space information of the current device, all installed applications, and all available volumes.| +| Window manager| [Screenshot](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/Media/Screenshot)| This sample uses the screenshot, window, and display modules to take screenshots, switch the privacy window, and query the privacy window, in sequence.| +| Bundle management framework| [Multi-HAP](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/Project/ApplicationHap/MultiHap)| This sample shows the development of multi-HAP. The sample app includes one entry HAP and two feature HAPs. The two feature HAPs provide audio and video playback components, respectively. The two components are also used in the entry component.| +| Ability framework| [Ability Launch Mode](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/ApplicationModels/AbilityStartMode)| This sample shows how to implement the standard, singleton, and specified ability launch modes in the stage model.| +| Resource management| [Application Theme Switch](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/Project/ResourceAllocation/ApplicationThemeSwitch)| This sample creates the **dark** and **light** folders at the same level as the **base** folder to configure resources related to the dark and light themes. The custom theme file is configured in the **ThemeConst** file to implement multi-theme switching by controlling variables.| For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples). diff --git a/en/release-notes/OpenHarmony-v3.2-release.md b/en/release-notes/OpenHarmony-v3.2-release.md index f36be4f1d8..aa8caf88f1 100644 --- a/en/release-notes/OpenHarmony-v3.2-release.md +++ b/en/release-notes/OpenHarmony-v3.2-release.md @@ -597,9 +597,9 @@ For details about the adaptation status, see [SIG_DevBoard](https://gitee.com/op | Subsystem| Name| Introduction| Programming Language| | -------- | -------- | -------- | -------- | -| Accessibility| [AccessibilityExtensionAbility](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/ApplicationModels/AccessibilityExtAbility)| This sample demonstrates an application developed using the AccessibilityExtensionAbility component. It uses multiple APIs to implement quick interaction.| ArkTS | -| Enterprise management| [Enterprise Device Management ExtensionAbility](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/ApplicationModels/EnterpriseAdminExtensionAbility)| EnterpriseAdminExtensionAbility is a mandatory component for Mobile Device Management (MDM) applications. When developing MDM applications for enterprises, you need to inherit EnterpriseAdminExtensionAbility and implement MDM service logic in the EnterpriseAdminExtensionAbility instance. EnterpriseAdminExtensionAbility implements notifications of system management status changes and defines the callbacks that are triggered when a device administrator application is enabled or disabled or an application is installed or uninstalled.| ArkTS | -| Mission management| [WorkScheduler](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/TaskManagement/WorkScheduler)| This sample uses the APIs **\@ohos.WorkSchedulerExtensionAbility**, **\@ohos.net.http**, **\@ohos.notification**, **\@ohos.bundle**, and **\@ohos.fileio** to implement the functionalities of setting background tasks, downloading, saving, and installing update packages, and sending notifications.| ArkTS | +| Accessibility| [AccessibilityExtensionAbility](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/ApplicationModels/AccessibilityExtAbility)| This sample demonstrates an application developed using the AccessibilityExtensionAbility component. It uses multiple APIs to implement quick interaction.| ArkTS | +| Enterprise management| [Enterprise Device Management ExtensionAbility](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/SystemFeature/ApplicationModels/EnterpriseAdminExtensionAbility)| EnterpriseAdminExtensionAbility is a mandatory component for Mobile Device Management (MDM) applications. When developing MDM applications for enterprises, you need to inherit EnterpriseAdminExtensionAbility and implement MDM service logic in the EnterpriseAdminExtensionAbility instance. EnterpriseAdminExtensionAbility implements notifications of system management status changes and defines the callbacks that are triggered when a device administrator application is enabled or disabled or an application is installed or uninstalled.| ArkTS | +| Mission management| [WorkScheduler](https://gitee.com/openharmony/applications_app_samples/tree/OpenHarmony-4.0-Beta2/code/BasicFeature/TaskManagement/WorkScheduler)| This sample uses the APIs **\@ohos.WorkSchedulerExtensionAbility**, **\@ohos.net.http**, **\@ohos.notification**, **\@ohos.bundle**, and **\@ohos.fileio** to implement the functionalities of setting background tasks, downloading, saving, and installing update packages, and sending notifications.| ArkTS | For more information, visit [Samples](https://gitee.com/openharmony/applications_app_samples). -- GitLab