2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 #include "toolkit-physical-keyboard.h"
19 #include <dali/public-api/common/dali-common.h>
20 #include <dali/public-api/object/base-object.h>
21 #include <dali/public-api/signals/dali-signal-v2.h>
26 /********************************************************************************
27 * Stub for Dali::Internal::Adaptor::PhysicalKeyboard
28 ********************************************************************************/
33 class PhysicalKeyboard : public BaseObject
35 public: // Creation & Destruction
39 static Dali::PhysicalKeyboard Get();
42 bool IsAttached() const;
45 Dali::PhysicalKeyboard::Signal& StatusChangedSignal();
48 Dali::PhysicalKeyboard::Signal mStatusChangedSignal;
50 static Dali::PhysicalKeyboard mPhysicalKeyboard;
53 Dali::PhysicalKeyboard PhysicalKeyboard::mPhysicalKeyboard;
55 PhysicalKeyboard::PhysicalKeyboard()
60 PhysicalKeyboard::~PhysicalKeyboard()
64 Dali::PhysicalKeyboard PhysicalKeyboard::Get()
66 if( ! mPhysicalKeyboard )
68 mPhysicalKeyboard = Dali::PhysicalKeyboard(new Internal::Adaptor::PhysicalKeyboard());
70 return mPhysicalKeyboard;
73 bool PhysicalKeyboard::IsAttached() const
78 Dali::PhysicalKeyboard::Signal& PhysicalKeyboard::StatusChangedSignal()
80 return mStatusChangedSignal;
83 } // namespace Adaptor
84 } // namespace Internal
87 /********************************************************************************
88 * Stub for Dali::PhysicalKeyboard
89 ********************************************************************************/
91 PhysicalKeyboard::PhysicalKeyboard(){}
92 PhysicalKeyboard::~PhysicalKeyboard(){}
94 PhysicalKeyboard PhysicalKeyboard::Get()
96 // Get the physical keyboard handle
97 PhysicalKeyboard handle = Internal::Adaptor::PhysicalKeyboard::Get();
101 bool PhysicalKeyboard::IsAttached() const
103 const BaseObject& object = GetBaseObject();
104 const Internal::Adaptor::PhysicalKeyboard& pyke = static_cast< const Internal::Adaptor::PhysicalKeyboard& >( object );
105 return pyke.IsAttached();
108 PhysicalKeyboard::Signal& PhysicalKeyboard::StatusChangedSignal()
110 BaseObject& object = GetBaseObject();
111 Internal::Adaptor::PhysicalKeyboard& pyke = static_cast< Internal::Adaptor::PhysicalKeyboard& >( object );
112 return pyke.StatusChangedSignal();
115 PhysicalKeyboard::PhysicalKeyboard( Internal::Adaptor::PhysicalKeyboard *impl )