Dali C#: csharp dll initial upload
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / KeyEvent.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace NUI {
12
13 public class KeyEvent : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16
17   internal KeyEvent(global::System.IntPtr cPtr, bool cMemoryOwn) {
18     swigCMemOwn = cMemoryOwn;
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21
22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyEvent obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   ~KeyEvent() {
27     DisposeQueue.Instance.Add(this);
28   }
29
30   public virtual void Dispose() {
31     if (!Stage.IsInstalled()) {
32       DisposeQueue.Instance.Add(this);
33       return;
34     }
35
36     lock(this) {
37       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
38         if (swigCMemOwn) {
39           swigCMemOwn = false;
40           NDalicPINVOKE.delete_KeyEvent(swigCPtr);
41         }
42         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
43       }
44       global::System.GC.SuppressFinalize(this);
45     }
46   }
47
48
49  public static KeyEvent GetKeyEventFromPtr(global::System.IntPtr cPtr) {
50     KeyEvent ret = new KeyEvent(cPtr, false);
51         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52     return ret;
53   }
54
55   public KeyEvent() : this(NDalicPINVOKE.new_KeyEvent__SWIG_0(), true) {
56     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57   }
58
59   public KeyEvent(string keyName, string keyString, int keyCode, int keyModifier, uint timeStamp, KeyEvent.State keyState) : this(NDalicPINVOKE.new_KeyEvent__SWIG_1(keyName, keyString, keyCode, keyModifier, timeStamp, (int)keyState), true) {
60     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
61   }
62
63   public bool IsShiftModifier() {
64     bool ret = NDalicPINVOKE.KeyEvent_IsShiftModifier(swigCPtr);
65     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66     return ret;
67   }
68
69   public bool IsCtrlModifier() {
70     bool ret = NDalicPINVOKE.KeyEvent_IsCtrlModifier(swigCPtr);
71     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72     return ret;
73   }
74
75   public bool IsAltModifier() {
76     bool ret = NDalicPINVOKE.KeyEvent_IsAltModifier(swigCPtr);
77     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78     return ret;
79   }
80
81   public string keyPressedName {
82     set {
83       NDalicPINVOKE.KeyEvent_keyPressedName_set(swigCPtr, value);
84       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85     } 
86     get {
87       string ret = NDalicPINVOKE.KeyEvent_keyPressedName_get(swigCPtr);
88       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89       return ret;
90     } 
91   }
92
93   public string keyPressed {
94     set {
95       NDalicPINVOKE.KeyEvent_keyPressed_set(swigCPtr, value);
96       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97     } 
98     get {
99       string ret = NDalicPINVOKE.KeyEvent_keyPressed_get(swigCPtr);
100       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101       return ret;
102     } 
103   }
104
105   public int keyCode {
106     set {
107       NDalicPINVOKE.KeyEvent_keyCode_set(swigCPtr, value);
108       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
109     } 
110     get {
111       int ret = NDalicPINVOKE.KeyEvent_keyCode_get(swigCPtr);
112       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113       return ret;
114     } 
115   }
116
117   public int keyModifier {
118     set {
119       NDalicPINVOKE.KeyEvent_keyModifier_set(swigCPtr, value);
120       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121     } 
122     get {
123       int ret = NDalicPINVOKE.KeyEvent_keyModifier_get(swigCPtr);
124       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125       return ret;
126     } 
127   }
128
129   public uint time {
130     set {
131       NDalicPINVOKE.KeyEvent_time_set(swigCPtr, value);
132       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133     } 
134     get {
135       uint ret = NDalicPINVOKE.KeyEvent_time_get(swigCPtr);
136       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137       return ret;
138     } 
139   }
140
141   public KeyEvent.State state {
142     set {
143       NDalicPINVOKE.KeyEvent_state_set(swigCPtr, (int)value);
144       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145     } 
146     get {
147       KeyEvent.State ret = (KeyEvent.State)NDalicPINVOKE.KeyEvent_state_get(swigCPtr);
148       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149       return ret;
150     } 
151   }
152
153   public enum State {
154     Down,
155     Up,
156     Last
157   }
158
159 }
160
161 }