Merge branch 'devel/masteri (1.2.36+)' into tizen
[platform/core/uifw/dali-core.git] / dali / devel-api / events / key-event-devel.h
1 #ifndef DALI_KEY_EVENT_DEVEL_H
2 #define DALI_KEY_EVENT_DEVEL_H
3
4 /*
5  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // INTERNAL_INCLUDES
22 #include <dali/public-api/events/key-event.h>
23
24 namespace Dali
25 {
26
27 namespace DevelKeyEvent
28 {
29
30 namespace DeviceClass
31 {
32
33 /**
34  * @brief An enum of Device Classe types.
35  */
36 enum Type
37 {
38   NONE,      ///< Not a device
39   USER,      ///< 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
46 };
47
48 } // namespace DeviceClass
49
50 /**
51  * @brief Get the device name the key event originated from
52  *
53  * @param[in] keyEvent The KeyEvent to retrieve the device name from
54  * @return The device name
55  */
56 DALI_IMPORT_API std::string GetDeviceName( const KeyEvent& keyEvent );
57
58 /**
59  * @brief Get the device class the key event originated from
60  *
61  * @param[in] keyEvent The KeyEvent to retrieve the device class from
62  * @return The device class
63  */
64 DALI_IMPORT_API DeviceClass::Type GetDeviceClass( const KeyEvent& keyEvent );
65
66 } // namespace DevelKeyEvent
67
68 } // namespace Dali
69
70 #endif  //DALI_KEY_EVENT_DEVEL_H