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