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