[dali_2.3.25] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / input-method-options.h
1 #ifndef DALI_VIRTUAL_KEYBOARD_OPTIONS_H
2 #define DALI_VIRTUAL_KEYBOARD_OPTIONS_H
3
4 /*
5  * Copyright (c) 2020 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 <memory>
23
24 #include <dali/public-api/object/property-map.h>
25
26 // INTERNAL INCLUDES
27 #include <dali/public-api/adaptor-framework/input-method.h>
28
29 namespace Dali
30 {
31 /**
32  * Class to handle the Input Method options
33  */
34 class DALI_ADAPTOR_API InputMethodOptions
35 {
36 public:
37   /**
38    * Constructor
39    */
40   InputMethodOptions(); /// Default InputMethodOptions options
41
42   /**
43    * Destructor
44    */
45   ~InputMethodOptions();
46
47   /**
48    * @brief Returns whether panel layout type is password or not
49    * @return true if panel layout type is password, false otherwise.
50    */
51   bool IsPassword() const;
52
53   /**
54    * @brief Apply property map to attribute class, this class will keep the virtualKeyboard settings.
55    * @param[in] settings The property map to be applied
56    */
57   void ApplyProperty(const Property::Map& settings);
58
59   /**
60    * @brief Retrieve property map from current option
61    * @param[out] settings The converted property map
62    */
63   void RetrieveProperty(Property::Map& settings);
64
65 public: // Intended for internal use
66   /**
67    * @brief Set option respectively
68    * @param[in] type The type of source option will be updated
69    * @param[in] options The source option to be applied
70    * @param[out] index The updated index after applying source option
71    * @return true if the value of this option is updated by source option
72    */
73   DALI_INTERNAL bool CompareAndSet(InputMethod::Category::Type type, const InputMethodOptions& options, int& index);
74
75 private:
76   struct Impl;
77   std::unique_ptr<Impl> mImpl;
78 };
79
80 } // namespace Dali
81
82 #endif // DALI_VIRTUAL_KEYBOARD_OPTIONS_H