2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/public-api/events/key-event.h>
22 #include <dali/internal/event/events/key-event-impl.h>
31 KeyEvent::KeyEvent(const KeyEvent& rhs) = default;
33 KeyEvent::KeyEvent(KeyEvent&& rhs) = default;
39 KeyEvent& KeyEvent::operator=(const KeyEvent& rhs) = default;
41 KeyEvent& KeyEvent::operator=(KeyEvent&& rhs) = default;
43 bool KeyEvent::IsShiftModifier() const
45 return GetImplementation(*this).IsShiftModifier();
48 bool KeyEvent::IsCtrlModifier() const
50 return GetImplementation(*this).IsCtrlModifier();
53 bool KeyEvent::IsAltModifier() const
55 return GetImplementation(*this).IsAltModifier();
58 const std::string& KeyEvent::GetCompose() const
60 return GetImplementation(*this).GetCompose();
63 const std::string& KeyEvent::GetDeviceName() const
65 return GetImplementation(*this).GetDeviceName();
68 Device::Class::Type KeyEvent::GetDeviceClass() const
70 return GetImplementation(*this).GetDeviceClass();
73 Device::Subclass::Type KeyEvent::GetDeviceSubclass() const
75 return GetImplementation(*this).GetDeviceSubclass();
78 const std::string& KeyEvent::GetKeyName() const
80 return GetImplementation(*this).GetKeyName();
83 const std::string& KeyEvent::GetKeyString() const
85 return GetImplementation(*this).GetKeyString();
88 const std::string& KeyEvent::GetLogicalKey() const
90 return GetImplementation(*this).GetLogicalKey();
93 int32_t KeyEvent::GetKeyCode() const
95 return GetImplementation(*this).GetKeyCode();
98 int32_t KeyEvent::GetKeyModifier() const
100 return GetImplementation(*this).GetKeyModifier();
103 unsigned long KeyEvent::GetTime() const
105 return GetImplementation(*this).GetTime();
108 KeyEvent::State KeyEvent::GetState() const
110 return GetImplementation(*this).GetState();
113 KeyEvent::KeyEvent(Internal::KeyEvent* internal)
114 : BaseHandle(internal)