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