Signed-off-by: wangxiuxiu96 <wangxiuxiu9@huawei.com>
Change-Id: I8193d5cbdb2d47741690cb21d018e0a8e6347aec
This commit is contained in:
wangxiuxiu96 2024-11-06 14:42:43 +08:00
parent c3f8f22e09
commit 760c33f255
5 changed files with 7 additions and 7 deletions

View File

@ -1122,7 +1122,7 @@ struct ArkUIKeyEvent {
ArkUI_Uint32 intentionCode;
// user input.
bool ret;
bool isConsumed;
bool stopPropagation;
};

View File

@ -6625,7 +6625,7 @@ void SetOnKeyPreIme(ArkUINodeHandle node, void* extraParam)
PipelineContext::SetCallBackNode(AceType::WeakClaim(frameNode));
SendArkUIAsyncEvent(&event);
info.SetStopPropagation(event.keyEvent.stopPropagation);
return event.keyEvent.ret;
return event.keyEvent.isConsumed;
};
NG::ViewAbstractModelNG::SetOnKeyPreIme(frameNode, std::move(onPreImeEvent));
}

View File

@ -163,7 +163,7 @@ uint32_t OH_ArkUI_KeyEvent_GetUnicode(const ArkUI_UIInputEvent *event)
return result;
}
void OH_ArkUI_KeyEvent_SetRet(const ArkUI_UIInputEvent *event, bool ret)
void OH_ArkUI_KeyEvent_SetConsumed(const ArkUI_UIInputEvent *event, bool isConsumed)
{
if (!event) {
return;
@ -172,7 +172,7 @@ void OH_ArkUI_KeyEvent_SetRet(const ArkUI_UIInputEvent *event, bool ret)
if (!keyEvent) {
return;
}
keyEvent->ret = ret;
keyEvent->isConsumed = isConsumed;
}
#ifdef __cplusplus
};

View File

@ -2437,6 +2437,6 @@
},
{
"first_introduced": "14",
"name": "OH_ArkUI_KeyEvent_SetRet"
"name": "OH_ArkUI_KeyEvent_SetConsumed"
}
]

View File

@ -616,10 +616,10 @@ uint32_t OH_ArkUI_KeyEvent_GetUnicode(const ArkUI_UIInputEvent* event);
* @brief
*
* @param event ArkUI_UIInputEvent事件指针
* @param ret
* @param isConsumed
* @since 14
*/
void OH_ArkUI_KeyEvent_SetRet(const ArkUI_UIInputEvent* event, bool ret);
void OH_ArkUI_KeyEvent_SetConsumed(const ArkUI_UIInputEvent* event, bool isConsumed);
#ifdef __cplusplus
};
#endif