2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.ComponentModel;
20 using System.Collections.Generic;
21 using Tizen.NUI.Binding;
26 internal class Property : global::System.IDisposable
28 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 /// <since_tizen> 3 </since_tizen>
33 protected bool swigCMemOwn;
35 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
37 swigCMemOwn = cMemoryOwn;
38 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
41 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
43 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46 //A Flag to check who called Dispose(). (By User or DisposeQueue)
47 private bool isDisposeQueued = false;
49 /// <since_tizen> 3 </since_tizen>
50 /// A Flat to check if it is already disposed.
52 protected bool disposed = false;
58 isDisposeQueued = true;
59 DisposeQueue.Instance.Add(this);
65 //Throw excpetion if Dispose() is called in separate thread.
66 if (!Window.IsInstalled())
68 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
73 Dispose(DisposeTypes.Implicit);
77 Dispose(DisposeTypes.Explicit);
78 System.GC.SuppressFinalize(this);
82 protected virtual void Dispose(DisposeTypes type)
89 if(type == DisposeTypes.Explicit)
92 //Release your own managed resources here.
93 //You should release all of your own disposable objects here.
96 //Release your own unmanaged resources here.
97 //You should not access any managed member here except static instance.
98 //because the execution order of Finalizes is non-deterministic.
100 if (swigCPtr.Handle != global::System.IntPtr.Zero)
105 NDalicPINVOKE.delete_Property(swigCPtr);
107 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
113 internal static int INVALID_INDEX
117 int ret = NDalicPINVOKE.Property_INVALID_INDEX_get();
118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123 internal static int INVALID_KEY
127 int ret = NDalicPINVOKE.Property_INVALID_KEY_get();
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 internal static int INVALID_COMPONENT_INDEX
137 int ret = NDalicPINVOKE.Property_INVALID_COMPONENT_INDEX_get();
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 /// This constructor creates a property instance.
146 /// <param name="arg0">A valid handle to the target object.</param>
147 /// <param name="propertyIndex">The index of a property.</param>
148 /// <since_tizen> 3 </since_tizen>
149 public Property(Animatable arg0, int propertyIndex) : this(NDalicPINVOKE.new_Property__SWIG_0(Animatable.getCPtr(arg0), propertyIndex), true)
151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 /// This constructor creates a property instance.
157 /// <param name="arg0">A valid handle to the target object.</param>
158 /// <param name="propertyIndex">The index of a property.</param>
159 /// <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>
160 /// <since_tizen> 3 </since_tizen>
161 public Property(Animatable arg0, int propertyIndex, int componentIndex) : this(NDalicPINVOKE.new_Property__SWIG_1(Animatable.getCPtr(arg0), propertyIndex, componentIndex), true)
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 /// This constructor creates a property instance.<br />
168 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
170 /// <param name="arg0">A valid handle to the target object.</param>
171 /// <param name="propertyName">The property name.</param>
172 /// <since_tizen> 3 </since_tizen>
173 public Property(Animatable arg0, string propertyName) : this(NDalicPINVOKE.new_Property__SWIG_2(Animatable.getCPtr(arg0), propertyName), true)
175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179 /// This constructor creates a property instance.<br />
180 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
182 /// <param name="arg0">A valid handle to the target object.</param>
183 /// <param name="propertyName">The property name.</param>
184 /// <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>
185 /// <since_tizen> 3 </since_tizen>
186 public Property(Animatable arg0, string propertyName, int componentIndex) : this(NDalicPINVOKE.new_Property__SWIG_3(Animatable.getCPtr(arg0), propertyName, componentIndex), true)
188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191 internal Animatable _object
195 NDalicPINVOKE.Property__object_set(swigCPtr, Animatable.getCPtr(value));
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200 Animatable ret = new Animatable(NDalicPINVOKE.Property__object_get(swigCPtr), false);
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207 /// Gets or sets the index of the property.
209 /// <since_tizen> 3 </since_tizen>
210 public int propertyIndex
214 NDalicPINVOKE.Property_propertyIndex_set(swigCPtr, value);
215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
219 int ret = NDalicPINVOKE.Property_propertyIndex_get(swigCPtr);
220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226 /// Gets or sets the component index of the property.
228 /// <since_tizen> 3 </since_tizen>
229 public int componentIndex
233 NDalicPINVOKE.Property_componentIndex_set(swigCPtr, value);
234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238 int ret = NDalicPINVOKE.Property_componentIndex_get(swigCPtr);
239 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
247 /// An array of property values.
249 /// <since_tizen> 3 </since_tizen>
250 public class PropertyArray : global::System.IDisposable
252 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
256 /// <since_tizen> 3 </since_tizen>
257 protected bool swigCMemOwn;
259 internal PropertyArray(global::System.IntPtr cPtr, bool cMemoryOwn)
261 swigCMemOwn = cMemoryOwn;
262 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
265 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyArray obj)
267 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
270 //A Flag to check who called Dispose(). (By User or DisposeQueue)
271 private bool isDisposeQueued = false;
273 /// A Flat to check if it is already disposed.
275 /// <since_tizen> 3 </since_tizen>
276 protected bool disposed = false;
281 /// <since_tizen> 3 </since_tizen>
286 isDisposeQueued = true;
287 DisposeQueue.Instance.Add(this);
294 /// <since_tizen> 3 </since_tizen>
295 public void Dispose()
297 //Throw excpetion if Dispose() is called in separate thread.
298 if (!Window.IsInstalled())
300 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
305 Dispose(DisposeTypes.Implicit);
309 Dispose(DisposeTypes.Explicit);
310 System.GC.SuppressFinalize(this);
317 /// <since_tizen> 3 </since_tizen>
318 protected virtual void Dispose(DisposeTypes type)
325 if(type == DisposeTypes.Explicit)
328 //Release your own managed resources here.
329 //You should release all of your own disposable objects here.
332 //Release your own unmanaged resources here.
333 //You should not access any managed member here except static instance.
334 //because the execution order of Finalizes is non-deterministic.
336 if (swigCPtr.Handle != global::System.IntPtr.Zero)
341 NDalicPINVOKE.delete_Property_Array(swigCPtr);
343 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
349 /// The operator to access an element.
351 /// <param name="index">The element index to access. No bounds checking is performed.</param>
352 /// <returns>The reference to the element.</returns>
353 /// <since_tizen> 3 </since_tizen>
354 public PropertyValue this[uint index]
358 return ValueOfIndex(index);
365 /// <since_tizen> 3 </since_tizen>
366 public PropertyArray() : this(NDalicPINVOKE.new_Property_Array__SWIG_0(), true)
368 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
371 internal PropertyArray(PropertyArray other) : this(NDalicPINVOKE.new_Property_Array__SWIG_1(PropertyArray.getCPtr(other)), true)
373 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
377 /// Retrieves the number of elements in the array.
379 /// <returns>The number of elements in the array.</returns>
380 /// <since_tizen> 3 </since_tizen>
383 uint ret = NDalicPINVOKE.Property_Array_Size(swigCPtr);
384 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
389 /// Retrieves the number of elements in the array.
391 /// <returns>The number of elements in the array.</returns>
392 /// <since_tizen> 3 </since_tizen>
395 uint ret = NDalicPINVOKE.Property_Array_Count(swigCPtr);
396 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
401 /// Returns whether the array is empty.
403 /// <returns>Returns true if empty, false otherwise.</returns>
404 /// <since_tizen> 3 </since_tizen>
407 bool ret = NDalicPINVOKE.Property_Array_Empty(swigCPtr);
408 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
413 /// Clears the array.
415 /// <since_tizen> 3 </since_tizen>
418 NDalicPINVOKE.Property_Array_Clear(swigCPtr);
419 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
423 /// Increases the capacity of the array.
425 /// <param name="size">The size to reserve.</param>
426 /// <since_tizen> 3 </since_tizen>
427 public void Reserve(uint size)
429 NDalicPINVOKE.Property_Array_Reserve(swigCPtr, size);
430 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
436 /// <param name="size">The size to resize</param>
437 /// <since_tizen> 3 </since_tizen>
438 public void Resize(uint size)
440 NDalicPINVOKE.Property_Array_Resize(swigCPtr, size);
441 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
445 /// Retrieves the capacity of the array.
447 /// <returns>The allocated capacity of the array.</returns>
448 /// <since_tizen> 3 </since_tizen>
449 public uint Capacity()
451 uint ret = NDalicPINVOKE.Property_Array_Capacity(swigCPtr);
452 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
457 /// Adds an element to the array.
459 /// <param name="value">The value to add at the end of the array.</param>
460 /// <since_tizen> 3 </since_tizen>
461 public void PushBack(PropertyValue value)
463 NDalicPINVOKE.Property_Array_PushBack(swigCPtr, PropertyValue.getCPtr(value));
464 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
468 /// Adds an keyvalue to the array.
469 /// This function should be first
471 /// <param name="value">The value to add at the end of the array.</param>
472 public PropertyArray Add(KeyValue value)
474 PropertyArray ret = new PropertyArray(NDalicPINVOKE.Property_Array_Add(swigCPtr, PropertyValue.getCPtr(value.TrueValue)), false);
475 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
480 /// Adds an element to the array.
482 /// <param name="value">The value to add at the end of the array.</param>
483 /// <since_tizen> 3 </since_tizen>
484 public PropertyArray Add(PropertyValue value)
486 PropertyArray ret = new PropertyArray(NDalicPINVOKE.Property_Array_Add(swigCPtr, PropertyValue.getCPtr(value)), false);
487 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
492 /// Accesses an element.
494 /// <param name="index">The element index to access. No bounds checking is performed.</param>
495 /// <returns>The reference to the element.</returns>
496 /// <since_tizen> 3 </since_tizen>
497 public PropertyValue GetElementAt(uint index)
499 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Array_GetElementAt__SWIG_0(swigCPtr, index), false);
500 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
505 /// Retrieves the value of elements in the array.
507 /// <param name="index">The element index to retrieve.</param>
508 /// <returns>The reference to the element.</returns>
509 private PropertyValue ValueOfIndex(uint index)
511 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Array_ValueOfIndex__SWIG_0(swigCPtr, index), false);
512 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
518 /// A key type which can be either a std::string or a Property::Index.
520 /// <since_tizen> 3 </since_tizen>
521 public class PropertyKey : global::System.IDisposable
523 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
527 /// <since_tizen> 3 </since_tizen>
528 protected bool swigCMemOwn;
530 internal PropertyKey(global::System.IntPtr cPtr, bool cMemoryOwn)
532 swigCMemOwn = cMemoryOwn;
533 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
536 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyKey obj)
538 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
541 //A Flag to check who called Dispose(). (By User or DisposeQueue)
542 private bool isDisposeQueued = false;
544 /// A Flat to check if it is already disposed.
546 /// <since_tizen> 3 </since_tizen>
547 protected bool disposed = false;
552 /// <since_tizen> 3 </since_tizen>
557 isDisposeQueued = true;
558 DisposeQueue.Instance.Add(this);
565 /// <since_tizen> 3 </since_tizen>
566 public void Dispose()
568 //Throw excpetion if Dispose() is called in separate thread.
569 if (!Window.IsInstalled())
571 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
576 Dispose(DisposeTypes.Implicit);
580 Dispose(DisposeTypes.Explicit);
581 System.GC.SuppressFinalize(this);
588 /// <since_tizen> 3 </since_tizen>
589 protected virtual void Dispose(DisposeTypes type)
596 if(type == DisposeTypes.Explicit)
599 //Release your own managed resources here.
600 //You should release all of your own disposable objects here.
603 //Release your own unmanaged resources here.
604 //You should not access any managed member here except static instance.
605 //because the execution order of Finalizes is non-deterministic.
607 if (swigCPtr.Handle != global::System.IntPtr.Zero)
612 NDalicPINVOKE.delete_Property_Key(swigCPtr);
614 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
620 /// The type of the key.
622 /// <since_tizen> 3 </since_tizen>
623 public PropertyKey.KeyType Type
627 NDalicPINVOKE.Property_Key_type_set(swigCPtr, (int)value);
628 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
632 PropertyKey.KeyType ret = (PropertyKey.KeyType)NDalicPINVOKE.Property_Key_type_get(swigCPtr);
633 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
641 /// <since_tizen> 3 </since_tizen>
646 NDalicPINVOKE.Property_Key_indexKey_set(swigCPtr, value);
647 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
651 int ret = NDalicPINVOKE.Property_Key_indexKey_get(swigCPtr);
652 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
660 /// <since_tizen> 3 </since_tizen>
661 public string StringKey
665 NDalicPINVOKE.Property_Key_stringKey_set(swigCPtr, value);
666 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
670 string ret = NDalicPINVOKE.Property_Key_stringKey_get(swigCPtr);
671 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679 /// <param name="key">The string key.</param>
680 /// <since_tizen> 3 </since_tizen>
681 public PropertyKey(string key) : this(NDalicPINVOKE.new_Property_Key__SWIG_0(key), true)
683 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
689 /// <param name="key">The index key.</param>
690 /// <since_tizen> 3 </since_tizen>
691 public PropertyKey(int key) : this(NDalicPINVOKE.new_Property_Key__SWIG_1(key), true)
693 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
697 /// Compares if rhs is equal to.
699 /// <param name="rhs">A string key to compare against.</param>
700 /// <returns>Returns true if the key compares, or false if it isn't equal or of the wrong type.</returns>
701 /// <since_tizen> 3 </since_tizen>
702 public bool EqualTo(string rhs)
704 bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_0(swigCPtr, rhs);
705 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
710 /// Compares if rhs is equal to.
712 /// <param name="rhs">The index key to compare against.</param>
713 /// <returns>Returns true if the key compares, or false if it isn't equal or of the wrong type.</returns>
714 /// <since_tizen> 3 </since_tizen>
715 public bool EqualTo(int rhs)
717 bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_1(swigCPtr, rhs);
718 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
723 /// Compares if rhs is equal to
725 /// <param name="rhs">A key to compare against</param>
726 /// <returns>Returns true if the keys are of the same type and have the same value.</returns>
727 /// <since_tizen> 3 </since_tizen>
728 public bool EqualTo(PropertyKey rhs)
730 bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_2(swigCPtr, PropertyKey.getCPtr(rhs));
731 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
736 /// Compares if rhs is not equal to.
738 /// <param name="rhs">The index key to compare against.</param>
739 /// <returns>Returns true if the key is not equal or not a string key.</returns>
740 /// <since_tizen> 3 </since_tizen>
741 public bool NotEqualTo(string rhs)
743 bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_0(swigCPtr, rhs);
744 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
749 /// Compares if rhs is not equal to.
751 /// <param name="rhs">The index key to compare against.</param>
752 /// <returns>Returns true if the key is not equal, or not the index key.</returns>
753 /// <since_tizen> 3 </since_tizen>
754 public bool NotEqualTo(int rhs)
756 bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_1(swigCPtr, rhs);
757 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
762 /// Compares if rhs is not equal to.
764 /// <param name="rhs">A key to compare against.</param>
765 /// <returns>Returns true if the keys are not of the same type or are not equal.</returns>
766 /// <since_tizen> 3 </since_tizen>
767 public bool NotEqualTo(PropertyKey rhs)
769 bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_2(swigCPtr, PropertyKey.getCPtr(rhs));
770 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
777 /// <since_tizen> 3 </since_tizen>
781 /// The type of key is index.
783 /// <since_tizen> 3 </since_tizen>
786 /// The type of key is string.
788 /// <since_tizen> 3 </since_tizen>
795 /// A map of property values, the key type could be string or Property::Index.
797 /// <since_tizen> 3 </since_tizen>
798 public class PropertyMap : global::System.IDisposable
800 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
804 /// <since_tizen> 3 </since_tizen>
805 protected bool swigCMemOwn;
807 internal PropertyMap(global::System.IntPtr cPtr, bool cMemoryOwn)
809 swigCMemOwn = cMemoryOwn;
810 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
813 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyMap obj)
815 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
818 //A Flag to check who called Dispose(). (By User or DisposeQueue)
819 private bool isDisposeQueued = false;
821 /// A Flat to check if it is already disposed.
823 /// <since_tizen> 3 </since_tizen>
824 protected bool disposed = false;
829 /// <since_tizen> 3 </since_tizen>
834 isDisposeQueued = true;
835 DisposeQueue.Instance.Add(this);
842 /// <since_tizen> 3 </since_tizen>
843 public void Dispose()
845 //Throw excpetion if Dispose() is called in separate thread.
846 if (!Window.IsInstalled())
848 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
853 Dispose(DisposeTypes.Implicit);
857 Dispose(DisposeTypes.Explicit);
858 System.GC.SuppressFinalize(this);
865 /// <since_tizen> 3 </since_tizen>
866 protected virtual void Dispose(DisposeTypes type)
873 if(type == DisposeTypes.Explicit)
876 //Release your own managed resources here.
877 //You should release all of your own disposable objects here.
880 //Release your own unmanaged resources here.
881 //You should not access any managed member here except static instance.
882 //because the execution order of Finalizes is non-deterministic.
884 if (swigCPtr.Handle != global::System.IntPtr.Zero)
889 NDalicPINVOKE.delete_Property_Map(swigCPtr);
891 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
897 /// The operator to access the element with the specified string key.<br />
898 /// If an element with the key does not exist, then it is created.<br />
900 /// <param name="key">The key whose value to access.</param>
901 /// <returns>A value for the element with the specified key.</returns>
902 /// <since_tizen> 3 </since_tizen>
903 public PropertyValue this[string key]
907 return ValueOfIndex(key);
912 /// The operator to access the element with the specified index key.<br />
913 /// If an element with the key does not exist, then it is created.<br />
915 /// <param name="key">The key whose value to access.</param>
916 /// <returns>A value for the element with the specified key.</returns>
917 /// <since_tizen> 3 </since_tizen>
918 public PropertyValue this[int key]
922 return ValueOfIndex(key);
929 /// <since_tizen> 3 </since_tizen>
930 public PropertyMap() : this(NDalicPINVOKE.new_Property_Map__SWIG_0(), true)
932 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
936 /// The copy constructor.
938 /// <param name="other">The map to copy from.</param>
939 /// <since_tizen> 3 </since_tizen>
940 public PropertyMap(PropertyMap other) : this(NDalicPINVOKE.new_Property_Map__SWIG_1(PropertyMap.getCPtr(other)), true)
942 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
946 /// Retrieves the number of elements in the map.
948 /// <returns>The number of elements in the map.</returns>
949 /// <since_tizen> 3 </since_tizen>
952 uint ret = NDalicPINVOKE.Property_Map_Count(swigCPtr);
953 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
958 /// Returns whether the map is empty.
960 /// <returns>Returns true if empty, false otherwise.</returns>
961 /// <since_tizen> 3 </since_tizen>
964 bool ret = NDalicPINVOKE.Property_Map_Empty(swigCPtr);
965 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
970 /// Inserts the key-value pair in the map, with the key type as string.<br />
971 /// Does not check for duplicates.<br />
973 /// <param name="key">The key to insert.</param>
974 /// <param name="value">The value to insert.</param>
975 /// <since_tizen> 3 </since_tizen>
976 public void Insert(string key, PropertyValue value)
978 NDalicPINVOKE.Property_Map_Insert__SWIG_0(swigCPtr, key, PropertyValue.getCPtr(value));
979 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
983 /// Inserts the key-value pair in the map, with the key type as index.<br />
984 /// Does not check for duplicates.<br />
986 /// <param name="key">The key to insert.</param>
987 /// <param name="value">The value to insert.</param>
988 /// <since_tizen> 3 </since_tizen>
989 public void Insert(int key, PropertyValue value)
991 NDalicPINVOKE.Property_Map_Insert__SWIG_2(swigCPtr, key, PropertyValue.getCPtr(value));
992 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
996 /// Inserts the key-value pair in the map, with the key type as string.<br />
997 /// Does not check for duplicates.<br />
999 /// <param name="key">The key to insert.</param>
1000 /// <param name="value">The value to insert.</param>
1001 /// <returns>Returns a reference to this object.</returns>
1002 /// <since_tizen> 3 </since_tizen>
1003 public PropertyMap Add(string key, PropertyValue value)
1005 PropertyMap ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_0(swigCPtr, key, PropertyValue.getCPtr(value)), false);
1006 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1011 /// Inserts the key-value pair in the map, with the key type as string.<br />
1012 /// Does not check for duplicates.<br />
1014 /// <param name="key">The key to insert.</param>
1015 /// <param name="value">The value to insert.</param>
1016 /// <returns>Returns a reference to this object.</returns>
1017 /// <since_tizen> 3 </since_tizen>
1018 public PropertyMap Add(int key, PropertyValue value)
1020 PropertyMap ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_2(swigCPtr, key, PropertyValue.getCPtr(value)), false);
1021 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1026 /// Inserts the keyvalue to the map.<br />
1027 /// Does not check for duplicates.<br />
1029 /// <param name="keyValue">The keyvalue to insert.</param>
1030 /// <returns>Returns a reference to this object.</returns>
1031 public PropertyMap Add(KeyValue keyValue)
1033 PropertyMap ret = new PropertyMap();
1034 if ( keyValue.KeyInt != null )
1036 ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_2(swigCPtr, (int)keyValue.KeyInt, PropertyValue.getCPtr(keyValue.TrueValue)), false);
1038 else if ( keyValue.KeyString != null)
1040 ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_0(swigCPtr, keyValue.KeyString, PropertyValue.getCPtr(keyValue.TrueValue)), false);
1042 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1048 /// Retrieves the value at the specified position.
1050 /// <param name="position">The specified position.</param>
1051 /// <returns>A reference to the value at the specified position.</returns>
1052 /// <since_tizen> 3 </since_tizen>
1053 public PropertyValue GetValue(uint position)
1055 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_GetValue(swigCPtr, position), false);
1056 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1061 /// Retrieves the key at the specified position.
1063 /// <param name="position">The specified position.</param>
1064 /// <returns>A copy of the key at the specified position.</returns>
1065 /// <since_tizen> 3 </since_tizen>
1066 public PropertyKey GetKeyAt(uint position)
1068 PropertyKey ret = new PropertyKey(NDalicPINVOKE.Property_Map_GetKeyAt(swigCPtr, position), true);
1069 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1074 /// Finds the value for the specified key if it exists.
1076 /// <param name="key">The key to find.</param>
1077 /// <returns>The value if it exists, an empty object otherwise.</returns>
1078 /// <since_tizen> 3 </since_tizen>
1079 public PropertyValue Find(int key)
1081 global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_2(swigCPtr, key);
1082 PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
1083 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1088 /// Finds the value for the specified keys if either exist.
1090 /// <param name="indexKey">The index key to find.</param>
1091 /// <param name="stringKey">The string key to find.</param>
1092 /// <returns>The value if it exists, an empty object otherwise.</returns>
1093 /// <since_tizen> 3 </since_tizen>
1094 public PropertyValue Find(int indexKey, string stringKey)
1096 global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_3(swigCPtr, indexKey, stringKey);
1097 PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
1098 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1105 /// <since_tizen> 3 </since_tizen>
1108 NDalicPINVOKE.Property_Map_Clear(swigCPtr);
1109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1113 /// Merges values from the map 'from' to the current.<br />
1114 /// Any values in 'from' will overwrite the values in the current map.<br />
1116 /// <param name="from">The map to merge from.</param>
1117 /// <since_tizen> 3 </since_tizen>
1118 public void Merge(PropertyMap from)
1120 NDalicPINVOKE.Property_Map_Merge(swigCPtr, PropertyMap.getCPtr(from));
1121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1125 /// Retrieves the element with the specified string key.
1127 /// <param name="key">The key whose value to retrieve.</param>
1128 /// <returns>The value for the element with the specified key.</returns>
1129 internal PropertyValue ValueOfIndex(string key)
1131 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_ValueOfIndex__SWIG_0(swigCPtr, key), false);
1132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1137 /// Retrieves the element with the specified index key.
1139 /// <param name="key">The key whose value to retrieve.</param>
1140 /// <returns>The value for the element with the specified key.</returns>
1141 internal PropertyValue ValueOfIndex(int key)
1143 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_ValueOfIndex__SWIG_2(swigCPtr, key), false);
1144 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1150 /// A value-type representing a property value.
1152 /// <since_tizen> 3 </since_tizen>
1153 public class PropertyValue : global::System.IDisposable
1155 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1159 /// <since_tizen> 3 </since_tizen>
1160 protected bool swigCMemOwn;
1162 internal PropertyValue(global::System.IntPtr cPtr, bool cMemoryOwn)
1164 swigCMemOwn = cMemoryOwn;
1165 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1168 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyValue obj)
1170 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1173 //A Flag to check who called Dispose(). (By User or DisposeQueue)
1174 private bool isDisposeQueued = false;
1176 /// A Flat to check if it is already disposed.
1178 /// <since_tizen> 3 </since_tizen>
1179 protected bool disposed = false;
1184 /// <since_tizen> 3 </since_tizen>
1187 if(!isDisposeQueued)
1189 isDisposeQueued = true;
1190 DisposeQueue.Instance.Add(this);
1197 /// <since_tizen> 3 </since_tizen>
1198 public void Dispose()
1200 //Throw excpetion if Dispose() is called in separate thread.
1201 if (!Window.IsInstalled())
1203 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
1206 if (isDisposeQueued)
1208 Dispose(DisposeTypes.Implicit);
1212 Dispose(DisposeTypes.Explicit);
1213 System.GC.SuppressFinalize(this);
1220 /// <since_tizen> 3 </since_tizen>
1221 protected virtual void Dispose(DisposeTypes type)
1228 if(type == DisposeTypes.Explicit)
1231 //Release your own managed resources here.
1232 //You should release all of your own disposable objects here.
1235 //Release your own unmanaged resources here.
1236 //You should not access any managed member here except static instance.
1237 //because the execution order of Finalizes is non-deterministic.
1239 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1243 swigCMemOwn = false;
1244 NDalicPINVOKE.delete_Property_Value(swigCPtr);
1246 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1253 /// An extension to the property value class that allows us to create a
1254 /// Property value from a C# object, for example, integer, float, or string.<br />
1256 /// <param name="obj">An object to create.</param>
1257 /// <returns>The created value.</returns>
1258 /// <since_tizen> 3 </since_tizen>
1259 static public PropertyValue CreateFromObject(System.Object obj)
1261 System.Type type = obj.GetType();
1263 PropertyValue value;
1266 value = new PropertyValue((int)obj);//Enum.Parse(type, str);
1268 else if (type.Equals(typeof(int)))
1270 value = new PropertyValue((int)obj);
1272 else if (type.Equals(typeof(System.Int32)))
1274 value = new PropertyValue((int)obj);
1276 else if (type.Equals(typeof(bool)))
1278 value = new PropertyValue((bool)obj);
1280 else if (type.Equals(typeof(float)))
1282 value = new PropertyValue((float)obj);
1284 else if (type.Equals(typeof(string)))
1286 value = new PropertyValue((string)obj);
1288 else if (type.Equals(typeof(Vector2)))
1290 value = new PropertyValue((Vector2)obj);
1292 else if (type.Equals(typeof(Vector3)))
1294 value = new PropertyValue((Vector3)obj);
1296 else if (type.Equals(typeof(Vector4)))
1298 value = new PropertyValue((Vector4)obj);
1300 else if (type.Equals(typeof(Position)))
1302 value = new PropertyValue((Position)obj);
1304 else if (type.Equals(typeof(Position2D)))
1306 value = new PropertyValue((Position2D)obj);
1308 else if (type.Equals(typeof(Size)))
1310 value = new PropertyValue((Size)obj);
1312 else if (type.Equals(typeof(Size2D)))
1314 value = new PropertyValue((Size2D)obj);
1316 else if (type.Equals(typeof(Color)))
1318 value = new PropertyValue((Color)obj);
1320 else if (type.Equals(typeof(Rotation)))
1322 value = new PropertyValue((Rotation)obj);
1324 else if (type.Equals(typeof(RelativeVector2)))
1326 value = new PropertyValue((RelativeVector2)obj);
1328 else if (type.Equals(typeof(RelativeVector3)))
1330 value = new PropertyValue((RelativeVector3)obj);
1332 else if (type.Equals(typeof(RelativeVector4)))
1334 value = new PropertyValue((RelativeVector4)obj);
1336 else if(type.Equals(typeof(Extents)))
1338 value = new PropertyValue((Extents)obj);
1342 throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name);
1344 //NUILog.Debug(" got an property value of =" + type.Name);
1349 /// Creates a Size2D property value.
1351 /// <param name="vectorValue">Size2D values.</param>
1352 /// <since_tizen> 3 </since_tizen>
1353 public PropertyValue(Size2D vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Size2D.getCPtr(vectorValue)), true)
1355 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1359 /// Creates a Position2D property value.
1361 /// <param name="vectorValue">Position2D values.</param>
1362 /// <since_tizen> 3 </since_tizen>
1363 public PropertyValue(Position2D vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Position2D.getCPtr(vectorValue)), true)
1365 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1369 /// Creates a Size property value.
1371 /// <param name="vectorValue">Size values.</param>
1372 internal PropertyValue(Size vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Size.getCPtr(vectorValue)), true)
1374 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1378 /// Creates a Position property value.
1380 /// <param name="vectorValue">Position values.</param>
1381 /// <since_tizen> 3 </since_tizen>
1382 public PropertyValue(Position vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Position.getCPtr(vectorValue)), true)
1384 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1388 /// Creates a Color property value.
1390 /// <param name="vectorValue">Color values.</param>
1391 /// <since_tizen> 3 </since_tizen>
1392 public PropertyValue(Color vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_6(Color.getCPtr(vectorValue)), true)
1394 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1399 /// Retrieves a Size2D value.
1401 /// <param name="vectorValue"> On return, a Size2D value.</param>
1402 /// <since_tizen> 3 </since_tizen>
1403 public bool Get(Size2D vectorValue)
1405 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Size2D.getCPtr(vectorValue));
1406 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1411 /// Retrieves a Position2D value.
1413 /// <param name="vectorValue"> On return, a Position2D value.</param>
1414 /// <since_tizen> 3 </since_tizen>
1415 public bool Get(Position2D vectorValue)
1417 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Position2D.getCPtr(vectorValue));
1418 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1423 /// Retrieves a Size value.
1425 /// <param name="vectorValue"> On return, a size value.</param>
1426 internal bool Get(Size vectorValue)
1428 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Size.getCPtr(vectorValue));
1429 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1434 /// Retrieves a Position value.
1436 /// <param name="vectorValue"> On return, a position value.</param>
1437 /// <since_tizen> 3 </since_tizen>
1438 public bool Get(Position vectorValue)
1440 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Position.getCPtr(vectorValue));
1441 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1446 /// Retrieves a Color value.
1448 /// <param name="vectorValue"> On return, a color value.</param>
1449 /// <since_tizen> 3 </since_tizen>
1450 public bool Get(Color vectorValue)
1452 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Color.getCPtr(vectorValue));
1453 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1460 /// The default constructor.
1462 /// <since_tizen> 3 </since_tizen>
1463 public PropertyValue() : this(NDalicPINVOKE.new_Property_Value__SWIG_0(), true)
1465 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1469 /// Creates a boolean property value.
1471 /// <param name="boolValue">A boolean value.</param>
1472 /// <since_tizen> 3 </since_tizen>
1473 public PropertyValue(bool boolValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_1(boolValue), true)
1475 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1479 /// Creates an integer property value.
1481 /// <param name="integerValue">An integer value.</param>
1482 /// <since_tizen> 3 </since_tizen>
1483 public PropertyValue(int integerValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_2(integerValue), true)
1485 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1489 /// Creates a float property value.
1491 /// <param name="floatValue">A floating-point value.</param>
1492 /// <since_tizen> 3 </since_tizen>
1493 public PropertyValue(float floatValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_3(floatValue), true)
1495 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1499 /// Creates a Vector2 property value.
1501 /// <param name="vectorValue">A vector of 2 floating-point values.</param>
1502 /// <since_tizen> 3 </since_tizen>
1503 public PropertyValue(Vector2 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Vector2.getCPtr(vectorValue)), true)
1505 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1509 /// Creates a Vector3 property value.
1511 /// <param name="vectorValue">A vector of 3 floating-point values.</param>
1512 /// <since_tizen> 3 </since_tizen>
1513 public PropertyValue(Vector3 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Vector3.getCPtr(vectorValue)), true)
1515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1519 /// Creates a Vector4 property value.
1521 /// <param name="vectorValue">A vector of 4 floating-point values.</param>
1522 /// <since_tizen> 3 </since_tizen>
1523 public PropertyValue(Vector4 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_6(Vector4.getCPtr(vectorValue)), true)
1525 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1528 internal PropertyValue(Matrix3 matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_7(Matrix3.getCPtr(matrixValue)), true)
1530 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1533 internal PropertyValue(Matrix matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_8(Matrix.getCPtr(matrixValue)), true)
1535 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1539 /// Creates a Rectangle property value.
1541 /// <param name="vectorValue">Rectangle values.</param>
1542 /// <since_tizen> 3 </since_tizen>
1543 public PropertyValue(Rectangle vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_9(Rectangle.getCPtr(vectorValue)), true)
1545 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1548 internal PropertyValue(AngleAxis angleAxis) : this(NDalicPINVOKE.new_Property_Value__SWIG_10(AngleAxis.getCPtr(angleAxis)), true)
1550 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1554 /// Creates a Rotation property value.
1556 /// <param name="quaternion">Rotation values.</param>
1557 /// <since_tizen> 3 </since_tizen>
1558 public PropertyValue(Rotation quaternion) : this(NDalicPINVOKE.new_Property_Value__SWIG_11(Rotation.getCPtr(quaternion)), true)
1560 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1564 /// Creates a string property value.
1566 /// <param name="stringValue">A string.</param>
1567 /// <since_tizen> 3 </since_tizen>
1568 public PropertyValue(string stringValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_12(stringValue), true)
1570 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1574 /// Creates an array property value.
1576 /// <param name="arrayValue">An array.</param>
1577 /// <since_tizen> 3 </since_tizen>
1578 public PropertyValue(PropertyArray arrayValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_14(PropertyArray.getCPtr(arrayValue)), true)
1580 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1584 /// Creates a map property value.
1586 /// <param name="mapValue">An array.</param>
1587 /// <since_tizen> 3 </since_tizen>
1588 public PropertyValue(PropertyMap mapValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_15(PropertyMap.getCPtr(mapValue)), true)
1590 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1594 /// Creates a Extents value.
1596 /// <param name="extentsValue">A Extents value.</param>
1597 /// <since_tizen> 4 </since_tizen>
1598 public PropertyValue(Extents extentsValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_16(Extents.getCPtr(extentsValue)), true)
1600 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1604 /// Creates a PropertyType value.
1606 /// <param name="type">A PropertyType value.</param>
1607 /// <since_tizen> 3 </since_tizen>
1608 public PropertyValue(PropertyType type) : this(NDalicPINVOKE.new_Property_Value__SWIG_17((int)type), true)
1610 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1614 /// Creates a PropertyValue value.
1616 /// <param name="value">A PropertyValue value.</param>
1617 /// <since_tizen> 3 </since_tizen>
1618 public PropertyValue(PropertyValue value) : this(NDalicPINVOKE.new_Property_Value__SWIG_18(PropertyValue.getCPtr(value)), true)
1620 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1624 /// Queries the type of this property value.
1626 /// <returns>The type ID</returns>
1627 /// <since_tizen> 3 </since_tizen>
1628 public new PropertyType GetType()
1630 PropertyType ret = (PropertyType)NDalicPINVOKE.Property_Value_GetType(swigCPtr);
1631 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1636 /// Retrieves a boolean value.
1638 /// <param name="boolValue">On return, a boolean value.</param>
1639 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1640 /// <since_tizen> 3 </since_tizen>
1641 public bool Get(out bool boolValue)
1643 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_1(swigCPtr, out boolValue);
1644 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1649 /// Retrieves a floating-point value.
1651 /// <param name="floatValue">On return, a floating-point value.</param>
1652 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1653 /// <since_tizen> 3 </since_tizen>
1654 public bool Get(out float floatValue)
1656 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_2(swigCPtr, out floatValue);
1657 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1662 /// Retrieves an integer value.
1664 /// <param name="integerValue">On return, an integer value.</param>
1665 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1666 /// <since_tizen> 3 </since_tizen>
1667 public bool Get(out int integerValue)
1669 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_3(swigCPtr, out integerValue);
1670 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1675 /// Retrieves an integer rectangle.
1677 /// <param name="rect">On return, an integer rectangle.</param>
1678 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1679 /// <since_tizen> 3 </since_tizen>
1680 public bool Get(Rectangle rect)
1682 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_4(swigCPtr, Rectangle.getCPtr(rect));
1683 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1688 /// Retrieves a vector value.
1690 /// <param name="vectorValue">On return, a vector value.</param>
1691 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1692 /// <since_tizen> 3 </since_tizen>
1693 public bool Get(Vector2 vectorValue)
1695 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Vector2.getCPtr(vectorValue));
1696 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1701 /// Retrieves a vector value.
1703 /// <param name="vectorValue">On return, a vector value.</param>
1704 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1705 /// <since_tizen> 3 </since_tizen>
1706 public bool Get(Vector3 vectorValue)
1708 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Vector3.getCPtr(vectorValue));
1709 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1714 /// Retrieves a vector value.
1716 /// <param name="vectorValue">On return, a vector value.</param>
1717 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1718 /// <since_tizen> 3 </since_tizen>
1719 public bool Get(Vector4 vectorValue)
1721 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Vector4.getCPtr(vectorValue));
1722 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1726 internal bool Get(Matrix3 matrixValue)
1728 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_8(swigCPtr, Matrix3.getCPtr(matrixValue));
1729 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1733 internal bool Get(Matrix matrixValue)
1735 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_9(swigCPtr, Matrix.getCPtr(matrixValue));
1736 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1740 internal bool Get(AngleAxis angleAxisValue)
1742 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_10(swigCPtr, AngleAxis.getCPtr(angleAxisValue));
1743 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1748 /// Retrieves a Rotation value.
1750 /// <param name="quaternionValue">On return, a rotation value.</param>
1751 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1752 /// <since_tizen> 3 </since_tizen>
1753 public bool Get(Rotation quaternionValue)
1755 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_11(swigCPtr, Rotation.getCPtr(quaternionValue));
1756 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1761 /// Retrieves a string property value.
1763 /// <param name="stringValue">On return, a string.</param>
1764 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1765 /// <since_tizen> 3 </since_tizen>
1766 public bool Get(out string stringValue)
1768 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_12(swigCPtr, out stringValue);
1769 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1774 /// Retrieves an array property value.
1776 /// <param name="arrayValue">On return, the array as a vector property values.</param>
1777 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1778 /// <since_tizen> 3 </since_tizen>
1779 public bool Get(PropertyArray arrayValue)
1781 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_13(swigCPtr, PropertyArray.getCPtr(arrayValue));
1782 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1787 /// Retrieves a map property value.
1789 /// <param name="mapValue">On return, the map as vector of string and property value pairs.</param>
1790 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1791 /// <since_tizen> 3 </since_tizen>
1792 public bool Get(PropertyMap mapValue)
1794 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_14(swigCPtr, PropertyMap.getCPtr(mapValue));
1795 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1800 /// Retrieves a Extents value.
1802 /// <param name="extentsValue">On return, a extents.</param>
1803 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1804 /// <since_tizen> 4 </since_tizen>
1805 public bool Get(Extents extentsValue)
1807 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_15(swigCPtr, Extents.getCPtr(extentsValue));
1808 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1816 public class KeyValue
1818 private string _key = null;
1819 private object _originalValue = null;
1820 private object _originalKey = null;
1822 public int? KeyInt = null;
1823 public string KeyString = null;
1824 public PropertyValue TrueValue = null;
1827 /// Default Constructor.
1849 /// OriginalKey property.
1851 public object OriginalKey
1855 return _originalKey;
1859 _originalKey = value;
1860 if (value is int || value is Int32)
1862 KeyInt = (int)value;
1864 if (value is string)
1866 KeyString = (string)value;
1870 if (value.GetType().Equals(typeof(int)) || value.GetType().Equals(typeof(Int32)))
1872 KeyInt = (int)value;
1874 else if (value.GetType().Equals(typeof(string)))
1876 KeyString = (string)value;
1878 KeyInt = (int)value;
1889 return _originalValue;
1893 _originalValue = value;
1894 TrueValue = PropertyValue.CreateFromObject(value);
1899 /// IntergerValue property.
1901 public int IntergerValue
1905 TrueValue = new PropertyValue(value);
1910 /// BooleanValue property.
1912 public bool BooleanValue
1916 TrueValue = new PropertyValue(value);
1921 /// SingleValue property.
1923 public float SingleValue
1927 TrueValue = new PropertyValue(value);
1932 /// StringValue property.
1934 public string StringValue
1938 TrueValue = new PropertyValue(value);
1943 /// Vector2Value property.
1945 public Vector2 Vector2Value
1949 TrueValue = new PropertyValue(value);
1954 /// Vector3Value property.
1956 public Vector3 Vector3Value
1960 TrueValue = new PropertyValue(value);
1965 /// Vector4Value property.
1967 public Vector4 Vector4Value
1971 TrueValue = new PropertyValue(value);
1976 /// PositionValue property.
1978 public Position PositionValue
1982 TrueValue = new PropertyValue(value);
1987 /// Position2DValue property.
1989 public Position2D Position2DValue
1993 TrueValue = new PropertyValue(value);
1998 /// SizeValue property.
2000 public Size SizeValue
2004 TrueValue = new PropertyValue(value);
2009 /// Size2DValue property.
2011 public Size2D Size2DValue
2015 TrueValue = new PropertyValue(value);
2020 /// ColorValue property.
2022 public Color ColorValue
2026 TrueValue = new PropertyValue(value);
2031 /// RectangleValue property.
2033 public Rectangle RectangleValue
2037 TrueValue = new PropertyValue(value);
2042 /// RotationValue property.
2044 public Rotation RotationValue
2048 TrueValue = new PropertyValue(value);
2053 /// RelativeVector2Value property.
2055 public RelativeVector2 RelativeVector2Value
2059 TrueValue = new PropertyValue(value);
2064 /// RelativeVector3Value property.
2066 public RelativeVector3 RelativeVector3Value
2070 TrueValue = new PropertyValue(value);
2075 /// RelativeVector4Value property.
2077 public RelativeVector4 RelativeVector4Value
2081 TrueValue = new PropertyValue(value);
2086 /// ExtentsValue property.
2088 public Extents ExtentsValue
2092 TrueValue = new PropertyValue(value);
2097 /// PropertyArrayValue property.
2099 public PropertyArray PropertyArrayValue
2103 TrueValue = new PropertyValue(value);
2108 /// PropertyMapValue property.
2110 public PropertyMap PropertyMapValue
2114 TrueValue = new PropertyValue(value);
2118 private void ParseKey(string key)
2121 if (VisualExtension.KeyDictionary.ContainsKey(key))
2123 VisualExtension.KeyDictionary.TryGetValue(key, out v);