License conversion from Flora to Apache 2.0
[platform/core/uifw/dali-adaptor.git] / capi / dali / public-api / adaptor-framework / common / key.h
1 #ifndef __DALI_KEY_H__
2 #define __DALI_KEY_H__
3
4 /*
5  * Copyright (c) 2014 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 /**
22  * @addtogroup CAPI_DALI_ADAPTOR_MODULE
23  * @{
24  */
25
26 // EXTERNAL INCLUDES
27
28 #include <dali/public-api/events/key-event.h>
29
30 namespace Dali DALI_IMPORT_API
31 {
32
33 /**
34  * @brief Mapping of keyboard and mouse button event keycodes to platform specific codes.
35  *
36  * For tizen the X Server Keycode is used as reference, unless it's over ridden
37  * in utilX.h in which case the values are based on utilX.h
38  */
39
40 typedef int KEY;
41
42 extern const KEY DALI_KEY_INVALID;
43 extern const KEY DALI_KEY_ESCAPE;
44 extern const KEY DALI_KEY_BACK;
45 extern const KEY DALI_KEY_CAMERA;
46 extern const KEY DALI_KEY_CONFIG;
47 extern const KEY DALI_KEY_POWER;
48 extern const KEY DALI_KEY_PAUSE;
49 extern const KEY DALI_KEY_CANCEL;
50 extern const KEY DALI_KEY_PLAY_CD;
51 extern const KEY DALI_KEY_STOP_CD;
52 extern const KEY DALI_KEY_PAUSE_CD;
53 extern const KEY DALI_KEY_NEXT_SONG;
54 extern const KEY DALI_KEY_PREVIOUS_SONG;
55 extern const KEY DALI_KEY_REWIND;
56 extern const KEY DALI_KEY_FASTFORWARD;
57 extern const KEY DALI_KEY_MEDIA;
58 extern const KEY DALI_KEY_PLAY_PAUSE;
59 extern const KEY DALI_KEY_MUTE;
60 extern const KEY DALI_KEY_SEND;
61 extern const KEY DALI_KEY_SELECT;
62 extern const KEY DALI_KEY_END;
63 extern const KEY DALI_KEY_MENU;
64 extern const KEY DALI_KEY_HOME;
65 extern const KEY DALI_KEY_HOMEPAGE;
66 extern const KEY DALI_KEY_WEBPAGE;
67 extern const KEY DALI_KEY_MAIL;
68 extern const KEY DALI_KEY_SCREENSAVER;
69 extern const KEY DALI_KEY_BRIGHTNESS_UP;
70 extern const KEY DALI_KEY_BRIGHTNESS_DOWN;
71 extern const KEY DALI_KEY_SOFT_KBD;
72 extern const KEY DALI_KEY_QUICK_PANEL;
73 extern const KEY DALI_KEY_TASK_SWITCH;
74 extern const KEY DALI_KEY_APPS;
75 extern const KEY DALI_KEY_SEARCH;
76 extern const KEY DALI_KEY_VOICE;
77 extern const KEY DALI_KEY_LANGUAGE;
78 extern const KEY DALI_KEY_VOLUME_UP;
79 extern const KEY DALI_KEY_VOLUME_DOWN;
80
81 /**
82  * @brief Check if a key event is for a specific DALI KEY.
83  *
84  * @param keyEvent reference to a keyEvent structure
85  * @param daliKey dali key enum
86  * @return true if the key is matched, false if not
87  */
88 bool IsKey( const KeyEvent& keyEvent, KEY daliKey);
89
90 } // namespace Dali
91
92 /**
93  * @}
94  */
95 #endif // __DALI_KEY_H__