Merge "DALi Version 2.2.51" into devel/master
[platform/core/uifw/dali-extension.git] / dali-extension / integration-api / key-extension.h
1 #ifndef __DALI_KEY_EXTENSION_H__
2 #define __DALI_KEY_EXTENSION_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 // EXTERNAL INCLUDES
22 #include <dali/public-api/events/key-event.h>
23 #include <dali/public-api/adaptor-framework/key.h>
24 #include <dali/devel-api/adaptor-framework/key-extension-plugin.h>
25
26 namespace Dali
27 {
28
29 /**
30  * @brief Enumeration for mapping keyboard and mouse button event keycodes to extension codes.
31  * @SINCE_1_2.43
32  */
33 enum EXTENSION_KEY
34 {
35 };
36
37 /**
38  * @brief Checks if a key event is for a specific extension DALI KEY.
39  *
40  * @SINCE_1_2.43
41  * @param keyEvent reference to a keyEvent structure
42  * @param daliKey Dali extension key enum
43  * @return true if the key is matched, @c false if not
44  */
45 DALI_IMPORT_API bool IsExtensionKey( const Dali::KeyEvent& keyEvent, Dali::EXTENSION_KEY daliKey);
46
47 namespace Plugin
48 {
49 class KeyExtension : public Dali::KeyExtensionPlugin
50 {
51
52 public:
53
54   /**
55    * @brief KeyExtension constructor.
56    * @SINCE_1_2.43
57    */
58   KeyExtension();
59
60   /**
61    * @brief KeyExtension destructor.
62    * @SINCE_1_2.43
63    */
64   virtual ~KeyExtension();
65
66   /**
67    * @brief Get extension key lookup table.
68    *
69    * @SINCE_1_2.43
70    * @return Pointer of extension Key lookup table.
71    */
72   virtual Dali::KeyExtensionPlugin::KeyLookup* GetKeyLookupTable();
73
74   /**
75    * @brief Get count of extension key lookup table.
76    *
77    * @SINCE_1_2.43
78    * @return count of extension Key lookup table.
79    */
80   virtual std::size_t GetKeyLookupTableCount();
81 };
82
83 }
84 }
85 #endif