1 #ifndef DALI_PHYSICAL_KEYBOARD_H
2 #define DALI_PHYSICAL_KEYBOARD_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/object/base-handle.h>
23 #include <dali/public-api/signals/dali-signal.h>
26 #include <dali/public-api/dali-adaptor-common.h>
31 namespace Internal DALI_INTERNAL
35 class PhysicalKeyboard;
40 * This is a handle to a physical keyboard connected to the device.
42 class DALI_ADAPTOR_API PhysicalKeyboard : public BaseHandle
46 typedef Signal< void (PhysicalKeyboard) > PhysicalKeyboardSignalType;
51 * Create an uninitialized PhysicalKeyboard handle; this can be initialized with GetKeyboard()
52 * Calling member functions with an uninitialized Dali::Object is not allowed.
59 * This is non-virtual since derived Handle types must not contain data or virtual methods.
64 * Gets a handle to the physical keyboard.
65 * @return A handle to the physical keyboard.
67 static PhysicalKeyboard Get();
70 * Queries whether a physical keyboard is attached or not.
71 * @return true if a physical keyboard is attached, false otherwise.
73 bool IsAttached() const;
78 * Emitted when the status of the physical keyboard changes.
79 * A callback of the following type may be connected:
81 * void YourCallbackName(PhysicalKeyboard keyboard);
83 * @pre The PhysicalKeyboard has been initialized.
84 * @return The status changed signal.
86 PhysicalKeyboardSignalType& StatusChangedSignal();
88 // Not intended for application developers
91 * Creates a new handle from the implementation.
92 * @param[in] impl A pointer to the object.
94 explicit DALI_INTERNAL PhysicalKeyboard( Internal::Adaptor::PhysicalKeyboard* impl );
99 #endif // DALI_PHYSICAL_KEYBOARD_H