Perform AABB test in the viewport space for renderers when not processing a 3D layer
[platform/core/uifw/dali-core.git] / dali / devel-api / events / key-event-devel.h
1 #ifndef DALI_KEY_EVENT_DEVEL_H\r
2 #define DALI_KEY_EVENT_DEVEL_H\r
3 \r
4 /*\r
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
6  *\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  *\r
11  * http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  *\r
19  */\r
20 \r
21 // INTERNAL INCLUDES\r
22 #include <dali/public-api/events/key-event.h>\r
23 \r
24 namespace Dali\r
25 {\r
26 namespace DevelKeyEvent\r
27 {\r
28 /**\r
29  * @brief Creates an initialized KeyEvent.\r
30  *\r
31  * @SINCE_1_9.27\r
32  * @param[in]  keyName         The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.\r
33  * @param[in]  logicalKey      The logical key symbol (eg. shift + 1 == "exclamation")\r
34  * @param[in]  keyString       The string of input characters or key pressed\r
35  * @param[in]  keyCode         The unique key code for the key pressed.\r
36  * @param[in]  keyModifier     The key modifier for special keys like shift and alt\r
37  * @param[in]  timeStamp       The time (in ms) that the key event occurred.\r
38  * @param[in]  keyState        The state of the key event.\r
39  * @param[in]  compose         The key compose\r
40  * @param[in]  deviceName      The name of device the key event originated from\r
41  * @param[in]  deviceClass     The class of device the key event originated from\r
42  * @param[in]  deviceSubclass  The subclass of device the key event originated from\r
43  * @return A handle to a newly allocated Dali resource\r
44  */\r
45 DALI_CORE_API KeyEvent New(const std::string&           keyName,\r
46                            const std::string&           logicalKey,\r
47                            const std::string&           keyString,\r
48                            int                          keyCode,\r
49                            int                          keyModifier,\r
50                            unsigned long                timeStamp,\r
51                            const Dali::KeyEvent::State& keyState,\r
52                            const std::string&           compose,\r
53                            const std::string&           deviceName,\r
54                            const Device::Class::Type    deviceClass,\r
55                            const Device::Subclass::Type deviceSubclass);\r
56 \r
57 /**\r
58  * @brief Set the name given to the key pressed\r
59  *\r
60  * @SINCE_1_9.27\r
61  * @param[in] keyEvent The instance of KeyEvent.\r
62  * @param[in] keyName The name given to the key pressed.\r
63  */\r
64 DALI_CORE_API void SetKeyName(KeyEvent keyEvent, const std::string& keyName);\r
65 \r
66 /**\r
67  * @brief Set the actual string of input characters that should be used for input editors.\r
68  *\r
69  * @SINCE_1_9.27\r
70  * @param[in] keyEvent The instance of KeyEvent.\r
71  * @param[in] keyString The actual string of input characters\r
72  */\r
73 DALI_CORE_API void SetKeyString(KeyEvent keyEvent, const std::string& keyString);\r
74 \r
75 /**\r
76  * @brief Set the unique key code for the key pressed.\r
77  *\r
78  * @SINCE_1_9.27\r
79  * @param[in] keyEvent The instance of KeyEvent.\r
80  * @param[in] keyCode The unique key code for the key pressed\r
81  */\r
82 DALI_CORE_API void SetKeyCode(KeyEvent keyEvent, int32_t keyCode);\r
83 \r
84 /**\r
85  * @brief Set the key modifier for special keys like Shift, Alt and Ctrl which modify the next key pressed.\r
86  *\r
87  * @SINCE_1_9.27\r
88  * @param[in] keyEvent The instance of KeyEvent.\r
89  * @param[in] keyModifier The key modifier\r
90  */\r
91 DALI_CORE_API void SetKeyModifier(KeyEvent keyEvent, int32_t keyModifier);\r
92 \r
93 /**\r
94  * @brief Set the time (in ms) that the key event occurred.\r
95  *\r
96  * @SINCE_1_9.27\r
97  * @param[in] keyEvent The instance of KeyEvent.\r
98  * @param[in] time The time (in ms)\r
99  */\r
100 DALI_CORE_API void SetTime(KeyEvent keyEvent, unsigned long time);\r
101 \r
102 /**\r
103  * @brief Set the state of the key event.\r
104  *\r
105  * @SINCE_1_9.27\r
106  * @param[in] keyEvent The instance of KeyEvent.\r
107  * @param[in] state The state of the key event\r
108  */\r
109 DALI_CORE_API void SetState(KeyEvent keyEvent, const KeyEvent::State& state);\r
110 \r
111 } // namespace DevelKeyEvent\r
112 \r
113 } // namespace Dali\r
114 \r
115 #endif // DALI_KEY_EVENT_DEVEL_H\r