diff --git a/en/application-dev/reference/apis/js-apis-data-storage.md b/en/application-dev/reference/apis/js-apis-data-storage.md index 7b7178215ac27b121c844dfd209d1ac8b74c2331..01d064e9a3e12e2bda811a7de953cf15fea6efe7 100644 --- a/en/application-dev/reference/apis/js-apis-data-storage.md +++ b/en/application-dev/reference/apis/js-apis-data-storage.md @@ -54,7 +54,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); }); let storage = data_storage.getStorageSync(path + '/mystore'); @@ -87,7 +87,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); }); data_storage.getStorage(path + '/mystore', function (err, storage) { @@ -130,7 +130,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); }); let getPromise = data_storage.getStorage(path + '/mystore'); @@ -166,7 +166,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); }); data_storage.deleteStorageSync(path + '/mystore'); @@ -197,7 +197,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); }); data_storage.deleteStorage(path + '/mystore', function (err) { @@ -238,7 +238,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); }); let promisedelSt = data_storage.deleteStorage(path + '/mystore'); @@ -273,7 +273,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); }); data_storage.removeStorageFromCacheSync(path + '/mystore'); @@ -304,7 +304,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); }); data_storage.removeStorageFromCache(path + '/mystore', function (err) { @@ -346,7 +346,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); }); let promiserevSt = data_storage.removeStorageFromCache(path + '/mystore') diff --git a/zh-cn/application-dev/device/usb-guidelines.md b/zh-cn/application-dev/device/usb-guidelines.md index 02a0b2500f8446aebd7482eef124037bd1973be8..312420b67aedf30cf11a78eafa420257f1bb2234 100644 --- a/zh-cn/application-dev/device/usb-guidelines.md +++ b/zh-cn/application-dev/device/usb-guidelines.md @@ -39,7 +39,7 @@ USB设备可作为Host设备连接Device设备进行数据传输。开发示例 1. 获取设备列表。 ```js - // 导入usb接口api包。 + // 导入USB接口api包。 import usb from '@ohos.usb'; // 获取设备列表。 var deviceList = usb.getDevices(); diff --git a/zh-cn/application-dev/napi/native-window-guidelines.md b/zh-cn/application-dev/napi/native-window-guidelines.md index c30e463187e6bfd46046d8f8180de92bdf59add3..da94f7cad61b0c9bdb7435723642a39778a835a5 100644 --- a/zh-cn/application-dev/napi/native-window-guidelines.md +++ b/zh-cn/application-dev/napi/native-window-guidelines.md @@ -86,7 +86,7 @@ NativeWindow是`OpenHarmony`**本地平台化窗口**,包括从`Surface`构建 SkImageInfo imageInfo = ... bitmap.setInfo(imageInfo, bufferHandle->stride); bitmap.setPixels(bufferHandle->virAddr); - //创建 Skia Canvas 并将内容写入naitve window + //创建 Skia Canvas 并将内容写入native window ... //写入完成后,通过OH_NativeWindwo_NativeWindowFlushBuffer 提交给消费者使用,例如:显示在屏幕上 @@ -101,7 +101,13 @@ NativeWindow是`OpenHarmony`**本地平台化窗口**,包括从`Surface`构建 OH_NativeXComponent_Callback &callback_; callback_->OnSurfaceCreated = OnSufaceCreatedCB; callback_->OnSurfaceChanged = OnSufaceChangedCB; - callback_->OnSurfaceDestoryed = OnSufaceDestoryedCB; + callback_->OnSurfaceDestroyed = OnSufaceDestroyedCB; callback_->DispatchTouchEvent = DispatchTouchEventCB; OH_NativeXComponent_RegisterCallback(nativeXComponent, callback_) ``` + +## 相关实例 + +针对NativeWindow的使用,有以下相关实例可供参考: + +- [使用NativeWindow接口获取Buffer](https://gitee.com/openharmony/graphic_graphic_2d/blob/master/rosen/samples/hello_native_window/hello_native_window.cpp) \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-storage.md b/zh-cn/application-dev/reference/apis/js-apis-data-storage.md index e41af6f916e6336a2d9951edfbd469cc36dcbbe2..898919a833638568d73a85c334c498b6574767b4 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-storage.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-storage.md @@ -53,7 +53,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); let storage = data_storage.getStorageSync(path + '/mystore'); storage.putSync('startup', 'auto'); @@ -86,7 +86,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); data_storage.getStorage(path + '/mystore', function (err, storage) { if (err) { @@ -129,7 +129,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); let getPromise = data_storage.getStorage(path + '/mystore'); getPromise.then((storage) => { @@ -165,7 +165,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); data_storage.deleteStorageSync(path + '/mystore'); }); @@ -195,7 +195,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); data_storage.deleteStorage(path + '/mystore', function (err) { if (err) { @@ -237,7 +237,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); let promisedelSt = data_storage.deleteStorage(path + '/mystore'); promisedelSt.then(() => { @@ -271,7 +271,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); data_storage.removeStorageFromCacheSync(path + '/mystore'); }); @@ -302,7 +302,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); data_storage.removeStorageFromCache(path + '/mystore', function (err) { if (err) { @@ -344,7 +344,7 @@ var path; var context = featureAbility.getContext(); context.getFilesDir().then((filePath) => { path = filePath; - console.info("======================>getFilesDirPromsie====================>"); + console.info("======================>getFilesDirPromise====================>"); let promiserevSt = data_storage.removeStorageFromCache(path + '/mystore') promiserevSt.then(() => {