已合并
GestureCollectIntercept #137111
yuanlin创建于 4月2日
GestureCollectIntercept #137111
已合并
共 9 个文件变更+453-1
| @@ -644,6 +644,7 @@ | |||
| 644 | - [ArkUI_GestureInterruptInfo](capi-arkui-nativemodule-arkui-gestureinterruptinfo.md) | 644 | - [ArkUI_GestureInterruptInfo](capi-arkui-nativemodule-arkui-gestureinterruptinfo.md) |
| 645 | - [ArkUI_GestureEvent](capi-arkui-nativemodule-arkui-gestureevent.md) | 645 | - [ArkUI_GestureEvent](capi-arkui-nativemodule-arkui-gestureevent.md) |
| 646 | - [ArkUI_GestureEventTargetInfo](capi-arkui-nativemodule-arkui-gestureeventtargetinfo.md) | 646 | - [ArkUI_GestureEventTargetInfo](capi-arkui-nativemodule-arkui-gestureeventtargetinfo.md) |
| 647 | + - [ArkUI_GestureCollectInterceptInfo](capi-arkui-nativemodule-arkui-gesturecollectinterceptinfo.md) | ||
| 647 | - [ArkUI_ParallelInnerGestureEvent](capi-arkui-nativemodule-arkui-parallelinnergestureevent.md) | 648 | - [ArkUI_ParallelInnerGestureEvent](capi-arkui-nativemodule-arkui-parallelinnergestureevent.md) |
| 648 | - [ArkUI_TouchRecognizer](capi-arkui-nativemodule-arkui-touchrecognizer.md) | 649 | - [ArkUI_TouchRecognizer](capi-arkui-nativemodule-arkui-touchrecognizer.md) |
| 649 | - [ArkUI_TouchRecognizer*](capi-arkui-nativemodule-arkui-touchrecognizerhandle.md) | 650 | - [ArkUI_TouchRecognizer*](capi-arkui-nativemodule-arkui-touchrecognizerhandle.md) |
| @@ -692,6 +692,26 @@ FontWeight是字重[fontWeight](./ts-basic-components-text.md#fontweight)入参v | |||
| 692 | | RightBottom | 从右下向左上。 | | 692 | | RightBottom | 从右下向左上。 | |
| 693 | | None | 无。 | | 693 | | None | 无。 | |
![]() ![]() | |||
| 694 | 694 | ||
| 695 | +## GestureCollectIntervention | ||
| 696 | + | ||
| 697 | +定义手势和事件收集的干预操作类型。 | ||
| 698 | + | ||
26的起始版本统一在接口描述下第一行添加起始版本说明。 起始版本: 26.0.0 ![]() ![]() | |||
| 699 | +**起始版本:** 26.0.0 | ||
| 700 | + | ||
| 701 | +**原子化服务API:** 从API版本26.0.0开始,该接口支持在原子化服务中使用。 | ||
| 702 | + | ||
| 703 | +**系统能力:** SystemCapability.ArkUI.ArkUI.Full | ||
| 704 | + | ||
| 705 | +**模型约束:** 此接口仅可在Stage模型下使用。 | ||
| 706 | + | ||
| 707 | +| 名称 | 值 | 说明 | | ||
| 708 | +| ----------- | - | ----- | | ||
| 709 | +| CONTINUE | 0 | 继续正常的手势和事件收集流程。不进行任何干预。 | | ||
| 710 | +| DISCARD_LOWER | 1 | 丢弃所有待收集的低优先级手势和事件。丢弃的部分包括左侧兄弟节点以及祖先节点(父节点及以上)的手势。仅保留当前节点和更高优先级节点中已收集的手势。 | | ||
| 711 | +| DISCARD_HIGHER | 2 | 丢弃已经收集到的高优先级手势和事件。会丢弃已收集的右侧兄弟节点和当前节点上的手势。将继续处理低优先级手势的收集流程(左侧兄弟节点和祖先节点)。 | | ||
| 712 | +| DISCARD_SELF | 3 | 丢弃当前节点自身的手势和事件。当前节点的手势和事件将从手势树中排除。兄弟节点(左侧和右侧)以及祖先节点的手势仍会继续收集。 | | ||
| 713 | +| DISCARD_LOWER_PRIORITY_SIBLINGS | 4 | 丢弃左侧兄弟节点中待收集的手势和事件。当前节点以及已收集的右侧兄弟节点的手势和事件将被保留。将继续处理父节点以及祖先节点的收集流程。 | | ||
| 714 | + | ||
| 695 | ## HorizontalAlign | 715 | ## HorizontalAlign |
| 696 | 716 | ||
| 697 | 定义子组件在水平方向上的对齐方式。 | 717 | 定义子组件在水平方向上的对齐方式。 |
| @@ -166,6 +166,59 @@ type TouchTestDoneCallback = (event: BaseGestureEvent, recognizers: Array\<Gestu | |||
| 166 | | event | [BaseGestureEvent](./ts-gesture-common.md#basegestureevent11对象说明) | 是 | [触摸测试](../../../ui/arkts-interaction-basic-principles.md#触摸测试)结束后的基础手势事件的信息。 <br/>**说明:** <br/>仅包含BaseGestureEvent的信息,不包含其子类拓展信息。<br/>axisHorizontal和axisVertical的值为0。 | | 166 | | event | [BaseGestureEvent](./ts-gesture-common.md#basegestureevent11对象说明) | 是 | [触摸测试](../../../ui/arkts-interaction-basic-principles.md#触摸测试)结束后的基础手势事件的信息。 <br/>**说明:** <br/>仅包含BaseGestureEvent的信息,不包含其子类拓展信息。<br/>axisHorizontal和axisVertical的值为0。 | |
| 167 | | recognizers | Array\<[GestureRecognizer](ts-gesture-common.md#gesturerecognizer12)\> | 是 | [触摸测试](../../../ui/arkts-interaction-basic-principles.md#触摸测试)结束后,所有手势识别器对象。 | | 167 | | recognizers | Array\<[GestureRecognizer](ts-gesture-common.md#gesturerecognizer12)\> | 是 | [触摸测试](../../../ui/arkts-interaction-basic-principles.md#触摸测试)结束后,所有手势识别器对象。 | |
| 168 | 168 | ||
| 169 | +## onGestureCollectIntercept | ||
| 170 | + | ||
| 171 | +onGestureCollectIntercept(callback: GestureCollectInterceptCallback): T | ||
| 172 | + | ||
| 173 | +在当前节点及更高优先级节点上的事件和手势被收集完成后触发该回调。该回调可用于干预事件和手势的收集结果。使用callback异步回调。 | ||
| 174 | + | ||
| 175 | +**起始版本:** 26.0.0 | ||
| 176 | + | ||
| 177 | +**原子化服务API:** 从API版本26.0.0开始,该接口支持在原子化服务中使用。 | ||
| 178 | + | ||
| 179 | +**系统能力:** SystemCapability.ArkUI.ArkUI.Full | ||
| 180 | + | ||
| 181 | +**模型约束:** 此接口仅可在Stage模型下使用。 | ||
| 182 | + | ||
| 183 | +**参数:** | ||
| 184 | + | ||
| 185 | +| 参数名 | 类型 | 必填 | 说明 | | ||
| 186 | +| ---------- | -------------------------- | ------- | ----------------------------- | | ||
| 187 | +| callback | [GestureCollectInterceptCallback](#gesturecollectinterceptcallback) | 是 | 组件进行触摸测试时使用的回调函数。在当前节点及更高优先级节点上的事件和手势收集完成后执行,以干预收集结果。 | | ||
| 188 | + | ||
| 189 | +**返回值:** | ||
| 190 | + | ||
| 191 | +| 类型 | 说明 | | ||
| 192 | +| -------- | -------- | | ||
| 193 | +| T | 返回当前组件。 | | ||
| 194 | + | ||
| 195 | +## GestureCollectInterceptCallback | ||
| 196 | + | ||
| 197 | +type GestureCollectInterceptCallback = (recognizers: Array\<GestureRecognizer\>, touchRecognizers?: Array\<TouchRecognizer\>) => GestureCollectIntervention | ||
| 198 | + | ||
| 199 | +定义在[onGestureCollectIntercept](#ongesturecollectintercept)中使用的回调类型。 | ||
| 200 | + | ||
| 201 | +**起始版本:** 26.0.0 | ||
| 202 | + | ||
| 203 | +**原子化服务API:** 从API版本26.0.0开始,该接口支持在原子化服务中使用。 | ||
| 204 | + | ||
添加模型约束说明。
![]() ![]() | |||
| 205 | +**系统能力:** SystemCapability.ArkUI.ArkUI.Full | ||
| 206 | + | ||
| 207 | +**模型约束:** 此接口仅可在Stage模型下使用。 | ||
| 208 | + | ||
| 209 | +**参数:** | ||
| 210 | + | ||
| 211 | +| 参数名 | 类型 | 必填 | 说明 | | ||
| 212 | +| -------- | ------------------------- | ---- | ------------------------------------------------------------ | | ||
| 213 | +| recognizers | Array\<[GestureRecognizer](ts-gesture-common.md#gesturerecognizer12)\> | 是 | 响应链上组件的手势识别器对象。 | | ||
| 214 | +| touchRecognizers | Array\<[TouchRecognizer](ts-gesture-common.md#touchrecognizer20)\> | 否 | 响应链上组件的触摸识别器对象。<br/>默认值为null。| | ||
| 215 | + | ||
| 216 | +**返回值:** | ||
| 217 | + | ||
| 218 | +| 类型 | 说明 | | ||
| 219 | +| ------ | --------- | | ||
| 220 | +| [GestureCollectIntervention](./ts-appendix-enums.md#gesturecollectintervention) | 手势收集干预结果。 | | ||
| 221 | + | ||
| 169 | ## 示例 | 222 | ## 示例 |
| 170 | 223 | ||
| 171 | ### 示例1(嵌套滚动) | 224 | ### 示例1(嵌套滚动) |
| @@ -796,3 +849,79 @@ struct TouchTestDoneExample { | |||
| 796 | } | 849 | } |
| 797 | ``` | 850 | ``` |
| 798 |  | 851 |  |
| 852 | + | ||
| 853 | +### 示例6(自定义干预事件和手势的收集结果) | ||
| 854 | + | ||
| 855 | +该示例通过配置[onGestureCollectIntercept](#ongesturecollectintercept)指定手势识别器或者触摸识别器是否透传到其他节点。点击button2时,不透传触摸事件到Column。点击button1时,透传触摸事件到Column,Column变色。 | ||
| 856 | + | ||
| 857 | +从API版本26.0.0开始,新增onGestureCollectIntercept接口。 | ||
| 858 | + | ||
| 859 | +```ts | ||
| 860 | +// xxx.ets | ||
| 861 | +@Entry | ||
| 862 | +@Component | ||
| 863 | +struct Index { | ||
| 864 | + @State backgroundColorButton1: string = '#D5D5D5'; | ||
| 865 | + @State backgroundColorButton2: string = '#D5D5D5'; | ||
| 866 | + @State backgroundColorRow: string = '#FFFFFF'; | ||
| 867 | + @State backgroundColorColumn: string = '#FFFFFF'; | ||
| 868 | + | ||
| 869 | + build() { | ||
| 870 | + Column() { | ||
| 871 | + Column() { | ||
| 872 | + Row({ space: 20 }) { | ||
| 873 | + Button('button1') | ||
| 874 | + .width('30%') | ||
| 875 | + .height(40) | ||
| 876 | + .id('button1') | ||
| 877 | + .onTouch(() => { | ||
| 878 | + this.backgroundColorButton1 = '#E5E5E5'; | ||
| 879 | + }) | ||
| 880 | + .backgroundColor(this.backgroundColorButton1) | ||
| 881 | + Button('button2') | ||
| 882 | + .width('30%') | ||
| 883 | + .height(40) | ||
| 884 | + .id('button2') | ||
| 885 | + .onTouch(() => { | ||
| 886 | + this.backgroundColorButton2 = '#E5E5E5'; | ||
| 887 | + }) | ||
| 888 | + .backgroundColor(this.backgroundColorButton2) | ||
| 889 | + } | ||
| 890 | + .justifyContent(FlexAlign.Center) | ||
| 891 | + .width('90%') | ||
| 892 | + .height(200) | ||
| 893 | + .margin(25) | ||
| 894 | + .onTouch(() => { | ||
| 895 | + this.backgroundColorRow = '#666666'; | ||
| 896 | + }) | ||
| 897 | + .backgroundColor(this.backgroundColorRow) | ||
| 898 | + .onGestureCollectIntercept((recognizers: Array<GestureRecognizer>, | ||
| 899 | + touchRecognizers: Array<TouchRecognizer>) => { | ||
| 900 | + if (!touchRecognizers) { | ||
| 901 | + return GestureCollectIntervention.CONTINUE; | ||
| 902 | + } else { | ||
| 903 | + for (let i = 0; i < touchRecognizers.length; i++) { | ||
| 904 | + let id = touchRecognizers[i].getEventTargetInfo().getId(); | ||
| 905 | + if (id == 'button2') { | ||
| 906 | + return GestureCollectIntervention.DISCARD_LOWER; | ||
| 907 | + } | ||
| 908 | + } | ||
| 909 | + } | ||
| 910 | + return GestureCollectIntervention.CONTINUE; | ||
| 911 | + }) | ||
| 912 | + } | ||
| 913 | + .margin(25) | ||
| 914 | + .padding(20) | ||
| 915 | + .width('90%') | ||
| 916 | + .height(250) | ||
| 917 | + .borderWidth(2) | ||
| 918 | + .onTouch(() => { | ||
| 919 | + this.backgroundColorColumn = '#E5E5E5'; | ||
| 920 | + }) | ||
| 921 | + .backgroundColor(this.backgroundColorColumn) | ||
| 922 | + } | ||
| 923 | + .padding(15) | ||
| 924 | + } | ||
| 925 | +} | ||
| 926 | +``` | ||
| 927 | + | ||
| @@ -120,6 +120,26 @@ getId(): string | |||||||
| 120 | | ------ | --------- | | 120 | | ------ | --------- | | ||||
| 121 | | string | 当前组件的[组件标识](./ts-universal-attributes-component-id.md#id)。 | | 121 | | string | 当前组件的[组件标识](./ts-universal-attributes-component-id.md#id)。 | | ||||
| 122 | 122 | ||||||
| 123 | +### getUniqueId | ||||||
| 124 | + | ||||||
| 125 | +getUniqueId(): number | ||||||
| 126 | + | ||||||
| 127 | +返回当前组件的唯一id。 | ||||||
| 128 | + | ||||||
| 129 | +**起始版本:** 26.0.0 | ||||||
| 130 | + | ||||||
| 131 | +**原子化服务API:** 从API版本26.0.0开始,该接口支持在原子化服务中使用。 | ||||||
| 132 | + | ||||||
| 133 | +**系统能力:** SystemCapability.ArkUI.ArkUI.Full | ||||||
| 134 | + | ||||||
| 135 | +**模型约束:** 此接口仅可在Stage模型下使用。 | ||||||
| 136 | + | ||||||
| 137 | +**返回值:** | ||||||
| 138 | + | ||||||
| 139 | +| 类型 | 说明 | | ||||||
| 140 | +| ------ | --------- | | ||||||
| 141 | +| number | 当前组件的唯一id。 | | ||||||
| 142 | + | ||||||
| 123 | ## TouchRecognizer<sup>20+</sup> | 143 | ## TouchRecognizer<sup>20+</sup> | ||||
| 124 | 144 | ||||||
| 125 | 触摸识别器对象。 | 145 | 触摸识别器对象。 | ||||
| @@ -154,6 +174,32 @@ cancelTouch(): void | |||||||
| 154 | 174 | ||||||
| 155 | **系统能力:** SystemCapability.ArkUI.ArkUI.Full | 175 | **系统能力:** SystemCapability.ArkUI.ArkUI.Full | ||||
| 156 | 176 | ||||||
| 177 | +### isHostBelongsTo | ||||||
| 178 | + | ||||||
| 179 | +isHostBelongsTo(uniqueId: number): boolean | ||||||
| 180 | + | ||||||
| 181 | +返回当前触摸识别器绑定节点是否为传入组件的后代节点。 | ||||||
| 182 | + | ||||||
| 183 | +**起始版本:** 26.0.0 | ||||||
| 184 | + | ||||||
| 185 | +**原子化服务API:** 从API版本26.0.0开始,该接口支持在原子化服务中使用。 | ||||||
| 186 | + | ||||||
| 187 | +**系统能力:** SystemCapability.ArkUI.ArkUI.Full | ||||||
| 188 | + | ||||||
| 189 | +**模型约束:** 此接口仅可在Stage模型下使用。 | ||||||
| 190 | + | ||||||
补充参数表格。 ![]() ![]() | |||||||
| 191 | +**参数:** | ||||||
| 192 | + | ||||||
| 193 | +| 参数名 | 类型 | 必填 | 说明 | | ||||||
| 194 | +| -------- | ------------------------- | ---- | ------------------------------------------------------------ | | ||||||
| 195 | +| uniqueId | number | 是 | 组件的唯一ID。可以通过[getUniqueId](#getuniqueid)接口获取该ID。 | | ||||||
| 196 | + | ||||||
| 197 | +**返回值:** | ||||||
| 198 | + | ||||||
| 199 | +| 类型 | 说明 | | ||||||
| 200 | +| ------ | --------- | | ||||||
| 201 | +| boolean | 当前触摸识别器绑定节点是否为传入组件的后代节点。true表示当前绑定节点为传入组件的后代节点,false表示当前绑定节点非传入组件的后代节点。 | | ||||||
A ❌疑似检测到中英文错别字 错误原因:术语使用不一致。第214行使用"Touch识别器",而这里使用"触摸识别器"。建议统一术语使用,要么全部使用中文"触摸识别器",要么全部使用英文"Touch识别器"。 建议修改为: 改动建议
![]() ![]() | |||||||
| 202 | + | ||||||
| 157 | ## GestureRecognizer<sup>12+</sup> | 203 | ## GestureRecognizer<sup>12+</sup> | ||||
| 158 | 204 | ||||||
| 159 | 手势识别器对象。 | 205 | 手势识别器对象。 | ||||
| @@ -326,6 +372,32 @@ preventBegin(): void | |||||||
| 326 | 372 | ||||||
| 327 | **系统能力:** SystemCapability.ArkUI.ArkUI.Full | 373 | **系统能力:** SystemCapability.ArkUI.ArkUI.Full | ||||
| 328 | 374 | ||||||
| 375 | +### isHostBelongsTo | ||||||
| 376 | + | ||||||
| 377 | +isHostBelongsTo(uniqueId: number): boolean | ||||||
| 378 | + | ||||||
| 379 | +返回当前手势识别器绑定节点是否为传入组件的后代节点。 | ||||||
| 380 | + | ||||||
| 381 | +**起始版本:** 26.0.0 | ||||||
| 382 | + | ||||||
| 383 | +**原子化服务API:** 从API版本26.0.0开始,该接口支持在原子化服务中使用。 | ||||||
| 384 | + | ||||||
| 385 | +**系统能力:** SystemCapability.ArkUI.ArkUI.Full | ||||||
| 386 | + | ||||||
| 387 | +**模型约束:** 此接口仅可在Stage模型下使用。 | ||||||
| 388 | + | ||||||
| 389 | +**参数:** | ||||||
| 390 | + | ||||||
| 391 | +| 参数名 | 类型 | 必填 | 说明 | | ||||||
| 392 | +| -------- | ------------------------- | ---- | ------------------------------------------------------------ | | ||||||
| 393 | +| uniqueId | number | 是 | 组件的唯一ID。可以通过[getUniqueId](#getuniqueid)接口获取该ID。 | | ||||||
| 394 | + | ||||||
| 395 | +**返回值:** | ||||||
| 396 | + | ||||||
| 397 | +| 类型 | 说明 | | ||||||
| 398 | +| ------ | --------- | | ||||||
| 399 | +| boolean | 当前手势识别器绑定节点是否为传入组件的后代节点。true表示当前绑定节点为传入组件的后代节点,false表示当前绑定节点非传入组件的后代节点。 | | ||||||
| 400 | + | ||||||
| 329 | ## TapRecognizer<sup>18+</sup> | 401 | ## TapRecognizer<sup>18+</sup> | ||||
| 330 | 402 | ||||||
| 331 | 点击手势识别器对象,继承自[GestureRecognizer](#gesturerecognizer12)。 | 403 | 点击手势识别器对象,继承自[GestureRecognizer](#gesturerecognizer12)。 | ||||
| @@ -0,0 +1,22 @@ | |||
| 1 | +# ArkUI_GestureCollectInterceptInfo | ||
添加readme目录。 ![]() ![]() | |||
| 2 | +<!--Kit: ArkUI--> | ||
| 3 | +<!--Subsystem: ArkUI--> | ||
| 4 | +<!--Owner: @yihao-lin--> | ||
| 5 | +<!--Designer: @piggyguy--> | ||
| 6 | +<!--Tester: @songyanhong--> | ||
| 7 | +<!--Adviser: @Brilliantry_Rui--> | ||
| 8 | + | ||
| 9 | +```c | ||
| 10 | +typedef struct ArkUI_GestureCollectInterceptInfo ArkUI_GestureCollectInterceptInfo | ||
| 11 | +``` | ||
| 12 | + | ||
| 13 | +## 概述 | ||
| 14 | + | ||
| 15 | +定义手势收集拦截信息。 | ||
| 16 | + | ||
| 17 | +**起始版本:** 26.0.0 | ||
| 18 | + | ||
| 19 | +**相关模块:** [ArkUI_NativeModule](capi-arkui-nativemodule.md) | ||
| 20 | + | ||
| 21 | +**所在头文件:** [native_type.h](capi-native-type-h.md) | ||
| 22 | + | ||
| @@ -51,6 +51,7 @@ | |||
| 51 | | [ArkUI_GestureRecognizerType](#arkui_gesturerecognizertype) | ArkUI_GestureRecognizerType | 定义手势类型。 | | 51 | | [ArkUI_GestureRecognizerType](#arkui_gesturerecognizertype) | ArkUI_GestureRecognizerType | 定义手势类型。 | |
| 52 | | [ArkUI_GestureInterruptResult](#arkui_gestureinterruptresult) | ArkUI_GestureInterruptResult | 定义手势打断结果。 | | 52 | | [ArkUI_GestureInterruptResult](#arkui_gestureinterruptresult) | ArkUI_GestureInterruptResult | 定义手势打断结果。 | |
| 53 | | [ArkUI_GestureRecognizerState](#arkui_gesturerecognizerstate) | ArkUI_GestureRecognizerState | 定义手势识别器状态。 | | 53 | | [ArkUI_GestureRecognizerState](#arkui_gesturerecognizerstate) | ArkUI_GestureRecognizerState | 定义手势识别器状态。 | |
| 54 | +| [OH_ArkUI_GestureCollectIntervention](#oh_arkui_gesturecollectintervention) | OH_ArkUI_GestureCollectIntervention | 定义手势和事件收集的干预操作类型。<br>**起始版本:** 26.0.0 | | ||
| 54 | 55 | ||
| 55 | ### 函数 | 56 | ### 函数 |
| 56 | 57 | ||
| @@ -112,6 +113,12 @@ | |||
| 112 | | [ArkUI_ErrorCode OH_ArkUI_PreventGestureRecognizerBegin(ArkUI_GestureRecognizer* recognizer)](#oh_arkui_preventgesturerecognizerbegin) | - | 在手指全部抬起前阻止手势识别器参与当前手势识别。如果系统已确定该手势识别器的结果(无论成功与否),调用此接口将无效。 | | 113 | | [ArkUI_ErrorCode OH_ArkUI_PreventGestureRecognizerBegin(ArkUI_GestureRecognizer* recognizer)](#oh_arkui_preventgesturerecognizerbegin) | - | 在手指全部抬起前阻止手势识别器参与当前手势识别。如果系统已确定该手势识别器的结果(无论成功与否),调用此接口将无效。 | |
| 113 | | [ArkUI_ErrorCode OH_ArkUI_LongPressGesture_SetAllowableMovement(ArkUI_GestureRecognizer* recognizer, double allowableMovement)](#oh_arkui_longpressgesture_setallowablemovement) | - | 设置长按手势识别器识别的手势的最大移动距离。 | | 114 | | [ArkUI_ErrorCode OH_ArkUI_LongPressGesture_SetAllowableMovement(ArkUI_GestureRecognizer* recognizer, double allowableMovement)](#oh_arkui_longpressgesture_setallowablemovement) | - | 设置长按手势识别器识别的手势的最大移动距离。 | |
| 114 | | [ArkUI_ErrorCode OH_ArkUI_LongPressGesture_GetAllowableMovement(ArkUI_GestureRecognizer* recognizer, double* allowableMovement)](#oh_arkui_longpressgesture_getallowablemovement) | - | 获取长按手势识别器识别的手势的最大移动距离。 | | 115 | | [ArkUI_ErrorCode OH_ArkUI_LongPressGesture_GetAllowableMovement(ArkUI_GestureRecognizer* recognizer, double* allowableMovement)](#oh_arkui_longpressgesture_getallowablemovement) | - | 获取长按手势识别器识别的手势的最大移动距离。 | |
| 116 | +| [ArkUI_ErrorCode OH_ArkUI_GestureCollectInterceptInfo_GetResponseRecognizers(const ArkUI_GestureCollectInterceptInfo* info, ArkUI_GestureRecognizerHandleArray* array, int32_t* size)](#oh_arkui_gesturecollectinterceptinfo_getresponserecognizers) | - | 从手势收集拦截信息中获取手势识别器。<br>**起始版本:** 26.0.0 | | ||
| 117 | +| [ArkUI_ErrorCode OH_ArkUI_GestureCollectInterceptInfo_GetTouchRecognizers(const ArkUI_GestureCollectInterceptInfo* info, ArkUI_TouchRecognizerHandleArray* recognizers, int32_t* size)](#oh_arkui_gesturecollectinterceptinfo_gettouchrecognizers) | - | 从手势收集拦截信息中获取触摸识别器句柄。<br>**起始版本:** 26.0.0 | | ||
| 118 | +| [ArkUI_ErrorCode OH_ArkUI_GestureCollectInterceptInfo_SetGestureCollectIntervention(ArkUI_GestureCollectInterceptInfo* info, OH_ArkUI_GestureCollectIntervention intervention)](#oh_arkui_gesturecollectinterceptinfo_setgesturecollectintervention) | - | 设置手势收集干预模式。<br>**起始版本:** 26.0.0 | | ||
| 119 | +| [ArkUI_ErrorCode OH_ArkUI_GetGestureBindNodeUniqueId(const ArkUI_GestureRecognizer* recognizer, int32_t* uniqueId)](#oh_arkui_getgesturebindnodeuniqueid) | - | 获取与手势识别器绑定的组件唯一ID。<br>**起始版本:** 26.0.0 | | ||
| 120 | +| [bool OH_ArkUI_TouchRecognizer_IsHostBelongsTo(const ArkUI_TouchRecognizerHandle recognizer, int32_t uniqueId)](#oh_arkui_touchrecognizer_ishostbelongsto) | - | 检查当前触摸识别器绑定节点是否为传入组件的后代节点。<br>**起始版本:** 26.0.0 | | ||
| 121 | +| [bool OH_ArkUI_GestureRecognizer_IsHostBelongsTo(const ArkUI_GestureRecognizer* recognizer, int32_t uniqueId)](#oh_arkui_gesturerecognizer_ishostbelongsto) | - | 检查当前手势识别器绑定节点是否为传入组件的后代节点。<br>**起始版本:** 26.0.0 | | ||
| 115 | 122 | ||
| 116 | ### 变量 | 123 | ### 变量 |
| 117 | 124 | ||
| @@ -255,6 +262,27 @@ enum ArkUI_GestureRecognizerType | |||
| 255 | | CLICK_GESTURE = 7 | 通过onClick注册的点击手势。<br>**起始版本:** 20 | | 262 | | CLICK_GESTURE = 7 | 通过onClick注册的点击手势。<br>**起始版本:** 20 | |
| 256 | | DRAG_DROP = 8 | 用于拖放的拖拽手势。<br>**起始版本:** 20 | | 263 | | DRAG_DROP = 8 | 用于拖放的拖拽手势。<br>**起始版本:** 20 | |
| 257 | 264 | ||
| 265 | +### OH_ArkUI_GestureCollectIntervention | ||
| 266 | + | ||
| 267 | +```c | ||
| 268 | +enum OH_ArkUI_GestureCollectIntervention | ||
| 269 | +``` | ||
| 270 | + | ||
| 271 | +**描述:** | ||
| 272 | + | ||
| 273 | + | ||
| 274 | +定义手势和事件收集的干预操作类型。 | ||
| 275 | + | ||
| 276 | +**起始版本:** 26.0.0 | ||
| 277 | + | ||
| 278 | +| 枚举项 | 描述 | | ||
| 279 | +| -- | -- | | ||
| 280 | +| OH_ARKUI_GESTURE_COLLECT_INTERVENTION_CONTINUE = 0 | 继续正常的手势和事件收集流程。不进行任何干预。 | | ||
| 281 | +| OH_ARKUI_GESTURE_COLLECT_INTERVENTION_DISCARD_LOWER = 1 | 丢弃所有待收集的低优先级手势和事件。<br/>丢弃的部分包括左侧兄弟节点以及祖先节点(父节点及以上)的手势。<br/>仅保留当前节点和更高优先级节点中已收集的手势。 | | ||
| 282 | +| OH_ARKUI_GESTURE_COLLECT_INTERVENTION_DISCARD_HIGHER = 2 | 丢弃已经收集到的高优先级手势和事件。<br/>会丢弃已收集的右侧兄弟节点和当前节点上的手势。<br/>将继续处理低优先级手势的收集流程(左侧兄弟节点和祖先节点)。 | | ||
| 283 | +| OH_ARKUI_GESTURE_COLLECT_INTERVENTION_DISCARD_SELF = 3 | 丢弃当前节点自身的手势和事件。<br/>当前节点的手势和事件将从手势树中排除。<br/>兄弟节点(左侧和右侧)以及祖先节点的手势仍会继续收集。 | | ||
| 284 | +| OH_ARKUI_GESTURE_COLLECT_INTERVENTION_DISCARD_LOWER_PRIORITY_SIBLINGS = 4 | 丢弃左侧兄弟节点中待收集的手势和事件。<br/>当前节点以及已收集的右侧兄弟节点的手势和事件将被保留。<br/>将继续处理父节点以及祖先节点的收集流程。 | | ||
| 285 | + | ||
| 258 | ### ArkUI_GestureInterruptResult | 286 | ### ArkUI_GestureInterruptResult |
| 259 | 287 | ||
| 260 | ```c | 288 | ```c |
| @@ -1787,3 +1815,155 @@ ArkUI_ErrorCode OH_ArkUI_LongPressGesture_GetAllowableMovement(ArkUI_GestureReco | |||
| 1787 | | -- | -- | | 1815 | | -- | -- | |
| 1788 | | [ArkUI_ErrorCode](capi-native-type-h.md#arkui_errorcode) | 错误码。<br> [ARKUI_ERROR_CODE_NO_ERROR](capi-native-type-h.md#arkui_errorcode) 成功。<br> [ARKUI_ERROR_CODE_PARAM_INVALID](capi-native-type-h.md#arkui_errorcode) 参数错误。<br>[ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED](capi-native-type-h.md#arkui_errorcode) 不支持手势识别器类型。 | | 1816 | | [ArkUI_ErrorCode](capi-native-type-h.md#arkui_errorcode) | 错误码。<br> [ARKUI_ERROR_CODE_NO_ERROR](capi-native-type-h.md#arkui_errorcode) 成功。<br> [ARKUI_ERROR_CODE_PARAM_INVALID](capi-native-type-h.md#arkui_errorcode) 参数错误。<br>[ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED](capi-native-type-h.md#arkui_errorcode) 不支持手势识别器类型。 | |
| 1789 | 1817 | ||
| 1818 | +### OH_ArkUI_GestureCollectInterceptInfo_GetResponseRecognizers() | ||
| 1819 | + | ||
| 1820 | +```c | ||
| 1821 | +ArkUI_ErrorCode OH_ArkUI_GestureCollectInterceptInfo_GetResponseRecognizers(const ArkUI_GestureCollectInterceptInfo* info, ArkUI_GestureRecognizerHandleArray* array, int32_t* size) | ||
| 1822 | +``` | ||
| 1823 | + | ||
| 1824 | +**描述:** | ||
| 1825 | + | ||
| 1826 | +从手势收集拦截信息中获取手势识别器。 | ||
| 1827 | + | ||
| 1828 | +**起始版本:** 26.0.0 | ||
| 1829 | + | ||
| 1830 | +**参数:** | ||
| 1831 | + | ||
| 1832 | +| 参数项 | 描述 | | ||
| 1833 | +| -- | -- | | ||
| 1834 | +| const [ArkUI_GestureCollectInterceptInfo](capi-arkui-nativemodule-arkui-gesturecollectinterceptinfo.md)* info | 表示指向手势收集拦截信息的指针。 | | ||
| 1835 | +| [ArkUI_GestureRecognizerHandleArray](capi-arkui-nativemodule-arkui-gesturerecognizerhandlearray.md)* array | 表示响应手势识别器数组的指针。 | | ||
| 1836 | +| int32_t* size | 表示响应手势识别器数组的大小。 | | ||
| 1837 | + | ||
| 1838 | +**返回:** | ||
| 1839 | + | ||
| 1840 | +| 类型 | 说明 | | ||
| 1841 | +| -- | -- | | ||
| 1842 | +| [ArkUI_ErrorCode](capi-native-type-h.md#arkui_errorcode) | 返回[ARKUI_ERROR_CODE_NO_ERROR](capi-native-type-h.md#arkui_errorcode)表示成功。<br> 返回[ARKUI_ERROR_CODE_PARAM_INVALID](capi-native-type-h.md#arkui_errorcode)表示发生参数异常。 | | ||
| 1843 | + | ||
| 1844 | +### OH_ArkUI_GestureCollectInterceptInfo_GetTouchRecognizers() | ||
| 1845 | + | ||
| 1846 | +```c | ||
| 1847 | +ArkUI_ErrorCode OH_ArkUI_GestureCollectInterceptInfo_GetTouchRecognizers(const ArkUI_GestureCollectInterceptInfo* info, ArkUI_TouchRecognizerHandleArray* recognizers, int32_t* size) | ||
| 1848 | +``` | ||
| 1849 | + | ||
| 1850 | +**描述:** | ||
| 1851 | + | ||
| 1852 | +从手势收集拦截信息中获取触摸识别器句柄。 | ||
| 1853 | + | ||
| 1854 | +**起始版本:** 26.0.0 | ||
| 1855 | + | ||
| 1856 | +**参数:** | ||
| 1857 | + | ||
| 1858 | +| 参数项 | 描述 | | ||
| 1859 | +| -- | -- | | ||
| 1860 | +| const [ArkUI_GestureCollectInterceptInfo](capi-arkui-nativemodule-arkui-gesturecollectinterceptinfo.md)* info | 表示指向手势收集拦截信息的指针。 | | ||
| 1861 | +| [ArkUI_TouchRecognizerHandleArray](capi-arkui-nativemodule-arkui-touchrecognizerhandlearray.md)* recognizers | 表示触摸识别器句柄数组的指针。 | | ||
| 1862 | +| int32_t* size | 表示recognizers数组的大小。 | | ||
| 1863 | + | ||
| 1864 | +**返回:** | ||
| 1865 | + | ||
| 1866 | +| 类型 | 说明 | | ||
| 1867 | +| -- | -- | | ||
| 1868 | +| [ArkUI_ErrorCode](capi-native-type-h.md#arkui_errorcode) | 返回[ARKUI_ERROR_CODE_NO_ERROR](capi-native-type-h.md#arkui_errorcode)表示成功。<br> 返回[ARKUI_ERROR_CODE_PARAM_INVALID](capi-native-type-h.md#arkui_errorcode)表示发生参数异常。 | | ||
| 1869 | + | ||
| 1870 | +### OH_ArkUI_GestureCollectInterceptInfo_SetGestureCollectIntervention() | ||
| 1871 | + | ||
| 1872 | +```c | ||
| 1873 | +ArkUI_ErrorCode OH_ArkUI_GestureCollectInterceptInfo_SetGestureCollectIntervention(ArkUI_GestureCollectInterceptInfo* info, OH_ArkUI_GestureCollectIntervention intervention) | ||
| 1874 | +``` | ||
| 1875 | + | ||
| 1876 | +**描述:** | ||
| 1877 | + | ||
| 1878 | +设置手势收集干预模式。 | ||
| 1879 | + | ||
| 1880 | +**起始版本:** 26.0.0 | ||
| 1881 | + | ||
| 1882 | +**参数:** | ||
| 1883 | + | ||
| 1884 | +| 参数项 | 描述 | | ||
| 1885 | +| -- | -- | | ||
| 1886 | +| [ArkUI_GestureCollectInterceptInfo](capi-arkui-nativemodule-arkui-gesturecollectinterceptinfo.md)* info | 手势收集拦截信息指针。 | | ||
| 1887 | +| [OH_ArkUI_GestureCollectIntervention](#oh_arkui_gesturecollectintervention) intervention | 手势收集干预模式,类型为[OH_ArkUI_GestureCollectIntervention](#oh_arkui_gesturecollectintervention)。 | | ||
| 1888 | + | ||
| 1889 | +**返回:** | ||
| 1890 | + | ||
| 1891 | +| 类型 | 说明 | | ||
| 1892 | +| -- | -- | | ||
| 1893 | +| [ArkUI_ErrorCode](capi-native-type-h.md#arkui_errorcode) | 如果成功,则返回[ARKUI_ERROR_CODE_NO_ERROR](capi-native-type-h.md#arkui_errorcode)。<br> 参数异常返回[ARKUI_ERROR_CODE_PARAM_INVALID](capi-native-type-h.md#arkui_errorcode)。 | | ||
| 1894 | + | ||
| 1895 | +### OH_ArkUI_GetGestureBindNodeUniqueId() | ||
| 1896 | + | ||
| 1897 | +```c | ||
| 1898 | +ArkUI_ErrorCode OH_ArkUI_GetGestureBindNodeUniqueId(const ArkUI_GestureRecognizer* recognizer, int32_t* uniqueId) | ||
| 1899 | +``` | ||
| 1900 | + | ||
| 1901 | +**描述:** | ||
| 1902 | + | ||
| 1903 | +获取与手势识别器绑定的组件唯一ID。 | ||
| 1904 | + | ||
| 1905 | +**起始版本:** 26.0.0 | ||
| 1906 | + | ||
| 1907 | +**参数:** | ||
| 1908 | + | ||
| 1909 | +| 参数项 | 描述 | | ||
| 1910 | +| -- | -- | | ||
| 1911 | +| const [ArkUI_GestureRecognizer](capi-arkui-nativemodule-arkui-gesturerecognizer.md)* recognizer | 表示指向手势识别器的指针。 | | ||
| 1912 | +| int32_t* uniqueId | 表示与手势识别器绑定的组件唯一ID。 | | ||
| 1913 | + | ||
| 1914 | +**返回:** | ||
| 1915 | + | ||
| 1916 | +| 类型 | 说明 | | ||
| 1917 | +| -- | -- | | ||
| 1918 | +| [ArkUI_ErrorCode](capi-native-type-h.md#arkui_errorcode) | 返回[ARKUI_ERROR_CODE_NO_ERROR](capi-native-type-h.md#arkui_errorcode)表示成功。<br> 返回[ARKUI_ERROR_CODE_PARAM_INVALID](capi-native-type-h.md#arkui_errorcode)表示发生参数异常。 | | ||
| 1919 | + | ||
| 1920 | +### OH_ArkUI_TouchRecognizer_IsHostBelongsTo() | ||
| 1921 | + | ||
| 1922 | +```c | ||
| 1923 | +bool OH_ArkUI_TouchRecognizer_IsHostBelongsTo(const ArkUI_TouchRecognizerHandle recognizer, int32_t uniqueId) | ||
| 1924 | +``` | ||
| 1925 | + | ||
| 1926 | +**描述:** | ||
| 1927 | + | ||
| 1928 | +检查当前触摸识别器绑定节点是否为传入组件的后代节点。 | ||
| 1929 | + | ||
| 1930 | +**起始版本:** 26.0.0 | ||
| 1931 | + | ||
| 1932 | +**参数:** | ||
| 1933 | + | ||
| 1934 | +| 参数项 | 描述 | | ||
| 1935 | +| -- | -- | | ||
| 1936 | +| const [ArkUI_TouchRecognizerHandle](capi-arkui-nativemodule-arkui-touchrecognizerhandlearray.md) recognizer | 表示触摸识别器句柄。 | | ||
| 1937 | +| int32_t uniqueId | 表示组件的唯一ID。 | | ||
| 1938 | + | ||
| 1939 | +**返回:** | ||
| 1940 | + | ||
| 1941 | +| 类型 | 说明 | | ||
| 1942 | +| -- | -- | | ||
| 1943 | +| bool | 如果当前触摸识别器绑定节点是传入组件的后代,则返回true,否则返回false。 | | ||
| 1944 | + | ||
| 1945 | +### OH_ArkUI_GestureRecognizer_IsHostBelongsTo() | ||
| 1946 | + | ||
| 1947 | +```c | ||
| 1948 | +bool OH_ArkUI_GestureRecognizer_IsHostBelongsTo(const ArkUI_GestureRecognizer* recognizer, int32_t uniqueId) | ||
| 1949 | +``` | ||
| 1950 | + | ||
| 1951 | +**描述:** | ||
| 1952 | + | ||
| 1953 | +检查当前手势识别器绑定节点是否为传入组件的后代节点。 | ||
| 1954 | + | ||
| 1955 | +**起始版本:** 26.0.0 | ||
| 1956 | + | ||
| 1957 | +**参数:** | ||
| 1958 | + | ||
| 1959 | +| 参数项 | 描述 | | ||
| 1960 | +| -- | -- | | ||
| 1961 | +| const [ArkUI_GestureRecognizer](capi-arkui-nativemodule-arkui-gesturerecognizer.md)* recognizer | 表示指向手势识别器的指针。 | | ||
| 1962 | +| int32_t uniqueId | 表示组件的唯一ID。 | | ||
| 1963 | + | ||
| 1964 | +**返回:** | ||
| 1965 | + | ||
| 1966 | +| 类型 | 说明 | | ||
| 1967 | +| -- | -- | | ||
| 1968 | +| bool | 如果当前手势绑定节点是传入组件的后代,则返回true,否则返回false。 | | ||
| 1969 | + | ||
| @@ -176,6 +176,8 @@ | |||||||||||||||
| 176 | | [int32_t OH_ArkUI_NativeModule_GetPageRootNodeHandleByContext(ArkUI_ContextHandle context, ArkUI_NodeHandle* rootNode)](#oh_arkui_nativemodule_getpagerootnodehandlebycontext) | - | 获得指定的UIContext对应窗口中的页面根节点。 | | 176 | | [int32_t OH_ArkUI_NativeModule_GetPageRootNodeHandleByContext(ArkUI_ContextHandle context, ArkUI_NodeHandle* rootNode)](#oh_arkui_nativemodule_getpagerootnodehandlebycontext) | - | 获得指定的UIContext对应窗口中的页面根节点。 | | ||||||||||||
| 177 | | [int32_t OH_ArkUI_NativeModule_RegisterCommonAreaApproximateChangeEvent(ArkUI_NodeHandle node, float expectedUpdateInterval, void* userData, void (*callback)(ArkUI_NodeEvent* event))](#oh_arkui_nativemodule_registercommonareaapproximatechangeevent) | - | 注册组件尺寸与区域变化的监听事件。可在任意时机对有效的[ArkUI_NodeHandle](capi-arkui-nativemodule-arkui-node8h.md)组件节点调用该函数。新注册的回调会替换该事件此前已注册的回调,并从下一帧开始生效。当回调不再需要时,请调用[OH_ArkUI_NativeModule_UnregisterCommonAreaApproximateChangeEvent](#oh_arkui_nativemodule_unregistercommonareaapproximatechangeevent)进行注销。否则,回调会在节点释放时自动注销。 | | 177 | | [int32_t OH_ArkUI_NativeModule_RegisterCommonAreaApproximateChangeEvent(ArkUI_NodeHandle node, float expectedUpdateInterval, void* userData, void (*callback)(ArkUI_NodeEvent* event))](#oh_arkui_nativemodule_registercommonareaapproximatechangeevent) | - | 注册组件尺寸与区域变化的监听事件。可在任意时机对有效的[ArkUI_NodeHandle](capi-arkui-nativemodule-arkui-node8h.md)组件节点调用该函数。新注册的回调会替换该事件此前已注册的回调,并从下一帧开始生效。当回调不再需要时,请调用[OH_ArkUI_NativeModule_UnregisterCommonAreaApproximateChangeEvent](#oh_arkui_nativemodule_unregistercommonareaapproximatechangeevent)进行注销。否则,回调会在节点释放时自动注销。 | | ||||||||||||
| 178 | | [int32_t OH_ArkUI_NativeModule_UnregisterCommonAreaApproximateChangeEvent(ArkUI_NodeHandle node)](#oh_arkui_nativemodule_unregistercommonareaapproximatechangeevent) | - | 解除组件上的尺寸与区域变化监听回调绑定。 | | 178 | | [int32_t OH_ArkUI_NativeModule_UnregisterCommonAreaApproximateChangeEvent(ArkUI_NodeHandle node)](#oh_arkui_nativemodule_unregistercommonareaapproximatechangeevent) | - | 解除组件上的尺寸与区域变化监听回调绑定。 | | ||||||||||||
| 179 | +| [ArkUI_GestureCollectInterceptInfo* OH_ArkUI_NodeEvent_GetGestureCollectInterceptInfo(ArkUI_NodeEvent* nodeEvent)](#oh_arkui_nodeevent_getgesturecollectinterceptinfo) | - | 从指定的ArkUI_NodeEvent对象中获取ArkUI_GestureCollectInterceptInfo对象。<br>**起始版本:** 26.0.0 | | ||||||||||||||
| 180 | + | ||||||||||||||
| 179 | ### 宏定义 | 181 | ### 宏定义 | ||||||||||||
| 180 | 182 | ||||||||||||||
| 181 | | 名称 | 描述 | | 183 | | 名称 | 描述 | | ||||||||||||
| @@ -331,6 +333,7 @@ enum ArkUI_NodeEventType | |||||||||||||||
| 331 | | NODE_ON_CUSTOM_OVERFLOW_SCROLL = 34 | 定义[ARKUI_NODE_CUSTOM](capi-native-node-h.md#arkui_nodetype)节点内容滚动事件。该事件在组件内容发生滚动时触发。<br> 当事件回调发生时,事件参数[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型为[ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)。<br> [ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)中包含2个参数:<br> <b>ArkUI_NodeComponentEvent.data[0].i32</b>:正在滚动的子组件id。<br> <b>ArkUI_NodeComponentEvent.data[1].f32</b>:节点滚动的偏移量,单位为px。<br>**起始版本:** 24 | | 333 | | NODE_ON_CUSTOM_OVERFLOW_SCROLL = 34 | 定义[ARKUI_NODE_CUSTOM](capi-native-node-h.md#arkui_nodetype)节点内容滚动事件。该事件在组件内容发生滚动时触发。<br> 当事件回调发生时,事件参数[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型为[ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)。<br> [ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)中包含2个参数:<br> <b>ArkUI_NodeComponentEvent.data[0].i32</b>:正在滚动的子组件id。<br> <b>ArkUI_NodeComponentEvent.data[1].f32</b>:节点滚动的偏移量,单位为px。<br>**起始版本:** 24 | | ||||||||||||
| 332 | | NODE_ON_STACK_OVERFLOW_SCROLL = 35 | 定义[ARKUI_NODE_STACK](capi-native-node-h.md#arkui_nodetype)节点内容滚动事件。该事件在组件内容发生滚动时触发。<br> 当事件回调发生时,事件参数[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型为[ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)。<br> [ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)中包含2个参数:<br> <b>ArkUI_NodeComponentEvent.data[0].i32</b>:正在滚动的子组件id。<br> <b>ArkUI_NodeComponentEvent.data[1].f32</b>:节点滚动的偏移量,单位为px。<br>**起始版本:** 24 | | 334 | | NODE_ON_STACK_OVERFLOW_SCROLL = 35 | 定义[ARKUI_NODE_STACK](capi-native-node-h.md#arkui_nodetype)节点内容滚动事件。该事件在组件内容发生滚动时触发。<br> 当事件回调发生时,事件参数[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型为[ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)。<br> [ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)中包含2个参数:<br> <b>ArkUI_NodeComponentEvent.data[0].i32</b>:正在滚动的子组件id。<br> <b>ArkUI_NodeComponentEvent.data[1].f32</b>:节点滚动的偏移量,单位为px。<br>**起始版本:** 24 | | ||||||||||||
| 333 | | NODE_ON_NEED_SOFTKEYBOARD = 36 | 用于设置事件回调。当组件获得焦点时,获焦组件触发该事件。<br> 当事件回调发生时,[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型值为[ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)。<br> [ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)不包含参数。<br> 系统会根据回调函数返回值判断是否需要键盘。<br> 可通过[OH_ArkUI_NodeEvent_SetReturnNumberValue](#oh_arkui_nodeevent_setreturnnumbervalue)接口设置是否需要键盘。<br> 返回值中index为0的value.i32表示是否需要键盘。<br> 取值为0:不需要键盘;取值为1:需要键盘。<br>**起始版本:** 24 | | 335 | | NODE_ON_NEED_SOFTKEYBOARD = 36 | 用于设置事件回调。当组件获得焦点时,获焦组件触发该事件。<br> 当事件回调发生时,[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型值为[ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)。<br> [ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)不包含参数。<br> 系统会根据回调函数返回值判断是否需要键盘。<br> 可通过[OH_ArkUI_NodeEvent_SetReturnNumberValue](#oh_arkui_nodeevent_setreturnnumbervalue)接口设置是否需要键盘。<br> 返回值中index为0的value.i32表示是否需要键盘。<br> 取值为0:不需要键盘;取值为1:需要键盘。<br>**起始版本:** 24 | | ||||||||||||
| 336 | +| NODE_ON_GESTURE_COLLECT_INTERCEPT = 37 | 当该节点及更高优先级节点上的事件和手势收集完成后,执行该回调。该回调用于干预事件和手势的收集结果。<br> 事件回调发生时,可从事件参数[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中获取[ArkUI_GestureCollectInterceptInfo](capi-arkui-nativemodule-arkui-gesturecollectinterceptinfo.md)对象。<br>**起始版本:** 26.0.0 | | ||||||||||||||
| 334 | | NODE_TEXT_ON_DETECT_RESULT_UPDATE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT = 1000 | 文本设置TextDataDetectorConfig且识别成功时,触发onDetectResultUpdate回调。触发该事件的条件:文本设置TextDataDetectorConfig且识别成功后。<br> 事件回调发生时,事件参数[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型为[ArkUI_StringAsyncEvent](capi-arkui-nativemodule-arkui-stringasyncevent.md)。<br> [ArkUI_StringAsyncEvent](capi-arkui-nativemodule-arkui-stringasyncevent.md)中包含1个参数:<br> <b>ArkUI_StringAsyncEvent.pStr</b>:表示文本识别的结果,Json格式。 | | 337 | | NODE_TEXT_ON_DETECT_RESULT_UPDATE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT = 1000 | 文本设置TextDataDetectorConfig且识别成功时,触发onDetectResultUpdate回调。触发该事件的条件:文本设置TextDataDetectorConfig且识别成功后。<br> 事件回调发生时,事件参数[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型为[ArkUI_StringAsyncEvent](capi-arkui-nativemodule-arkui-stringasyncevent.md)。<br> [ArkUI_StringAsyncEvent](capi-arkui-nativemodule-arkui-stringasyncevent.md)中包含1个参数:<br> <b>ArkUI_StringAsyncEvent.pStr</b>:表示文本识别的结果,Json格式。 | | ||||||||||||
| 335 | | NODE_TEXT_SPAN_ON_LONG_PRESS = 1001 | Span组件长按事件。组件被长按时触发此回调。<br> 事件回调发生时,可从事件参数[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中获取[ArkUI_UIInputEvent](capi-arkui-eventmodule-arkui-uiinputevent.md)。<br>**起始版本:** 20 | | 338 | | NODE_TEXT_SPAN_ON_LONG_PRESS = 1001 | Span组件长按事件。组件被长按时触发此回调。<br> 事件回调发生时,可从事件参数[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中获取[ArkUI_UIInputEvent](capi-arkui-eventmodule-arkui-uiinputevent.md)。<br>**起始版本:** 20 | | ||||||||||||
| 336 | | NODE_TEXT_ON_TEXT_SELECTION_CHANGE = 1002 | 定义文本选择位置变化时触发的事件。当事件回调发生时,[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型为[ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)。 <br> [ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)包含两个参数:<br> <b>ArkUI_NodeComponentEvent.data[0].i32</b>:文本选择区域的起始位置。 <br> <b>ArkUI_NodeComponentEvent.data[1].i32</b>:文本选择区域的结束位置。 <br><br>**起始版本:** 26.0.0 | | 339 | | NODE_TEXT_ON_TEXT_SELECTION_CHANGE = 1002 | 定义文本选择位置变化时触发的事件。当事件回调发生时,[ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)对象中的联合体类型为[ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)。 <br> [ArkUI_NodeComponentEvent](capi-arkui-nativemodule-arkui-nodecomponentevent.md)包含两个参数:<br> <b>ArkUI_NodeComponentEvent.data[0].i32</b>:文本选择区域的起始位置。 <br> <b>ArkUI_NodeComponentEvent.data[1].i32</b>:文本选择区域的结束位置。 <br><br>**起始版本:** 26.0.0 | | ||||||||||||
| @@ -3655,4 +3658,28 @@ int32_t OH_ArkUI_NativeModule_UnregisterCommonAreaApproximateChangeEvent(ArkUI_N | |||||||||||||||
| 3655 | 3658 | ||||||||||||||
| 3656 | | 类型 | 说明 | | 3659 | | 类型 | 说明 | | ||||||||||||
| 3657 | | -- | -- | | 3660 | | -- | -- | | ||||||||||||
| 3658 | -| int32_t | 错误码。<br> [ARKUI_ERROR_CODE_NO_ERROR](capi-native-type-h.md#arkui_errorcode) 操作成功。<br>[ARKUI_ERROR_CODE_PARAM_INVALID](capi-native-type-h.md#arkui_errorcode) 函数参数异常。 | | 3661 | +| int32_t | 错误码。<br> [ARKUI_ERROR_CODE_NO_ERROR](capi-native-type-h.md#arkui_errorcode) 操作成功。<br>[ARKUI_ERROR_CODE_PARAM_INVALID](capi-native-type-h.md#arkui_errorcode) 函数参数异常。 | | ||||||||||||
| 3662 | + | ||||||||||||||
缺少标题 ![]() ![]() | |||||||||||||||
| 3663 | +### OH_ArkUI_NodeEvent_GetGestureCollectInterceptInfo() | ||||||||||||||
| 3664 | + | ||||||||||||||
| 3665 | +```c | ||||||||||||||
| 3666 | +ArkUI_GestureCollectInterceptInfo* OH_ArkUI_NodeEvent_GetGestureCollectInterceptInfo(ArkUI_NodeEvent* nodeEvent) | ||||||||||||||
| 3667 | +``` | ||||||||||||||
| 3668 | + | ||||||||||||||
| 3669 | +**描述** | ||||||||||||||
AA ❌疑似检测到中英文错别字 错误原因:Markdown 文档中参数说明部分缺少冒号,应为 改动建议
![]() ![]() ❌疑似检测到中英文错别字 错误原因:中文文档中"描述"后面缺少冒号":",应该使用中文冒号":"而不是英文冒号":",或者保持英文格式但需要添加冒号。 建议修改为: 改动建议
![]() ![]() ❌疑似检测到中英文错别字 错误原因:中文描述缺少冒号 建议修改为: 改动建议
![]() ![]() | |||||||||||||||
| 3670 | + | ||||||||||||||
| 3671 | +从指定的ArkUI_NodeEvent对象中获取ArkUI_GestureCollectInterceptInfo对象。 | ||||||||||||||
| 3672 | + | ||||||||||||||
| 3673 | +**起始版本:** 26.0.0 | ||||||||||||||
| 3674 | + | ||||||||||||||
| 3675 | +**参数:** | ||||||||||||||
| 3676 | + | ||||||||||||||
| 3677 | +| 参数项 | 描述 | | ||||||||||||||
| 3678 | +| -- | -- | | ||||||||||||||
| 3679 | +| [ArkUI_NodeEvent](capi-arkui-nativemodule-arkui-nodeevent.md)* nodeEvent | 表示指向ArkUI_NodeEvent对象的指针。 | | ||||||||||||||
| 3680 | + | ||||||||||||||
| 3681 | +**返回:** | ||||||||||||||
| 3682 | + | ||||||||||||||
| 3683 | +| 类型 | 说明 | | ||||||||||||||
| 3684 | +| -- | -- | | ||||||||||||||
| 3685 | +| [ArkUI_GestureCollectInterceptInfo](capi-arkui-nativemodule-arkui-gesturecollectinterceptinfo.md)* | 返回指向ArkUI_GestureCollectInterceptInfo对象的指针。仅在回调期间有效,无需释放。<br>如果传入的参数无效,或者不是手势收集拦截信息,则返回`null`。 | | ||||||||||||||
| @@ -46,6 +46,7 @@ | |||
| 46 | | [ArkUI_DrawContext](capi-arkui-nativemodule-arkui-drawcontext.md) | ArkUI_DrawContext | 定义组件绘制上下文类型结构。 | | 46 | | [ArkUI_DrawContext](capi-arkui-nativemodule-arkui-drawcontext.md) | ArkUI_DrawContext | 定义组件绘制上下文类型结构。 | |
| 47 | | [ArkUI_Node*](capi-arkui-nativemodule-arkui-node8h.md) | ArkUI_NodeHandle | 定义ArkUI native组件实例对象指针定义。 | | 47 | | [ArkUI_Node*](capi-arkui-nativemodule-arkui-node8h.md) | ArkUI_NodeHandle | 定义ArkUI native组件实例对象指针定义。 | |
| 48 | | [ArkUI_NativeDialog*](capi-arkui-nativemodule-arkui-nativedialog8h.md) | ArkUI_NativeDialogHandle | 定义ArkUI在Native侧的自定义弹窗控制器对象指针。 | | 48 | | [ArkUI_NativeDialog*](capi-arkui-nativemodule-arkui-nativedialog8h.md) | ArkUI_NativeDialogHandle | 定义ArkUI在Native侧的自定义弹窗控制器对象指针。 | |
| 49 | +| [ArkUI_GestureCollectInterceptInfo](capi-arkui-nativemodule-arkui-gesturecollectinterceptinfo.md) | ArkUI_GestureCollectInterceptInfo | 定义手势收集拦截信息。 | | ||
| 49 | | [ArkUI_GridItemSize](capi-arkui-nativemodule-arkui-griditemsize.md) | ArkUI_GridItemSize | 定义Grid布局选项onGetIrregularSizeByIndex回调返回值结构体。 | | 50 | | [ArkUI_GridItemSize](capi-arkui-nativemodule-arkui-griditemsize.md) | ArkUI_GridItemSize | 定义Grid布局选项onGetIrregularSizeByIndex回调返回值结构体。 | |
| 50 | | [ArkUI_GridItemRect](capi-arkui-nativemodule-arkui-griditemrect.md) | ArkUI_GridItemRect | 定义Grid布局选项onGetRectByIndex回调返回值结构体。 | | 51 | | [ArkUI_GridItemRect](capi-arkui-nativemodule-arkui-griditemrect.md) | ArkUI_GridItemRect | 定义Grid布局选项onGetRectByIndex回调返回值结构体。 | |
| 51 | | [ArkUI_GridLayoutOptions](capi-arkui-nativemodule-arkui-gridlayoutoptions.md) | ArkUI_GridLayoutOptions | 定义Grid布局选项。 | | 52 | | [ArkUI_GridLayoutOptions](capi-arkui-nativemodule-arkui-gridlayoutoptions.md) | ArkUI_GridLayoutOptions | 定义Grid布局选项。 | |
1.按钮颜色太浅了,看不清
2.

