* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef EVENT_INTEGRITY_H
#define EVENT_INTEGRITY_H
#include "pointer_event.h"
namespace OHOS {
namespace MMI {
class EventIntegrity {
public:
EventIntegrity();
~EventIntegrity() = default;
bool IsCompleteEvent(const std::shared_ptr<PointerEvent> pointerEvent);
private:
bool HandleSwipeBegin(const std::shared_ptr<PointerEvent>& pointerEvent);
bool HandleSwipeUpdate(const std::shared_ptr<PointerEvent>& pointerEvent);
bool HandleSwipeEnd(const std::shared_ptr<PointerEvent>& pointerEvent);
bool HandleAxisBegin(const std::shared_ptr<PointerEvent>& pointerEvent);
bool HandleAxisUpdate(const std::shared_ptr<PointerEvent>& pointerEvent);
bool HandleAxisEnd(const std::shared_ptr<PointerEvent>& pointerEvent);
private:
int32_t eventAction_ { PointerEvent::POINTER_ACTION_UNKNOWN };
};
}
}
#endif