Revert "[Tizen] Add DALi Autofill implementation"
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / physical-keyboard.h
1 #ifndef DALI_PHYSICAL_KEYBOARD_H
2 #define DALI_PHYSICAL_KEYBOARD_H
3
4 /*
5  * Copyright (c) 2019 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
22 #include <dali/public-api/object/base-handle.h>
23 #include <dali/public-api/signals/dali-signal.h>
24
25 // INTERNAL INCLUDES
26 #include <dali/public-api/dali-adaptor-common.h>
27
28 namespace Dali
29 {
30
31 namespace Internal DALI_INTERNAL
32 {
33 namespace Adaptor
34 {
35 class PhysicalKeyboard;
36 }
37 }
38
39 /**
40  * This is a handle to a physical keyboard connected to the device.
41  */
42 class DALI_ADAPTOR_API PhysicalKeyboard : public BaseHandle
43 {
44 public:
45
46   typedef Signal< void (PhysicalKeyboard) > PhysicalKeyboardSignalType;
47
48 public:
49
50   /**
51    * Create an uninitialized PhysicalKeyboard handle; this can be initialized with GetKeyboard()
52    * Calling member functions with an uninitialized Dali::Object is not allowed.
53    */
54   PhysicalKeyboard();
55
56   /**
57    * @brief Destructor
58    *
59    * This is non-virtual since derived Handle types must not contain data or virtual methods.
60    */
61   ~PhysicalKeyboard();
62
63   /**
64    * Gets a handle to the physical keyboard.
65    * @return A handle to the physical keyboard.
66    */
67   static PhysicalKeyboard Get();
68
69   /**
70    * Queries whether a physical keyboard is attached or not.
71    * @return true if a physical keyboard is attached, false otherwise.
72    */
73   bool IsAttached() const;
74
75   // Signals
76
77   /**
78    * Emitted when the status of the physical keyboard changes.
79    * A callback of the following type may be connected:
80    * @code
81    *   void YourCallbackName(PhysicalKeyboard keyboard);
82    * @endcode
83    * @pre The PhysicalKeyboard has been initialized.
84    * @return The status changed signal.
85    */
86   PhysicalKeyboardSignalType& StatusChangedSignal();
87
88   // Not intended for application developers
89
90   /**
91    * Creates a new handle from the implementation.
92    * @param[in] impl A pointer to the object.
93    */
94   explicit DALI_INTERNAL PhysicalKeyboard( Internal::Adaptor::PhysicalKeyboard* impl );
95 };
96
97 } // namespace Dali
98
99 #endif // DALI_PHYSICAL_KEYBOARD_H