(KeyEvents) Removing deprecated and unused KeyEvents
[platform/core/uifw/dali-core.git] / dali / integration-api / events / key-event-integ.h
1 #ifndef __DALI_INTEGRATION_KEY_EVENT_H__
2 #define __DALI_INTEGRATION_KEY_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 // EXTERNAL INCLUDES
21 #include <string>
22
23 // INTERNAL INCLUDES
24 #include <dali/integration-api/events/event.h>
25
26 namespace Dali DALI_IMPORT_API
27 {
28
29 namespace Integration
30 {
31
32 /**
33  * An instance of this class should be used by the adaptor to send a key event to
34  * the Dali core.
35  *
36  */
37 struct KeyEvent : public Event
38 {
39   // Enumerations
40   // Specifies the state of the key event.
41   enum State
42   {
43     Down,        /**< Key down */
44     Up,          /**< Key up */
45
46     Last
47   };
48
49   /**
50    * Default Constructor
51    */
52   KeyEvent();
53
54   /**
55    * Constructor
56    * @param[in]  keyName       The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
57    * @param[in]  keyString     A string of input characters or key pressed
58    * @param[in]  keyCode       The unique key code for the key pressed.
59    * @param[in]  keyModifier   The key modifier for special keys like shift and alt
60    * @param[in]  timeStamp The time (in ms) that the key event occurred.
61    * @param[in]  keyState The state of the key event.
62    */
63   KeyEvent(const std::string& keyName,
64            const std::string& keyString,
65            int keyCode,
66            int keyModifier,
67            unsigned long timeStamp,
68            const State& keyState);
69
70   /**
71    * Virtual destructor
72    */
73   virtual ~KeyEvent();
74
75   // Data
76
77   /**
78    *@copydoc Dali::KeyEvent::keyPressedName
79    */
80   std::string keyName;
81
82   /**
83    *@copydoc Dali::KeyEvent::keyPressed
84    */
85   std::string keyString;
86
87   /**
88    * @copydoc Dali::KeyEvent::keyCode
89    */
90   int  keyCode;
91
92   /**
93    *@copydoc Dali::KeyEvent::keyModifier
94    */
95   int  keyModifier;
96
97   /**
98    *@copydoc Dali::KeyEvent::time
99    */
100   unsigned long time;
101
102   /**
103    * State of the key event.
104    * @see State
105    */
106   State state;
107
108 };
109
110 } // namespace Integration
111
112 } // namespace Dali
113
114 #endif // __DALI_INTEGRATION_KEY_EVENT_H__