3946baa02954769c6a29dbcc411fd61aa1d1aefa
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / Position.cs
1 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
2 // PROPRIETARY/CONFIDENTIAL \r
3 // This software is the confidential and proprietary\r
4 // information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall\r
5 // not disclose such Confidential Information and shall use it only in\r
6 // accordance with the terms of the license agreement you entered into with\r
7 // SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the\r
8 // suitability of the software, either express or implied, including but not\r
9 // limited to the implied warranties of merchantability, fitness for a\r
10 // particular purpose, or non-infringement. SAMSUNG shall not be liable for any\r
11 // damages suffered by licensee as a result of using, modifying or distributing\r
12 // this software or its derivatives.\r
13 \r
14 // Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
15 //\r
16 // Licensed under the Apache License, Version 2.0 (the "License");\r
17 // you may not use this file except in compliance with the License.\r
18 // You may obtain a copy of the License at\r
19 //\r
20 // http://www.apache.org/licenses/LICENSE-2.0\r
21 //\r
22 // Unless required by applicable law or agreed to in writing, software\r
23 // distributed under the License is distributed on an "AS IS" BASIS,\r
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
25 // See the License for the specific language governing permissions and\r
26 // limitations under the License.\r
27 //\r
28 \r
29 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts\r
30 // Some have been manually changed\r
31 \r
32 \r
33 namespace Tizen.NUI\r
34 {\r
35 \r
36     public class Position : global::System.IDisposable\r
37     {\r
38         private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
39         protected bool swigCMemOwn;\r
40 \r
41         internal Position(global::System.IntPtr cPtr, bool cMemoryOwn)\r
42         {\r
43             swigCMemOwn = cMemoryOwn;\r
44             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
45         }\r
46 \r
47         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Position obj)\r
48         {\r
49             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
50         }\r
51 \r
52         ~Position()\r
53         {\r
54             DisposeQueue.Instance.Add(this);\r
55         }\r
56 \r
57         public virtual void Dispose()\r
58         {\r
59             if (!Stage.IsInstalled())\r
60             {\r
61                 DisposeQueue.Instance.Add(this);\r
62                 return;\r
63             }\r
64 \r
65             lock (this)\r
66             {\r
67                 if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
68                 {\r
69                     if (swigCMemOwn)\r
70                     {\r
71                         swigCMemOwn = false;\r
72                         NDalicPINVOKE.delete_Vector3(swigCPtr);\r
73                     }\r
74                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
75                 }\r
76                 global::System.GC.SuppressFinalize(this);\r
77             }\r
78         }\r
79 \r
80         internal static Position GetVector3FromPtr(global::System.IntPtr cPtr)\r
81         {\r
82             Position ret = new Position(cPtr, false);\r
83             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
84             return ret;\r
85         }\r
86 \r
87         public Position() : this(NDalicPINVOKE.new_Vector3__SWIG_0(), true)\r
88         {\r
89             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
90         }\r
91 \r
92         public Position(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(x, y, z), true)\r
93         {\r
94             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
95         }\r
96 \r
97         public float X\r
98         {\r
99             set\r
100             {\r
101                 NDalicPINVOKE.Vector3_X_set(swigCPtr, value);\r
102                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
103             }\r
104             get\r
105             {\r
106                 float ret = NDalicPINVOKE.Vector3_X_get(swigCPtr);\r
107                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
108                 return ret;\r
109             }\r
110         }\r
111 \r
112         public float Y\r
113         {\r
114             set\r
115             {\r
116                 NDalicPINVOKE.Vector3_Y_set(swigCPtr, value);\r
117                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
118             }\r
119             get\r
120             {\r
121                 float ret = NDalicPINVOKE.Vector3_Y_get(swigCPtr);\r
122                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
123                 return ret;\r
124             }\r
125         }\r
126 \r
127         public float Z\r
128         {\r
129             set\r
130             {\r
131                 NDalicPINVOKE.Vector3_Z_set(swigCPtr, value);\r
132                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
133             }\r
134             get\r
135             {\r
136                 float ret = NDalicPINVOKE.Vector3_Z_get(swigCPtr);\r
137                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
138                 return ret;\r
139             }\r
140         }\r
141 \r
142         public static float ParentOriginTop\r
143         {\r
144             get\r
145             {\r
146                 float ret = NDalicPINVOKE.ParentOriginTop_get();\r
147                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
148                 return ret;\r
149             }\r
150         }\r
151 \r
152         public static float ParentOriginBottom\r
153         {\r
154             get\r
155             {\r
156                 float ret = NDalicPINVOKE.ParentOriginBottom_get();\r
157                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
158                 return ret;\r
159             }\r
160         }\r
161 \r
162         public static float ParentOriginLeft\r
163         {\r
164             get\r
165             {\r
166                 float ret = NDalicPINVOKE.ParentOriginLeft_get();\r
167                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
168                 return ret;\r
169             }\r
170         }\r
171 \r
172         public static float ParentOriginRight\r
173         {\r
174             get\r
175             {\r
176                 float ret = NDalicPINVOKE.ParentOriginRight_get();\r
177                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
178                 return ret;\r
179             }\r
180         }\r
181 \r
182         public static float ParentOriginMiddle\r
183         {\r
184             get\r
185             {\r
186                 float ret = NDalicPINVOKE.ParentOriginMiddle_get();\r
187                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
188                 return ret;\r
189             }\r
190         }\r
191 \r
192         public static Position ParentOriginTopLeft\r
193         {\r
194             get\r
195             {\r
196                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopLeft_get();\r
197                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
198                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
199                 return ret;\r
200             }\r
201         }\r
202 \r
203         public static Position ParentOriginTopCenter\r
204         {\r
205             get\r
206             {\r
207                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopCenter_get();\r
208                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
209                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
210                 return ret;\r
211             }\r
212         }\r
213 \r
214         public static Position ParentOriginTopRight\r
215         {\r
216             get\r
217             {\r
218                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginTopRight_get();\r
219                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
220                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
221                 return ret;\r
222             }\r
223         }\r
224 \r
225         public static Position ParentOriginCenterLeft\r
226         {\r
227             get\r
228             {\r
229                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterLeft_get();\r
230                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
231                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
232                 return ret;\r
233             }\r
234         }\r
235 \r
236         public static Position ParentOriginCenter\r
237         {\r
238             get\r
239             {\r
240                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenter_get();\r
241                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
242                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
243                 return ret;\r
244             }\r
245         }\r
246 \r
247         public static Position ParentOriginCenterRight\r
248         {\r
249             get\r
250             {\r
251                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginCenterRight_get();\r
252                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
253                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
254                 return ret;\r
255             }\r
256         }\r
257 \r
258         public static Position ParentOriginBottomLeft\r
259         {\r
260             get\r
261             {\r
262                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomLeft_get();\r
263                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
264                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
265                 return ret;\r
266             }\r
267         }\r
268 \r
269         public static Position ParentOriginBottomCenter\r
270         {\r
271             get\r
272             {\r
273                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomCenter_get();\r
274                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
275                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
276                 return ret;\r
277             }\r
278         }\r
279 \r
280         public static Position ParentOriginBottomRight\r
281         {\r
282             get\r
283             {\r
284                 global::System.IntPtr cPtr = NDalicPINVOKE.ParentOriginBottomRight_get();\r
285                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
286                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
287                 return ret;\r
288             }\r
289         }\r
290 \r
291         public static float AnchorPointTop\r
292         {\r
293             get\r
294             {\r
295                 float ret = NDalicPINVOKE.AnchorPointTop_get();\r
296                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
297                 return ret;\r
298             }\r
299         }\r
300 \r
301         public static float AnchorPointBottom\r
302         {\r
303             get\r
304             {\r
305                 float ret = NDalicPINVOKE.AnchorPointBottom_get();\r
306                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
307                 return ret;\r
308             }\r
309         }\r
310 \r
311         public static float AnchorPointLeft\r
312         {\r
313             get\r
314             {\r
315                 float ret = NDalicPINVOKE.AnchorPointLeft_get();\r
316                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
317                 return ret;\r
318             }\r
319         }\r
320 \r
321         public static float AnchorPointRight\r
322         {\r
323             get\r
324             {\r
325                 float ret = NDalicPINVOKE.AnchorPointRight_get();\r
326                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
327                 return ret;\r
328             }\r
329         }\r
330 \r
331         public static float AnchorPointMiddle\r
332         {\r
333             get\r
334             {\r
335                 float ret = NDalicPINVOKE.AnchorPointMiddle_get();\r
336                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
337                 return ret;\r
338             }\r
339         }\r
340 \r
341         public static Position AnchorPointTopLeft\r
342         {\r
343             get\r
344             {\r
345                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get();\r
346                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
347                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
348                 return ret;\r
349             }\r
350         }\r
351 \r
352         public static Position AnchorPointTopCenter\r
353         {\r
354             get\r
355             {\r
356                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get();\r
357                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
358                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
359                 return ret;\r
360             }\r
361         }\r
362 \r
363         public static Position AnchorPointTopRight\r
364         {\r
365             get\r
366             {\r
367                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get();\r
368                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
369                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
370                 return ret;\r
371             }\r
372         }\r
373 \r
374         public static Position AnchorPointCenterLeft\r
375         {\r
376             get\r
377             {\r
378                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get();\r
379                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
380                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
381                 return ret;\r
382             }\r
383         }\r
384 \r
385         public static Position AnchorPointCenter\r
386         {\r
387             get\r
388             {\r
389                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get();\r
390                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
391                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
392                 return ret;\r
393             }\r
394         }\r
395 \r
396         public static Position AnchorPointCenterRight\r
397         {\r
398             get\r
399             {\r
400                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get();\r
401                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
402                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
403                 return ret;\r
404             }\r
405         }\r
406 \r
407         public static Position AnchorPointBottomLeft\r
408         {\r
409             get\r
410             {\r
411                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get();\r
412                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
413                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
414                 return ret;\r
415             }\r
416         }\r
417 \r
418         public static Position AnchorPointBottomCenter\r
419         {\r
420             get\r
421             {\r
422                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get();\r
423                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
424                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
425                 return ret;\r
426             }\r
427         }\r
428 \r
429         public static Position AnchorPointBottomRight\r
430         {\r
431             get\r
432             {\r
433                 global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get();\r
434                 Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);\r
435                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
436                 return ret;\r
437             }\r
438         }\r
439 \r
440     }\r
441 \r
442     public struct ParentOrigin\r
443     {\r
444         public static readonly float Top = Position.ParentOriginTop;\r
445         public static readonly float Bottom = Position.ParentOriginBottom;\r
446         public static readonly float Left = Position.ParentOriginLeft;\r
447         public static readonly float Right = Position.ParentOriginRight;\r
448         public static readonly float Middle = Position.ParentOriginMiddle;\r
449         public static readonly Position TopLeft = Position.ParentOriginTopLeft;\r
450         public static readonly Position TopCenter = Position.ParentOriginTopCenter;\r
451         public static readonly Position TopRight = Position.ParentOriginTopRight;\r
452         public static readonly Position CenterLeft = Position.ParentOriginCenterLeft;\r
453         public static readonly Position Center = Position.ParentOriginCenter;\r
454         public static readonly Position CenterRight = Position.ParentOriginCenterRight;\r
455         public static readonly Position BottomLeft = Position.ParentOriginBottomLeft;\r
456         public static readonly Position BottomCenter = Position.ParentOriginBottomCenter;\r
457         public static readonly Position BottomRight = Position.ParentOriginBottomRight;\r
458     }\r
459     public struct AnchorPoint\r
460     {\r
461         public static readonly float Top = Position.AnchorPointTop;\r
462         public static readonly float Bottom = Position.AnchorPointBottom;\r
463         public static readonly float Left = Position.AnchorPointLeft;\r
464         public static readonly float Right = Position.AnchorPointRight;\r
465         public static readonly float Middle = Position.AnchorPointMiddle;\r
466         public static readonly Position TopLeft = Position.AnchorPointTopLeft;\r
467         public static readonly Position TopCenter = Position.AnchorPointTopCenter;\r
468         public static readonly Position TopRight = Position.AnchorPointTopRight;\r
469         public static readonly Position CenterLeft = Position.AnchorPointCenterLeft;\r
470         public static readonly Position Center = Position.AnchorPointCenter;\r
471         public static readonly Position CenterRight = Position.AnchorPointCenterRight;\r
472         public static readonly Position BottomLeft = Position.AnchorPointBottomLeft;\r
473         public static readonly Position BottomCenter = Position.AnchorPointBottomCenter;\r
474         public static readonly Position BottomRight = Position.AnchorPointBottomRight;\r
475     }\r
476 \r
477 }\r