1 #ifndef __DALI_INTERNAL_KEY_EVENT_H__
2 #define __DALI_INTERNAL_KEY_EVENT_H__
5 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/events/key-event.h>
37 KeyEventImpl( Dali::KeyEvent* keyEvent );
45 * @brief Assignment operator.
46 * @param[in] rhs A reference to the copied handle
47 * @return A reference to this
49 KeyEventImpl& operator=( const KeyEventImpl& rhs );
52 * @brief Get the compose string.
54 * @return The compose string.
56 std::string GetCompose() const;
59 * @brief Set the compose string to the KeyEvent
60 * A string if this keystroke has modified a string in the middle of being composed,
61 * this string replaces the previous one.
63 * @param[in] compose The compose string to set
65 void SetCompose( const std::string& compose );
68 * @brief Get the device name the key event originated from
70 * @return The device name
72 std::string GetDeviceName() const;
75 * @brief Set the device name to the KeyEvent
77 * @param[in] deviceName Device name string to set
79 void SetDeviceName( const std::string& deviceName );
82 * @brief Get the device class the key event originated from
84 * @return The device class
86 Device::Class::Type GetDeviceClass() const;
89 * @brief Set the device class to the KeyEvent
91 * @param[in] deviceClass Device class to set
93 void SetDeviceClass( Device::Class::Type deviceClass );
96 * @brief Get the device subclass the key event originated from
98 * @return The device subclass
100 Device::Subclass::Type GetDeviceSubclass() const;
103 * @brief Set the device subclass to the KeyEvent
105 * @param[in] deviceClass Device subclass to set
107 void SetDeviceSubclass( Device::Subclass::Type deviceSubclass );
115 KeyEventImpl( const KeyEventImpl& rhs );
119 std::string mCompose;
120 std::string mDeviceName;
121 Device::Class::Type mDeviceClass;
122 Device::Subclass::Type mDeviceSubclass;
125 } // namespace Internal
127 // Helpers for public-api forwarding methods
129 Internal::KeyEventImpl* GetImplementation( KeyEvent* keyEvent );
131 const Internal::KeyEventImpl* GetImplementation( const KeyEvent* keyEvent );
135 #endif // __DALI_INTERNAL_KEY_EVENT_H__