Ensure BaseHandle class move noexcept (core public-api)
[platform/core/uifw/dali-core.git] / dali / public-api / events / key-event.cpp
1 /*
2  * Copyright (c) 2020 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/public-api/events/key-event.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/event/events/key-event-impl.h>
23
24 namespace Dali
25 {
26 KeyEvent::KeyEvent()
27 : BaseHandle()
28 {
29 }
30
31 KeyEvent::KeyEvent(const KeyEvent& rhs) = default;
32
33 KeyEvent::KeyEvent(KeyEvent&& rhs) noexcept = default;
34
35 KeyEvent::~KeyEvent() = default;
36
37 KeyEvent& KeyEvent::operator=(const KeyEvent& rhs) = default;
38
39 KeyEvent& KeyEvent::operator=(KeyEvent&& rhs) noexcept = default;
40
41 bool KeyEvent::IsShiftModifier() const
42 {
43   return GetImplementation(*this).IsShiftModifier();
44 }
45
46 bool KeyEvent::IsCtrlModifier() const
47 {
48   return GetImplementation(*this).IsCtrlModifier();
49 }
50
51 bool KeyEvent::IsAltModifier() const
52 {
53   return GetImplementation(*this).IsAltModifier();
54 }
55
56 const std::string& KeyEvent::GetCompose() const
57 {
58   return GetImplementation(*this).GetCompose();
59 }
60
61 const std::string& KeyEvent::GetDeviceName() const
62 {
63   return GetImplementation(*this).GetDeviceName();
64 }
65
66 Device::Class::Type KeyEvent::GetDeviceClass() const
67 {
68   return GetImplementation(*this).GetDeviceClass();
69 }
70
71 Device::Subclass::Type KeyEvent::GetDeviceSubclass() const
72 {
73   return GetImplementation(*this).GetDeviceSubclass();
74 }
75
76 const std::string& KeyEvent::GetKeyName() const
77 {
78   return GetImplementation(*this).GetKeyName();
79 }
80
81 const std::string& KeyEvent::GetKeyString() const
82 {
83   return GetImplementation(*this).GetKeyString();
84 }
85
86 const std::string& KeyEvent::GetLogicalKey() const
87 {
88   return GetImplementation(*this).GetLogicalKey();
89 }
90
91 int32_t KeyEvent::GetKeyCode() const
92 {
93   return GetImplementation(*this).GetKeyCode();
94 }
95
96 int32_t KeyEvent::GetKeyModifier() const
97 {
98   return GetImplementation(*this).GetKeyModifier();
99 }
100
101 unsigned long KeyEvent::GetTime() const
102 {
103   return GetImplementation(*this).GetTime();
104 }
105
106 KeyEvent::State KeyEvent::GetState() const
107 {
108   return GetImplementation(*this).GetState();
109 }
110
111 KeyEvent::KeyEvent(Internal::KeyEvent* internal)
112 : BaseHandle(internal)
113 {
114 }
115
116 } // namespace Dali