mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
!39326 修改OH_ArkUI_DragEvent_GetModifierKeyStates接口只有无符号整数才能进行位运算
Merge pull request !39326 from Zhang Jinyu/modifierKeysState
This commit is contained in:
commit
ca79efb4c9
@ -57,6 +57,7 @@ typedef long long ArkUI_Int64;
|
||||
typedef float ArkUI_Float32;
|
||||
typedef double ArkUI_Float64;
|
||||
typedef const char* ArkUI_CharPtr;
|
||||
typedef unsigned long long ArkUI_Uint64;
|
||||
|
||||
// Several opaque struct declarations.
|
||||
struct _ArkUIVMContext;
|
||||
@ -236,7 +237,7 @@ struct ArkUIDragEvent {
|
||||
ArkUI_Float64 displayY;
|
||||
ArkUI_Float64 screenX;
|
||||
ArkUI_Float64 screenY;
|
||||
ArkUI_Int64 modifierKeyState;
|
||||
ArkUI_Uint64 modifierKeyState;
|
||||
ArkUI_Int32 dragBehavior;
|
||||
bool useCustomDropAnimation;
|
||||
ArkUI_Int32 subKind;
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
namespace OHOS::Ace::NG {
|
||||
namespace NodeModifier {
|
||||
int64_t CalculateModifierKeyState(const std::vector<OHOS::Ace::KeyCode>& status)
|
||||
uint64_t CalculateModifierKeyState(const std::vector<OHOS::Ace::KeyCode>& status)
|
||||
{
|
||||
uint64_t modifierKeysState = 0;
|
||||
// check ctrl
|
||||
@ -80,7 +80,7 @@ int64_t CalculateModifierKeyState(const std::vector<OHOS::Ace::KeyCode>& status)
|
||||
modifierKeysState |= ARKUI_MODIFIER_KEY_FN;
|
||||
}
|
||||
|
||||
return static_cast<int64_t>(modifierKeysState);
|
||||
return modifierKeysState;
|
||||
}
|
||||
|
||||
void SetDragEventProperty(const RefPtr<OHOS::Ace::DragEvent>& info, ArkUINodeEvent& event,
|
||||
|
@ -431,7 +431,7 @@ float OH_ArkUI_DragEvent_GetVelocity(ArkUI_DragEvent* event);
|
||||
* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
|
||||
* @since 12
|
||||
*/
|
||||
int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, int64_t* keys);
|
||||
int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, uint64_t* keys);
|
||||
|
||||
/**
|
||||
* @brief Sets whether to enable strict reporting on drag events.
|
||||
|
@ -41,7 +41,7 @@ constexpr int32_t MAX_POINTID = 9;
|
||||
constexpr int32_t MIN_POINTID = 0;
|
||||
} // namespace
|
||||
|
||||
int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, int64_t* keys)
|
||||
int32_t OH_ArkUI_DragEvent_GetModifierKeyStates(ArkUI_DragEvent* event, uint64_t* keys)
|
||||
{
|
||||
if (!event || !keys) {
|
||||
return ARKUI_ERROR_CODE_PARAM_INVALID;
|
||||
|
Loading…
Reference in New Issue
Block a user