diff --git a/en/application-dev/device/Readme-EN.md b/en/application-dev/device/Readme-EN.md index 41f8cf0de280706eff7ae88c051d50d18630f173..c006438a34418139129e23f475d059e274ca914d 100644 --- a/en/application-dev/device/Readme-EN.md +++ b/en/application-dev/device/Readme-EN.md @@ -13,6 +13,6 @@ - Vibrator - [Vibrator Overview](vibrator-overview.md) - [Vibrator Development](vibrator-guidelines.md) -- Update Servcie +- Update Service - [Sample Server Overview](sample-server-overview.md) - [Sample Server Development](sample-server-guidelines.md) diff --git a/en/application-dev/napi/native-window-guidelines.md b/en/application-dev/napi/native-window-guidelines.md index f86fdb78ed8d0c111c1c2a1eb8b80ca2de5409bf..b92ccc54234c9162dad4b35242dcf9d992e5eeec 100644 --- a/en/application-dev/napi/native-window-guidelines.md +++ b/en/application-dev/napi/native-window-guidelines.md @@ -56,7 +56,7 @@ The following steps describe how to use `OH_NativeXComponent` in OpenHarmony to 3. Define the callback `OnSurfaceCreated`. During the creation of a `Surface`, the callback is used to initialize the rendering environment, for example, the `Skia` rendering environment, and write the content to be displayed to `NativeWindow`. ```c++ - void OnSufaceCreatedCB(NativeXComponent* component, void* window) { + void OnSurfaceCreatedCB(NativeXComponent* component, void* window) { // Obtain the width and height of the native window. uint64_t width_ = 0, height_ = 0; OH_NativeXComponent_GetXComponentSize(nativeXComponent, window, &width_, &height_); @@ -89,8 +89,8 @@ The following steps describe how to use `OH_NativeXComponent` in OpenHarmony to // Create Skia Canvas and write the content to the native window. ... - // After the write operation is complete, flush the buffer by using OH_NativeWindwo_NativeWindowFlushBuffer so that the data is displayed on the screen. - Regoin region{nullptr, 0}; + // After the write operation is complete, flush the buffer by using OH_NativeWindow_NativeWindowFlushBuffer so that the data is displayed on the screen. + Region region{nullptr, 0}; OH_NativeWindow_NativeWindowFlushBuffer(nativeWindow_, buffer, fenceFd, region) } ``` @@ -99,9 +99,9 @@ The following steps describe how to use `OH_NativeXComponent` in OpenHarmony to ```c++ OH_NativeXComponent_Callback &callback_; - callback_->OnSurfaceCreated = OnSufaceCreatedCB; - callback_->OnSurfaceChanged = OnSufaceChangedCB; - callback_->OnSurfaceDestoryed = OnSufaceDestoryedCB; + callback_->OnSurfaceCreated = OnSurfaceCreatedCB; + callback_->OnSurfaceChanged = OnSurfaceChangedCB; + callback_->OnSurfaceDestoryed = OnSurfaceDestoryedCB; callback_->DispatchTouchEvent = DispatchTouchEventCB; OH_NativeXComponent_RegisterCallback(nativeXComponent, callback_) ``` diff --git a/zh-cn/application-dev/napi/native-window-guidelines.md b/zh-cn/application-dev/napi/native-window-guidelines.md index e1fef217387a4473ced7b4acf328f9fd963b6b20..69299f3979c8c03c674157563aa93a7d0949524c 100644 --- a/zh-cn/application-dev/napi/native-window-guidelines.md +++ b/zh-cn/application-dev/napi/native-window-guidelines.md @@ -56,7 +56,7 @@ NativeWindow是`OpenHarmony`**本地平台化窗口**,包括从`Surface`构建 3. **定义回调函数OnSurfaceCreated**。用于在`Surface`创建时,通过回调函数初始化开发者的渲染环境,例如`Skia`渲染环境。并将要显示的内容写入`NativeWindow`: ```c++ - void OnSufaceCreatedCB(NativeXComponent* component, void* window) { + void OnSurfaceCreatedCB(NativeXComponent* component, void* window) { //获取 native window 的宽高 uint64_t width_ = 0, height_ = 0; OH_NativeXComponent_GetXComponentSize(nativeXComponent, window, &width_, &height_); @@ -89,8 +89,8 @@ NativeWindow是`OpenHarmony`**本地平台化窗口**,包括从`Surface`构建 //创建 Skia Canvas 并将内容写入naitve window ... - //写入完成后,通过OH_NativeWindwo_NativeWindowFlushBuffer 提交给消费者使用,例如:显示在屏幕上 - Regoin region{nullptr, 0}; + //写入完成后,通过OH_NativeWindow_NativeWindowFlushBuffer 提交给消费者使用,例如:显示在屏幕上 + Region region{nullptr, 0}; OH_NativeWindow_NativeWindowFlushBuffer(nativeWindow_, buffer, fenceFd, region) } ``` @@ -99,9 +99,9 @@ NativeWindow是`OpenHarmony`**本地平台化窗口**,包括从`Surface`构建 ```c++ OH_NativeXComponent_Callback &callback_; - callback_->OnSurfaceCreated = OnSufaceCreatedCB; - callback_->OnSurfaceChanged = OnSufaceChangedCB; - callback_->OnSurfaceDestoryed = OnSufaceDestoryedCB; + callback_->OnSurfaceCreated = OnSurfaceCreatedCB; + callback_->OnSurfaceChanged = OnSurfaceChangedCB; + callback_->OnSurfaceDestoryed = OnSurfaceDestoryedCB; callback_->DispatchTouchEvent = DispatchTouchEventCB; OH_NativeXComponent_RegisterCallback(nativeXComponent, callback_) ``` diff --git a/zh-cn/device-dev/porting/porting-dayu200-on_standard-demo.md b/zh-cn/device-dev/porting/porting-dayu200-on_standard-demo.md index d5629c54112b19d9bc6f8aa8692fa9bbd94e0435..6bdd613d31f4ec4b58aa8713a047c227b79afb05 100755 --- a/zh-cn/device-dev/porting/porting-dayu200-on_standard-demo.md +++ b/zh-cn/device-dev/porting/porting-dayu200-on_standard-demo.md @@ -3292,7 +3292,7 @@ root { busType = 0; // 0:i2c 1:spi busNum = 5; busAddr = 0x15; - regWidth = 1; // 1btye + regWidth = 1; // 1byte } sensorIdAttr :: sensorIdInfo { chipName = "mxc6655xa";