[NUI] Change the values of some enumeration types of InputMethod (#2049)
authorSeoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com>
Wed, 7 Oct 2020 05:58:38 +0000 (14:58 +0900)
committerGitHub <noreply@github.com>
Wed, 7 Oct 2020 05:58:38 +0000 (14:58 +0900)
- In Tizen.NUI.InputMethod.ActionButtonTitleType, some enumeration types
 are not used anymore : Previous, Unspecified, None
- To match the types of ecore_imf, some values should be changed.

Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
src/Tizen.NUI/src/public/InputMethod.cs

index f376c65..29907e8 100755 (executable)
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
+using System;
 
 namespace Tizen.NUI
 {
@@ -176,6 +177,7 @@ namespace Tizen.NUI
             /// <summary>
             /// Previous action.
             /// </summary>
+            [Obsolete("Deprecated in API8, will be removed in API10.")]
             Previous,
             /// <summary>
             /// Search action.
@@ -192,10 +194,12 @@ namespace Tizen.NUI
             /// <summary>
             /// Unspecified action.
             /// </summary>
+            [Obsolete("Deprecated in API8, will be removed in API10.")]
             Unspecified,
             /// <summary>
             /// Nothing to do.
             /// </summary>
+            [Obsolete("Deprecated in API8, will be removed in API10.")]
             None
         }
 
@@ -387,7 +391,15 @@ namespace Tizen.NUI
         {
             PropertyMap _outputMap = new PropertyMap();
             if (_panelLayout != null) { _outputMap.Add("PANEL_LAYOUT", new PropertyValue((int)_panelLayout)); }
-            if (_actionButton != null) { _outputMap.Add("BUTTON_ACTION", new PropertyValue((int)_actionButton)); }
+            if (_actionButton != null)
+            {
+                // Temporarily specify the values to match the types of ecore_imf.
+                if (_actionButton == InputMethod.ActionButtonTitleType.Search) _actionButton = (InputMethod.ActionButtonTitleType.Search - 1); // 6
+                else if (_actionButton == InputMethod.ActionButtonTitleType.Send) _actionButton = (InputMethod.ActionButtonTitleType.Send - 1); // 7
+                else if (_actionButton == InputMethod.ActionButtonTitleType.SignIn) _actionButton = (InputMethod.ActionButtonTitleType.SignIn - 1); // 8
+                else if (_actionButton == InputMethod.ActionButtonTitleType.Unspecified || _actionButton == InputMethod.ActionButtonTitleType.None) _actionButton = InputMethod.ActionButtonTitleType.Default;
+                _outputMap.Add("BUTTON_ACTION", new PropertyValue((int)_actionButton));
+            }
             if (_autoCapital != null) { _outputMap.Add("AUTO_CAPITALIZE", new PropertyValue((int)_autoCapital)); }
             if (_variation != null) { _outputMap.Add("VARIATION", new PropertyValue((int)_variation)); }
             return _outputMap;