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 f68734fd7740c085dc03aee7fbb3ace1aea54bc7..b76828c66366e8118265b204c86b639463db7626 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 b01bc1145e3714affc0fc17588bf25664cf68154..97e111f9102eb8cc33133c9e5c9b4deadfe558e6 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 b6c65808534e46a6b6bd7b1e9dc2430357237d8b..e6c8f9d3123eb4a748aa4871a0a9e1ec16aa2bb7 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 d137c48a1a8e8661ac419394ffd595d9f3912725..878844d16a59752fb3664e363cad27b69d7e9841 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 c249fbd4d283c2a6c3ec8dd0be63aca6e69112ab..44e37ff0137b5f6868886be7b897c4d8808b487d 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 a0f5aa844651bbfa353f8da21912a65db16c42bc..edc3baea8251f17286cc909df2d52b26188d1a94 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 3c662e1a0bd8eff011a6675a6f001d1b6ef67595..825c1f7ed93b7d661c5f189dd8687986f9fd4156 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 5674c4cdc47a3674bf9379474323c6d791a14b04..c12418f2f7f837b719ee5397d8abf7f582edab93 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 65a9abd17f21093d5e42ec9d8025c6ec5553cc5a..28caa25d66d07d063b681ea5dffbd8df5398b73b 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 150d4fbe57c60f1f864d9cc15fdb52132a824db9..165285fbc1f7f2aba0988c88d2e2f3362c770aa0 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 2b7365809b75930b0c20282147f4a30d1793b25d..7f0393367b4ae9594a1ea01c6ad12f8a11ff8c59 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 f2b78545ff9d8a63af5c764800da8daa8531f188..820070986567b6745b9d0a920e3712bf62afc27d 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 a67c40277b67aaf3bc9cbed815eee6972c23e663..114fc049e35955c71c3d11ac88db751f19cf9efb 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 d8e133aeade78502268c2af3cd4b705cdbe24583..c533a4f49056d7da52b8086304a12e3c1a6a0f5c 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 686b519bc6ceaa10ac7b5947a02ac28bed55dae7..2ef0e99f872fd0f9298ce1a88b6978aeff8f87a7 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 a76171f7b731f9badb933064bfc0836240eb372c..a9fc84f9844ebac1f5f2c79e7ef5b8336be22a42 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 34127bc9495fc3a445842e2b8e9d13a1d6e44568..32426e33258fcf5b3976588d19b7bd58eaac91de 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 9e81530b5ae638154f48d662f7b583a2b2b986bc..4ff872db5c2306411b3e34fabc9154d8771fc316 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 aa5cf871aecb1a50e5216f5aee4b04533b30d586..84555db100b8e1c1ad81f4dc1be3f189d24286d5 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 435d175e86c6e516e5fae8aba7a6e87416d31081..d423f073d40410c426dba4ca19877c7c52290f7c 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 2d9c8e303471c92f1ed63d6cae081b687ddf3a2e..198de86e063fb71801303866048a561921b6471d 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 1fd6b22d4b518b61ae1f262e00d6636a65893d14..6992c005cee95ca32fa5a6fffdd837e37af9470c 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 785cf406e017e591ff1bd0c984c8b0a93b7f127d..eaa8bc571e56996e40634da472ab23320ec88691 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 d5fba8b194ba60c99868d0e2866703303402ffa7..32edef1b979e0a2bcf6ad0dabc73691f2f26872b 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 209e6c58432dbb5d0a4ad11d0195822489ba5135..baab41e24e74633e70a408537ae47d37aa2d4bcb 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 22e6b2e2e81f86a9cfe9a00f3be81069bb5b0b85..0da469af667fa7068e24b1aff4bea53e180bfa17 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 62b030bd7cc540ec6980422ec5e37a5651bbd6a6..85b1a0ed9793fb3ec1f1585146043477cb2e6676 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 17950d8453aeba1abd5c901a2731836790826419..96fe7d74e62b4d7baefe941af59b78203e29ad20 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 7a745a6606bb42947ab7a74049b87ba33732d70e..f5aebe743e29b644ce9d13c1570b2d3e3a0c67d4 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 20790003985759fb3b7e4eb50e091054278e5a4e..9a282c3093f866dfe7ccbde177ac57bee2000714 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 e98641f80a174ee0c85ca8a282d1ff6d4262dc57..23e38577d10744c6646b7e14a48721f925a340b6 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 d4293025b8c5a4ae8f335e9b064b2edf3a67c16d..eae88de81d087426eb3206cbec9568109abaef5d 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 29826442789b710f246a79fe15f31ff897b8aa49..2841736de10f5d549f62ef9d926e3379de825a06 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 5dae705e3b2a5bc53eba530398882b58beb3f6ab..27a7def39df2e59a8edbc2b4e226db96179e677a 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 15d3549b87944bf4c7cd371ad915d25f6b70ba7e..4f993f6bef8dd5b4ac138a13fd380803d05b4748 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 08a2fd5be452bf51c898fabe92a3bc67d6f372ee..bce286e8def63f96f3a88484190dc3e8038fe788 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 628a7f590ad9e5d39e865e00b4d480aa541b0d65..a72dfbf7621f6bdfc0372a6a8093d27657d67be9 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 2159c4570a59f2c01443e97784a32d26c58895f0..e08c5b8b0f39a0e7c3f1fd940f071033b311f7eb 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 9d0269584e25902ff583f948c0f5cdc3ce363e13..9f88c3236bfa63699cb0056f1c62165e458ae999 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 87adf25560d3d58519f6aa869ee513ba786d17d4..ddf02d55f8e294dec314a645bcc821231df11515 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 509ace4e30312692104ad555a66307be2d5f4f42..7afb75ff6ca1b5cf15717cd7e7de66d46703d35c 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 deea7cc9e1627d1b5b5f2556602f17f937a62521..9d538513c66b652bdc2f018ab2a6e39680133f94 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 959d1ae81909c25d5fd3a54eef3b9a10fd9b5f09..89d5775e8815a222812b4917c7c2244d310c5f7f 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 1416456ea1526681e55fd4f96c4966476d75e774..4b4363855344f460e3efba6f37bba0e5c8b15bdb 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 eec1a1b5bc7403412b51e63adea3ffe7f592da54..bc0f24b52c56514c5b2140e60fb35d3dde4f6769 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 cea579ee8f92c9b5a23085e0ce5503c1382d2b84..e8d08b111b8cc007f63d9d6739db24660ec9a881 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 fc8b1e1d4bbbe74e6166bcf6340d8b91cd92a628..c679c30129d38ccaa5bc30777dbe6b07cbf1dc42 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 aa74877badfb699324f5477a5c4f9b77f3b0ddf7..fd62eac65464ff66c54664b4222c57199a63e7ea 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 7a39747af998d8dc03073665e467c4ed96d9371b..527f5998c6416c26c55220ebc124ffd1bd4dde0c 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 199867b3f18085135137566ba976baabcdca8cc9..1cc14524545636b15ea46dfc60f10c4fc1ef294a 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 5fd01b3fc62be76efd146091f68376fe5d396b4f..76129259f81a98a52365775ad320fe30c6e05ad7 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 b1dc75ede5e4648634c9d5cbeff4678ea76f98bd..d5e657a6a6e5b548b3944a0b0df334dce12efb22 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 c124ad89aedd445263347d5953b8cbd891f7c7fb..6e4f3404f746b7251b58447851f74a5200605400 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 9ee7c83de4404a64949d958cb4662e6f458cb57e..366a53a790a7adedb74f93d0f6a00b0d6e9272e8 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 3d0b4f1ea3502a13c565bdff87ac362c836a5018..1031db9133388efa1e143d2183d2b5f21a0de592 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 b3925630118f9e621793a816ca97a8b21ddc2bc5..1811c13a19524ff17c013dcea1189e1d002c7e9e 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 882ae37606d2eec1be17caeab8dad06a3c8b5809..6635d2ab25aa3411733cc85636b68aaf4320f5db 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 aac7e1ebaeadc46467ac09702778f379924082a9..20fef92877bbea39749ab8e093467ed9b98428d2 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 fc8dc5499bdc3066c5f21a53862cf03d57469aae..4f2ba41c801f7437ff85950e2fd54d912455cc6a 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 a18ba8bda22d76a51559fb0abb4f5e19fd435132..3b24ee43ce4fa5228da66aba01411b1f2206630b 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 5bdb7b760773fc23954490ecf1120b6b1945140e..912041ec509af6e2cfa2ce2c96f4b4132680768a 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 3917f0a4e909f9d3fc5832e2abd21706e0fc4c98..fc6d4372cfc15c4b4c4642d6f23933f989605d37 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 f4809e31f33fa824cc8231177a79af547688ba45..06f7badc93d1e989d518fadb82b7d182c6070b43 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 734538cfbd7c1dab5450cf717e9d1deefb1cda0a..32394d2e5369f28cb47569e3f2e2e77c50351634 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 edeb079d9f27acdb0dd1a4784aa19ab81daedd25..1b59b325c638ec9b7e7606c7a09e71df0234f790 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 89570dc8815ec20cc1a728b2898e6cd6d68b08ac..aa38c2fb43a87c6f629c9894e4e3283cdc51546e 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