Klocwork fixes.
[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) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // INTERNAL INCLUDES
21 #include <dali/public-api/common/dali-common.h>
22
23 namespace Dali DALI_IMPORT_API
24 {
25
26 namespace Integration
27 {
28
29 /**
30  * Base structure for events passed to Dali::Integration::Core::QueueEvent()
31  * An instance of this class cannot be created.
32  */
33 struct Event
34 {
35   // Destruction
36
37   /**
38    * Virtual destructor.
39    */
40   virtual ~Event();
41
42   // Enumerations
43
44   enum Type
45   {
46     Touch,         ///< A touch event, when the user interacts with the screen.
47     Key,           ///< A key pressed event, from the virtual or external keyboard.
48     Gesture,       ///< A Gesture event has been detected.
49     MouseWheel     ///< A mouse wheel event, when the mouse wheel is being rolled from an external mouse.
50   };
51
52   // Data
53
54   /**
55    * The event type.
56    */
57   Type type;
58
59 protected: // Constructors only to be used by derived structures.
60
61   /**
62    * This constructor is only used by derived classes.
63    * @param[in] eventType The type of event.
64    */
65   Event(Type eventType);
66 };
67
68 } // namespace Integration
69
70 } // namespace Dali
71
72 #endif // __DALI_INTEGRATION_EVENT_H__