12d4d9a4dSopenharmony_ci/* 22d4d9a4dSopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 32d4d9a4dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 42d4d9a4dSopenharmony_ci * you may not use this file except in compliance with the License. 52d4d9a4dSopenharmony_ci * You may obtain a copy of the License at 62d4d9a4dSopenharmony_ci * 72d4d9a4dSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 82d4d9a4dSopenharmony_ci * 92d4d9a4dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 102d4d9a4dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 112d4d9a4dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 122d4d9a4dSopenharmony_ci * See the License for the specific language governing permissions and 132d4d9a4dSopenharmony_ci * limitations under the License. 142d4d9a4dSopenharmony_ci */ 152d4d9a4dSopenharmony_ci 162d4d9a4dSopenharmony_ci#ifndef DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_H 172d4d9a4dSopenharmony_ci#define DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_H 182d4d9a4dSopenharmony_ci 192d4d9a4dSopenharmony_ci#include <vector> 202d4d9a4dSopenharmony_ci#include <string> 212d4d9a4dSopenharmony_ci 222d4d9a4dSopenharmony_ci#include "constants_dinput.h" 232d4d9a4dSopenharmony_ci 242d4d9a4dSopenharmony_cinamespace OHOS { 252d4d9a4dSopenharmony_cinamespace DistributedHardware { 262d4d9a4dSopenharmony_cinamespace DistributedInput { 272d4d9a4dSopenharmony_ciclass TouchPadEventFragment { 282d4d9a4dSopenharmony_cipublic: 292d4d9a4dSopenharmony_ci TouchPadEventFragment() : events({}) {}; 302d4d9a4dSopenharmony_ci 312d4d9a4dSopenharmony_ci bool IsShouldDrop(); 322d4d9a4dSopenharmony_ci bool IsTouchPadOptFinish() const; 332d4d9a4dSopenharmony_ci bool IsTouchPadOptStart() const; 342d4d9a4dSopenharmony_ci void PushEvent(const RawEvent &event); 352d4d9a4dSopenharmony_ci std::vector<RawEvent> GetEvents(); 362d4d9a4dSopenharmony_ciprivate: 372d4d9a4dSopenharmony_ci std::vector<RawEvent> events; 382d4d9a4dSopenharmony_ci}; 392d4d9a4dSopenharmony_ci} // namespace DistributedInput 402d4d9a4dSopenharmony_ci} // namespace DistributedHardware 412d4d9a4dSopenharmony_ci} // namespace OHOS 422d4d9a4dSopenharmony_ci#endif // DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_H