Dali 3D User Interface Engine
physical-keyboard-impl.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_PHYSICAL_KEYBOARD_H__
2 #define __DALI_INTERNAL_PHYSICAL_KEYBOARD_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
23 
24 // INTERNAL INCLUDES
25 #include <physical-keyboard.h>
26 
27 namespace Dali
28 {
29 
30 namespace Internal
31 {
32 
33 namespace Adaptor
34 {
35 
37 {
38 public:
39 
43  static Dali::PhysicalKeyboard New();
44 
48  static Dali::PhysicalKeyboard Get();
49 
53  bool IsAttached() const;
54 
60  void KeyReceived( bool fromPhysicalKeyboard );
61 
62  // Signals
63 
68 
69 protected:
70 
74  virtual ~PhysicalKeyboard();
75 
76 private:
77 
78  // Undefined
81 
86 
87 private:
88 
90  bool mAttached;
91 };
92 
93 } // namespace Adaptor
94 
95 } // namespace Internal
96 
97 // Helpers for public-api forwarding methods
98 
100 {
101  DALI_ASSERT_ALWAYS( keyboard && "PhysicalKeyboard handle is empty" );
102 
103  BaseObject& handle = keyboard.GetBaseObject();
104 
105  return static_cast< Internal::Adaptor::PhysicalKeyboard& >( handle );
106 }
107 
109 {
110  DALI_ASSERT_ALWAYS( keyboard && "PhysicalKeyboard handle is empty" );
111 
112  const BaseObject& handle = keyboard.GetBaseObject();
113 
114  return static_cast< const Internal::Adaptor::PhysicalKeyboard& >( handle );
115 }
116 
117 } // namespace Dali
118 
119 #endif // __DALI_INTERNAL_PHYSICAL_KEYBOARD_H__
Dali Docs Home
Read more about Dali