1 #ifndef DALI_KEY_EVENT_DEVEL_H
2 #define DALI_KEY_EVENT_DEVEL_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>
27 namespace DevelKeyEvent
34 * @brief An enum of Device Classe types.
38 NONE, ///< Not a device
39 SEAT, ///< The user/seat (the user themselves)
40 KEYBOARD, ///< A regular keyboard, numberpad or attached buttons
41 MOUSE, ///< A mouse, trackball or touchpad relative motion device
42 TOUCH, ///< A touchscreen with fingers or stylus
43 PEN, ///< A special pen device
44 POINTER, ///< A laser pointer, wii-style or 7"minority report" pointing device
45 GAMEPAD ///< A gamepad controller or joystick
48 } // namespace DeviceClass
51 * @brief Get the device name the key event originated from
53 * @param[in] keyEvent The KeyEvent to retrieve the device name from
54 * @return The device name
56 DALI_IMPORT_API std::string GetDeviceName( const KeyEvent& keyEvent );
59 * @brief Set the device name to the KeyEvent
61 * @param[in] keyEvent The KeyEvent to set the device name on
62 * @param[in] deviceName Device name string to set
64 DALI_IMPORT_API void SetDeviceName( KeyEvent& keyEvent, const std::string& deviceName );
67 * @brief Get the device class the key event originated from
69 * @param[in] keyEvent The KeyEvent to retrieve the device class from
70 * @return The device class
72 DALI_IMPORT_API DeviceClass::Type GetDeviceClass( const KeyEvent& keyEvent );
75 * @brief Set the device class to the KeyEvent
77 * @param[in] keyEvent The KeyEvent to set the device class on
78 * @param[in] deviceClass Device class to set
80 DALI_IMPORT_API void SetDeviceClass( KeyEvent& keyEvent, const DeviceClass::Type& deviceClass );
82 } // namespace DevelKeyEvent
86 #endif //DALI_KEY_EVENT_DEVEL_H