From 6f24de24ddc7e1907650299ab8ccf3fd2e632068 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Mon, 28 Apr 2025 19:33:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81=E6=A0=87?= =?UTF-8?q?=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan --- .../src/main/ets/common/PromptActionClass.ts | 10 +++++- .../entry/src/main/ets/pages/Index2.ets | 4 ++- .../src/main/ets/pages/Menu/CreateMenu.ets | 12 ++++++- .../src/main/ets/pages/Toast/CreateToast.ets | 4 ++- .../pages/customdialog/CreateCustomDialog.ets | 9 ++++++ .../pages/fixedstyledialog/ActionSheet.ets | 4 ++- .../pages/fixedstyledialog/AlertDialog.ets | 4 ++- .../fixedstyledialog/CalendarPickerDialog.ets | 4 ++- .../fixedstyledialog/DatePickerDialog.ets | 4 ++- .../fixedstyledialog/TextPickerDialog.ets | 4 ++- .../fixedstyledialog/TimePickerDialog.ets | 4 ++- .../opencustomdialog/openCustomDialog.ets | 2 ++ .../src/main/ets/pages/popup/ButtonPopup.ets | 4 ++- .../src/main/ets/pages/popup/CustomPopup.ets | 4 ++- .../main/ets/pages/popup/PopupAnimation.ets | 4 ++- .../main/ets/pages/popup/PopupStateChange.ets | 4 ++- .../src/main/ets/pages/popup/PopupStyle.ets | 4 ++- .../src/main/ets/pages/popup/TextPrompts.ets | 4 ++- .../src/main/ets/pages/Touch/ClickEvent.ets | 4 ++- .../src/main/ets/pages/Touch/TouchEvent.ets | 4 ++- .../src/main/ets/pages/device/HoverEffect.ets | 4 ++- .../src/main/ets/pages/device/OnHover.ets | 4 ++- .../entry/src/main/ets/pages/device/OnKey.ets | 4 ++- .../src/main/ets/pages/device/OnKeyPreIme.ets | 4 ++- .../src/main/ets/pages/device/OnMouse.ets | 4 ++- .../src/main/ets/pages/drag/DefaultDrag.ets | 31 +++++++++++++++++-- .../src/main/ets/pages/drag/MoreDrag.ets | 14 ++++++++- .../src/main/ets/pages/focus/DefaultFocus.ets | 4 ++- .../main/ets/pages/focus/FocusAndClick.ets | 4 ++- .../main/ets/pages/focus/FocusController.ets | 4 ++- .../main/ets/pages/focus/FocusPriority.ets | 4 ++- .../ets/pages/focus/FocusScopePriority.ets | 4 ++- .../src/main/ets/pages/focus/FocusStyle.ets | 4 ++- .../src/main/ets/pages/focus/Focusable.ets | 6 ++-- .../src/main/ets/pages/focus/onFocusBlur.ets | 4 ++- .../ets/pages/gesturejudge/GestureJudge.ets | 10 +++++- .../main/ets/pages/groupgesture/Exclusive.ets | 4 ++- .../main/ets/pages/groupgesture/Parallel.ets | 4 ++- .../main/ets/pages/groupgesture/Sequence.ets | 4 ++- .../pages/singlegesture/LongPressGesture.ets | 4 ++- .../ets/pages/singlegesture/PanGesture.ets | 4 ++- .../ets/pages/singlegesture/PinchGesture.ets | 4 ++- .../pages/singlegesture/RotationGesture.ets | 4 ++- .../ets/pages/singlegesture/SwipeGesture.ets | 4 ++- .../ets/pages/singlegesture/TapGesture.ets | 4 ++- .../entry/src/main/ets/pages/Index.ets | 2 ++ .../main/ets/entryability/EntryAbility.ets | 6 +++- .../main/ets/entry1ability/Entry1Ability.ets | 5 ++- .../main/ets/entryability/EntryAbility.ets | 6 +++- .../main/ets/entryability/EntryAbility.ets | 6 +++- .../3des_ecb_encryption_decryption.cpp | 4 ++- ...ecb_encryption_decryption_asynchronous.ets | 2 ++ ..._ecb_encryption_decryption_synchronous.ets | 2 ++ .../project/sm4_cbc_encryption_decryption.cpp | 4 +++ .../project/sm4_ecb_encryption_decryption.cpp | 4 +++ .../project/sm4_gcm_encryption_decryption.cpp | 4 +++ .../sm4_gcm_seg_encryption_decryption.cpp | 2 ++ ...cbc_encryption_decryption_asynchronous.ets | 2 ++ ..._cbc_encryption_decryption_synchronous.ets | 2 ++ ...ecb_encryption_decryption_asynchronous.ets | 2 ++ ..._ecb_encryption_decryption_synchronous.ets | 2 ++ ...gcm_encryption_decryption_asynchronous.ets | 2 ++ ..._gcm_encryption_decryption_synchronous.ets | 2 ++ ...seg_encryption_decryption_asynchronous.ets | 2 ++ ..._seg_encryption_decryption_synchronous.ets | 2 ++ .../bluetoothService/GattServerManager.ets | 4 ++- 66 files changed, 257 insertions(+), 52 deletions(-) diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/common/PromptActionClass.ts b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/common/PromptActionClass.ts index f68734fd77..b76828c663 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/common/PromptActionClass.ts +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/common/PromptActionClass.ts @@ -14,6 +14,7 @@ */ // PromptActionClass.ts +// [Start open_close_update_custom_dialog] import { BusinessError } from '@kit.BasicServicesKit'; import { ComponentContent, window } from '@kit.ArkUI'; import { UIContext } from '@ohos.arkui.UIContext'; @@ -35,6 +36,7 @@ export class PromptActionClass { this.options = options; } + // [Start call_open_custom_dialog] static openDialog() { if (this.contentNode !== null) { this.ctx.getPromptAction().openCustomDialog(this.contentNode, this.options) @@ -48,7 +50,9 @@ export class PromptActionClass { }) } } + // [End call_open_custom_dialog] + // [Start call_close_custom_dialog] static closeDialog() { if (this.contentNode !== null) { this.ctx.getPromptAction().closeCustomDialog(this.contentNode) @@ -62,7 +66,9 @@ export class PromptActionClass { }) } } + // [End call_close_custom_dialog] + // [Start update_custom_dialog_property] static updateDialog(options: Object) { if (this.contentNode !== null) { this.ctx.getPromptAction().updateCustomDialog(this.contentNode, options) @@ -76,4 +82,6 @@ export class PromptActionClass { }) } } -} \ No newline at end of file + // [End update_custom_dialog_property] +} +// [End open_close_update_custom_dialog] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Index2.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Index2.ets index b01bc1145e..97e111f910 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Index2.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Index2.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start dialog_route_jump_back] @Entry @Component struct Index2 { @@ -31,4 +32,5 @@ struct Index2 { }) }.width('100%').height('100%').margin({ top: 20 }) } -} \ No newline at end of file +} +// [End dialog_route_jump_back] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Menu/CreateMenu.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Menu/CreateMenu.ets index b6c6580853..e6c8f9d312 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Menu/CreateMenu.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Menu/CreateMenu.ets @@ -15,6 +15,7 @@ import { PromptAction } from '@kit.ArkUI'; +// [Start builder_menu_content] class Tmp { private iconStr2: ResourceStr = $r('app.media.app_icon') @@ -75,9 +76,11 @@ export struct menuExample { } } build() { + // [StartExclude builder_menu_content] NavDestination() { Column({ space: 12 }) { + // [Start call_bind_menu] Button($r('app.string.menu_default')) .bindMenu([ { @@ -87,16 +90,21 @@ export struct menuExample { } } ]) + // [End call_bind_menu] .width(160) .height(50) + // [Start bind_menu_property] Button($r('app.string.menu_bind')) .bindMenu(this.MyMenu) + // [End bind_menu_property] .width(160) .height(50) + // [Start create_right_click_menu] Button($r('app.string.menu_rightClick')) .bindContextMenu(this.MyMenu, ResponseType.RightClick) + // [End create_right_click_menu] .width(160) .height(50) @@ -108,4 +116,6 @@ export struct menuExample { .backgroundColor('#f1f2f3') .title($r('app.string.create_menu')) } -} \ No newline at end of file + // [EndExclude builder_menu_content] +} +// [End builder_menu_content] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Toast/CreateToast.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Toast/CreateToast.ets index d137c48a1a..878844d16a 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Toast/CreateToast.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/Toast/CreateToast.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start create_toast] import { PromptAction } from '@kit.ArkUI'; import { BusinessError } from '@kit.BasicServicesKit'; @@ -49,4 +50,5 @@ export struct CreateToastExample { .backgroundColor('#f1f2f3') .title($r('app.string.CreateToast_title')) } -} \ No newline at end of file +} +// [End create_toast] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/customdialog/CreateCustomDialog.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/customdialog/CreateCustomDialog.ets index c249fbd4d2..44e37ff013 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/customdialog/CreateCustomDialog.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/customdialog/CreateCustomDialog.ets @@ -16,6 +16,7 @@ import { PromptActionClass } from '../../common/PromptActionClass'; import { ComponentContent } from '@kit.ArkUI'; +// [Start create_custom_dialog_example] @CustomDialog struct CustomDialogExample { controller: CustomDialogController = new CustomDialogController({ @@ -35,6 +36,10 @@ struct CustomDialogExample { } } +// [End create_custom_dialog_example] + +// [Start click_event_pop_dialog] +// [Start create_custom_dialog_controller] @Entry @Component export struct CreateDialog { @@ -42,6 +47,7 @@ export struct CreateDialog { builder: CustomDialogExample(), }) + // [StartExclude create_custom_dialog_controller] build() { NavDestination() { Column({ space: 12 }) { @@ -61,4 +67,7 @@ export struct CreateDialog { .backgroundColor('#f1f2f3') .title($r('app.string.CustomDialog_create')) } + // [EndExclude create_custom_dialog_controller] + // [End create_custom_dialog_controller] + // [End click_event_pop_dialog] } \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/ActionSheet.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/ActionSheet.ets index a0f5aa8446..edc3baea82 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/ActionSheet.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/ActionSheet.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start action_sheet_dialog] @Entry @Component export struct showActionSheetExample { @@ -80,4 +81,5 @@ export struct showActionSheetExample { .backgroundColor('#f1f2f3') .title($r('app.string.CustomDialog_ActionSheet')) } -} \ No newline at end of file +} +// [End action_sheet_dialog] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/AlertDialog.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/AlertDialog.ets index 3c662e1a0b..825c1f7ed9 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/AlertDialog.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/AlertDialog.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start alert_dialog] import { PromptAction } from '@kit.ArkUI'; @Entry @@ -70,4 +71,5 @@ export struct showAlertDialogExample { .backgroundColor('#f1f2f3') .title($r('app.string.CustomDialog_AlertDialog')) } -} \ No newline at end of file +} +// [End alert_dialog] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/CalendarPickerDialog.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/CalendarPickerDialog.ets index 5674c4cdc4..c12418f2f7 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/CalendarPickerDialog.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/CalendarPickerDialog.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start calender_picker_dialog] import { PromptAction } from '@kit.ArkUI'; @Entry @@ -59,4 +60,5 @@ export struct CalendarDialog { .backgroundColor('#f1f2f3') .title($r('app.string.CustomDialog_calender')) } -} \ No newline at end of file +} +// [End calender_picker_dialog] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/DatePickerDialog.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/DatePickerDialog.ets index 65a9abd17f..28caa25d66 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/DatePickerDialog.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/DatePickerDialog.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start date_picker_dialog] import { PromptAction } from '@kit.ArkUI'; @Entry @@ -50,4 +51,5 @@ export struct DatePickerDialogExample { .backgroundColor('#f1f2f3') .title($r('app.string.CustomDialog_date')) } -} \ No newline at end of file +} +// [End date_picker_dialog] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/TextPickerDialog.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/TextPickerDialog.ets index 150d4fbe57..165285fbc1 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/TextPickerDialog.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/TextPickerDialog.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start text_picker_dialog] import { PromptAction } from '@kit.ArkUI'; @Entry @@ -63,4 +64,5 @@ export struct TextPickerDialogExample { .backgroundColor('#f1f2f3') .title($r('app.string.CustomDialog_text')) } -} \ No newline at end of file +} +// [End text_picker_dialog] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/TimePickerDialog.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/TimePickerDialog.ets index 2b7365809b..7f0393367b 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/TimePickerDialog.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/fixedstyledialog/TimePickerDialog.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start time_picker_dialog] import { PromptAction } from '@kit.ArkUI'; @Entry @@ -56,4 +57,5 @@ export struct TimePickerDialogExample { .backgroundColor('#f1f2f3') .title($r('app.string.CustomDialog_time')) } -} \ No newline at end of file +} +// [End time_picker_dialog] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/opencustomdialog/openCustomDialog.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/opencustomdialog/openCustomDialog.ets index f2b78545ff..8200709865 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/opencustomdialog/openCustomDialog.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/opencustomdialog/openCustomDialog.ets @@ -89,8 +89,10 @@ function buildText(params: Params) { export struct openCustomDialog { @State message: string = 'hello' private ctx: UIContext = this.getUIContext(); + // [Start create_component_content] private contentNode: ComponentContent = new ComponentContent(this.ctx, wrapBuilder(buildText), new Params(this.message)); + // [End create_component_content] aboutToAppear(): void { PromptActionClass.setContext(this.ctx); diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/ButtonPopup.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/ButtonPopup.ets index a67c40277b..114fc049e3 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/ButtonPopup.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/ButtonPopup.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start button_popup] @Entry @Component export struct ButtonPopupExample { @@ -58,4 +59,5 @@ export struct ButtonPopupExample { .backgroundColor('#f1f2f3') .title($r('app.string.button_popup')) } -} \ No newline at end of file +} +// [End button_popup] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/CustomPopup.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/CustomPopup.ets index d8e133aead..c533a4f490 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/CustomPopup.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/CustomPopup.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start custom_popup] @Entry @Component export struct CustomPopupExample { @@ -58,4 +59,5 @@ export struct CustomPopupExample { .backgroundColor('#f1f2f3') .title($r('app.string.custom_popup')) } -} \ No newline at end of file +} +// [End custom_popup] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupAnimation.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupAnimation.ets index 686b519bc6..2ef0e99f87 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupAnimation.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupAnimation.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start animation_popup] @Entry @Component export struct AnimationPopupExample { @@ -81,4 +82,5 @@ export struct AnimationPopupExample { .backgroundColor('#f1f2f3') .title($r('app.string.AnimationPopup_title')) } -} \ No newline at end of file +} +// [End animation_popup] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupStateChange.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupStateChange.ets index a76171f7b7..a9fc84f984 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupStateChange.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupStateChange.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start state_popup] @Entry @Component export struct StatePopupExample { @@ -46,4 +47,5 @@ export struct StatePopupExample { .backgroundColor('#f1f2f3') .title($r('app.string.onStateChange_title')) } -} \ No newline at end of file +} +// [End state_popup] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupStyle.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupStyle.ets index 34127bc949..32426e3325 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupStyle.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/PopupStyle.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start style_popup] @Entry @Component export struct StylePopupExample { @@ -58,4 +59,5 @@ export struct StylePopupExample { .backgroundColor('#f1f2f3') .title($r('app.string.StylePopup_title')) } -} \ No newline at end of file +} +// [End style_popup] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/TextPrompts.ets b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/TextPrompts.ets index 9e81530b5a..4ff872db5c 100644 --- a/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/TextPrompts.ets +++ b/code/DocsSample/ArkUISample/DialogProject/entry/src/main/ets/pages/popup/TextPrompts.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start text_popup] @Entry @Component export struct TextPopupExample { @@ -41,4 +42,5 @@ export struct TextPopupExample { .backgroundColor('#f1f2f3') .title($r('app.string.TextPopup_title')) } -} \ No newline at end of file +} +// [End text_popup] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/Touch/ClickEvent.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/Touch/ClickEvent.ets index aa5cf871ae..84555db100 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/Touch/ClickEvent.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/Touch/ClickEvent.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start click_event_handle] @Entry @Component export struct Click { @@ -48,4 +49,5 @@ export struct Click { .backgroundColor('#f1f2f3') .title($r('app.string.Touch_ClickEvent_title')) } -} \ No newline at end of file +} +// [End click_event_handle] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/Touch/TouchEvent.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/Touch/TouchEvent.ets index 435d175e86..d423f073d4 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/Touch/TouchEvent.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/Touch/TouchEvent.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start touch_event_handle] @Entry @Component export struct Touch { @@ -70,4 +71,5 @@ export struct Touch { .backgroundColor('#f1f2f3') .title($r('app.string.Touch_TouchEvent_title')) } -} \ No newline at end of file +} +// [End touch_event_handle] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/HoverEffect.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/HoverEffect.ets index 2d9c8e3034..198de86e06 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/HoverEffect.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/HoverEffect.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start mouse_hover_effect] @Entry @Component export struct HoverEffectSample { @@ -47,4 +48,5 @@ export struct HoverEffectSample { .backgroundColor('#f1f2f3') .title($r('app.string.HoverEffectSample_title')) } -} \ No newline at end of file +} +// [End mouse_hover_effect] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnHover.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnHover.ets index 1fd6b22d4b..6992c005ce 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnHover.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnHover.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start dynamic_response_mouse_hover] @Entry @Component export struct Hover { @@ -46,4 +47,5 @@ export struct Hover { .backgroundColor('#f1f2f3') .title($r('app.string.Device_OnHover_title')) } -} \ No newline at end of file +} +// [End dynamic_response_mouse_hover] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnKey.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnKey.ets index 785cf406e0..eaa8bc571e 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnKey.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnKey.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start listen_response_key_event] @Entry @Component export struct OnKey { @@ -73,4 +74,5 @@ export struct OnKey { .backgroundColor('#f1f2f3') .title($r('app.string.Device_OnKey_title')) } -} \ No newline at end of file +} +// [End listen_response_key_event] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnKeyPreIme.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnKeyPreIme.ets index d5fba8b194..32edef1b97 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnKeyPreIme.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnKeyPreIme.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start key_event_intercept] import { KeyCode } from '@kit.InputKit'; @Entry @@ -50,4 +51,5 @@ export struct PreIme { .backgroundColor('#f1f2f3') .title($r('app.string.Device_OnKeyPreIme_title')) } -} \ No newline at end of file +} +// [End key_event_intercept] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnMouse.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnMouse.ets index 209e6c5843..baab41e24e 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnMouse.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/device/OnMouse.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start listen_response_mouse_event] @Entry @Component export struct Mouse { @@ -76,4 +77,5 @@ export struct Mouse { .backgroundColor('#f1f2f3') .title($r('app.string.Device_OnMouse_title')) } -} \ No newline at end of file +} +// [End listen_response_mouse_event] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/DefaultDrag.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/DefaultDrag.ets index 22e6b2e2e8..0da469af66 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/DefaultDrag.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/DefaultDrag.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start default_drag] import { unifiedDataChannel, uniformTypeDescriptor } from '@kit.ArkData'; import { promptAction } from '@kit.ArkUI'; import { BusinessError } from '@kit.BasicServicesKit'; @@ -27,6 +28,7 @@ export struct DefaultDrag { @State imgState: Visibility = Visibility.Visible; @State pixmap: image.PixelMap | undefined = undefined; + // [Start generate_pix_map] @Builder pixelMapBuilder() { Column() { @@ -37,6 +39,8 @@ export struct DefaultDrag { } } + // [StartExclude generate_pix_map] + // [Start data_delayed_retry] getDataFromUdmfRetry(event: DragEvent, callback: (data: DragEvent) => void) { try { let data: UnifiedData = event.getData(); @@ -64,6 +68,8 @@ export struct DefaultDrag { this.getDataFromUdmfRetry(event, callback); }, 1500); } + // [End data_delayed_retry] + // [EndExclude generate_pix_map] // 调用componentSnapshot中的createFromBuilder接口截取自定义builder的截图 private getComponentSnapshot(): void { @@ -78,6 +84,7 @@ export struct DefaultDrag { this.pixmap = pixmap; }) } + // [End generate_pix_map] // 长按50ms时提前准备自定义截图的pixmap private PreDragChange(preDragStatus: PreDragStatus): void { @@ -99,15 +106,20 @@ export struct DefaultDrag { .margin(10) .backgroundColor('#008888') Row() { + // [Start module_draggable] Image($r('app.media.app_icon')) .width(100) .height(100) .draggable(true) .margin({ left: 15 }) + // [StartExclude module_draggable] .visibility(this.imgState)// 绑定平行手势,可同时触发应用自定义长按手势 + // [Start bind_parallel_gesture] .parallelGesture(LongPressGesture().onAction(() => { promptAction.showToast({ duration: 100, message: 'Long press gesture trigger' }); })) + // [End bind_parallel_gesture] + // [EndExclude module_draggable] .onDragStart((event) => { let data: unifiedDataChannel.Image = new unifiedDataChannel.Image(); data.imageUri = 'common/pic/img.png'; @@ -119,10 +131,15 @@ export struct DefaultDrag { extraInfo: 'this is extraInfo', }; return dragItemInfo; - })// 提前准备拖拽自定义背板图 + }) + // [End module_draggable] + // 提前准备拖拽自定义背板图 + // [Start set_custom_drag_status] .onPreDrag((status: PreDragStatus) => { this.PreDragChange(status); }) + // [End set_custom_drag_status] + // [Start set_on_drag_end] .onDragEnd((event) => { // onDragEnd里取到的result值在接收方onDrop设置 if (event.getResult() === DragResult.DRAG_SUCCESSFUL) { @@ -131,6 +148,7 @@ export struct DefaultDrag { promptAction.showToast({ duration: 100, message: 'Drag failed' }); } }) + // [End set_on_drag_end] } Text('Drag Target Area') @@ -146,11 +164,16 @@ export struct DefaultDrag { .draggable(true) .margin({ left: 15 }) .border({ color: Color.Black, width: 1 })// 控制角标显示类型为MOVE,即不显示角标 + // [Start set_drag_behavior_move] .onDragMove((event) => { event.setResult(DragResult.DROP_ENABLED) event.dragBehavior = DragBehavior.MOVE + // [End set_drag_behavior_move] }) + // [Start allow_drag_type] .allowDrop([uniformTypeDescriptor.UniformDataType.IMAGE]) + // [End allow_drag_type] + // [Start set_on_drop_call] .onDrop((dragEvent?: DragEvent) => { // 获取拖拽数据 this.getDataFromUdmf((dragEvent as DragEvent), (event: DragEvent) => { @@ -164,7 +187,8 @@ export struct DefaultDrag { event.setResult(DragResult.DRAG_SUCCESSFUL); }) }) - } + // [End set_on_drop_call] + }allowDrop } .width('100%') .height('100%') @@ -179,4 +203,5 @@ export struct DefaultDrag { .backgroundColor('#f1f2f3') .title($r('app.string.Drag_DefaultDrag_title')) } -} \ No newline at end of file +} +// [End default_drag] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/MoreDrag.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/MoreDrag.ets index 62b030bd7c..85b1a0ed97 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/MoreDrag.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/drag/MoreDrag.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start more_drag] import { KeyCode } from '@kit.InputKit'; import { image } from '@kit.ImageKit'; @@ -60,6 +61,7 @@ export struct MoreDrag { Column({ space: 12 }) { Column({ space: 5 }) { + // [Start create_grid_item_module] Grid() { ForEach(this.numbers, (idx: number) => { GridItem() { @@ -70,6 +72,7 @@ export struct MoreDrag { .opacity(1.0) .id('grid' + idx) } + // [StartExclude create_grid_item_module] .dragPreview(this.previewData[idx]) .selectable(true) .selected(this.isSelectedGrid[idx]) @@ -78,8 +81,10 @@ export struct MoreDrag { normal: this.normalStyles, selected: this.selectStyles }) + // [Start grid_item_module_selected_true] .onClick(() => { this.isSelectedGrid[idx] = !this.isSelectedGrid[idx]; + // [StartExclude grid_item_module_selected_true] if (this.isSelectedGrid[idx]) { this.numberBadge++; let gridItemName = 'grid' + idx; @@ -95,14 +100,20 @@ export struct MoreDrag { } else { this.numberBadge--; } + // [EndExclude grid_item_module_selected_true] }) + // [End grid_item_module_selected_true] // 使能多选拖拽,右上角数量角标需要应用设置numberBadge参数 + // [EndExclude create_grid_item_module] + // [Start drag_preview_options] .dragPreviewOptions({ numberBadge: this.numberBadge }, { isMultiSelectionEnabled: true, defaultAnimationBeforeLifting: true }) + // [End drag_preview_options] .onDragStart(() => { }) }, (idx: string) => idx) } + // [End create_grid_item_module] .columnsTemplate('1fr 1fr 1fr 1fr 1fr') .columnsGap(5) .rowsGap(10) @@ -117,4 +128,5 @@ export struct MoreDrag { .backgroundColor('#f1f2f3') .title($r('app.string.Drag_MoreDrag_title')) } -} \ No newline at end of file +} +// [End more_drag] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/DefaultFocus.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/DefaultFocus.ets index 17950d8453..96fe7d74e6 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/DefaultFocus.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/DefaultFocus.ets @@ -15,6 +15,7 @@ import { KeyCode } from '@kit.InputKit'; +// [Start focus_visualization_manage] @Entry @Component export struct DefaultFocus { @@ -81,4 +82,5 @@ export struct DefaultFocus { .backgroundColor('#f1f2f3') .title($r('app.string.Focus_DefaultFocus_title')) } -} \ No newline at end of file +} +// [End focus_visualization_manage] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusAndClick.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusAndClick.ets index 7a745a6606..f5aebe743e 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusAndClick.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusAndClick.ets @@ -16,6 +16,7 @@ import { KeyCode } from '@kit.InputKit'; import { ColorMetrics, LengthMetrics } from '@kit.ArkUI'; +// [Start dynamic_focus_click_count] @Entry @Component export struct FocusAndClick { @@ -49,4 +50,5 @@ export struct FocusAndClick { .backgroundColor('#f1f2f3') .title($r('app.string.Focus_FocusAndClick_title')) } -} \ No newline at end of file +} +// [End dynamic_focus_click_count] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusController.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusController.ets index 2079000398..9a282c3093 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusController.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusController.ets @@ -16,6 +16,7 @@ import { KeyCode } from '@kit.InputKit'; import { ColorMetrics, LengthMetrics } from '@kit.ArkUI'; +// [Start dynamic_focus_control_demo] @Entry @Component export struct FocusControl { @@ -95,4 +96,5 @@ export struct FocusControl { .backgroundColor('#f1f2f3') .title($r('app.string.Focus_FocusController_title')) } -} \ No newline at end of file +} +// [End dynamic_focus_control_demo] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusPriority.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusPriority.ets index e98641f80a..23e38577d1 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusPriority.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusPriority.ets @@ -15,6 +15,7 @@ import { KeyCode } from '@kit.InputKit'; +// [Start focus_priority_manage] @Entry @Component export struct FocusPrioritySample { @@ -43,4 +44,5 @@ export struct FocusPrioritySample { .backgroundColor('#f1f2f3') .title($r('app.string.Focus_FocusPriority_title')) } -} \ No newline at end of file +} +// [End focus_priority_manage] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusScopePriority.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusScopePriority.ets index d4293025b8..eae88de81d 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusScopePriority.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusScopePriority.ets @@ -16,6 +16,7 @@ import { KeyCode } from '@kit.InputKit'; import { ColorMetrics, LengthMetrics } from '@kit.ArkUI'; +// [Start focus_scope_navigation] @Entry @Component export struct FocusScopePriority { @@ -145,4 +146,5 @@ export struct FocusScopePriority { .backgroundColor('#f1f2f3') .title($r('app.string.Focus_FocusScopePriority_title')) } -} \ No newline at end of file +} +// [End focus_scope_navigation] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusStyle.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusStyle.ets index 2982644278..2841736de1 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusStyle.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/FocusStyle.ets @@ -16,6 +16,7 @@ import { KeyCode } from '@kit.InputKit'; import { ColorMetrics, LengthMetrics } from '@kit.ArkUI'; +// [Start focus_style_manage] @Entry @Component export struct FocusStyle { @@ -48,4 +49,5 @@ export struct FocusStyle { .backgroundColor('#f1f2f3') .title($r('app.string.Focus_FocusStyle_title')) } -} \ No newline at end of file +} +// [End focus_style_manage] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/Focusable.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/Focusable.ets index 5dae705e3b..27a7def39d 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/Focusable.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/Focusable.ets @@ -12,9 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + import { KeyCode } from '@kit.InputKit'; +// [Start dynamic_focus_control_manage] @Entry @Component export struct FocusableExample { @@ -108,4 +109,5 @@ export struct FocusableExample { .backgroundColor('#f1f2f3') .title($r('app.string.Focus_Focusable_title')) } -} \ No newline at end of file +} +// [End dynamic_focus_control_manage] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/onFocusBlur.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/onFocusBlur.ets index 15d3549b87..4f993f6bef 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/onFocusBlur.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/focus/onFocusBlur.ets @@ -15,6 +15,7 @@ import { KeyCode } from '@kit.InputKit'; +// [Start focus_dynamic_reflect] @Entry @Component export struct OnFocusBlur { @@ -79,4 +80,5 @@ export struct OnFocusBlur { .backgroundColor('#f1f2f3') .title($r('app.string.Focus_OnFocusBlur_title')) } -} \ No newline at end of file +} +// [End focus_dynamic_reflect] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/gesturejudge/GestureJudge.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/gesturejudge/GestureJudge.ets index 08a2fd5be4..bce286e8de 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/gesturejudge/GestureJudge.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/gesturejudge/GestureJudge.ets @@ -13,15 +13,19 @@ * limitations under the License. */ +// [Start gesture_judge] +// [Start set_gesture_judge] @Entry @Component export struct GestureJudge { scroller: Scroller = new Scroller(); + // [StartExclude set_gesture_judge] scroller2: Scroller = new Scroller(); private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; private childRecognizer: GestureRecognizer = new GestureRecognizer(); private currentRecognizer: GestureRecognizer = new GestureRecognizer(); private lastOffset: number = 0; + // [EndExclude set_gesture_judge] build() { NavDestination() { @@ -115,6 +119,7 @@ export struct GestureJudge { } return GestureJudgeResult.CONTINUE; }) + // [StartExclude set_gesture_judge] .parallelGesture( // 绑定一个Pan手势作为动态控制器 PanGesture() .onActionUpdate((event: GestureEvent) => { @@ -151,6 +156,7 @@ export struct GestureJudge { this.lastOffset = event.offsetY; }) ) + // [EndExclude set_gesture_judge] }.width('100%').height('90%').backgroundColor(0xDCDCDC) } .width('100%') @@ -160,4 +166,6 @@ export struct GestureJudge { .backgroundColor('#f1f2f3') .title($r('app.string.gesture_GestureJudge_title')) } -} \ No newline at end of file +} +// [End set_gesture_judge] +// [End gesture_judge] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Exclusive.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Exclusive.ets index 628a7f590a..a72dfbf762 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Exclusive.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Exclusive.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start exclusive_recognition_gesture] @Entry @Component export struct Exclusive { @@ -52,4 +53,5 @@ export struct Exclusive { .backgroundColor('#f1f2f3') .title($r('app.string.groupgesture_Exclusive_title')) } -} \ No newline at end of file +} +// [End exclusive_recognition_gesture] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Parallel.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Parallel.ets index 2159c4570a..e08c5b8b0f 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Parallel.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Parallel.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start parallel_recognition_gesture] @Entry @Component export struct Parallel { @@ -52,4 +53,5 @@ export struct Parallel { .backgroundColor('#f1f2f3') .title($r('app.string.groupgesture_Parallel_title')) } -} \ No newline at end of file +} +// [End parallel_recognition_gesture] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Sequence.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Sequence.ets index 9d0269584e..9f88c3236b 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Sequence.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/groupgesture/Sequence.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start sequence_recognition_gesture] @Entry @Component export struct Sequence { @@ -88,4 +89,5 @@ export struct Sequence { .backgroundColor('#f1f2f3') .title($r('app.string.groupgesture_Sequence_title')) } -} \ No newline at end of file +} +// [End sequence_recognition_gesture] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/LongPressGesture.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/LongPressGesture.ets index 87adf25560..ddf02d55f8 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/LongPressGesture.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/LongPressGesture.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start catch_long_press_event] @Entry @Component export struct LongPress { @@ -51,4 +52,5 @@ export struct LongPress { .backgroundColor('#f1f2f3') .title($r('app.string.singlegesture_LongPressGesture_title')) } -} \ No newline at end of file +} +// [End catch_long_press_event] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/PanGesture.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/PanGesture.ets index 509ace4e30..7afb75ff6c 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/PanGesture.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/PanGesture.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start catch_pan_gesture_event] @Entry @Component export struct Pan { @@ -62,4 +63,5 @@ export struct Pan { .backgroundColor('#f1f2f3') .title($r('app.string.singlegesture_PanGesture_title')) } -} \ No newline at end of file +} +// [End catch_pan_gesture_event] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/PinchGesture.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/PinchGesture.ets index deea7cc9e1..9d538513c6 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/PinchGesture.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/PinchGesture.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start catch_pinch_gesture_event] @Entry @Component export struct Pinch { @@ -62,4 +63,5 @@ export struct Pinch { .backgroundColor('#f1f2f3') .title($r('app.string.singlegesture_PinchGesture_title')) } -} \ No newline at end of file +} +// [End catch_pinch_gesture_event] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/RotationGesture.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/RotationGesture.ets index 959d1ae819..89d5775e88 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/RotationGesture.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/RotationGesture.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start catch_rotation_gesture_event] @Entry @Component export struct Rotation { @@ -61,4 +62,5 @@ export struct Rotation { .backgroundColor('#f1f2f3') .title($r('app.string.singlegesture_RotationGesture_title')) } -} \ No newline at end of file +} +// [End catch_rotation_gesture_event] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/SwipeGesture.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/SwipeGesture.ets index 1416456ea1..4b43638553 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/SwipeGesture.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/SwipeGesture.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start catch_swipe_gesture_event] @Entry @Component export struct Swipe { @@ -53,4 +54,5 @@ export struct Swipe { .backgroundColor('#f1f2f3') .title($r('app.string.singlegesture_SwipeGesture_title')) } -} \ No newline at end of file +} +// [End catch_swipe_gesture_event] \ No newline at end of file diff --git a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/TapGesture.ets b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/TapGesture.ets index eec1a1b5bc..bc0f24b52c 100644 --- a/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/TapGesture.ets +++ b/code/DocsSample/ArkUISample/EventProject/entry/src/main/ets/pages/singlegesture/TapGesture.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start catch_click_twice_event] @Entry @Component export struct Tap { @@ -46,4 +47,5 @@ export struct Tap { .backgroundColor('#f1f2f3') .title($r('app.string.singlegesture_TapGesture_title')) } -} \ No newline at end of file +} +// [End catch_click_twice_event] \ No newline at end of file diff --git a/code/DocsSample/ConnectivityKit/Bluetooth/SerialCommunication/entry/src/main/ets/pages/Index.ets b/code/DocsSample/ConnectivityKit/Bluetooth/SerialCommunication/entry/src/main/ets/pages/Index.ets index cea579ee8f..e8d08b111b 100644 --- a/code/DocsSample/ConnectivityKit/Bluetooth/SerialCommunication/entry/src/main/ets/pages/Index.ets +++ b/code/DocsSample/ConnectivityKit/Bluetooth/SerialCommunication/entry/src/main/ets/pages/Index.ets @@ -130,6 +130,7 @@ struct serialCommunication { } }) + // [Start socket_spp_connect] Button('connectDevice') .width('50%') .backgroundColor('#8CE072') @@ -156,6 +157,7 @@ struct serialCommunication { } }) + // [End socket_spp_connect] Button('writeData') .width('50%') diff --git a/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry/src/main/ets/entryability/EntryAbility.ets b/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry/src/main/ets/entryability/EntryAbility.ets index fc8b1e1d4b..c679c30129 100644 --- a/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry/src/main/ets/entryability/EntryAbility.ets +++ b/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry/src/main/ets/entryability/EntryAbility.ets @@ -13,6 +13,8 @@ * limitations under the License. */ + +// [Start front_hce_swipe_ets] import { cardEmulation } from '@kit.ConnectivityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; @@ -92,4 +94,6 @@ export default class EntryAbility extends UIAbility { } } } -} \ No newline at end of file +} + +// [End front_hce_swipe_ets] diff --git a/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry1/src/main/ets/entry1ability/Entry1Ability.ets b/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry1/src/main/ets/entry1ability/Entry1Ability.ets index aa74877bad..fd62eac654 100644 --- a/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry1/src/main/ets/entry1ability/Entry1Ability.ets +++ b/code/DocsSample/ConnectivityKit/NFC/HCECardSimulationDevelopment/entry1/src/main/ets/entry1ability/Entry1Ability.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start back_hce_swipe_ets] import { cardEmulation } from '@kit.ConnectivityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; @@ -82,4 +83,6 @@ export default class EntryAbility extends UIAbility { } } } -} \ No newline at end of file +} + +// [Start back_hce_swipe_ets] diff --git a/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry/src/main/ets/entryability/EntryAbility.ets b/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry/src/main/ets/entryability/EntryAbility.ets index 7a39747af9..527f5998c6 100644 --- a/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry/src/main/ets/entryability/EntryAbility.ets +++ b/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry/src/main/ets/entryability/EntryAbility.ets @@ -13,6 +13,8 @@ * limitations under the License. */ + +// [Start front_get_nfc_tag_ets] import { tag } from '@kit.ConnectivityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; @@ -131,4 +133,6 @@ export default class EntryAbility extends UIAbility { } } } -} \ No newline at end of file +} + +// [End front_get_nfc_tag_ets] diff --git a/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry1/src/main/ets/entryability/EntryAbility.ets b/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry1/src/main/ets/entryability/EntryAbility.ets index 199867b3f1..1cc1452454 100644 --- a/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry1/src/main/ets/entryability/EntryAbility.ets +++ b/code/DocsSample/ConnectivityKit/NFC/NFCReadAndWrite/entry1/src/main/ets/entryability/EntryAbility.ets @@ -13,6 +13,8 @@ * limitations under the License. */ + +// [Start back_get_nfc_tag_ets] import { tag } from '@kit.ConnectivityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; @@ -89,4 +91,6 @@ export default class EntryAbility extends UIAbility { return; } } -} \ No newline at end of file +} + +// [End back_get_nfc_tag_ets] diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/cpp/types/project/3des_ecb_encryption_decryption.cpp b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/cpp/types/project/3des_ecb_encryption_decryption.cpp index 5fd01b3fc6..76129259f8 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/cpp/types/project/3des_ecb_encryption_decryption.cpp +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/cpp/types/project/3des_ecb_encryption_decryption.cpp @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start crypt_decrypt_flow] #include "CryptoArchitectureKit/crypto_common.h" #include "CryptoArchitectureKit/crypto_sym_cipher.h" #include @@ -74,4 +75,5 @@ end: OH_Crypto_FreeDataBlob(&outUpdate); OH_Crypto_FreeDataBlob(&decUpdate); return ret; -} \ No newline at end of file +} +// [End crypt_decrypt_flow] \ No newline at end of file diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/ets/pages/3des_ecb_encryption_decryption_asynchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/ets/pages/3des_ecb_encryption_decryption_asynchronous.ets index b1dc75ede5..d5e657a6a6 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/ets/pages/3des_ecb_encryption_decryption_asynchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/ets/pages/3des_ecb_encryption_decryption_asynchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start async_symmetry_encrypt_decrypt] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -56,6 +57,7 @@ async function main() { console.error('decrypt failed'); } } +// [End async_symmetry_encrypt_decrypt] @Entry @Component diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/ets/pages/3des_ecb_encryption_decryption_synchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/ets/pages/3des_ecb_encryption_decryption_synchronous.ets index c124ad89ae..6e4f3404f7 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/ets/pages/3des_ecb_encryption_decryption_synchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidance3DES/entry/src/main/ets/pages/3des_ecb_encryption_decryption_synchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start sync_symmetry_encrypt_decrypt] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -56,6 +57,7 @@ function main() { console.error('decrypt failed'); } } +// [End sync_symmetry_encrypt_decrypt] @Entry @Component diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_cbc_encryption_decryption.cpp b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_cbc_encryption_decryption.cpp index 9ee7c83de4..366a53a790 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_cbc_encryption_decryption.cpp +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_cbc_encryption_decryption.cpp @@ -13,10 +13,13 @@ * limitations under the License. */ +// [Start crypt_decrypt_sm4_cbc] #include "CryptoArchitectureKit/crypto_common.h" #include "CryptoArchitectureKit/crypto_sym_cipher.h" #include +// [StartExclude crypt_decrypt_sm4_cbc] #include "file.h" +// [EndExclude crypt_decrypt_sm4_cbc] OH_Crypto_ErrCode doTestSm4Cbc() { @@ -91,3 +94,4 @@ end: OH_Crypto_FreeDataBlob(&decUpdate); return ret; } +// [End crypt_decrypt_sm4_cbc] diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_ecb_encryption_decryption.cpp b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_ecb_encryption_decryption.cpp index 3d0b4f1ea3..1031db9133 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_ecb_encryption_decryption.cpp +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_ecb_encryption_decryption.cpp @@ -13,10 +13,13 @@ * limitations under the License. */ +// [Start crypt_decrypt_sm4_ecb] #include "CryptoArchitectureKit/crypto_common.h" #include "CryptoArchitectureKit/crypto_sym_cipher.h" #include +// [StartExclude crypt_decrypt_sm4_ecb] #include "file.h" +// [EndExclude crypt_decrypt_sm4_ecb] OH_Crypto_ErrCode doTestSm4Ecb() { @@ -83,3 +86,4 @@ end: OH_Crypto_FreeDataBlob(&decUpdate); return ret; } +// [End crypt_decrypt_sm4_ecb] diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_gcm_encryption_decryption.cpp b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_gcm_encryption_decryption.cpp index b392563011..1811c13a19 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_gcm_encryption_decryption.cpp +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_gcm_encryption_decryption.cpp @@ -13,10 +13,13 @@ * limitations under the License. */ +// [Start crypt_decrypt_sm4_gcm] #include "CryptoArchitectureKit/crypto_common.h" #include "CryptoArchitectureKit/crypto_sym_cipher.h" #include +// [StartExclude crypt_decrypt_sm4_gcm] #include "file.h" +// [EndExclude crypt_decrypt_sm4_gcm] OH_Crypto_ErrCode doTestSm4Gcm() { @@ -114,3 +117,4 @@ end: OH_Crypto_FreeDataBlob(&tagOutPut); return ret; } +// [End crypt_decrypt_sm4_gcm] diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_gcm_seg_encryption_decryption.cpp b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_gcm_seg_encryption_decryption.cpp index 882ae37606..6635d2ab25 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_gcm_seg_encryption_decryption.cpp +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4/entry/src/main/cpp/types/project/sm4_gcm_seg_encryption_decryption.cpp @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start crypt_decrypt_sm4_gcm_seg] #include #include "CryptoArchitectureKit/crypto_common.h" #include "CryptoArchitectureKit/crypto_sym_cipher.h" @@ -140,3 +141,4 @@ end: OH_Crypto_FreeDataBlob(&decUpdate); return ret; } +// [End crypt_decrypt_sm4_gcm_seg] diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_cbc_encryption_decryption/sm4_cbc_encryption_decryption_asynchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_cbc_encryption_decryption/sm4_cbc_encryption_decryption_asynchronous.ets index aac7e1ebae..20fef92877 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_cbc_encryption_decryption/sm4_cbc_encryption_decryption_asynchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_cbc_encryption_decryption/sm4_cbc_encryption_decryption_asynchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start async_symmetry_encrypt_decrypt_sm4_cbc] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -75,6 +76,7 @@ async function main() { console.error(`SM4 “${error}“, error code: ${error.code}`); } } +// [End async_symmetry_encrypt_decrypt_sm4_cbc] @Entry @Component diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_cbc_encryption_decryption/sm4_cbc_encryption_decryption_synchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_cbc_encryption_decryption/sm4_cbc_encryption_decryption_synchronous.ets index fc8dc5499b..4f2ba41c80 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_cbc_encryption_decryption/sm4_cbc_encryption_decryption_synchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_cbc_encryption_decryption/sm4_cbc_encryption_decryption_synchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start sync_symmetry_encrypt_decrypt_sm4_cbc] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -75,6 +76,7 @@ function main() { console.error(`SM4 “${error}“, error code: ${error.code}`); } } +// [End sync_symmetry_encrypt_decrypt_sm4_cbc] @Entry @Component diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_ecb_encryption_decryption/sm4_ecb_encryption_decryption_asynchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_ecb_encryption_decryption/sm4_ecb_encryption_decryption_asynchronous.ets index a18ba8bda2..3b24ee43ce 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_ecb_encryption_decryption/sm4_ecb_encryption_decryption_asynchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_ecb_encryption_decryption/sm4_ecb_encryption_decryption_asynchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start async_symmetry_encrypt_decrypt_sm4] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -54,6 +55,7 @@ async function main() { console.error('decrypt failed'); } } +// [End async_symmetry_encrypt_decrypt_sm4] @Entry @Component diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_ecb_encryption_decryption/sm4_ecb_encryption_decryption_synchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_ecb_encryption_decryption/sm4_ecb_encryption_decryption_synchronous.ets index 5bdb7b7607..912041ec50 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_ecb_encryption_decryption/sm4_ecb_encryption_decryption_synchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_ecb_encryption_decryption/sm4_ecb_encryption_decryption_synchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start sync_symmetry_encrypt_decrypt_sm4] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -54,6 +55,7 @@ function main() { console.error('decrypt failed'); } } +// [End sync_symmetry_encrypt_decrypt_sm4] @Entry @Component diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_encryption_decryption/sm4_gcm_encryption_decryption_asynchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_encryption_decryption/sm4_gcm_encryption_decryption_asynchronous.ets index 3917f0a4e9..fc6d4372cf 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_encryption_decryption/sm4_gcm_encryption_decryption_asynchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_encryption_decryption/sm4_gcm_encryption_decryption_asynchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start async_symmetry_encrypt_decrypt_sm4_gcm] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -89,6 +90,7 @@ async function main() { console.error('decrypt failed'); } } +// [End async_symmetry_encrypt_decrypt_sm4_gcm] @Entry @Component diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_encryption_decryption/sm4_gcm_encryption_decryption_synchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_encryption_decryption/sm4_gcm_encryption_decryption_synchronous.ets index f4809e31f3..06f7badc93 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_encryption_decryption/sm4_gcm_encryption_decryption_synchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_encryption_decryption/sm4_gcm_encryption_decryption_synchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start sync_symmetry_encrypt_decrypt_sm4_gcm] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -89,6 +90,7 @@ function main() { console.error('decrypt failed'); } } +// [End sync_symmetry_encrypt_decrypt_sm4_gcm] @Entry @Component diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_seg_encryption_decryption/sm4_gcm_seg_encryption_decryption_asynchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_seg_encryption_decryption/sm4_gcm_seg_encryption_decryption_asynchronous.ets index 734538cfbd..32394d2e53 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_seg_encryption_decryption/sm4_gcm_seg_encryption_decryption_asynchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_seg_encryption_decryption/sm4_gcm_seg_encryption_decryption_asynchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start async_symmetry_encrypt_decrypt_sm4_gcm_seg] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -113,6 +114,7 @@ async function sm4() { console.error('decrypt failed'); } } +// [End async_symmetry_encrypt_decrypt_sm4_gcm_seg] @Entry @Component diff --git a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_seg_encryption_decryption/sm4_gcm_seg_encryption_decryption_synchronous.ets b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_seg_encryption_decryption/sm4_gcm_seg_encryption_decryption_synchronous.ets index edeb079d9f..1b59b325c6 100755 --- a/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_seg_encryption_decryption/sm4_gcm_seg_encryption_decryption_synchronous.ets +++ b/code/DocsSample/Security/CryptoArchitectureKit/EncryptionDecryption/EncryptionDecryptionGuidanceSM4ArkTs/entry/src/main/ets/pages/sm4_gcm_seg_encryption_decryption/sm4_gcm_seg_encryption_decryption_synchronous.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start sync_symmetry_encrypt_decrypt_sm4_gcm_seg] import { cryptoFramework } from '@kit.CryptoArchitectureKit'; import { buffer } from '@kit.ArkTS'; @@ -113,6 +114,7 @@ function main() { console.error('decrypt failed'); } } +// [End sync_symmetry_encrypt_decrypt_sm4_gcm_seg] @Entry @Component diff --git a/code/DocsSample/bluetoothSample/entry/src/main/ets/bluetoothService/GattServerManager.ets b/code/DocsSample/bluetoothSample/entry/src/main/ets/bluetoothService/GattServerManager.ets index 89570dc881..aa38c2fb43 100644 --- a/code/DocsSample/bluetoothSample/entry/src/main/ets/bluetoothService/GattServerManager.ets +++ b/code/DocsSample/bluetoothSample/entry/src/main/ets/bluetoothService/GattServerManager.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +// [Start gatt_server_manage] import { ble } from '@kit.ConnectivityKit'; import { constant } from '@kit.ConnectivityKit'; import { BusinessError } from '@kit.BasicServicesKit'; @@ -292,4 +293,5 @@ export class GattServerManager { let gattServerManager = new GattServerManager(); -export default gattServerManager as GattServerManager; \ No newline at end of file +export default gattServerManager as GattServerManager; +// [End gatt_server_manage] \ No newline at end of file -- Gitee