Merge "Add C# binding for VideoView.Underlay property."
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Key.cs
index e17632e..c4e371d 100755 (executable)
@@ -1,18 +1,19 @@
-/** Copyright (c) 2017 Samsung Electronics Co., Ltd.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 namespace Tizen.NUI
 {
@@ -23,6 +24,10 @@ namespace Tizen.NUI
     public class Key : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        /// <summary>
+        /// swigCMemOwn
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         protected bool swigCMemOwn;
 
         internal Key(global::System.IntPtr cPtr, bool cMemoryOwn)
@@ -38,9 +43,16 @@ namespace Tizen.NUI
 
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
-        //A Flat to check if it is already disposed.
+        /// <summary>
+        /// A Flat to check if it is already disposed.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         protected bool disposed = false;
 
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         ~Key()
         {
             if(!isDisposeQueued)
@@ -50,6 +62,10 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void Dispose()
         {
             //Throw excpetion if Dispose() is called in separate thread.
@@ -69,6 +85,11 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <param name="type">The dispose type.</param>
+        /// <since_tizen> 3 </since_tizen>
         protected virtual void Dispose(DisposeTypes type)
         {
             if (disposed)
@@ -107,6 +128,10 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Device name
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public string DeviceName
         {
             get
@@ -118,8 +143,9 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Name given to the key pressed
+        /// Name given to the key pressed.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public string KeyPressedName
         {
             get
@@ -145,6 +171,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Keycode for the key pressed.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int KeyCode
         {
             get
@@ -158,8 +185,9 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Special keys like shift, alt and control which modify the next key pressed.
+        /// Special keys like Shift, Alt, and Ctrl which modify the next key pressed.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public int KeyModifier
         {
             get
@@ -175,6 +203,7 @@ namespace Tizen.NUI
         /// <summary>
         /// The time (in ms) that the key event occurred.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public uint Time
         {
             get
@@ -190,6 +219,7 @@ namespace Tizen.NUI
         /// <summary>
         /// State of the key event.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public Key.StateType State
         {
             get
@@ -202,6 +232,10 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get the device class the key event originated from.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public DeviceClassType DeviceClass
         {
             get
@@ -212,33 +246,48 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get the device subclass the key event originated from.
+        /// </summary>
+        /// <since_tizen> 4 </since_tizen>
+        public DeviceSubClassType DeviceSubClass
+        {
+            get
+            {
+                int ret = NDalicPINVOKE.GetDeviceSubClass(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return (DeviceSubClassType)ret;
+            }
+        }
 
         /// <summary>
-        /// Default Constructor.
+        /// The default constructor.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public Key() : this(NDalicPINVOKE.new_Key__SWIG_0(), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         /// <summary>
-        /// Constructor.
+        /// The constructor.
         /// </summary>
-        /// <param name="keyName">The name of the key pressed or command from the IMF, if later then the some following parameters will be needed</param>
-        /// <param name="keyString">A string of input characters or key pressed</param>
-        /// <param name="keyCode">The unique key code for the key pressed</param>
-        /// <param name="keyModifier">The key modifier for special keys like shift and alt</param>
-        /// <param name="timeStamp">The time (in ms) that the key event occurred</param>
-        /// <param name="keyState">The state of the key event</param>
+        /// <param name="keyName">The name of the key pressed or command from the IMF, if later, then the following parameters will be needed.</param>
+        /// <param name="keyString">A string of input characters or key pressed.</param>
+        /// <param name="keyCode">The unique key code for the key pressed.</param>
+        /// <param name="keyModifier">The key modifier for special keys like Shift and Alt.</param>
+        /// <param name="timeStamp">The time (in ms) that the key event occurred.</param>
+        /// <param name="keyState">The state of the key event.</param>
         internal Key(string keyName, string keyString, int keyCode, int keyModifier, uint timeStamp, Key.StateType keyState) : this(NDalicPINVOKE.new_Key__SWIG_1(keyName, keyString, keyCode, keyModifier, timeStamp, (int)keyState), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         /// <summary>
-        /// Checks to see if Shift key modifier has been supplied.
+        /// Checks to see if the Shift key modifier has been supplied.
         /// </summary>
-        /// <returns>True if shift modifier</returns>
+        /// <returns>True if Shift modifier.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public bool IsShiftModifier()
         {
             bool ret = NDalicPINVOKE.Key_IsShiftModifier(swigCPtr);
@@ -249,7 +298,8 @@ namespace Tizen.NUI
         /// <summary>
         /// Checks to see if Ctrl (control) key modifier has been supplied.
         /// </summary>
-        /// <returns>True if ctrl modifier</returns>
+        /// <returns>True if Ctrl modifier.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public bool IsCtrlModifier()
         {
             bool ret = NDalicPINVOKE.Key_IsCtrlModifier(swigCPtr);
@@ -260,7 +310,8 @@ namespace Tizen.NUI
         /// <summary>
         /// Checks to see if Alt key modifier has been supplied.
         /// </summary>
-        /// <returns>True if alt modifier</returns>
+        /// <returns>True if Alt modifier.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public bool IsAltModifier()
         {
             bool ret = NDalicPINVOKE.Key_IsAltModifier(swigCPtr);
@@ -361,12 +412,25 @@ namespace Tizen.NUI
         /// <summary>
         /// Enumeration for specifying the state of the key event.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public enum StateType
         {
+            /// <summary>
+            /// Key Down.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             Down,
+            /// <summary>
+            /// Key Up.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             Up,
+            /// <summary>
+            /// Key Last.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             Last
         }
 
     }
-}
+}
\ No newline at end of file