99340ce879d95b8fc4195f23be5cf7005a8519c5
[platform/core/uifw/dali-adaptor.git] / adaptors / public-api / adaptor-framework / 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 // EXTERNAL INCLUDES
22
23 #include <dali/public-api/events/key-event.h>
24
25 namespace Dali DALI_IMPORT_API
26 {
27
28 /**
29  * @brief Mapping of keyboard and mouse button event keycodes to platform specific codes.
30  *
31  * For tizen the X Server Keycode is used as reference, unless it's over ridden
32  * in utilX.h in which case the values are based on utilX.h
33  */
34
35 typedef int KEY;
36
37 extern const KEY DALI_KEY_INVALID;
38 extern const KEY DALI_KEY_ESCAPE;
39 extern const KEY DALI_KEY_BACK;
40 extern const KEY DALI_KEY_CAMERA;
41 extern const KEY DALI_KEY_CONFIG;
42 extern const KEY DALI_KEY_POWER;
43 extern const KEY DALI_KEY_PAUSE;
44 extern const KEY DALI_KEY_CANCEL;
45 extern const KEY DALI_KEY_PLAY_CD;
46 extern const KEY DALI_KEY_STOP_CD;
47 extern const KEY DALI_KEY_PAUSE_CD;
48 extern const KEY DALI_KEY_NEXT_SONG;
49 extern const KEY DALI_KEY_PREVIOUS_SONG;
50 extern const KEY DALI_KEY_REWIND;
51 extern const KEY DALI_KEY_FASTFORWARD;
52 extern const KEY DALI_KEY_MEDIA;
53 extern const KEY DALI_KEY_PLAY_PAUSE;
54 extern const KEY DALI_KEY_MUTE;
55 extern const KEY DALI_KEY_SEND;
56 extern const KEY DALI_KEY_SELECT;
57 extern const KEY DALI_KEY_END;
58 extern const KEY DALI_KEY_MENU;
59 extern const KEY DALI_KEY_HOME;
60 extern const KEY DALI_KEY_HOMEPAGE;
61 extern const KEY DALI_KEY_WEBPAGE;
62 extern const KEY DALI_KEY_MAIL;
63 extern const KEY DALI_KEY_SCREENSAVER;
64 extern const KEY DALI_KEY_BRIGHTNESS_UP;
65 extern const KEY DALI_KEY_BRIGHTNESS_DOWN;
66 extern const KEY DALI_KEY_SOFT_KBD;
67 extern const KEY DALI_KEY_QUICK_PANEL;
68 extern const KEY DALI_KEY_TASK_SWITCH;
69 extern const KEY DALI_KEY_APPS;
70 extern const KEY DALI_KEY_SEARCH;
71 extern const KEY DALI_KEY_VOICE;
72 extern const KEY DALI_KEY_LANGUAGE;
73 extern const KEY DALI_KEY_VOLUME_UP;
74 extern const KEY DALI_KEY_VOLUME_DOWN;
75 extern const KEY DALI_KEY_BACKSPACE;
76 extern const KEY DALI_KEY_CURSOR_LEFT;
77 extern const KEY DALI_KEY_CURSOR_RIGHT;
78 extern const KEY DALI_KEY_CURSOR_UP;
79 extern const KEY DALI_KEY_CURSOR_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 #endif // __DALI_KEY_H__