Release 4.0.0-preview1-00235
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Property.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16
17 using System;
18
19 namespace Tizen.NUI
20 {
21
22     internal class Property : global::System.IDisposable
23     {
24         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
25         protected bool swigCMemOwn;
26
27         internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
28         {
29             swigCMemOwn = cMemoryOwn;
30             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
31         }
32
33         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
34         {
35             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
36         }
37
38         //A Flag to check who called Dispose(). (By User or DisposeQueue)
39         private bool isDisposeQueued = false;
40         //A Flat to check if it is already disposed.
41         protected bool disposed = false;
42
43         ~Property()
44         {
45             if(!isDisposeQueued)
46             {
47                 isDisposeQueued = true;
48                 DisposeQueue.Instance.Add(this);
49             }
50         }
51
52         public void Dispose()
53         {
54             //Throw excpetion if Dispose() is called in separate thread.
55             if (!Window.IsInstalled())
56             {
57                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
58             }
59
60             if (isDisposeQueued)
61             {
62                 Dispose(DisposeTypes.Implicit);
63             }
64             else
65             {
66                 Dispose(DisposeTypes.Explicit);
67                 System.GC.SuppressFinalize(this);
68             }
69         }
70
71         protected virtual void Dispose(DisposeTypes type)
72         {
73             if (disposed)
74             {
75                 return;
76             }
77
78             if(type == DisposeTypes.Explicit)
79             {
80                 //Called by User
81                 //Release your own managed resources here.
82                 //You should release all of your own disposable objects here.
83             }
84
85             //Release your own unmanaged resources here.
86             //You should not access any managed member here except static instance.
87             //because the execution order of Finalizes is non-deterministic.
88
89             if (swigCPtr.Handle != global::System.IntPtr.Zero)
90             {
91                 if (swigCMemOwn)
92                 {
93                     swigCMemOwn = false;
94                     NDalicPINVOKE.delete_Property(swigCPtr);
95                 }
96                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
97             }
98             disposed = true;
99         }
100
101
102         internal static int INVALID_INDEX
103         {
104             get
105             {
106                 int ret = NDalicPINVOKE.Property_INVALID_INDEX_get();
107                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108                 return ret;
109             }
110         }
111
112         internal static int INVALID_KEY
113         {
114             get
115             {
116                 int ret = NDalicPINVOKE.Property_INVALID_KEY_get();
117                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118                 return ret;
119             }
120         }
121
122         internal static int INVALID_COMPONENT_INDEX
123         {
124             get
125             {
126                 int ret = NDalicPINVOKE.Property_INVALID_COMPONENT_INDEX_get();
127                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128                 return ret;
129             }
130         }
131
132         /// <summary>
133         /// This constructor creates a property instance.
134         /// </summary>
135         /// <param name="arg0">A valid handle to the target object.</param>
136         /// <param name="propertyIndex">The index of a property.</param>
137         public Property(Animatable arg0, int propertyIndex) : this(NDalicPINVOKE.new_Property__SWIG_0(Animatable.getCPtr(arg0), propertyIndex), true)
138         {
139             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140         }
141
142         /// <summary>
143         /// This constructor creates a property instance.
144         /// </summary>
145         /// <param name="arg0">A valid handle to the target object.</param>
146         /// <param name="propertyIndex">The index of a property.</param>
147         /// <param name="componentIndex">Index to a sub component of a property, for use with Vector2, Vector3 and Vector4. -1 for the main property (default is -1).</param>
148         public Property(Animatable arg0, int propertyIndex, int componentIndex) : this(NDalicPINVOKE.new_Property__SWIG_1(Animatable.getCPtr(arg0), propertyIndex, componentIndex), true)
149         {
150             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151         }
152
153         /// <summary>
154         /// This constructor creates a property instance.<br>
155         /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br>
156         /// </summary>
157         /// <param name="arg0">A valid handle to the target object.</param>
158         /// <param name="propertyName">The property name.</param>
159         public Property(Animatable arg0, string propertyName) : this(NDalicPINVOKE.new_Property__SWIG_2(Animatable.getCPtr(arg0), propertyName), true)
160         {
161             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162         }
163
164         /// <summary>
165         /// This constructor creates a property instance.<br>
166         /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br>
167         /// </summary>
168         /// <param name="arg0">A valid handle to the target object.</param>
169         /// <param name="propertyName">The property name.</param>
170         /// <param name="componentIndex">Index to a sub component of a property, for use with Vector2, Vector3 and Vector4. -1 for main property (default is -1).</param>
171         public Property(Animatable arg0, string propertyName, int componentIndex) : this(NDalicPINVOKE.new_Property__SWIG_3(Animatable.getCPtr(arg0), propertyName, componentIndex), true)
172         {
173             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174         }
175
176         internal Animatable _object
177         {
178             set
179             {
180                 NDalicPINVOKE.Property__object_set(swigCPtr, Animatable.getCPtr(value));
181                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182             }
183             get
184             {
185                 Animatable ret = new Animatable(NDalicPINVOKE.Property__object_get(swigCPtr), false);
186                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187                 return ret;
188             }
189         }
190
191         /// <summary>
192         /// Gets or sets the index of the property.
193         /// </summary>
194         public int propertyIndex
195         {
196             set
197             {
198                 NDalicPINVOKE.Property_propertyIndex_set(swigCPtr, value);
199                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200             }
201             get
202             {
203                 int ret = NDalicPINVOKE.Property_propertyIndex_get(swigCPtr);
204                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205                 return ret;
206             }
207         }
208
209         /// <summary>
210         /// Gets or sets the component index of the property.
211         /// </summary>
212         public int componentIndex
213         {
214             set
215             {
216                 NDalicPINVOKE.Property_componentIndex_set(swigCPtr, value);
217                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218             }
219             get
220             {
221                 int ret = NDalicPINVOKE.Property_componentIndex_get(swigCPtr);
222                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223                 return ret;
224             }
225         }
226
227     }
228
229     /// <summary>
230     /// An array of property values.
231     /// </summary>
232     public class PropertyArray : global::System.IDisposable
233     {
234         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
235         protected bool swigCMemOwn;
236
237         internal PropertyArray(global::System.IntPtr cPtr, bool cMemoryOwn)
238         {
239             swigCMemOwn = cMemoryOwn;
240             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
241         }
242
243         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyArray obj)
244         {
245             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
246         }
247
248         //A Flag to check who called Dispose(). (By User or DisposeQueue)
249         private bool isDisposeQueued = false;
250         //A Flat to check if it is already disposed.
251         protected bool disposed = false;
252
253         ~PropertyArray()
254         {
255             if(!isDisposeQueued)
256             {
257                 isDisposeQueued = true;
258                 DisposeQueue.Instance.Add(this);
259             }
260         }
261
262         public void Dispose()
263         {
264             //Throw excpetion if Dispose() is called in separate thread.
265             if (!Window.IsInstalled())
266             {
267                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
268             }
269
270             if (isDisposeQueued)
271             {
272                 Dispose(DisposeTypes.Implicit);
273             }
274             else
275             {
276                 Dispose(DisposeTypes.Explicit);
277                 System.GC.SuppressFinalize(this);
278             }
279         }
280
281         protected virtual void Dispose(DisposeTypes type)
282         {
283             if (disposed)
284             {
285                 return;
286             }
287
288             if(type == DisposeTypes.Explicit)
289             {
290                 //Called by User
291                 //Release your own managed resources here.
292                 //You should release all of your own disposable objects here.
293             }
294
295             //Release your own unmanaged resources here.
296             //You should not access any managed member here except static instance.
297             //because the execution order of Finalizes is non-deterministic.
298
299             if (swigCPtr.Handle != global::System.IntPtr.Zero)
300             {
301                 if (swigCMemOwn)
302                 {
303                     swigCMemOwn = false;
304                     NDalicPINVOKE.delete_Property_Array(swigCPtr);
305                 }
306                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
307             }
308             disposed = true;
309         }
310
311         /// <summary>
312         /// The operator to access an element.
313         /// </summary>
314         /// <param name="index">The element index to access. No bounds checking is performed.</param>
315         /// <returns>The reference to the element.</returns>
316         public PropertyValue this[uint index]
317         {
318             get
319             {
320                 return ValueOfIndex(index);
321             }
322         }
323
324         /// <summary>
325         /// The constructor.
326         /// </summary>
327         public PropertyArray() : this(NDalicPINVOKE.new_Property_Array__SWIG_0(), true)
328         {
329             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330         }
331
332         internal PropertyArray(PropertyArray other) : this(NDalicPINVOKE.new_Property_Array__SWIG_1(PropertyArray.getCPtr(other)), true)
333         {
334             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335         }
336
337         /// <summary>
338         /// Retrieves the number of elements in the array.
339         /// </summary>
340         /// <returns>The number of elements in the array.</returns>
341         public uint Size()
342         {
343             uint ret = NDalicPINVOKE.Property_Array_Size(swigCPtr);
344             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
345             return ret;
346         }
347
348         /// <summary>
349         /// Retrieves the number of elements in the array.
350         /// </summary>
351         /// <returns>The number of elements in the array.</returns>
352         public uint Count()
353         {
354             uint ret = NDalicPINVOKE.Property_Array_Count(swigCPtr);
355             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356             return ret;
357         }
358
359         /// <summary>
360         /// Returns whether the array is empty.
361         /// </summary>
362         /// <returns>Returns true if empty, false otherwise.</returns>
363         public bool Empty()
364         {
365             bool ret = NDalicPINVOKE.Property_Array_Empty(swigCPtr);
366             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
367             return ret;
368         }
369
370         /// <summary>
371         /// Clears the array.
372         /// </summary>
373         public void Clear()
374         {
375             NDalicPINVOKE.Property_Array_Clear(swigCPtr);
376             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
377         }
378
379         /// <summary>
380         /// Increases the capacity of the array.
381         /// </summary>
382         /// <param name="size">The size to reserve.</param>
383         public void Reserve(uint size)
384         {
385             NDalicPINVOKE.Property_Array_Reserve(swigCPtr, size);
386             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
387         }
388
389         /// <summary>
390         /// Resizes to size.
391         /// </summary>
392         /// <param name="size">The size to resize</param>
393         public void Resize(uint size)
394         {
395             NDalicPINVOKE.Property_Array_Resize(swigCPtr, size);
396             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
397         }
398
399         /// <summary>
400         /// Retrieves the capacity of the array.
401         /// </summary>
402         /// <returns>The allocated capacity of the array.</returns>
403         public uint Capacity()
404         {
405             uint ret = NDalicPINVOKE.Property_Array_Capacity(swigCPtr);
406             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
407             return ret;
408         }
409
410         /// <summary>
411         /// Adds an element to the array.
412         /// </summary>
413         /// <param name="value">The value to add at the end of the array.</param>
414         public void PushBack(PropertyValue value)
415         {
416             NDalicPINVOKE.Property_Array_PushBack(swigCPtr, PropertyValue.getCPtr(value));
417             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
418         }
419
420         /// <summary>
421         /// Adds an element to the array.
422         /// </summary>
423         /// <param name="value">The value to add at the end of the array.</param>
424         public PropertyArray Add(PropertyValue value)
425         {
426             PropertyArray ret = new PropertyArray(NDalicPINVOKE.Property_Array_Add(swigCPtr, PropertyValue.getCPtr(value)), false);
427             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
428             return ret;
429         }
430
431         /// <summary>
432         /// Accesses an element.
433         /// </summary>
434         /// <param name="index">The element index to access. No bounds checking is performed.</param>
435         /// <returns>The reference to the element.</returns>
436         public PropertyValue GetElementAt(uint index)
437         {
438             PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Array_GetElementAt__SWIG_0(swigCPtr, index), false);
439             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
440             return ret;
441         }
442
443         /// <summary>
444         /// Retrieves the value of elements in the array.
445         /// </summary>
446         /// <param name="index">The element index to retrieve.</param>
447         /// <returns>The reference to the element.</returns>
448         private PropertyValue ValueOfIndex(uint index)
449         {
450             PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Array_ValueOfIndex__SWIG_0(swigCPtr, index), false);
451             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
452             return ret;
453         }
454     }
455
456     /// <summary>
457     /// A key type which can be either a std::string or a Property::Index.
458     /// </summary>
459     public class PropertyKey : global::System.IDisposable
460     {
461         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
462         protected bool swigCMemOwn;
463
464         internal PropertyKey(global::System.IntPtr cPtr, bool cMemoryOwn)
465         {
466             swigCMemOwn = cMemoryOwn;
467             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
468         }
469
470         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyKey obj)
471         {
472             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
473         }
474
475         //A Flag to check who called Dispose(). (By User or DisposeQueue)
476         private bool isDisposeQueued = false;
477         //A Flat to check if it is already disposed.
478         protected bool disposed = false;
479
480         ~PropertyKey()
481         {
482             if(!isDisposeQueued)
483             {
484                 isDisposeQueued = true;
485                 DisposeQueue.Instance.Add(this);
486             }
487         }
488
489         public void Dispose()
490         {
491             //Throw excpetion if Dispose() is called in separate thread.
492             if (!Window.IsInstalled())
493             {
494                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
495             }
496
497             if (isDisposeQueued)
498             {
499                 Dispose(DisposeTypes.Implicit);
500             }
501             else
502             {
503                 Dispose(DisposeTypes.Explicit);
504                 System.GC.SuppressFinalize(this);
505             }
506         }
507
508         protected virtual void Dispose(DisposeTypes type)
509         {
510             if (disposed)
511             {
512                 return;
513             }
514
515             if(type == DisposeTypes.Explicit)
516             {
517                 //Called by User
518                 //Release your own managed resources here.
519                 //You should release all of your own disposable objects here.
520             }
521
522             //Release your own unmanaged resources here.
523             //You should not access any managed member here except static instance.
524             //because the execution order of Finalizes is non-deterministic.
525
526             if (swigCPtr.Handle != global::System.IntPtr.Zero)
527             {
528                 if (swigCMemOwn)
529                 {
530                     swigCMemOwn = false;
531                     NDalicPINVOKE.delete_Property_Key(swigCPtr);
532                 }
533                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
534             }
535             disposed = true;
536         }
537
538         /// <summary>
539         /// The type of the key.
540         /// </summary>
541         public PropertyKey.KeyType Type
542         {
543             set
544             {
545                 NDalicPINVOKE.Property_Key_type_set(swigCPtr, (int)value);
546                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
547             }
548             get
549             {
550                 PropertyKey.KeyType ret = (PropertyKey.KeyType)NDalicPINVOKE.Property_Key_type_get(swigCPtr);
551                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
552                 return ret;
553             }
554         }
555
556         /// <summary>
557         /// The index key.
558         /// </summary>
559         public int IndexKey
560         {
561             set
562             {
563                 NDalicPINVOKE.Property_Key_indexKey_set(swigCPtr, value);
564                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
565             }
566             get
567             {
568                 int ret = NDalicPINVOKE.Property_Key_indexKey_get(swigCPtr);
569                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
570                 return ret;
571             }
572         }
573
574         /// <summary>
575         /// The string key.
576         /// </summary>
577         public string StringKey
578         {
579             set
580             {
581                 NDalicPINVOKE.Property_Key_stringKey_set(swigCPtr, value);
582                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
583             }
584             get
585             {
586                 string ret = NDalicPINVOKE.Property_Key_stringKey_get(swigCPtr);
587                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
588                 return ret;
589             }
590         }
591
592         /// <summary>
593         /// The constructor.
594         /// </summary>
595         /// <param name="key">The string key.</param>
596         public PropertyKey(string key) : this(NDalicPINVOKE.new_Property_Key__SWIG_0(key), true)
597         {
598             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
599         }
600
601         /// <summary>
602         /// The constructor.
603         /// </summary>
604         /// <param name="key">The index key.</param>
605         public PropertyKey(int key) : this(NDalicPINVOKE.new_Property_Key__SWIG_1(key), true)
606         {
607             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
608         }
609
610         /// <summary>
611         /// Compares if rhs is equal to.
612         /// </summary>
613         /// <param name="rhs">A string key to compare against.</param>
614         /// <returns>Returns true if the key compares, or false if it isn't equal or of the wrong type.</returns>
615         public bool EqualTo(string rhs)
616         {
617             bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_0(swigCPtr, rhs);
618             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
619             return ret;
620         }
621
622         /// <summary>
623         /// Compares if rhs is equal to.
624         /// </summary>
625         /// <param name="rhs">The index key to compare against.</param>
626         /// <returns>Returns true if the key compares, or false if it isn't equal or of the wrong type.</returns>
627         public bool EqualTo(int rhs)
628         {
629             bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_1(swigCPtr, rhs);
630             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
631             return ret;
632         }
633
634         /// <summary>
635         /// Compares if rhs is equal to
636         /// </summary>
637         /// <param name="rhs">A key to compare against</param>
638         /// <returns>Returns true if the keys are of the same type and have the same value.</returns>
639         public bool EqualTo(PropertyKey rhs)
640         {
641             bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_2(swigCPtr, PropertyKey.getCPtr(rhs));
642             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
643             return ret;
644         }
645
646         /// <summary>
647         /// Compares if rhs is not equal to.
648         /// </summary>
649         /// <param name="rhs">The index key to compare against.</param>
650         /// <returns>Returns true if the key is not equal or not a string key.</returns>
651         public bool NotEqualTo(string rhs)
652         {
653             bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_0(swigCPtr, rhs);
654             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
655             return ret;
656         }
657
658         /// <summary>
659         /// Compares if rhs is not equal to.
660         /// </summary>
661         /// <param name="rhs">The index key to compare against.</param>
662         /// <returns>Returns true if the key is not equal, or not the index key.</returns>
663         public bool NotEqualTo(int rhs)
664         {
665             bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_1(swigCPtr, rhs);
666             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
667             return ret;
668         }
669
670         /// <summary>
671         /// Compares if rhs is not equal to.
672         /// </summary>
673         /// <param name="rhs">A key to compare against.</param>
674         /// <returns>Returns true if the keys are not of the same type or are not equal.</returns>
675         public bool NotEqualTo(PropertyKey rhs)
676         {
677             bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_2(swigCPtr, PropertyKey.getCPtr(rhs));
678             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679             return ret;
680         }
681
682         /// <summary>
683         /// The type of key.
684         /// </summary>
685         public enum KeyType
686         {
687             Index,
688             String
689         }
690
691     }
692
693     /// <summary>
694     /// A map of property values, the key type could be string or Property::Index.
695     /// </summary>
696     public class PropertyMap : global::System.IDisposable
697     {
698         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
699         protected bool swigCMemOwn;
700
701         internal PropertyMap(global::System.IntPtr cPtr, bool cMemoryOwn)
702         {
703             swigCMemOwn = cMemoryOwn;
704             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
705         }
706
707         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyMap obj)
708         {
709             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
710         }
711
712         //A Flag to check who called Dispose(). (By User or DisposeQueue)
713         private bool isDisposeQueued = false;
714         //A Flat to check if it is already disposed.
715         protected bool disposed = false;
716
717         ~PropertyMap()
718         {
719             if(!isDisposeQueued)
720             {
721                 isDisposeQueued = true;
722                 DisposeQueue.Instance.Add(this);
723             }
724         }
725
726         public void Dispose()
727         {
728             //Throw excpetion if Dispose() is called in separate thread.
729             if (!Window.IsInstalled())
730             {
731                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
732             }
733
734             if (isDisposeQueued)
735             {
736                 Dispose(DisposeTypes.Implicit);
737             }
738             else
739             {
740                 Dispose(DisposeTypes.Explicit);
741                 System.GC.SuppressFinalize(this);
742             }
743         }
744
745         protected virtual void Dispose(DisposeTypes type)
746         {
747             if (disposed)
748             {
749                 return;
750             }
751
752             if(type == DisposeTypes.Explicit)
753             {
754                 //Called by User
755                 //Release your own managed resources here.
756                 //You should release all of your own disposable objects here.
757             }
758
759             //Release your own unmanaged resources here.
760             //You should not access any managed member here except static instance.
761             //because the execution order of Finalizes is non-deterministic.
762
763             if (swigCPtr.Handle != global::System.IntPtr.Zero)
764             {
765                 if (swigCMemOwn)
766                 {
767                     swigCMemOwn = false;
768                     NDalicPINVOKE.delete_Property_Map(swigCPtr);
769                 }
770                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
771             }
772             disposed = true;
773         }
774
775         /// <summary>
776         /// The operator to access the element with the specified string key.<br>
777         /// If an element with the key does not exist, then it is created.<br>
778         /// </summary>
779         /// <param name="key">The key whose value to access.</param>
780         /// <returns>A value for the element with the specified key.</returns>
781         public PropertyValue this[string key]
782         {
783             get
784             {
785                 return ValueOfIndex(key);
786             }
787         }
788
789         /// <summary>
790         /// The operator to access the element with the specified index key.<br>
791         /// If an element with the key does not exist, then it is created.<br>
792         /// </summary>
793         /// <param name="key">The key whose value to access.</param>
794         /// <returns>A value for the element with the specified key.</returns>
795         public PropertyValue this[int key]
796         {
797             get
798             {
799                 return ValueOfIndex(key);
800             }
801         }
802
803         /// <summary>
804         /// The constructor.
805         /// </summary>
806         public PropertyMap() : this(NDalicPINVOKE.new_Property_Map__SWIG_0(), true)
807         {
808             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
809         }
810
811         /// <summary>
812         /// The copy constructor.
813         /// </summary>
814         /// <param name="other">The map to copy from.</param>
815         public PropertyMap(PropertyMap other) : this(NDalicPINVOKE.new_Property_Map__SWIG_1(PropertyMap.getCPtr(other)), true)
816         {
817             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
818         }
819
820         /// <summary>
821         /// Retrieves the number of elements in the map.
822         /// </summary>
823         /// <returns>The number of elements in the map.</returns>
824         public uint Count()
825         {
826             uint ret = NDalicPINVOKE.Property_Map_Count(swigCPtr);
827             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
828             return ret;
829         }
830
831         /// <summary>
832         /// Returns whether the map is empty.
833         /// </summary>
834         /// <returns>Returns true if empty, false otherwise.</returns>
835         public bool Empty()
836         {
837             bool ret = NDalicPINVOKE.Property_Map_Empty(swigCPtr);
838             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
839             return ret;
840         }
841
842         /// <summary>
843         /// Inserts the key-value pair in the map, with the key type as string.<br>
844         /// Does not check for duplicates.<br>
845         /// </summary>
846         /// <param name="key">The key to insert.</param>
847         /// <param name="value">The value to insert.</param>
848         public void Insert(string key, PropertyValue value)
849         {
850             NDalicPINVOKE.Property_Map_Insert__SWIG_0(swigCPtr, key, PropertyValue.getCPtr(value));
851             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
852         }
853
854         /// <summary>
855         /// Inserts the key-value pair in the map, with the key type as index.<br>
856         /// Does not check for duplicates.<br>
857         /// </summary>
858         /// <param name="key">The key to insert.</param>
859         /// <param name="value">The value to insert.</param>
860         public void Insert(int key, PropertyValue value)
861         {
862             NDalicPINVOKE.Property_Map_Insert__SWIG_2(swigCPtr, key, PropertyValue.getCPtr(value));
863             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
864         }
865
866         /// <summary>
867         /// Inserts the key-value pair in the map, with the key type as string.<br>
868         /// Does not check for duplicates.<br>
869         /// </summary>
870         /// <param name="key">The key to insert.</param>
871         /// <param name="value">The value to insert.</param>
872         /// <returns>Returns a reference to this object.</returns>
873         public PropertyMap Add(string key, PropertyValue value)
874         {
875             PropertyMap ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_0(swigCPtr, key, PropertyValue.getCPtr(value)), false);
876             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
877             return ret;
878         }
879
880         /// <summary>
881         /// Inserts the key-value pair in the map, with the key type as string.<br>
882         /// Does not check for duplicates.<br>
883         /// </summary>
884         /// <param name="key">The key to insert.</param>
885         /// <param name="value">The value to insert.</param>
886         /// <returns>Returns a reference to this object.</returns>
887         public PropertyMap Add(int key, PropertyValue value)
888         {
889             PropertyMap ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_2(swigCPtr, key, PropertyValue.getCPtr(value)), false);
890             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
891             return ret;
892         }
893
894         /// <summary>
895         /// Retrieves the value at the specified position.
896         /// </summary>
897         /// <param name="position">The specified position.</param>
898         /// <returns>A reference to the value at the specified position.</returns>
899         public PropertyValue GetValue(uint position)
900         {
901             PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_GetValue(swigCPtr, position), false);
902             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
903             return ret;
904         }
905
906         [Obsolete("Please do not use! this will be deprecated")]
907         public string GetKey(uint position)
908         {
909             string ret = NDalicPINVOKE.Property_Map_GetKey(swigCPtr, position);
910             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
911             return ret;
912         }
913
914         /// <summary>
915         /// Retrieves the key at the specified position.
916         /// </summary>
917         /// <param name="position">The specified position.</param>
918         /// <returns>A copy of the key at the specified position.</returns>
919         public PropertyKey GetKeyAt(uint position)
920         {
921             PropertyKey ret = new PropertyKey(NDalicPINVOKE.Property_Map_GetKeyAt(swigCPtr, position), true);
922             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
923             return ret;
924         }
925
926         [Obsolete("Please do not use! this will be deprecated")]
927         public PropertyValue Find(string key)
928         {
929             global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_0(swigCPtr, key);
930             PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
931             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
932             return ret;
933         }
934
935         /// <summary>
936         /// Finds the value for the specified key if it exists.
937         /// </summary>
938         /// <param name="key">The key to find.</param>
939         /// <returns>The value if it exists, an empty object otherwise.</returns>
940         public PropertyValue Find(int key)
941         {
942             global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_2(swigCPtr, key);
943             PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
944             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
945             return ret;
946         }
947
948         /// <summary>
949         /// Finds the value for the specified keys if either exist.
950         /// </summary>
951         /// <param name="indexKey">The index key to find.</param>
952         /// <param name="stringKey">The string key to find.</param>
953         /// <returns>The value if it exists, an empty object otherwise.</returns>
954         public PropertyValue Find(int indexKey, string stringKey)
955         {
956             global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_3(swigCPtr, indexKey, stringKey);
957             PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
958             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
959             return ret;
960         }
961
962         [Obsolete("Please do not use! this will be deprecated")]
963         public PropertyValue Find(string key, PropertyType type)
964         {
965             global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_4(swigCPtr, key, (int)type);
966             PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
967             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968             return ret;
969         }
970
971         [Obsolete("Please do not use! this will be deprecated")]
972         public PropertyValue Find(int key, PropertyType type)
973         {
974             global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_5(swigCPtr, key, (int)type);
975             PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
976             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
977             return ret;
978         }
979
980         /// <summary>
981         /// Clears the map.
982         /// </summary>
983         public void Clear()
984         {
985             NDalicPINVOKE.Property_Map_Clear(swigCPtr);
986             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
987         }
988
989         /// <summary>
990         /// Merges values from the map 'from' to the current.<br>
991         /// Any values in 'from' will overwrite the values in the current map.<br>
992         /// </summary>
993         /// <param name="from">The map to merge from.</param>
994         public void Merge(PropertyMap from)
995         {
996             NDalicPINVOKE.Property_Map_Merge(swigCPtr, PropertyMap.getCPtr(from));
997             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
998         }
999
1000         /// <summary>
1001         /// Retrieves the element with the specified string key.
1002         /// </summary>
1003         /// <param name="key">The key whose value to retrieve.</param>
1004         /// <returns>The value for the element with the specified key.</returns>
1005         internal PropertyValue ValueOfIndex(string key)
1006         {
1007             PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_ValueOfIndex__SWIG_0(swigCPtr, key), false);
1008             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1009             return ret;
1010         }
1011
1012         /// <summary>
1013         /// Retrieves the element with the specified index key.
1014         /// </summary>
1015         /// <param name="key">The key whose value to retrieve.</param>
1016         /// <returns>The value for the element with the specified key.</returns>
1017         internal PropertyValue ValueOfIndex(int key)
1018         {
1019             PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_ValueOfIndex__SWIG_2(swigCPtr, key), false);
1020             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1021             return ret;
1022         }
1023     }
1024
1025     /// <summary>
1026     /// A value-type representing a property value.
1027     /// </summary>
1028     public class PropertyValue : global::System.IDisposable
1029     {
1030         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1031         protected bool swigCMemOwn;
1032
1033         internal PropertyValue(global::System.IntPtr cPtr, bool cMemoryOwn)
1034         {
1035             swigCMemOwn = cMemoryOwn;
1036             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1037         }
1038
1039         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyValue obj)
1040         {
1041             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1042         }
1043
1044         //A Flag to check who called Dispose(). (By User or DisposeQueue)
1045         private bool isDisposeQueued = false;
1046         //A Flat to check if it is already disposed.
1047         protected bool disposed = false;
1048
1049         ~PropertyValue()
1050         {
1051             if(!isDisposeQueued)
1052             {
1053                 isDisposeQueued = true;
1054                 DisposeQueue.Instance.Add(this);
1055             }
1056         }
1057
1058         public void Dispose()
1059         {
1060             //Throw excpetion if Dispose() is called in separate thread.
1061             if (!Window.IsInstalled())
1062             {
1063                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
1064             }
1065
1066             if (isDisposeQueued)
1067             {
1068                 Dispose(DisposeTypes.Implicit);
1069             }
1070             else
1071             {
1072                 Dispose(DisposeTypes.Explicit);
1073                 System.GC.SuppressFinalize(this);
1074             }
1075         }
1076
1077         protected virtual void Dispose(DisposeTypes type)
1078         {
1079             if (disposed)
1080             {
1081                 return;
1082             }
1083
1084             if(type == DisposeTypes.Explicit)
1085             {
1086                 //Called by User
1087                 //Release your own managed resources here.
1088                 //You should release all of your own disposable objects here.
1089             }
1090
1091             //Release your own unmanaged resources here.
1092             //You should not access any managed member here except static instance.
1093             //because the execution order of Finalizes is non-deterministic.
1094
1095             if (swigCPtr.Handle != global::System.IntPtr.Zero)
1096             {
1097                 if (swigCMemOwn)
1098                 {
1099                     swigCMemOwn = false;
1100                     NDalicPINVOKE.delete_Property_Value(swigCPtr);
1101                 }
1102                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1103             }
1104             disposed = true;
1105         }
1106
1107
1108         /// <summary>
1109         /// An extension to the property value class that allows us to create a
1110         /// Property value from a C# object, for example, integer, float, or string.<br>
1111         /// </summary>
1112         /// <param name="obj">An object to create.</param>
1113         /// <returns>The created value.</returns>
1114         static public PropertyValue CreateFromObject(System.Object obj)
1115         {
1116             System.Type type = obj.GetType();
1117
1118             PropertyValue value;
1119
1120             if (type.Equals(typeof(int)))
1121             {
1122                 value = new PropertyValue((int)obj);
1123             }
1124             if (type.Equals(typeof(System.Int32)))
1125             {
1126                 value = new PropertyValue((int)obj);
1127             }
1128             else if (type.Equals(typeof(bool)))
1129             {
1130                 value = new PropertyValue((bool)obj);
1131             }
1132             else if (type.Equals(typeof(float)))
1133             {
1134                 value = new PropertyValue((float)obj);
1135             }
1136             else if (type.Equals(typeof(string)))
1137             {
1138                 value = new PropertyValue((string)obj);
1139             }
1140             else if (type.Equals(typeof(Vector2)))
1141             {
1142                 value = new PropertyValue((Vector2)obj);
1143             }
1144             else if (type.Equals(typeof(Vector3)))
1145             {
1146                 value = new PropertyValue((Vector3)obj);
1147             }
1148             else if (type.Equals(typeof(Vector4)))
1149             {
1150                 value = new PropertyValue((Vector4)obj);
1151             }
1152             else if (type.Equals(typeof(Position)))
1153             {
1154                 value = new PropertyValue((Position)obj);
1155             }
1156             else if (type.Equals(typeof(Position2D)))
1157             {
1158                 value = new PropertyValue((Position2D)obj);
1159             }
1160             else if (type.Equals(typeof(Size)))
1161             {
1162                 value = new PropertyValue((Size)obj);
1163             }
1164             else if (type.Equals(typeof(Size2D)))
1165             {
1166                 value = new PropertyValue((Size2D)obj);
1167             }
1168             else if (type.Equals(typeof(Color)))
1169             {
1170                 value = new PropertyValue((Color)obj);
1171             }
1172             else if (type.Equals(typeof(Rotation)))
1173             {
1174                 value = new PropertyValue((Rotation)obj);
1175             }
1176             else if (type.Equals(typeof(RelativeVector2)))
1177             {
1178                 value = new PropertyValue((RelativeVector2)obj);
1179             }
1180             else if (type.Equals(typeof(RelativeVector3)))
1181             {
1182                 value = new PropertyValue((RelativeVector3)obj);
1183             }
1184             else if (type.Equals(typeof(RelativeVector4)))
1185             {
1186                 value = new PropertyValue((RelativeVector4)obj);
1187             }
1188             else
1189             {
1190                 throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name);
1191             }
1192             NUILog.Debug(" got an property value of =" + type.Name);
1193             return value;
1194         }
1195
1196         /// <summary>
1197         /// Creates a Size2D property value.
1198         /// </summary>
1199         /// <param name="vectorValue">Size2D values.</param>
1200         public PropertyValue(Size2D vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Size2D.getCPtr(vectorValue)), true)
1201         {
1202             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1203         }
1204
1205         /// <summary>
1206         /// Creates a Position2D property value.
1207         /// </summary>
1208         /// <param name="vectorValue">Position2D values.</param>
1209         public PropertyValue(Position2D vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Position2D.getCPtr(vectorValue)), true)
1210         {
1211             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1212         }
1213
1214         /// <summary>
1215         /// Creates a Size property value.
1216         /// </summary>
1217         /// <param name="vectorValue">Size values.</param>
1218         internal PropertyValue(Size vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Size.getCPtr(vectorValue)), true)
1219         {
1220             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1221         }
1222
1223         /// <summary>
1224         /// Creates a Position property value.
1225         /// </summary>
1226         /// <param name="vectorValue">Position values.</param>
1227         public PropertyValue(Position vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Position.getCPtr(vectorValue)), true)
1228         {
1229             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1230         }
1231
1232         /// <summary>
1233         /// Creates a Color property value.
1234         /// </summary>
1235         /// <param name="vectorValue">Color values.</param>
1236         public PropertyValue(Color vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_6(Color.getCPtr(vectorValue)), true)
1237         {
1238             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1239         }
1240
1241
1242         /// <summary>
1243         /// Retrieves a Size2D value.
1244         /// </summary>
1245         /// <param name="vectorValue"> On return, a Size2D value.</param>
1246         public bool Get(Size2D vectorValue)
1247         {
1248             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Size2D.getCPtr(vectorValue));
1249             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1250             return ret;
1251         }
1252
1253         /// <summary>
1254         /// Retrieves a Position2D value.
1255         /// </summary>
1256         /// <param name="vectorValue"> On return, a Position2D value.</param>
1257         public bool Get(Position2D vectorValue)
1258         {
1259             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Position2D.getCPtr(vectorValue));
1260             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1261             return ret;
1262         }
1263
1264         /// <summary>
1265         /// Retrieves a Size value.
1266         /// </summary>
1267         /// <param name="vectorValue"> On return, a size value.</param>
1268         internal bool Get(Size vectorValue)
1269         {
1270             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Size.getCPtr(vectorValue));
1271             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1272             return ret;
1273         }
1274
1275         /// <summary>
1276         /// Retrieves a Position value.
1277         /// </summary>
1278         /// <param name="vectorValue"> On return, a position value.</param>
1279         public bool Get(Position vectorValue)
1280         {
1281             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Position.getCPtr(vectorValue));
1282             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1283             return ret;
1284         }
1285
1286         /// <summary>
1287         /// Retrieves a Color value.
1288         /// </summary>
1289         /// <param name="vectorValue"> On return, a color value.</param>
1290         public bool Get(Color vectorValue)
1291         {
1292             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Color.getCPtr(vectorValue));
1293             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1294             return ret;
1295         }
1296
1297
1298
1299         /// <summary>
1300         /// The default constructor.
1301         /// </summary>
1302         public PropertyValue() : this(NDalicPINVOKE.new_Property_Value__SWIG_0(), true)
1303         {
1304             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1305         }
1306
1307         /// <summary>
1308         /// Creates a boolean property value.
1309         /// </summary>
1310         /// <param name="boolValue">A boolean value.</param>
1311         public PropertyValue(bool boolValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_1(boolValue), true)
1312         {
1313             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1314         }
1315
1316         /// <summary>
1317         /// Creates an integer property value.
1318         /// </summary>
1319         /// <param name="integerValue">An integer value.</param>
1320         public PropertyValue(int integerValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_2(integerValue), true)
1321         {
1322             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1323         }
1324
1325         /// <summary>
1326         /// Creates a float property value.
1327         /// </summary>
1328         /// <param name="floatValue">A floating-point value.</param>
1329         public PropertyValue(float floatValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_3(floatValue), true)
1330         {
1331             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1332         }
1333
1334         /// <summary>
1335         /// Creates a Vector2 property value.
1336         /// </summary>
1337         /// <param name="vectorValue">A vector of 2 floating-point values.</param>
1338         public PropertyValue(Vector2 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Vector2.getCPtr(vectorValue)), true)
1339         {
1340             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1341         }
1342
1343         /// <summary>
1344         /// Creates a Vector3 property value.
1345         /// </summary>
1346         /// <param name="vectorValue">A vector of 3 floating-point values.</param>
1347         public PropertyValue(Vector3 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Vector3.getCPtr(vectorValue)), true)
1348         {
1349             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1350         }
1351
1352         /// <summary>
1353         /// Creates a Vector4 property value.
1354         /// </summary>
1355         /// <param name="vectorValue">A vector of 4 floating-point values.</param>
1356         public PropertyValue(Vector4 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_6(Vector4.getCPtr(vectorValue)), true)
1357         {
1358             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1359         }
1360
1361         internal PropertyValue(Matrix3 matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_7(Matrix3.getCPtr(matrixValue)), true)
1362         {
1363             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1364         }
1365
1366         internal PropertyValue(Matrix matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_8(Matrix.getCPtr(matrixValue)), true)
1367         {
1368             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1369         }
1370
1371         /// <summary>
1372         /// Creates a Rectangle property value.
1373         /// </summary>
1374         /// <param name="vectorValue">Rectangle values.</param>
1375         public PropertyValue(Rectangle vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_9(Rectangle.getCPtr(vectorValue)), true)
1376         {
1377             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1378         }
1379
1380         internal PropertyValue(AngleAxis angleAxis) : this(NDalicPINVOKE.new_Property_Value__SWIG_10(AngleAxis.getCPtr(angleAxis)), true)
1381         {
1382             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1383         }
1384
1385         /// <summary>
1386         /// Creates a Rotation property value.
1387         /// </summary>
1388         /// <param name="quaternion">Rotation values.</param>
1389         public PropertyValue(Rotation quaternion) : this(NDalicPINVOKE.new_Property_Value__SWIG_11(Rotation.getCPtr(quaternion)), true)
1390         {
1391             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1392         }
1393
1394         /// <summary>
1395         /// Creates a string property value.
1396         /// </summary>
1397         /// <param name="stringValue">A string.</param>
1398         public PropertyValue(string stringValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_12(stringValue), true)
1399         {
1400             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1401         }
1402
1403         /// <summary>
1404         /// Creates an array property value.
1405         /// </summary>
1406         /// <param name="arrayValue">An array.</param>
1407         public PropertyValue(PropertyArray arrayValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_14(PropertyArray.getCPtr(arrayValue)), true)
1408         {
1409             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1410         }
1411
1412         /// <summary>
1413         /// Creates a map property value.
1414         /// </summary>
1415         /// <param name="mapValue">An array.</param>
1416         public PropertyValue(PropertyMap mapValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_15(PropertyMap.getCPtr(mapValue)), true)
1417         {
1418             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1419         }
1420
1421         /// <summary>
1422         /// Creates a PropertyType value.
1423         /// </summary>
1424         /// <param name="type">A PropertyType value.</param>
1425         public PropertyValue(PropertyType type) : this(NDalicPINVOKE.new_Property_Value__SWIG_16((int)type), true)
1426         {
1427             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1428         }
1429
1430         /// <summary>
1431         /// Creates a PropertyValue value.
1432         /// </summary>
1433         /// <param name="value">A PropertyValue value.</param>
1434         public PropertyValue(PropertyValue value) : this(NDalicPINVOKE.new_Property_Value__SWIG_17(PropertyValue.getCPtr(value)), true)
1435         {
1436             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1437         }
1438
1439         /// <summary>
1440         /// Queries the type of this property value.
1441         /// </summary>
1442         /// <returns>The type ID</returns>
1443         public new PropertyType GetType()
1444         {
1445             PropertyType ret = (PropertyType)NDalicPINVOKE.Property_Value_GetType(swigCPtr);
1446             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1447             return ret;
1448         }
1449
1450         /// <summary>
1451         /// Retrieves a boolean value.
1452         /// </summary>
1453         /// <param name="boolValue">On return, a boolean value.</param>
1454         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1455         public bool Get(out bool boolValue)
1456         {
1457             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_1(swigCPtr, out boolValue);
1458             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1459             return ret;
1460         }
1461
1462         /// <summary>
1463         /// Retrieves a floating-point value.
1464         /// </summary>
1465         /// <param name="floatValue">On return, a floating-point value.</param>
1466         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1467         public bool Get(out float floatValue)
1468         {
1469             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_2(swigCPtr, out floatValue);
1470             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1471             return ret;
1472         }
1473
1474         /// <summary>
1475         /// Retrieves an integer value.
1476         /// </summary>
1477         /// <param name="integerValue">On return, an integer value.</param>
1478         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1479         public bool Get(out int integerValue)
1480         {
1481             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_3(swigCPtr, out integerValue);
1482             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1483             return ret;
1484         }
1485
1486         /// <summary>
1487         /// Retrieves an integer rectangle.
1488         /// </summary>
1489         /// <param name="rect">On return, an integer rectangle.</param>
1490         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1491         public bool Get(Rectangle rect)
1492         {
1493             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_4(swigCPtr, Rectangle.getCPtr(rect));
1494             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1495             return ret;
1496         }
1497
1498         /// <summary>
1499         /// Retrieves a vector value.
1500         /// </summary>
1501         /// <param name="vectorValue">On return, a vector value.</param>
1502         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1503         public bool Get(Vector2 vectorValue)
1504         {
1505             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Vector2.getCPtr(vectorValue));
1506             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1507             return ret;
1508         }
1509
1510         /// <summary>
1511         /// Retrieves a vector value.
1512         /// </summary>
1513         /// <param name="vectorValue">On return, a vector value.</param>
1514         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1515         public bool Get(Vector3 vectorValue)
1516         {
1517             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Vector3.getCPtr(vectorValue));
1518             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1519             return ret;
1520         }
1521
1522         /// <summary>
1523         /// Retrieves a vector value.
1524         /// </summary>
1525         /// <param name="vectorValue">On return, a vector value.</param>
1526         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1527         public bool Get(Vector4 vectorValue)
1528         {
1529             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Vector4.getCPtr(vectorValue));
1530             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1531             return ret;
1532         }
1533
1534         internal bool Get(Matrix3 matrixValue)
1535         {
1536             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_8(swigCPtr, Matrix3.getCPtr(matrixValue));
1537             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1538             return ret;
1539         }
1540
1541         internal bool Get(Matrix matrixValue)
1542         {
1543             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_9(swigCPtr, Matrix.getCPtr(matrixValue));
1544             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1545             return ret;
1546         }
1547
1548         internal bool Get(AngleAxis angleAxisValue)
1549         {
1550             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_10(swigCPtr, AngleAxis.getCPtr(angleAxisValue));
1551             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1552             return ret;
1553         }
1554
1555         /// <summary>
1556         /// Retrieves a Rotation value.
1557         /// </summary>
1558         /// <param name="quaternionValue">On return, a rotation value.</param>
1559         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1560         public bool Get(Rotation quaternionValue)
1561         {
1562             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_11(swigCPtr, Rotation.getCPtr(quaternionValue));
1563             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1564             return ret;
1565         }
1566
1567         /// <summary>
1568         /// Retrieves a string property value.
1569         /// </summary>
1570         /// <param name="stringValue">On return, a string.</param>
1571         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1572         public bool Get(out string stringValue)
1573         {
1574             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_12(swigCPtr, out stringValue);
1575             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1576             return ret;
1577         }
1578
1579         /// <summary>
1580         /// Retrieves an array property value.
1581         /// </summary>
1582         /// <param name="arrayValue">On return, the array as a vector property values.</param>
1583         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1584         public bool Get(PropertyArray arrayValue)
1585         {
1586             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_13(swigCPtr, PropertyArray.getCPtr(arrayValue));
1587             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1588             return ret;
1589         }
1590
1591         /// <summary>
1592         /// Retrieves a map property value.
1593         /// </summary>
1594         /// <param name="mapValue">On return, the map as vector of string and property value pairs.</param>
1595         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1596         public bool Get(PropertyMap mapValue)
1597         {
1598             bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_14(swigCPtr, PropertyMap.getCPtr(mapValue));
1599             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1600             return ret;
1601         }
1602     }
1603 }