input: use pepper-xkb api to create/set keymap instead of pepper and xkbcommon apis
[platform/core/uifw/pepper-dali.git] / pepper-dali / internal / input.h
1 #ifndef __DALI_PEPPER_INPUT_H__
2 #define __DALI_PEPPER_INPUT_H__
3
4 /*
5  * Copyright (c) 2016 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 <pepper-dali/public-api/compositor/compositor.h>
23
24 // EXTERNAL INCLUDES
25 #include <dali/public-api/common/dali-common.h>
26 #include <dali/public-api/object/base-handle.h>
27 #include <pepper.h>
28 #include <pepper-xkb.h>
29
30 namespace Dali
31 {
32
33 namespace Pepper
34 {
35
36 namespace Internal DALI_INTERNAL
37 {
38 class Input;
39 }
40
41 /**
42  * @addtogroup dali_pepper_compositor
43  * @{
44  */
45
46 class Input : public BaseHandle
47 {
48 public:
49
50   /**
51    * @brief Create Input.
52    *
53    * @since_tizen 3.0
54    * @return A handle to Input.
55    */
56   static Input New( Pepper::Compositor compositor );
57
58   /**
59    * @brief Downcast a handle to Input handle.
60    *
61    * If the BaseHandle points is a Input the downcast returns a valid handle.
62    * If not the returned handle is left empty.
63    *
64    * @since_tizen 3.0
65    * @param[in] handle Handle to an object
66    * @return handle to a Input or an empty handle
67    */
68   static Input DownCast( BaseHandle handle );
69
70   /**
71    * @brief Creates an empty handle.
72    * @since_tizen 3.0
73    */
74   Input();
75
76   /**
77    * @brief Copy constructor.
78    *
79    * @since_tizen 3.0
80    * @param[in] handle The handle to copy from.
81    */
82   Input( const Input& handle );
83
84   /**
85    * @brief Assignment operator.
86    *
87    * @since_tizen 3.0
88    * @param[in] handle The handle to copy from.
89    * @return A reference to this.
90    */
91   Input& operator=( const Input& handle );
92
93   /**
94    * @brief Destructor
95    *
96    * This is non-virtual since derived Handle types must not contain data or virtual methods.
97    * @since_tizen 3.0
98    */
99   ~Input();
100
101   pepper_pointer_t* GetPointer();
102   pepper_keyboard_t* GetKeyboard();
103   pepper_touch_t* GetTouch();
104
105 public: // Not intended for application developers
106
107   /**
108    * @brief Creates a handle using the Pepper::Internal implementation.
109    *
110    * @since_tizen 3.0
111    * @param[in] implementation The Input implementation.
112    */
113   explicit DALI_INTERNAL Input( Internal::Input* implementation );
114 };
115
116 /**
117  * @}
118  */
119 } // namespace Pepper
120
121 } // namespace Dali
122
123 #endif // __DALI_PEPPER_INPUT_H__