1 #ifndef DALI_HOVER_EVENT_H
2 #define DALI_HOVER_EVENT_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <cstdint> // uint32_t
25 #include <dali/public-api/common/dali-common.h>
26 #include <dali/public-api/events/touch-point.h>
31 * @addtogroup dali_core_events
36 * @brief Hover events are a collection of touch points at a specific moment in time.
38 * When a multi-touch event occurs, each touch point represents the points that are currently being
39 * hovered or the points where a hover has stopped.
42 struct DALI_CORE_API HoverEvent
44 // Construction & Destruction
47 * @brief Default constructor.
55 * @param[in] time The time the event occurred
57 HoverEvent(unsigned long time);
68 * @brief This is a container of points for this hover event.
70 * The first point in the set is always the
71 * primary touch point (i.e. the first point touched in a multi-touch event).
73 TouchPointContainer points;
76 * @brief The time (in ms) that the hover event occurred.
80 // Convenience Methods
83 * @brief Returns the total number of points in this HoverEvent.
86 * @return Total number of Points
88 uint32_t GetPointCount() const;
91 * @brief Returns a touch point at the index requested.
93 * The first point in the set is always the primary
94 * touch point (i.e. the first point touched in a multi-touch event).
96 * @param[in] point The index of the required Point
97 * @return Point requested
98 * @note "point" should be less than the value returned by GetPointCount().
99 * If out of range, then program asserts.
101 const TouchPoint& GetPoint( uint32_t point) const;
109 #endif // DALI_HOVER_EVENT_H