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;
35 KeyEvent::~KeyEvent() = default;
37 KeyEvent& KeyEvent::operator=(const KeyEvent& rhs) = default;
39 KeyEvent& KeyEvent::operator=(KeyEvent&& rhs) = default;
41 bool KeyEvent::IsShiftModifier() const
43 return GetImplementation(*this).IsShiftModifier();
46 bool KeyEvent::IsCtrlModifier() const
48 return GetImplementation(*this).IsCtrlModifier();
51 bool KeyEvent::IsAltModifier() const
53 return GetImplementation(*this).IsAltModifier();
56 const std::string& KeyEvent::GetCompose() const
58 return GetImplementation(*this).GetCompose();
61 const std::string& KeyEvent::GetDeviceName() const
63 return GetImplementation(*this).GetDeviceName();
66 Device::Class::Type KeyEvent::GetDeviceClass() const
68 return GetImplementation(*this).GetDeviceClass();
71 Device::Subclass::Type KeyEvent::GetDeviceSubclass() const
73 return GetImplementation(*this).GetDeviceSubclass();
76 const std::string& KeyEvent::GetKeyName() const
78 return GetImplementation(*this).GetKeyName();
81 const std::string& KeyEvent::GetKeyString() const
83 return GetImplementation(*this).GetKeyString();
86 const std::string& KeyEvent::GetLogicalKey() const
88 return GetImplementation(*this).GetLogicalKey();
91 int32_t KeyEvent::GetKeyCode() const
93 return GetImplementation(*this).GetKeyCode();
96 int32_t KeyEvent::GetKeyModifier() const
98 return GetImplementation(*this).GetKeyModifier();
101 unsigned long KeyEvent::GetTime() const
103 return GetImplementation(*this).GetTime();
106 KeyEvent::State KeyEvent::GetState() const
108 return GetImplementation(*this).GetState();
111 KeyEvent::KeyEvent(Internal::KeyEvent* internal)
112 : BaseHandle(internal)