nui 1.0.2 release
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Key.cs
1 //------------------------------------------------------------------------------\r
2 // <auto-generated />\r
3 //\r
4 // This file was automatically generated by SWIG (http://www.swig.org).\r
5 // Version 3.0.9\r
6 //\r
7 // Do not make changes to this file unless you know what you are doing--modify\r
8 // the SWIG interface file instead.\r
9 //------------------------------------------------------------------------------\r
10 \r
11 namespace Tizen.NUI\r
12 {\r
13 \r
14     public class Key : global::System.IDisposable\r
15     {\r
16         private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
17         protected bool swigCMemOwn;\r
18 \r
19         internal Key(global::System.IntPtr cPtr, bool cMemoryOwn)\r
20         {\r
21             swigCMemOwn = cMemoryOwn;\r
22             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
23         }\r
24 \r
25         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Key obj)\r
26         {\r
27             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
28         }\r
29 \r
30         ~Key()\r
31         {\r
32             DisposeQueue.Instance.Add(this);\r
33         }\r
34 \r
35         public virtual void Dispose()\r
36         {\r
37             if (!Stage.IsInstalled())\r
38             {\r
39                 DisposeQueue.Instance.Add(this);\r
40                 return;\r
41             }\r
42 \r
43             lock (this)\r
44             {\r
45                 if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
46                 {\r
47                     if (swigCMemOwn)\r
48                     {\r
49                         swigCMemOwn = false;\r
50                         NDalicPINVOKE.delete_Key(swigCPtr);\r
51                     }\r
52                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
53                 }\r
54                 global::System.GC.SuppressFinalize(this);\r
55             }\r
56         }\r
57 \r
58 \r
59         internal static Key GetKeyFromPtr(global::System.IntPtr cPtr)\r
60         {\r
61             Key ret = new Key(cPtr, false);\r
62             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
63             return ret;\r
64         }\r
65 \r
66         public string KeyPressedName\r
67         {\r
68             get\r
69             {\r
70                 return keyPressedName;\r
71             }\r
72         }\r
73 \r
74         /* duplicated with KeyPressedName : removed\r
75         public string KeyPressed\r
76         {\r
77             get\r
78             {\r
79                 return keyPressed;\r
80             }\r
81         }\r
82         */\r
83 \r
84         public int KeyCode\r
85         {\r
86             get\r
87             {\r
88                 return keyCode;\r
89             }\r
90         }\r
91 \r
92         public int KeyModifier\r
93         {\r
94             get\r
95             {\r
96                 return keyModifier;\r
97             }\r
98         }\r
99 \r
100         public uint Time\r
101         {\r
102             get\r
103             {\r
104                 return time;\r
105             }\r
106         }\r
107 \r
108         public Key.StateType State\r
109         {\r
110             get\r
111             {\r
112                 return state;\r
113             }\r
114         }\r
115 \r
116         public Key() : this(NDalicPINVOKE.new_Key__SWIG_0(), true)\r
117         {\r
118             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
119         }\r
120 \r
121         public 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)\r
122         {\r
123             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
124         }\r
125 \r
126         public bool IsShiftModifier()\r
127         {\r
128             bool ret = NDalicPINVOKE.Key_IsShiftModifier(swigCPtr);\r
129             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
130             return ret;\r
131         }\r
132 \r
133         public bool IsCtrlModifier()\r
134         {\r
135             bool ret = NDalicPINVOKE.Key_IsCtrlModifier(swigCPtr);\r
136             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
137             return ret;\r
138         }\r
139 \r
140         public bool IsAltModifier()\r
141         {\r
142             bool ret = NDalicPINVOKE.Key_IsAltModifier(swigCPtr);\r
143             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
144             return ret;\r
145         }\r
146 \r
147         private string keyPressedName\r
148         {\r
149             set\r
150             {\r
151                 NDalicPINVOKE.Key_keyPressedName_set(swigCPtr, value);\r
152                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
153             }\r
154             get\r
155             {\r
156                 string ret = NDalicPINVOKE.Key_keyPressedName_get(swigCPtr);\r
157                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
158                 return ret;\r
159             }\r
160         }\r
161 \r
162         private string keyPressed\r
163         {\r
164             set\r
165             {\r
166                 NDalicPINVOKE.Key_keyPressed_set(swigCPtr, value);\r
167                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
168             }\r
169             get\r
170             {\r
171                 string ret = NDalicPINVOKE.Key_keyPressed_get(swigCPtr);\r
172                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
173                 return ret;\r
174             }\r
175         }\r
176 \r
177         private int keyCode\r
178         {\r
179             set\r
180             {\r
181                 NDalicPINVOKE.Key_keyCode_set(swigCPtr, value);\r
182                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
183             }\r
184             get\r
185             {\r
186                 int ret = NDalicPINVOKE.Key_keyCode_get(swigCPtr);\r
187                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
188                 return ret;\r
189             }\r
190         }\r
191 \r
192         private int keyModifier\r
193         {\r
194             set\r
195             {\r
196                 NDalicPINVOKE.Key_keyModifier_set(swigCPtr, value);\r
197                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
198             }\r
199             get\r
200             {\r
201                 int ret = NDalicPINVOKE.Key_keyModifier_get(swigCPtr);\r
202                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
203                 return ret;\r
204             }\r
205         }\r
206 \r
207         private uint time\r
208         {\r
209             set\r
210             {\r
211                 NDalicPINVOKE.Key_time_set(swigCPtr, value);\r
212                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
213             }\r
214             get\r
215             {\r
216                 uint ret = NDalicPINVOKE.Key_time_get(swigCPtr);\r
217                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
218                 return ret;\r
219             }\r
220         }\r
221 \r
222         private Key.StateType state\r
223         {\r
224             set\r
225             {\r
226                 NDalicPINVOKE.Key_state_set(swigCPtr, (int)value);\r
227                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
228             }\r
229             get\r
230             {\r
231                 Key.StateType ret = (Key.StateType)NDalicPINVOKE.Key_state_get(swigCPtr);\r
232                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
233                 return ret;\r
234             }\r
235         }\r
236 \r
237         public enum StateType\r
238         {\r
239             Down,\r
240             Up,\r
241             Last\r
242         }\r
243 \r
244     }\r
245 \r
246 }\r