1 /* 2 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef GRAPHIC_LITE_PRESS_EVENT_H 17 #define GRAPHIC_LITE_PRESS_EVENT_H 18 19 /** 20 * @addtogroup UI_Events 21 * @{ 22 * 23 * @brief Defines UI events, such as press, click and drag events. 24 * 25 * @since 1.0 26 * @version 1.0 27 */ 28 29 /** 30 * @file press_event.h 31 * 32 * @brief Declares a touch event, which indicates that the touchscreen or mouse is pressed. 33 * 34 * @since 1.0 35 * @version 1.0 36 */ 37 38 #include "event.h" 39 40 namespace OHOS { 41 /** 42 * @brief Defines a touch event, which indicates that the touchscreen or mouse is pressed. 43 * 44 * @since 1.0 45 * @version 1.0 46 */ 47 class PressEvent : public Event { 48 public: 49 /** 50 * @brief A constructor used to create a <b>PressEvent</b> instance. 51 * @param pos Indicates the position where the press event occurs. 52 * @since 1.0 53 * @version 1.0 54 */ PressEvent(const Point & pos)55 PressEvent(const Point& pos) : Event(pos) {} 56 57 /** 58 * @brief A destructor used to delete the <b>PressEvent</b> instance. 59 * @since 1.0 60 * @version 1.0 61 */ ~PressEvent()62 virtual ~PressEvent() {} 63 }; 64 } // namespace OHOS 65 #endif // GRAPHIC_LITE_PRESS_EVENT_H 66