1 #ifndef DALI_PHYSICAL_KEYBOARD_H
2 #define DALI_PHYSICAL_KEYBOARD_H
5 * Copyright (c) 2020 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>
30 namespace Internal DALI_INTERNAL
34 class PhysicalKeyboard;
36 } // namespace DALI_INTERNAL
39 * This is a handle to a physical keyboard connected to the device.
41 class DALI_ADAPTOR_API PhysicalKeyboard : public BaseHandle
44 typedef Signal<void(PhysicalKeyboard)> PhysicalKeyboardSignalType;
48 * Create an uninitialized PhysicalKeyboard handle; this can be initialized with GetKeyboard()
49 * Calling member functions with an uninitialized Dali::Object is not allowed.
56 * This is non-virtual since derived Handle types must not contain data or virtual methods.
61 * Gets a handle to the physical keyboard.
62 * @return A handle to the physical keyboard.
64 static PhysicalKeyboard Get();
67 * Queries whether a physical keyboard is attached or not.
68 * @return true if a physical keyboard is attached, false otherwise.
70 bool IsAttached() const;
75 * Emitted when the status of the physical keyboard changes.
76 * A callback of the following type may be connected:
78 * void YourCallbackName(PhysicalKeyboard keyboard);
80 * @pre The PhysicalKeyboard has been initialized.
81 * @return The status changed signal.
83 PhysicalKeyboardSignalType& StatusChangedSignal();
85 // Not intended for application developers
88 * Creates a new handle from the implementation.
89 * @param[in] impl A pointer to the object.
91 explicit DALI_INTERNAL PhysicalKeyboard(Internal::Adaptor::PhysicalKeyboard* impl);
96 #endif // DALI_PHYSICAL_KEYBOARD_H