Formatted API
[platform/core/uifw/dali-core.git] / dali / integration-api / events / event.h
1 #ifndef DALI_INTEGRATION_EVENT_H
2 #define DALI_INTEGRATION_EVENT_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/common/dali-common.h>
23
24 namespace Dali
25 {
26 namespace Integration
27 {
28 /**
29  * Base structure for events passed to Dali::Integration::Core::QueueEvent()
30  * An instance of this class cannot be created.
31  */
32 struct DALI_CORE_API Event
33 {
34   // Destruction
35
36   /**
37    * Virtual destructor.
38    */
39   virtual ~Event();
40
41   // Enumerations
42
43   enum Type
44   {
45     Touch, ///< A touch event, when the user interacts with the screen.
46     Key,   ///< A key pressed event, from the virtual or external keyboard.
47     Wheel, ///< A wheel event, when the wheel is being rolled from an external mouse.
48     Hover  ///< A hover event, when the user hovers above the screen.
49   };
50
51   // Data
52
53   /**
54    * The event type.
55    */
56   Type type;
57
58 protected: // Constructors only to be used by derived structures.
59   /**
60    * This constructor is only used by derived classes.
61    * @param[in] eventType The type of event.
62    */
63   Event(Type eventType);
64 };
65
66 } // namespace Integration
67
68 } // namespace Dali
69
70 #endif // DALI_INTEGRATION_EVENT_H