Revert "[Tizen] Adding deviceClass to KeyEvent Integ"
[platform/core/uifw/dali-core.git] / dali / integration-api / events / key-event-integ.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/integration-api/events/key-event-integ.h>
20
21 namespace Dali
22 {
23
24 namespace Integration
25 {
26
27 KeyEvent::KeyEvent()
28 : Event(Key),
29   keyName(),
30   keyString(),
31   keyCode(-1),
32   keyModifier(0),
33   time(0),
34   state(KeyEvent::Down),
35   deviceName("")
36 {
37 }
38
39 KeyEvent::KeyEvent( const std::string& keyName, const std::string& keyString, int keyCode, int keyModifier,
40                     unsigned long timeStamp, const State& keyState, const std::string deviceName )
41 : Event(Key),
42   keyName(keyName),
43   keyString(keyString),
44   keyCode(keyCode),
45   keyModifier(keyModifier),
46   time(timeStamp),
47   state(keyState),
48   deviceName(deviceName)
49 {
50 }
51
52 KeyEvent::KeyEvent( const Dali::KeyEvent& event )
53 : Event(Key),
54   keyName( event.keyPressedName ),
55   keyString( event.keyPressed ),
56   keyCode( event.keyCode ),
57   keyModifier( event.keyModifier ),
58   time( event.time ),
59   state( static_cast< Integration::KeyEvent::State >( event.state ) ),
60   deviceName("")
61 {
62 }
63
64 KeyEvent::~KeyEvent()
65 {
66 }
67
68 } // namespace Integration
69
70 } // namespace Dali