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 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1427 [EditorBrowsable(EditorBrowsableState.Never)]
1428 public bool Get(Size vectorValue)
1430 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Size.getCPtr(vectorValue));
1431 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1436 /// Retrieves a Position value.
1438 /// <param name="vectorValue"> On return, a position value.</param>
1439 /// <since_tizen> 3 </since_tizen>
1440 public bool Get(Position vectorValue)
1442 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Position.getCPtr(vectorValue));
1443 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1448 /// Retrieves a Color value.
1450 /// <param name="vectorValue"> On return, a color value.</param>
1451 /// <since_tizen> 3 </since_tizen>
1452 public bool Get(Color vectorValue)
1454 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Color.getCPtr(vectorValue));
1455 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1462 /// The default constructor.
1464 /// <since_tizen> 3 </since_tizen>
1465 public PropertyValue() : this(NDalicPINVOKE.new_Property_Value__SWIG_0(), true)
1467 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1471 /// Creates a boolean property value.
1473 /// <param name="boolValue">A boolean value.</param>
1474 /// <since_tizen> 3 </since_tizen>
1475 public PropertyValue(bool boolValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_1(boolValue), true)
1477 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1481 /// Creates an integer property value.
1483 /// <param name="integerValue">An integer value.</param>
1484 /// <since_tizen> 3 </since_tizen>
1485 public PropertyValue(int integerValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_2(integerValue), true)
1487 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1491 /// Creates a float property value.
1493 /// <param name="floatValue">A floating-point value.</param>
1494 /// <since_tizen> 3 </since_tizen>
1495 public PropertyValue(float floatValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_3(floatValue), true)
1497 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1501 /// Creates a Vector2 property value.
1503 /// <param name="vectorValue">A vector of 2 floating-point values.</param>
1504 /// <since_tizen> 3 </since_tizen>
1505 public PropertyValue(Vector2 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Vector2.getCPtr(vectorValue)), true)
1507 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1511 /// Creates a Vector3 property value.
1513 /// <param name="vectorValue">A vector of 3 floating-point values.</param>
1514 /// <since_tizen> 3 </since_tizen>
1515 public PropertyValue(Vector3 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Vector3.getCPtr(vectorValue)), true)
1517 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1521 /// Creates a Vector4 property value.
1523 /// <param name="vectorValue">A vector of 4 floating-point values.</param>
1524 /// <since_tizen> 3 </since_tizen>
1525 public PropertyValue(Vector4 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_6(Vector4.getCPtr(vectorValue)), true)
1527 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1530 internal PropertyValue(Matrix3 matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_7(Matrix3.getCPtr(matrixValue)), true)
1532 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1535 internal PropertyValue(Matrix matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_8(Matrix.getCPtr(matrixValue)), true)
1537 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1541 /// Creates a Rectangle property value.
1543 /// <param name="vectorValue">Rectangle values.</param>
1544 /// <since_tizen> 3 </since_tizen>
1545 public PropertyValue(Rectangle vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_9(Rectangle.getCPtr(vectorValue)), true)
1547 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1550 internal PropertyValue(AngleAxis angleAxis) : this(NDalicPINVOKE.new_Property_Value__SWIG_10(AngleAxis.getCPtr(angleAxis)), true)
1552 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1556 /// Creates a Rotation property value.
1558 /// <param name="quaternion">Rotation values.</param>
1559 /// <since_tizen> 3 </since_tizen>
1560 public PropertyValue(Rotation quaternion) : this(NDalicPINVOKE.new_Property_Value__SWIG_11(Rotation.getCPtr(quaternion)), true)
1562 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1566 /// Creates a string property value.
1568 /// <param name="stringValue">A string.</param>
1569 /// <since_tizen> 3 </since_tizen>
1570 public PropertyValue(string stringValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_12(stringValue), true)
1572 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1576 /// Creates an array property value.
1578 /// <param name="arrayValue">An array.</param>
1579 /// <since_tizen> 3 </since_tizen>
1580 public PropertyValue(PropertyArray arrayValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_14(PropertyArray.getCPtr(arrayValue)), true)
1582 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1586 /// Creates a map property value.
1588 /// <param name="mapValue">An array.</param>
1589 /// <since_tizen> 3 </since_tizen>
1590 public PropertyValue(PropertyMap mapValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_15(PropertyMap.getCPtr(mapValue)), true)
1592 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1596 /// Creates a Extents value.
1598 /// <param name="extentsValue">A Extents value.</param>
1599 /// <since_tizen> 4 </since_tizen>
1600 public PropertyValue(Extents extentsValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_16(Extents.getCPtr(extentsValue)), true)
1602 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1606 /// Creates a PropertyType value.
1608 /// <param name="type">A PropertyType value.</param>
1609 /// <since_tizen> 3 </since_tizen>
1610 public PropertyValue(PropertyType type) : this(NDalicPINVOKE.new_Property_Value__SWIG_17((int)type), true)
1612 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1616 /// Creates a PropertyValue value.
1618 /// <param name="value">A PropertyValue value.</param>
1619 /// <since_tizen> 3 </since_tizen>
1620 public PropertyValue(PropertyValue value) : this(NDalicPINVOKE.new_Property_Value__SWIG_18(PropertyValue.getCPtr(value)), true)
1622 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1626 /// Queries the type of this property value.
1628 /// <returns>The type ID</returns>
1629 /// <since_tizen> 3 </since_tizen>
1630 public new PropertyType GetType()
1632 PropertyType ret = (PropertyType)NDalicPINVOKE.Property_Value_GetType(swigCPtr);
1633 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1638 /// Retrieves a boolean value.
1640 /// <param name="boolValue">On return, a boolean value.</param>
1641 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1642 /// <since_tizen> 3 </since_tizen>
1643 public bool Get(out bool boolValue)
1645 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_1(swigCPtr, out boolValue);
1646 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1651 /// Retrieves a floating-point value.
1653 /// <param name="floatValue">On return, a floating-point value.</param>
1654 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1655 /// <since_tizen> 3 </since_tizen>
1656 public bool Get(out float floatValue)
1658 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_2(swigCPtr, out floatValue);
1659 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1664 /// Retrieves an integer value.
1666 /// <param name="integerValue">On return, an integer value.</param>
1667 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1668 /// <since_tizen> 3 </since_tizen>
1669 public bool Get(out int integerValue)
1671 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_3(swigCPtr, out integerValue);
1672 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1677 /// Retrieves an integer rectangle.
1679 /// <param name="rect">On return, an integer rectangle.</param>
1680 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1681 /// <since_tizen> 3 </since_tizen>
1682 public bool Get(Rectangle rect)
1684 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_4(swigCPtr, Rectangle.getCPtr(rect));
1685 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1690 /// Retrieves a vector value.
1692 /// <param name="vectorValue">On return, a vector value.</param>
1693 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1694 /// <since_tizen> 3 </since_tizen>
1695 public bool Get(Vector2 vectorValue)
1697 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Vector2.getCPtr(vectorValue));
1698 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1703 /// Retrieves a vector value.
1705 /// <param name="vectorValue">On return, a vector value.</param>
1706 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1707 /// <since_tizen> 3 </since_tizen>
1708 public bool Get(Vector3 vectorValue)
1710 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Vector3.getCPtr(vectorValue));
1711 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1716 /// Retrieves a vector value.
1718 /// <param name="vectorValue">On return, a vector value.</param>
1719 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1720 /// <since_tizen> 3 </since_tizen>
1721 public bool Get(Vector4 vectorValue)
1723 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Vector4.getCPtr(vectorValue));
1724 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1729 /// Retrieves a vector value.
1731 /// <param name="vectorValue">On return, a vector value.</param>
1732 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1733 /// <since_tizen> 5 </since_tizen>
1734 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1735 [EditorBrowsable(EditorBrowsableState.Never)]
1736 public bool Get(RelativeVector2 vectorValue)
1738 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, RelativeVector2.getCPtr(vectorValue));
1739 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1744 /// Retrieves a vector value.
1746 /// <param name="vectorValue">On return, a vector value.</param>
1747 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1748 /// <since_tizen> 5 </since_tizen>
1749 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1750 [EditorBrowsable(EditorBrowsableState.Never)]
1751 public bool Get(RelativeVector3 vectorValue)
1753 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, RelativeVector3.getCPtr(vectorValue));
1754 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1759 /// Retrieves a vector value.
1761 /// <param name="vectorValue">On return, a vector value.</param>
1762 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1763 /// <since_tizen> 5 </since_tizen>
1764 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1765 [EditorBrowsable(EditorBrowsableState.Never)]
1766 public bool Get(RelativeVector4 vectorValue)
1768 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, RelativeVector4.getCPtr(vectorValue));
1769 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1773 internal bool Get(Matrix3 matrixValue)
1775 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_8(swigCPtr, Matrix3.getCPtr(matrixValue));
1776 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1780 internal bool Get(Matrix matrixValue)
1782 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_9(swigCPtr, Matrix.getCPtr(matrixValue));
1783 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1787 internal bool Get(AngleAxis angleAxisValue)
1789 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_10(swigCPtr, AngleAxis.getCPtr(angleAxisValue));
1790 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1795 /// Retrieves a rotation value.
1797 /// <param name="quaternionValue">On return, a rotation value.</param>
1798 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1799 /// <since_tizen> 3 </since_tizen>
1800 public bool Get(Rotation quaternionValue)
1802 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_11(swigCPtr, Rotation.getCPtr(quaternionValue));
1803 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1808 /// Retrieves a string property value.
1810 /// <param name="stringValue">On return, a string.</param>
1811 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1812 /// <since_tizen> 3 </since_tizen>
1813 public bool Get(out string stringValue)
1815 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_12(swigCPtr, out stringValue);
1816 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1821 /// Retrieves an array property value.
1823 /// <param name="arrayValue">On return, the array as a vector property values.</param>
1824 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1825 /// <since_tizen> 3 </since_tizen>
1826 public bool Get(PropertyArray arrayValue)
1828 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_13(swigCPtr, PropertyArray.getCPtr(arrayValue));
1829 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1834 /// Retrieves a map property value.
1836 /// <param name="mapValue">On return, the map as vector of string and property value pairs.</param>
1837 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1838 /// <since_tizen> 3 </since_tizen>
1839 public bool Get(PropertyMap mapValue)
1841 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_14(swigCPtr, PropertyMap.getCPtr(mapValue));
1842 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1847 /// Retrieves a Extents value.
1849 /// <param name="extentsValue">On return, a extents.</param>
1850 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1851 /// <since_tizen> 4 </since_tizen>
1852 public bool Get(Extents extentsValue)
1854 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_15(swigCPtr, Extents.getCPtr(extentsValue));
1855 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1863 public class KeyValue
1865 private string _key = null;
1866 private object _originalValue = null;
1867 private object _originalKey = null;
1872 public int? KeyInt = null;
1877 public string KeyString = null;
1882 public PropertyValue TrueValue = null;
1885 /// Default Constructor.
1907 /// OriginalKey property.
1909 public object OriginalKey
1913 return _originalKey;
1917 _originalKey = value;
1918 if (value is int || value is Int32)
1920 KeyInt = (int)value;
1922 else if (value is string)
1924 KeyString = value.ToString();
1926 else if (value.GetType().Equals(typeof(int)) || value.GetType().Equals(typeof(Int32)))
1928 KeyInt = (int)value;
1930 else if (value.GetType().Equals(typeof(string)))
1932 KeyString = value.ToString();
1944 return _originalValue;
1948 _originalValue = value;
1949 TrueValue = PropertyValue.CreateFromObject(value);
1954 /// IntergerValue property.
1956 public int IntergerValue
1960 TrueValue = new PropertyValue(value);
1965 /// BooleanValue property.
1967 public bool BooleanValue
1971 TrueValue = new PropertyValue(value);
1976 /// SingleValue property.
1978 public float SingleValue
1982 TrueValue = new PropertyValue(value);
1987 /// StringValue property.
1989 public string StringValue
1993 TrueValue = new PropertyValue(value);
1998 /// Vector2Value property.
2000 public Vector2 Vector2Value
2004 TrueValue = new PropertyValue(value);
2009 /// Vector3Value property.
2011 public Vector3 Vector3Value
2015 TrueValue = new PropertyValue(value);
2020 /// Vector4Value property.
2022 public Vector4 Vector4Value
2026 TrueValue = new PropertyValue(value);
2031 /// PositionValue property.
2033 public Position PositionValue
2037 TrueValue = new PropertyValue(value);
2042 /// Position2DValue property.
2044 public Position2D Position2DValue
2048 TrueValue = new PropertyValue(value);
2053 /// SizeValue property.
2055 public Size SizeValue
2059 TrueValue = new PropertyValue(value);
2064 /// Size2DValue property.
2066 public Size2D Size2DValue
2070 TrueValue = new PropertyValue(value);
2075 /// ColorValue property.
2077 public Color ColorValue
2081 TrueValue = new PropertyValue(value);
2086 /// RectangleValue property.
2088 public Rectangle RectangleValue
2092 TrueValue = new PropertyValue(value);
2097 /// RotationValue property.
2099 public Rotation RotationValue
2103 TrueValue = new PropertyValue(value);
2108 /// RelativeVector2Value property.
2110 public RelativeVector2 RelativeVector2Value
2114 TrueValue = new PropertyValue(value);
2119 /// RelativeVector3Value property.
2121 public RelativeVector3 RelativeVector3Value
2125 TrueValue = new PropertyValue(value);
2130 /// RelativeVector4Value property.
2132 public RelativeVector4 RelativeVector4Value
2136 TrueValue = new PropertyValue(value);
2141 /// ExtentsValue property.
2143 public Extents ExtentsValue
2147 TrueValue = new PropertyValue(value);
2152 /// PropertyArrayValue property.
2154 public PropertyArray PropertyArrayValue
2158 TrueValue = new PropertyValue(value);
2163 /// PropertyMapValue property.
2165 public PropertyMap PropertyMapValue
2169 TrueValue = new PropertyValue(value);
2173 private void ParseKey(string key)
2176 if (VisualExtension.KeyDictionary.ContainsKey(key))
2178 VisualExtension.KeyDictionary.TryGetValue(key, out v);