-/** 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
{
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)
//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)
}
}
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void Dispose()
{
//Throw excpetion if Dispose() is called in separate thread.
}
}
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <param name="type">The dispose type.</param>
+ /// <since_tizen> 3 </since_tizen>
protected virtual void Dispose(DisposeTypes type)
{
if (disposed)
return ret;
}
+ /// <summary>
+ /// Device name
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public string DeviceName
{
get
}
/// <summary>
- /// Name given to the key pressed
+ /// Name given to the key pressed.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public string KeyPressedName
{
get
/// <summary>
/// Keycode for the key pressed.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public int KeyCode
{
get
}
/// <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
/// <summary>
/// The time (in ms) that the key event occurred.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public uint Time
{
get
/// <summary>
/// State of the key event.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public Key.StateType State
{
get
}
}
+ /// <summary>
+ /// Get the device class the key event originated from.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
public DeviceClassType DeviceClass
{
get
}
}
+ /// <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);
/// <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);
/// <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);
/// <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