[NUI] remove input method dependency from View.ControlState (#1585)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Controls / Extension / ButtonExtension.cs
index 429b4b9..83a8b1b 100644 (file)
@@ -26,6 +26,12 @@ namespace Tizen.NUI.Components.Extension
     public abstract class ButtonExtension
     {
         /// <summary>
+        /// The Touch info to get current touch position.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        protected Touch TouchInfo { get; private set; }
+
+        /// <summary>
         /// Called immediately after the Button creates the text part.
         /// </summary>
         /// <param name="button">The Button instance that the extension currently applied to.</param>
@@ -65,10 +71,9 @@ namespace Tizen.NUI.Components.Extension
         /// Describes actions on Button's ControlStates changed.
         /// </summary>
         /// <param name="button">The Button instance that the extension currently applied to.</param>
-        /// <param name="previousState">The previous contol state of the Button.</param>
-        /// <param name="touchInfo">The touch information in case the state has changed by touching.</param>
+        /// <param name="args">The control state changed information.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public virtual void OnControlStateChanged(Button button, ControlStates previousState, Touch touchInfo)
+        public virtual void OnControlStateChanged(Button button, View.ControlStateChangedEventArgs args)
         {
         }
 
@@ -99,5 +104,12 @@ namespace Tizen.NUI.Components.Extension
         public virtual void OnDispose(Button button)
         {
         }
-  }
+
+        /// <summary>
+        /// Set the Touch Info.
+        /// </summary>
+        /// <param name="touch">The Touch Info.</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SetTouchInfo(Touch touch) => TouchInfo = touch;
+    }
 }